diff options
author | Thiago Fernando <thiagofernando@outlook.com> | 2019-05-10 14:54:25 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-10 14:54:25 -0300 |
commit | ce0473480bab3fc621d4baecfff0f413e21b5e2c (patch) | |
tree | 06d724b4f80885bdd13137f7977d7a914cca0138 /client/lib/modal.js | |
parent | c43508cacbd64357409a3de114db9dab2ae59a9d (diff) | |
parent | 7ff4067e88ed59686c86d81447fa2ce550032034 (diff) | |
download | wekan-ce0473480bab3fc621d4baecfff0f413e21b5e2c.tar.gz wekan-ce0473480bab3fc621d4baecfff0f413e21b5e2c.tar.bz2 wekan-ce0473480bab3fc621d4baecfff0f413e21b5e2c.zip |
Merge pull request #1 from wekan/devel
ldap changes
Diffstat (limited to 'client/lib/modal.js')
-rw-r--r-- | client/lib/modal.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/client/lib/modal.js b/client/lib/modal.js index d5350264..3c27a179 100644 --- a/client/lib/modal.js +++ b/client/lib/modal.js @@ -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' } ); |