diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-06-29 08:38:52 -0400 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-06-29 08:38:52 -0400 |
commit | 40b782788afdf2d1cf5ecd9cf157526946f322c4 (patch) | |
tree | b0aa59515089e84d86449dc246a4c0efed0253e9 /client/lib/modal.js | |
parent | 100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff) | |
parent | 45163e2d2db3eb7c8b3edbdc133a9ea7e0594c5a (diff) | |
download | wekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.tar.gz wekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.tar.bz2 wekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.zip |
Merge branch 'justinr1234-linting' into meteor-1.8
Diffstat (limited to 'client/lib/modal.js')
-rw-r--r-- | client/lib/modal.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/client/lib/modal.js b/client/lib/modal.js index 3c27a179..1086734e 100644 --- a/client/lib/modal.js +++ b/client/lib/modal.js @@ -1,6 +1,6 @@ const closedValue = null; -window.Modal = new class { +window.Modal = new (class { constructor() { this._currentModal = new ReactiveVar(closedValue); this._onCloseGoTo = ''; @@ -21,7 +21,7 @@ window.Modal = new class { return this.getTemplateName() !== closedValue; } - isWide(){ + isWide() { return this._isWideModal; } @@ -32,23 +32,23 @@ window.Modal = new class { } } - openWide(modalName, { header = '', onCloseGoTo = ''} = {}) { + openWide(modalName, { header = '', onCloseGoTo = '' } = {}) { this._currentModal.set({ header, modalName }); this._onCloseGoTo = onCloseGoTo; this._isWideModal = true; } - open(modalName, { header = '', onCloseGoTo = ''} = {}) { + open(modalName, { header = '', onCloseGoTo = '' } = {}) { this._currentModal.set({ header, modalName }); this._onCloseGoTo = onCloseGoTo; - } -}(); +})(); Blaze.registerHelper('Modal', Modal); -EscapeActions.register('modalWindow', +EscapeActions.register( + 'modalWindow', () => Modal.close(), () => Modal.isOpen(), - { noClickEscapeOn: '.modal-container' } + { noClickEscapeOn: '.modal-container' }, ); |