mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Click on the page to escape the last action
This is a generalization of what we had for closing a popup by clicking outside of it. It now works for inlinedForms and detailsPane as well.
This commit is contained in:
parent
12919cbfc6
commit
92dd05d06d
17 changed files with 199 additions and 145 deletions
|
@ -78,7 +78,7 @@ MultiSelection = {
|
|||
|
||||
activate: function() {
|
||||
if (! this.isActive()) {
|
||||
EscapeActions.executeLowerThan('detailsPane');
|
||||
EscapeActions.executeUpTo('detailsPane');
|
||||
this._isActive.set(true);
|
||||
Sidebar.setView(this.sidebarView);
|
||||
Tracker.flush();
|
||||
|
@ -91,6 +91,7 @@ MultiSelection = {
|
|||
if (Sidebar && Sidebar.getView() === this.sidebarView) {
|
||||
Sidebar.setView();
|
||||
}
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -149,11 +150,7 @@ MultiSelection = {
|
|||
|
||||
Blaze.registerHelper('MultiSelection', MultiSelection);
|
||||
|
||||
EscapeActions.register('multiselection-disable',
|
||||
EscapeActions.register('multiselection',
|
||||
function() { MultiSelection.disable(); },
|
||||
function() { return MultiSelection.isActive(); }
|
||||
);
|
||||
|
||||
EscapeActions.register('multiselection-reset',
|
||||
function() { MultiSelection.reset(); }
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue