mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Merge branch 'fixDragInListsView' of https://github.com/andresmanelli/wekan into andresmanelli-fixDragInListsView
This commit is contained in:
commit
4505495762
3 changed files with 99 additions and 88 deletions
|
|
@ -1,13 +0,0 @@
|
|||
BlazeComponent.extendComponent({
|
||||
currentCardIsInThisList(listId, swimlaneId) {
|
||||
const currentCard = Cards.findOne(Session.get('currentCard'));
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
if (board.view === 'board-view-lists')
|
||||
return currentCard && currentCard.listId === listId;
|
||||
else if (board.view === 'board-view-swimlanes')
|
||||
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
||||
else
|
||||
return false;
|
||||
},
|
||||
}).register('listsGroup');
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
const { calculateIndex } = Utils;
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onRendered() {
|
||||
const boardComponent = this.parentComponent();
|
||||
const $listsDom = this.$('.js-lists');
|
||||
|
||||
if (!Session.get('currentCard')) {
|
||||
boardComponent.scrollLeft();
|
||||
}
|
||||
function currentCardIsInThisList(listId, swimlaneId) {
|
||||
const currentCard = Cards.findOne(Session.get('currentCard'));
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
if (board.view === 'board-view-lists')
|
||||
return currentCard && currentCard.listId === listId;
|
||||
else if (board.view === 'board-view-swimlanes')
|
||||
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
||||
else
|
||||
return false;
|
||||
};
|
||||
|
||||
function initSortable(boardComponent, $listsDom) {
|
||||
// We want to animate the card details window closing. We rely on CSS
|
||||
// transition for the actual animation.
|
||||
$listsDom._uihooks = {
|
||||
|
|
@ -74,6 +78,18 @@ BlazeComponent.extendComponent({
|
|||
MultiSelection.isActive() || !userIsMember());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onRendered() {
|
||||
const boardComponent = this.parentComponent();
|
||||
const $listsDom = this.$('.js-lists');
|
||||
|
||||
if (!Session.get('currentCard')) {
|
||||
boardComponent.scrollLeft();
|
||||
}
|
||||
|
||||
initSortable(boardComponent, $listsDom);
|
||||
},
|
||||
onCreated() {
|
||||
this.draggingActive = new ReactiveVar(false);
|
||||
|
|
@ -87,15 +103,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
currentCardIsInThisList(listId, swimlaneId) {
|
||||
const currentCard = Cards.findOne(Session.get('currentCard'));
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
if (board.view === 'board-view-lists')
|
||||
return currentCard && currentCard.listId === listId;
|
||||
else if (board.view === 'board-view-swimlanes')
|
||||
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
||||
else
|
||||
return false;
|
||||
return currentCardIsInThisList(listId, swimlaneId);
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
@ -210,3 +218,19 @@ Template.swimlane.helpers({
|
|||
return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
currentCardIsInThisList(listId, swimlaneId) {
|
||||
return currentCardIsInThisList(listId, swimlaneId);
|
||||
},
|
||||
onRendered() {
|
||||
const boardComponent = this.parentComponent();
|
||||
const $listsDom = this.$('.js-lists');
|
||||
|
||||
if (!Session.get('currentCard')) {
|
||||
boardComponent.scrollLeft();
|
||||
}
|
||||
|
||||
initSortable(boardComponent, $listsDom);
|
||||
},
|
||||
}).register('listsGroup');
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
margin-top: 50px;
|
||||
font-weight: bold;
|
||||
min-height: 9px;
|
||||
min-width: 30px;
|
||||
width: 50px;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue