mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Merge pull request #4071 from mfilser/card_popup_search_and_global_search
Card popup search and global search
This commit is contained in:
commit
552e99d460
29 changed files with 192 additions and 181 deletions
|
@ -269,7 +269,7 @@ Template.addReactionPopup.events({
|
|||
const cardComment = CardComments.findOne({_id: commentId});
|
||||
cardComment.toggleReaction(codepoint);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
|
|||
Utils.goBoardId(board._id);
|
||||
},
|
||||
'click .js-delete-board': Popup.afterConfirm('boardDelete', function() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
const isSandstorm =
|
||||
Meteor.settings &&
|
||||
Meteor.settings.public &&
|
||||
|
|
|
@ -7,11 +7,11 @@ Template.boardMenuPopup.events({
|
|||
'click .js-rename-board': Popup.open('boardChangeTitle'),
|
||||
'click .js-custom-fields'() {
|
||||
Sidebar.setView('customFields');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-archives'() {
|
||||
Sidebar.setView('archives');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-change-board-color': Popup.open('boardChangeColor'),
|
||||
'click .js-change-language': Popup.open('changeLanguage'),
|
||||
|
@ -24,7 +24,7 @@ Template.boardMenuPopup.events({
|
|||
}),
|
||||
'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
Boards.remove(currentBoard._id);
|
||||
FlowRouter.go('home');
|
||||
}),
|
||||
|
@ -47,7 +47,7 @@ Template.boardChangeTitlePopup.events({
|
|||
if (newTitle) {
|
||||
this.rename(newTitle);
|
||||
this.setDescription(newDesc);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
event.preventDefault();
|
||||
},
|
||||
|
@ -173,15 +173,15 @@ Template.boardHeaderBar.helpers({
|
|||
Template.boardChangeViewPopup.events({
|
||||
'click .js-open-lists-view'() {
|
||||
Utils.setBoardView('board-view-lists');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-swimlanes-view'() {
|
||||
Utils.setBoardView('board-view-swimlanes');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-cal-view'() {
|
||||
Utils.setBoardView('board-view-cal');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -327,7 +327,7 @@ BlazeComponent.extendComponent({
|
|||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
const visibility = this.currentData();
|
||||
currentBoard.setVisibility(visibility);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
|
||||
events() {
|
||||
|
@ -360,7 +360,7 @@ BlazeComponent.extendComponent({
|
|||
Session.get('currentBoard'),
|
||||
level,
|
||||
(err, ret) => {
|
||||
if (!err && ret) Popup.close();
|
||||
if (!err && ret) Popup.back();
|
||||
},
|
||||
);
|
||||
},
|
||||
|
@ -432,7 +432,7 @@ BlazeComponent.extendComponent({
|
|||
const direction = down ? -1 : 1;
|
||||
this.setSortBy([sortby, direction]);
|
||||
if (Utils.isMiniScreen) {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -451,7 +451,7 @@ BlazeComponent.extendComponent({
|
|||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('due-date'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-sort-title'() {
|
||||
const sortBy = {
|
||||
|
@ -459,7 +459,7 @@ BlazeComponent.extendComponent({
|
|||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('title'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-sort-created-asc'() {
|
||||
const sortBy = {
|
||||
|
@ -467,7 +467,7 @@ BlazeComponent.extendComponent({
|
|||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('date-created-newest-first'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-sort-created-desc'() {
|
||||
const sortBy = {
|
||||
|
@ -475,7 +475,7 @@ BlazeComponent.extendComponent({
|
|||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -4,7 +4,7 @@ Template.attachmentsGalery.events({
|
|||
'attachmentDelete',
|
||||
function() {
|
||||
Attachments.remove(this._id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
),
|
||||
// If we let this event bubble, FlowRouter will handle it and empty the page
|
||||
|
@ -53,7 +53,7 @@ Template.attachmentsGalery.helpers({
|
|||
|
||||
Template.previewAttachedImagePopup.events({
|
||||
'click .js-large-image-clicked'() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -65,7 +65,7 @@ Template.cardAttachmentsPopup.events({
|
|||
if (attachment && attachment._id && attachment.isImage()) {
|
||||
card.setCover(attachment._id);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -174,7 +174,7 @@ Template.previewClipboardImagePopup.events({
|
|||
|
||||
pastedResults = null;
|
||||
$(document.body).pasteImageReader(() => {});
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -8,26 +8,30 @@ template(name="cardDetails")
|
|||
+editCardTitleForm
|
||||
else
|
||||
unless isMiniScreen
|
||||
a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
|
||||
unless cardMaximized
|
||||
a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
|
||||
if cardMaximized
|
||||
a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
|
||||
unless isPopup
|
||||
a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
|
||||
if cardMaximized
|
||||
a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
|
||||
else
|
||||
a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
|
||||
if currentUser.isBoardMember
|
||||
a.fa.fa-navicon.card-details-menu.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
|
||||
input.inline-input(type="text" id="cardURL_copy" value="{{ originRelativeUrl }}")
|
||||
a.fa.fa-link.card-copy-button.js-copy-link(
|
||||
id="cardURL_copy"
|
||||
class="fa-link"
|
||||
title="{{_ 'copy-card-link-to-clipboard'}}"
|
||||
href="{{ originRelativeUrl }}"
|
||||
)
|
||||
if isMiniScreen
|
||||
else
|
||||
unless isPopup
|
||||
a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
|
||||
if currentUser.isBoardMember
|
||||
a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
|
||||
a.fa.fa-link.card-copy-mobile-button(
|
||||
a.fa.fa-link.card-copy-mobile-button.js-copy-link(
|
||||
id="cardURL_copy"
|
||||
class="fa-link"
|
||||
title="{{_ 'copy-card-link-to-clipboard'}}"
|
||||
href="{{ originRelativeUrl }}"
|
||||
)
|
||||
h2.card-details-title.js-card-title(
|
||||
class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")
|
||||
|
|
|
@ -323,7 +323,8 @@ BlazeComponent.extendComponent({
|
|||
'click .js-close-card-details'() {
|
||||
Utils.goBoardId(this.data().boardId);
|
||||
},
|
||||
'click .js-copy-link'() {
|
||||
'click .js-copy-link'(event) {
|
||||
event.preventDefault();
|
||||
const StringToCopyElement = document.getElementById('cardURL_copy');
|
||||
StringToCopyElement.value =
|
||||
window.location.origin + window.location.pathname;
|
||||
|
@ -680,6 +681,7 @@ Template.cardDetailsActionsPopup.events({
|
|||
.map((c) => c.sort),
|
||||
);
|
||||
this.move(this.boardId, this.swimlaneId, this.listId, minOrder - 1);
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-move-card-to-bottom'(event) {
|
||||
event.preventDefault();
|
||||
|
@ -691,7 +693,7 @@ Template.cardDetailsActionsPopup.events({
|
|||
this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
|
||||
},
|
||||
'click .js-archive': Popup.afterConfirm('cardArchive', function () {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
this.archive();
|
||||
Utils.goBoardId(this.boardId);
|
||||
}),
|
||||
|
@ -700,7 +702,7 @@ Template.cardDetailsActionsPopup.events({
|
|||
const currentCard = this;
|
||||
const level = currentCard.findWatcher(Meteor.userId()) ? null : 'watching';
|
||||
Meteor.call('watch', 'card', currentCard._id, level, (err, ret) => {
|
||||
if (!err && ret) Popup.close();
|
||||
if (!err && ret) Popup.back();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -819,7 +821,13 @@ Template.moveCardPopup.events({
|
|||
const slSelect = $('.js-select-swimlanes')[0];
|
||||
const swimlaneId = slSelect.options[slSelect.selectedIndex].value;
|
||||
card.move(boardId, swimlaneId, listId, 0);
|
||||
Popup.close();
|
||||
|
||||
// set new id's to card object in case the card is moved to top by the comment "moveCard" after this command (.js-move-card)
|
||||
this.boardId = boardId;
|
||||
this.swimlaneId = swimlaneId;
|
||||
this.listId = listId;
|
||||
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
BlazeComponent.extendComponent({
|
||||
|
@ -887,7 +895,7 @@ Template.copyCardPopup.events({
|
|||
// See https://github.com/wekan/wekan/issues/80
|
||||
Filter.addException(_id);
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -914,7 +922,7 @@ Template.convertChecklistItemToCardPopup.events({
|
|||
});
|
||||
Filter.addException(_id);
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
|
||||
}
|
||||
},
|
||||
|
@ -970,7 +978,7 @@ Template.copyChecklistToManyCardsPopup.events({
|
|||
cmt.copy(_id);
|
||||
});
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -1000,11 +1008,11 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-submit'() {
|
||||
this.currentCard.setColor(this.currentColor.get());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-remove-color'() {
|
||||
this.currentCard.setColor(null);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1106,7 +1114,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
'click .js-delete': Popup.afterConfirm('cardDelete', function () {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
// verify that there are no linked cards
|
||||
if (Cards.find({ linkedId: this._id }).count() === 0) {
|
||||
Cards.remove(this._id);
|
||||
|
@ -1173,12 +1181,12 @@ BlazeComponent.extendComponent({
|
|||
if (endString) {
|
||||
this.currentCard.setVoteEnd(endString);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-remove-vote': Popup.afterConfirm('deleteVote', () => {
|
||||
event.preventDefault();
|
||||
this.currentCard.unsetVote();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
'click a.js-toggle-vote-public'(event) {
|
||||
event.preventDefault();
|
||||
|
@ -1218,7 +1226,7 @@ BlazeComponent.extendComponent({
|
|||
// if active vote - store it
|
||||
if (this.currentData().getVoteQuestion()) {
|
||||
this._storeDate(newDate.toDate());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
} else {
|
||||
this.currentData().vote = { end: newDate.toDate() }; // set vote end temp
|
||||
Popup.back();
|
||||
|
@ -1252,86 +1260,77 @@ BlazeComponent.extendComponent({
|
|||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(usaDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (euroAmDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(euroAmDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (euro24hDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(euro24hDate.toDate());
|
||||
this.card.setPokerEnd(euro24hDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (eurodotDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(eurodotDate.toDate());
|
||||
this.card.setPokerEnd(eurodotDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (minusDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(minusDate.toDate());
|
||||
this.card.setPokerEnd(minusDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (slashDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(slashDate.toDate());
|
||||
this.card.setPokerEnd(slashDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (dotDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(dotDate.toDate());
|
||||
this.card.setPokerEnd(dotDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (brezhonegDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(brezhonegDate.toDate());
|
||||
this.card.setPokerEnd(brezhonegDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (hrvatskiDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(hrvatskiDate.toDate());
|
||||
this.card.setPokerEnd(hrvatskiDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
|
@ -1341,41 +1340,37 @@ BlazeComponent.extendComponent({
|
|||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(latviaDate.toDate());
|
||||
this.card.setPokerEnd(latviaDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (nederlandsDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(nederlandsDate.toDate());
|
||||
this.card.setPokerEnd(nederlandsDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (greekDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(greekDate.toDate());
|
||||
this.card.setPokerEnd(greekDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (macedonianDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(macedonianDate.toDate());
|
||||
this.card.setPokerEnd(macedonianDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else {
|
||||
this.error.set('invalid-date');
|
||||
evt.target.date.focus();
|
||||
|
@ -1384,7 +1379,7 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-date'(evt) {
|
||||
evt.preventDefault();
|
||||
this._deleteDate();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1422,11 +1417,11 @@ BlazeComponent.extendComponent({
|
|||
if (endString) {
|
||||
this.currentCard.setPokerEnd(endString);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-remove-poker': Popup.afterConfirm('deletePoker', (event) => {
|
||||
this.currentCard.unsetPoker();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
'click a.js-toggle-poker-allow-non-members'(event) {
|
||||
event.preventDefault();
|
||||
|
@ -1489,7 +1484,7 @@ BlazeComponent.extendComponent({
|
|||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(newDate.toDate());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
} else {
|
||||
this.currentData().poker = { end: newDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
|
@ -1521,130 +1516,117 @@ BlazeComponent.extendComponent({
|
|||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(usaDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: usaDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (euroAmDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(euroAmDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: euroAmDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (euro24hDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(euro24hDate.toDate());
|
||||
this.card.setPokerEnd(euro24hDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: euro24hDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (eurodotDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(eurodotDate.toDate());
|
||||
this.card.setPokerEnd(eurodotDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: eurodotDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (minusDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(minusDate.toDate());
|
||||
this.card.setPokerEnd(minusDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: minusDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (slashDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(slashDate.toDate());
|
||||
this.card.setPokerEnd(slashDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: slashDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (dotDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(dotDate.toDate());
|
||||
this.card.setPokerEnd(dotDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: dotDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (brezhonegDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(brezhonegDate.toDate());
|
||||
this.card.setPokerEnd(brezhonegDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: brezhonegDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (hrvatskiDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(hrvatskiDate.toDate());
|
||||
this.card.setPokerEnd(hrvatskiDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: hrvatskiDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (latviaDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(latviaDate.toDate());
|
||||
this.card.setPokerEnd(latviaDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: latviaDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (nederlandsDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(nederlandsDate.toDate());
|
||||
this.card.setPokerEnd(nederlandsDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: nederlandsDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (greekDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(greekDate.toDate());
|
||||
this.card.setPokerEnd(greekDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: greekDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else if (macedonianDate.isValid()) {
|
||||
// if active poker - store it
|
||||
if (this.currentData().getPokerQuestion()) {
|
||||
this._storeDate(macedonianDate.toDate());
|
||||
this.card.setPokerEnd(macedonianDate.toDate());
|
||||
Popup.close();
|
||||
} else {
|
||||
this.currentData().poker = { end: macedonianDate.toDate() }; // set poker end temp
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
} else {
|
||||
// this.error.set('invalid-date);
|
||||
this.error.set('invalid-date' + ' ' + dateString);
|
||||
|
@ -1654,7 +1636,7 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-date'(evt) {
|
||||
evt.preventDefault();
|
||||
this._deleteDate();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1781,7 +1763,7 @@ Template.cardAssigneePopup.helpers({
|
|||
Template.cardAssigneePopup.events({
|
||||
'click .js-remove-assignee'() {
|
||||
Cards.findOne(this.cardId).unassignAssignee(this.userId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-edit-profile': Popup.open('editProfile'),
|
||||
});
|
||||
|
|
|
@ -4,15 +4,6 @@
|
|||
|
||||
avatar-radius = 50%
|
||||
|
||||
#cardURL_copy
|
||||
// Have clipboard text not visible by moving it to far left
|
||||
position: absolute
|
||||
left: -2000px
|
||||
top: 0px
|
||||
|
||||
#clipboard
|
||||
white-space: normal
|
||||
|
||||
.assignee
|
||||
border-radius: 3px
|
||||
display: block
|
||||
|
|
|
@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
if (spentTime >= 0) {
|
||||
this.storeTime(spentTime, isOvertime);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
} else {
|
||||
this.error.set('invalid-time');
|
||||
evt.target.time.focus();
|
||||
|
@ -43,7 +43,7 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-time'(evt) {
|
||||
evt.preventDefault();
|
||||
this.deleteTime();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click a.js-toggle-overtime': this.toggleOvertime,
|
||||
},
|
||||
|
|
|
@ -106,7 +106,7 @@ BlazeComponent.extendComponent({
|
|||
if (!Number.isNaN(sort)) {
|
||||
let card = this.data();
|
||||
card.move(card.boardId, card.swimlaneId, card.listId, sort);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
template(name="resultCard")
|
||||
.result-card-wrapper
|
||||
a.minicard-wrapper.card-title(href=originRelativeUrl)
|
||||
a.minicard-wrapper.js-minicard.card-title(href=originRelativeUrl)
|
||||
+minicard(this)
|
||||
//= card.title
|
||||
ul.result-card-context-list
|
||||
|
|
|
@ -5,7 +5,23 @@ Template.resultCard.helpers({
|
|||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
clickOnMiniCard(evt) {
|
||||
evt.preventDefault();
|
||||
Session.set('popupCard', this.currentData()._id);
|
||||
this.cardDetailsPopup(evt);
|
||||
},
|
||||
|
||||
cardDetailsPopup(event) {
|
||||
if (!Popup.isOpen()) {
|
||||
Popup.open("cardDetails")(event);
|
||||
}
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{}];
|
||||
return [
|
||||
{
|
||||
'click .js-minicard': this.clickOnMiniCard,
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('resultCard');
|
||||
|
|
|
@ -496,7 +496,7 @@ BlazeComponent.extendComponent({
|
|||
evt.preventDefault();
|
||||
const linkedId = $('.js-select-cards option:selected').val();
|
||||
if (!linkedId) {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
return;
|
||||
}
|
||||
const _id = Cards.insert({
|
||||
|
@ -511,7 +511,7 @@ BlazeComponent.extendComponent({
|
|||
linkedId,
|
||||
});
|
||||
Filter.addException(_id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-link-board'(evt) {
|
||||
//LINK BOARD
|
||||
|
@ -522,7 +522,7 @@ BlazeComponent.extendComponent({
|
|||
!impBoardId ||
|
||||
Cards.findOne({ linkedId: impBoardId, archived: false })
|
||||
) {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
return;
|
||||
}
|
||||
const _id = Cards.insert({
|
||||
|
@ -537,7 +537,7 @@ BlazeComponent.extendComponent({
|
|||
linkedId: impBoardId,
|
||||
});
|
||||
Filter.addException(_id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -584,7 +584,7 @@ BlazeComponent.extendComponent({
|
|||
});
|
||||
}
|
||||
if (!board) {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
return;
|
||||
}
|
||||
const boardId = board._id;
|
||||
|
@ -711,7 +711,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -145,19 +145,19 @@ Template.listActionPopup.events({
|
|||
'click .js-select-cards'() {
|
||||
const cardIds = this.allCards().map(card => card._id);
|
||||
MultiSelection.add(cardIds);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-toggle-watch-list'() {
|
||||
const currentList = this;
|
||||
const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching';
|
||||
Meteor.call('watch', 'list', currentList._id, level, (err, ret) => {
|
||||
if (!err && ret) Popup.close();
|
||||
if (!err && ret) Popup.back();
|
||||
});
|
||||
},
|
||||
'click .js-close-list'(event) {
|
||||
event.preventDefault();
|
||||
this.archive();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-set-wip-limit': Popup.open('setWipLimit'),
|
||||
'click .js-more': Popup.open('listMore'),
|
||||
|
@ -233,7 +233,7 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Template.listMorePopup.events({
|
||||
'click .js-delete': Popup.afterConfirm('listDelete', function() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
// TODO how can we avoid the fetch call?
|
||||
const allCards = this.allCards().fetch();
|
||||
const allCardIds = _.pluck(allCards, '_id');
|
||||
|
@ -299,11 +299,11 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-submit'() {
|
||||
this.currentList.setColor(this.currentColor.get());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-remove-color'() {
|
||||
this.currentList.setColor(null);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -38,12 +38,12 @@ BlazeComponent.extendComponent({
|
|||
{
|
||||
'click .js-due-cards-view-me'() {
|
||||
Utils.setDueCardsView('me');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
|
||||
'click .js-due-cards-view-all'() {
|
||||
Utils.setDueCardsView('all');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -232,7 +232,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-submit'() {
|
||||
this.colorButtonValue.set(this.currentColor.get());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -116,6 +116,6 @@ Template.boardCardTitlePopup.events({
|
|||
.trim();
|
||||
Popup.getOpenerComponent().setNameFilter(title);
|
||||
event.preventDefault();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
|
|
@ -562,7 +562,7 @@ Template.editOrgPopup.events({
|
|||
);
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -606,7 +606,7 @@ Template.editTeamPopup.events({
|
|||
);
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -721,7 +721,7 @@ Template.editUserPopup.events({
|
|||
} else {
|
||||
usernameMessageElement.hide();
|
||||
emailMessageElement.hide();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -735,7 +735,7 @@ Template.editUserPopup.events({
|
|||
}
|
||||
} else {
|
||||
usernameMessageElement.hide();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
});
|
||||
} else if (isChangeEmail) {
|
||||
|
@ -752,11 +752,11 @@ Template.editUserPopup.events({
|
|||
}
|
||||
} else {
|
||||
emailMessageElement.hide();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
);
|
||||
} else Popup.close();
|
||||
} else Popup.back();
|
||||
},
|
||||
'click #addUserOrg'(event) {
|
||||
event.preventDefault();
|
||||
|
@ -891,7 +891,7 @@ Template.newOrgPopup.events({
|
|||
orgWebsite,
|
||||
orgIsActive,
|
||||
);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -917,7 +917,7 @@ Template.newTeamPopup.events({
|
|||
teamWebsite,
|
||||
teamIsActive,
|
||||
);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -990,11 +990,11 @@ Template.newUserPopup.events({
|
|||
} else {
|
||||
usernameMessageElement.hide();
|
||||
emailMessageElement.hide();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click #addUserOrgNewUser'(event) {
|
||||
event.preventDefault();
|
||||
|
@ -1048,7 +1048,7 @@ Template.settingsOrgPopup.events({
|
|||
return;
|
||||
}
|
||||
Org.remove(this.orgId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ Template.settingsTeamPopup.events({
|
|||
return;
|
||||
}
|
||||
Team.remove(this.teamId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ Template.settingsUserPopup.events({
|
|||
//
|
||||
//
|
||||
*/
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -188,15 +188,15 @@ Template.boardMenuPopup.events({
|
|||
'click .js-rename-board': Popup.open('boardChangeTitle'),
|
||||
'click .js-open-rules-view'() {
|
||||
Modal.openWide('rulesMain');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-custom-fields'() {
|
||||
Sidebar.setView('customFields');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-archives'() {
|
||||
Sidebar.setView('archives');
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-change-board-color': Popup.open('boardChangeColor'),
|
||||
'click .js-change-language': Popup.open('changeLanguage'),
|
||||
|
@ -209,7 +209,7 @@ Template.boardMenuPopup.events({
|
|||
}),
|
||||
'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
Boards.remove(currentBoard._id);
|
||||
FlowRouter.go('home');
|
||||
}),
|
||||
|
@ -252,7 +252,7 @@ Template.boardMenuPopup.helpers({
|
|||
Template.memberPopup.events({
|
||||
'click .js-filter-member'() {
|
||||
Filter.members.toggle(this.userId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-change-role': Popup.open('changePermissions'),
|
||||
'click .js-remove-member': Popup.afterConfirm('removeMember', function() {
|
||||
|
@ -266,12 +266,12 @@ Template.memberPopup.events({
|
|||
card.unassignAssignee(memberId);
|
||||
});
|
||||
Boards.findOne(boardId).removeMember(memberId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
'click .js-leave-member': Popup.afterConfirm('leaveBoard', () => {
|
||||
const boardId = Session.get('currentBoard');
|
||||
Meteor.call('quitBoard', boardId, () => {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
FlowRouter.go('home');
|
||||
});
|
||||
}),
|
||||
|
@ -460,7 +460,7 @@ BlazeComponent.extendComponent({
|
|||
activities: ['all'],
|
||||
});
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1229,7 +1229,7 @@ BlazeComponent.extendComponent({
|
|||
self.setLoading(false);
|
||||
if (err) self.setError(err.error);
|
||||
else if (ret.email) self.setError('email-sent');
|
||||
else Popup.close();
|
||||
else Popup.back();
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1316,7 +1316,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1380,10 +1380,10 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Meteor.call('setBoardOrgs', boardOrganizations, currentBoard._id);
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click #cancelLeaveBoardBtn'(){
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1490,7 +1490,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1581,10 +1581,10 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Meteor.call('setBoardTeams', boardTeams, members, currentBoard._id);
|
||||
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click #cancelLeaveBoardTeamBtn'(){
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -94,13 +94,13 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
|
||||
const cardId = this._id;
|
||||
Cards.remove(cardId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
|
||||
this.archivedCards().forEach(card => {
|
||||
Cards.remove(card._id);
|
||||
});
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
|
||||
'click .js-restore-list'() {
|
||||
|
@ -115,13 +115,13 @@ BlazeComponent.extendComponent({
|
|||
|
||||
'click .js-delete-list': Popup.afterConfirm('listDelete', function() {
|
||||
this.remove();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
'click .js-delete-all-lists': Popup.afterConfirm('listDelete', () => {
|
||||
this.archivedLists().forEach(list => {
|
||||
list.remove();
|
||||
});
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}),
|
||||
|
||||
'click .js-restore-swimlane'() {
|
||||
|
@ -138,7 +138,7 @@ BlazeComponent.extendComponent({
|
|||
'swimlaneDelete',
|
||||
function() {
|
||||
this.remove();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
),
|
||||
'click .js-delete-all-swimlanes': Popup.afterConfirm(
|
||||
|
@ -147,7 +147,7 @@ BlazeComponent.extendComponent({
|
|||
this.archivedSwimlanes().forEach(swimlane => {
|
||||
swimlane.remove();
|
||||
});
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
),
|
||||
},
|
||||
|
|
|
@ -283,7 +283,7 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
|
|||
} else {
|
||||
CustomFields.remove(customField._id);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
),
|
||||
},
|
||||
|
@ -302,6 +302,6 @@ CreateCustomFieldPopup.register('createCustomFieldPopup');
|
|||
'submit'(evt) {
|
||||
const customFieldId = this._id;
|
||||
CustomFields.remove(customFieldId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
}
|
||||
});*/
|
||||
|
|
|
@ -171,22 +171,22 @@ Template.multiselectionSidebar.helpers({
|
|||
Template.disambiguateMultiLabelPopup.events({
|
||||
'click .js-remove-label'() {
|
||||
mutateSelectedCards('removeLabel', this._id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-add-label'() {
|
||||
mutateSelectedCards('addLabel', this._id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
Template.disambiguateMultiMemberPopup.events({
|
||||
'click .js-unassign-member'() {
|
||||
mutateSelectedCards('assignMember', this._id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-assign-member'() {
|
||||
mutateSelectedCards('unassignMember', this._id);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -3,10 +3,14 @@ template(name="searchSidebar")
|
|||
input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto")
|
||||
.list-body
|
||||
.minilists.clearfix.js-minilists
|
||||
hr
|
||||
{{_ 'lists' }}
|
||||
each (lists)
|
||||
a.minilist-wrapper.js-minilist(href=originRelativeUrl)
|
||||
+minilist(this)
|
||||
.minicards.clearfix.js-minicards
|
||||
each (results)
|
||||
hr
|
||||
{{_ 'cards' }}
|
||||
each (cards)
|
||||
a.minicard-wrapper.js-minicard(href=originRelativeUrl)
|
||||
+minicard(this)
|
||||
|
|
|
@ -3,7 +3,7 @@ BlazeComponent.extendComponent({
|
|||
this.term = new ReactiveVar('');
|
||||
},
|
||||
|
||||
results() {
|
||||
cards() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
return currentBoard.searchCards(this.term.get());
|
||||
},
|
||||
|
@ -13,9 +13,22 @@ BlazeComponent.extendComponent({
|
|||
return currentBoard.searchLists(this.term.get());
|
||||
},
|
||||
|
||||
clickOnMiniCard(evt) {
|
||||
evt.preventDefault();
|
||||
Session.set('popupCard', this.currentData()._id);
|
||||
this.cardDetailsPopup(evt);
|
||||
},
|
||||
|
||||
cardDetailsPopup(event) {
|
||||
if (!Popup.isOpen()) {
|
||||
Popup.open("cardDetails")(event);
|
||||
}
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .js-minicard': this.clickOnMiniCard,
|
||||
'submit .js-search-term-form'(evt) {
|
||||
evt.preventDefault();
|
||||
this.term.set(evt.target.searchTerm.value);
|
||||
|
|
|
@ -39,7 +39,7 @@ Template.swimlaneActionPopup.events({
|
|||
'click .js-close-swimlane'(event) {
|
||||
event.preventDefault();
|
||||
this.archive();
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-move-swimlane': Popup.open('moveSwimlane'),
|
||||
'click .js-copy-swimlane': Popup.open('copySwimlane'),
|
||||
|
@ -88,7 +88,7 @@ BlazeComponent.extendComponent({
|
|||
// XXX ideally, we should move the popup to the newly
|
||||
// created swimlane so a user can add more than one swimlane
|
||||
// with a minimum of interactions
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-swimlane-template': Popup.open('searchElement'),
|
||||
},
|
||||
|
@ -118,11 +118,11 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-submit'() {
|
||||
this.currentSwimlane.setColor(this.currentColor.get());
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-remove-color'() {
|
||||
this.currentSwimlane.setColor(null);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -327,7 +327,7 @@ class MoveSwimlaneComponent extends BlazeComponent {
|
|||
boardId = bSelect.options[bSelect.selectedIndex].value;
|
||||
Meteor.call(this.serverMethod, this.currentSwimlane._id, boardId);
|
||||
}
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -290,7 +290,7 @@ Template.cardMemberPopup.helpers({
|
|||
Template.cardMemberPopup.events({
|
||||
'click .js-remove-member'() {
|
||||
Cards.findOne(this.cardId).unassignMember(this.userId);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-edit-profile': Popup.open('editProfile'),
|
||||
});
|
||||
|
|
|
@ -34,10 +34,10 @@ Template.memberMenuPopup.helpers({
|
|||
|
||||
Template.memberMenuPopup.events({
|
||||
'click .js-my-cards'() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-due-cards'() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-archived-board'() {
|
||||
Modal.open('archivedBoards');
|
||||
|
@ -53,7 +53,7 @@ Template.memberMenuPopup.events({
|
|||
AccountsTemplates.logout();
|
||||
},
|
||||
'click .js-go-setting'() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -155,7 +155,7 @@ Template.editProfilePopup.events({
|
|||
} else Popup.back();
|
||||
},
|
||||
'click #deleteButton': Popup.afterConfirm('userDelete', function() {
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
Users.remove(Meteor.userId());
|
||||
AccountsTemplates.logout();
|
||||
}),
|
||||
|
|
|
@ -187,7 +187,7 @@ window.ExportHtml = Popup => {
|
|||
const boardSlug = getBoardSlug();
|
||||
|
||||
await addJsonExportToZip(zip, boardSlug);
|
||||
Popup.close();
|
||||
Popup.back();
|
||||
closeSidebar();
|
||||
cleanBoardHtml();
|
||||
|
||||
|
|
|
@ -713,6 +713,7 @@ function findCards(sessionId, query) {
|
|||
CustomFields.find({ _id: { $in: customFieldIds } }),
|
||||
Users.find({ _id: { $in: users } }, { fields: Users.safeFields }),
|
||||
Checklists.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||
ChecklistItems.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||
Attachments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||
CardComments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||
SessionData.find({ userId, sessionId }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue