summaryrefslogtreecommitdiffstats
path: root/client/lib/modal.js
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-16 16:54:29 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-16 16:54:29 +0200
commit9c6d374b950e8c4bd0c1c905cf36c953581a3156 (patch)
treeff2667017f5a30931bbef6807dfbff08ac5b2513 /client/lib/modal.js
parent99e7c659072943b80b08564465ee8cb5c90d3905 (diff)
downloadwekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.tar.gz
wekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.tar.bz2
wekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.zip
Labels activities
Diffstat (limited to 'client/lib/modal.js')
-rw-r--r--client/lib/modal.js14
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' }
);