mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Merge pull request #4101 from mfilser/popup_fixes_archive_cards_attachement_etc
Popup fixes: Archive cards, upload attachements etc
This commit is contained in:
commit
4c9d10f7a7
3 changed files with 7 additions and 7 deletions
|
@ -692,7 +692,7 @@ Template.cardDetailsActionsPopup.events({
|
|||
this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
|
||||
},
|
||||
'click .js-archive': Popup.afterConfirm('cardArchive', function () {
|
||||
Popup.back();
|
||||
Popup.close();
|
||||
this.archive();
|
||||
Utils.goBoardId(this.boardId);
|
||||
}),
|
||||
|
@ -701,7 +701,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.back();
|
||||
if (!err && ret) Popup.close();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -1007,7 +1007,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-submit'() {
|
||||
this.currentCard.setColor(this.currentColor.get());
|
||||
Popup.back();
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-remove-color'() {
|
||||
this.currentCard.setColor(null);
|
||||
|
|
|
@ -55,7 +55,7 @@ BlazeComponent.extendComponent({
|
|||
*/
|
||||
cardLabelsPopup(event) {
|
||||
if (this.find('.js-card-label:hover')) {
|
||||
Popup.open("cardLabels")(event, this.currentData());
|
||||
Popup.open("cardLabels")(event, {dataContextIfCurrentDataIsUndefined: this.currentData()});
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ window.Popup = new (class {
|
|||
}
|
||||
/** opens the popup
|
||||
* @param evt the current event
|
||||
* @param dataContextIfCurrentDataIsUndefined use this dataContext if this.currentData() is undefined
|
||||
* @param options options (dataContextIfCurrentDataIsUndefined use this dataContext if this.currentData() is undefined)
|
||||
*/
|
||||
return function(evt, dataContextIfCurrentDataIsUndefined) {
|
||||
return function(evt, options) {
|
||||
// If a popup is already opened, clicking again on the opener element
|
||||
// should close it -- and interrupt the current `open` function.
|
||||
if (self.isOpen()) {
|
||||
|
@ -71,7 +71,7 @@ window.Popup = new (class {
|
|||
title: self._getTitle(popupName),
|
||||
depth: self._stack.length,
|
||||
offset: self._getOffset(openerElement),
|
||||
dataContext: (this && this.currentData && this.currentData()) || dataContextIfCurrentDataIsUndefined || this,
|
||||
dataContext: (this && this.currentData && this.currentData()) || (options && options.dataContextIfCurrentDataIsUndefined) || this,
|
||||
});
|
||||
|
||||
// If there are no popup currently opened we use the Blaze API to render
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue