summaryrefslogtreecommitdiffstats
path: root/client/lib/modal.js
diff options
context:
space:
mode:
authorXavier Priour <xavier.priour@bubblyware.com>2015-12-13 20:02:51 +0100
committerXavier Priour <xavier.priour@bubblyware.com>2015-12-13 20:02:51 +0100
commite304185c23014fe3a4511d213535549e4bfeb207 (patch)
tree1e3a33f06db36b52f9bbfafb6163a652883a0cdf /client/lib/modal.js
parent18697d45f652a119ba21b0cef42fbf732902bfa9 (diff)
parent0954cff5b470712210275a9c0699d85d6579ab54 (diff)
downloadwekan-e304185c23014fe3a4511d213535549e4bfeb207.tar.gz
wekan-e304185c23014fe3a4511d213535549e4bfeb207.tar.bz2
wekan-e304185c23014fe3a4511d213535549e4bfeb207.zip
Merge remote-tracking branch 'upstream/devel' into devel
Diffstat (limited to 'client/lib/modal.js')
-rw-r--r--client/lib/modal.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/lib/modal.js b/client/lib/modal.js
index e6301cb5..1ca8804b 100644
--- a/client/lib/modal.js
+++ b/client/lib/modal.js
@@ -6,8 +6,14 @@ window.Modal = new class {
this._onCloseGoTo = '';
}
+ getHeaderName() {
+ const currentModal = this._currentModal.get();
+ return currentModal && currentModal.header;
+ }
+
getTemplateName() {
- return this._currentModal.get();
+ const currentModal = this._currentModal.get();
+ return currentModal && currentModal.modalName;
}
isOpen() {
@@ -21,8 +27,8 @@ window.Modal = new class {
}
}
- open(modalName, { onCloseGoTo = ''} = {}) {
- this._currentModal.set(modalName);
+ open(modalName, { header = '', onCloseGoTo = ''} = {}) {
+ this._currentModal.set({ header, modalName });
this._onCloseGoTo = onCloseGoTo;
}
};