mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 23:44:06 +01:00
Use Popup.back() instead of Popup.close() to get no conflicts if a Popup is opened as "Sub Popup"
- .back() is also .close() if there is no "popup layer" left
This commit is contained in:
parent
a59dfa8fc0
commit
b9250e4be4
17 changed files with 82 additions and 82 deletions
|
|
@ -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();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue