mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 07:01:47 +01:00
Merge pull request #4153 from marook/multi-selection-panel-opening
improve multi selection sidebar opening and closing
This commit is contained in:
commit
1975673152
1 changed files with 9 additions and 0 deletions
|
|
@ -60,6 +60,8 @@ MultiSelection = {
|
|||
|
||||
startRangeCardId: null,
|
||||
|
||||
_sidebarWasOpen: false,
|
||||
|
||||
reset() {
|
||||
this._selectedCards.set([]);
|
||||
},
|
||||
|
|
@ -84,11 +86,15 @@ MultiSelection = {
|
|||
|
||||
activate() {
|
||||
if (!this.isActive()) {
|
||||
this._sidebarWasOpen = Sidebar.isOpen();
|
||||
EscapeActions.executeUpTo('detailsPane');
|
||||
this._isActive.set(true);
|
||||
Tracker.flush();
|
||||
}
|
||||
Sidebar.setView(this.sidebarView);
|
||||
if(Utils.isMiniScreen()) {
|
||||
Sidebar.hide();
|
||||
}
|
||||
},
|
||||
|
||||
disable() {
|
||||
|
|
@ -96,6 +102,9 @@ MultiSelection = {
|
|||
this._isActive.set(false);
|
||||
if (Sidebar && Sidebar.getView() === this.sidebarView) {
|
||||
Sidebar.setView();
|
||||
if(!this._sidebarWasOpen) {
|
||||
Sidebar.hide();
|
||||
}
|
||||
}
|
||||
this.reset();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue