mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 22:58:48 +01:00
Labels activities
This commit is contained in:
parent
99e7c65907
commit
9c6d374b95
19 changed files with 480 additions and 60 deletions
|
|
@ -4,6 +4,7 @@ window.Modal = new class {
|
|||
constructor() {
|
||||
this._currentModal = new ReactiveVar(closedValue);
|
||||
this._onCloseGoTo = '';
|
||||
this._isWideModal = false;
|
||||
}
|
||||
|
||||
getHeaderName() {
|
||||
|
|
@ -20,6 +21,10 @@ window.Modal = new class {
|
|||
return this.getTemplateName() !== closedValue;
|
||||
}
|
||||
|
||||
isWide(){
|
||||
return this._isWideModal;
|
||||
}
|
||||
|
||||
close() {
|
||||
this._currentModal.set(closedValue);
|
||||
if (this._onCloseGoTo) {
|
||||
|
|
@ -27,9 +32,16 @@ window.Modal = new class {
|
|||
}
|
||||
}
|
||||
|
||||
openWide(modalName, { header = '', onCloseGoTo = ''} = {}) {
|
||||
this._currentModal.set({ header, modalName });
|
||||
this._onCloseGoTo = onCloseGoTo;
|
||||
this._isWideModal = true;
|
||||
}
|
||||
|
||||
open(modalName, { header = '', onCloseGoTo = ''} = {}) {
|
||||
this._currentModal.set({ header, modalName });
|
||||
this._onCloseGoTo = onCloseGoTo;
|
||||
|
||||
}
|
||||
}();
|
||||
|
||||
|
|
@ -38,5 +50,5 @@ Blaze.registerHelper('Modal', Modal);
|
|||
EscapeActions.register('modalWindow',
|
||||
() => Modal.close(),
|
||||
() => Modal.isOpen(),
|
||||
{ noClickEscapeOn: '.modal-content' }
|
||||
{ noClickEscapeOn: '.modal-container' }
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue