mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 23:51:48 +01:00
Merge branch 'devel'
This commit is contained in:
commit
5b98f139d1
3 changed files with 38 additions and 20 deletions
|
|
@ -22,7 +22,8 @@ and fixes the following bugs:
|
|||
- [Fix scroll when dragging elements. Remove scrollbars from swimlanes.](https://github.com/wekan/wekan/commit/ed8471be9b79243b016a275e5b11a6912717fbb9);
|
||||
- [Partial fix for scroll bar inside cardDetails](https://github.com/wekan/wekan/commit/ac7d44f8a8d809cd94ed5ef3640473f34c72403b);
|
||||
- [Fix swimlane header rotation on Google Chrome. After this change both Firefox 58 and Google Chrome 64
|
||||
have properly rotated swimlane header.](https://github.com/wekan/wekan/commit/9a1b1a5bedbe44827de109731a3c3b1a07790d3e).
|
||||
have properly rotated swimlane header.](https://github.com/wekan/wekan/commit/9a1b1a5bedbe44827de109731a3c3b1a07790d3e);
|
||||
- [Fix card copy and move with swimlanes](https://github.com/wekan/wekan/commit/4b53b0c90a57593c0fe2d808d2298e85f488bfa9).
|
||||
|
||||
Thanks to GitHub users andresmanelli, GhassenRjab, kubiko, lumatijev, lunatic4ever and xet7 for their contributions.
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ template(name="copyChecklistToManyCardsPopup")
|
|||
+boardsAndLists
|
||||
|
||||
template(name="boardsAndLists")
|
||||
label {{_ 'boards'}}:
|
||||
select.js-select-boards
|
||||
each boards
|
||||
if $eq _id currentBoard._id
|
||||
|
|
@ -173,14 +174,18 @@ template(name="boardsAndLists")
|
|||
else
|
||||
option(value="{{_id}}") {{title}}
|
||||
|
||||
label {{_ 'swimlanes'}}:
|
||||
select.js-select-swimlanes
|
||||
each swimlanes
|
||||
option(value="{{_id}}") {{title}}
|
||||
|
||||
label {{_ 'lists'}}:
|
||||
ul.pop-over-list
|
||||
select.js-select-lists
|
||||
each aBoardLists
|
||||
li
|
||||
if $eq ../_id _id
|
||||
a.disabled {{title}} ({{_ 'current'}})
|
||||
else
|
||||
a.js-select-list= title
|
||||
option(value="{{_id}}") {{title}}
|
||||
|
||||
.edit-controls.clearfix
|
||||
button.primary.confirm.js-done {{_ 'done'}}
|
||||
|
||||
template(name="cardMembersPopup")
|
||||
ul.pop-over-list.js-card-member-list
|
||||
|
|
|
|||
|
|
@ -211,11 +211,14 @@ Template.editCardTitleForm.events({
|
|||
});
|
||||
|
||||
Template.moveCardPopup.events({
|
||||
'click .js-select-list' () {
|
||||
'click .js-done' () {
|
||||
// XXX We should *not* get the currentCard from the global state, but
|
||||
// instead from a “component” state.
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const newListId = this._id;
|
||||
const lSelect = $('.js-select-lists')[0];
|
||||
const newListId = lSelect.options[lSelect.selectedIndex].value;
|
||||
const slSelect = $('.js-select-swimlanes')[0];
|
||||
card.swimlaneId = slSelect.options[slSelect.selectedIndex].value;
|
||||
card.move(card.swimlaneId, newListId, 0);
|
||||
Popup.close();
|
||||
},
|
||||
|
|
@ -223,7 +226,8 @@ Template.moveCardPopup.events({
|
|||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.selectedBoard = new ReactiveVar(Session.get('currentBoard'));
|
||||
subManager.subscribe('board', Session.get('currentBoard'));
|
||||
this.selectedBoardId = new ReactiveVar(Session.get('currentBoard'));
|
||||
},
|
||||
|
||||
boards() {
|
||||
|
|
@ -236,32 +240,41 @@ BlazeComponent.extendComponent({
|
|||
return boards;
|
||||
},
|
||||
|
||||
swimlanes() {
|
||||
const board = Boards.findOne(this.selectedBoardId.get());
|
||||
return board.swimlanes();
|
||||
},
|
||||
|
||||
aBoardLists() {
|
||||
subManager.subscribe('board', this.selectedBoard.get());
|
||||
const board = Boards.findOne(this.selectedBoard.get());
|
||||
const board = Boards.findOne(this.selectedBoardId.get());
|
||||
return board.lists();
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
'change .js-select-boards'(evt) {
|
||||
this.selectedBoard.set($(evt.currentTarget).val());
|
||||
this.selectedBoardId.set($(evt.currentTarget).val());
|
||||
subManager.subscribe('board', this.selectedBoardId.get());
|
||||
},
|
||||
}];
|
||||
},
|
||||
}).register('boardsAndLists');
|
||||
|
||||
Template.copyCardPopup.events({
|
||||
'click .js-select-list' (evt) {
|
||||
'click .js-done'() {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const oldId = card._id;
|
||||
card._id = null;
|
||||
card.listId = this._id;
|
||||
const list = Lists.findOne(card.listId);
|
||||
card.boardId = list.boardId;
|
||||
const textarea = $(evt.currentTarget).parents('.content').find('textarea');
|
||||
const lSelect = $('.js-select-lists')[0];
|
||||
card.listId = lSelect.options[lSelect.selectedIndex].value;
|
||||
const slSelect = $('.js-select-swimlanes')[0];
|
||||
card.swimlaneId = slSelect.options[slSelect.selectedIndex].value;
|
||||
const bSelect = $('.js-select-boards')[0];
|
||||
card.boardId = bSelect.options[bSelect.selectedIndex].value;
|
||||
const textarea = $('#copy-card-title');
|
||||
const title = textarea.val().trim();
|
||||
// insert new card to the bottom of new list
|
||||
card.sort = Lists.findOne(this._id).cards().count();
|
||||
card.sort = Lists.findOne(card.listId).cards().count();
|
||||
|
||||
if (title) {
|
||||
card.title = title;
|
||||
|
|
@ -297,7 +310,6 @@ Template.copyCardPopup.events({
|
|||
},
|
||||
});
|
||||
|
||||
|
||||
Template.copyChecklistToManyCardsPopup.events({
|
||||
'click .js-select-list' (evt) {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue