summaryrefslogtreecommitdiffstats
path: root/client/lib/modal.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-12-08 16:05:59 -0500
committerMaxime Quandalle <maxime@quandalle.com>2015-12-09 19:10:26 -0500
commit71b9a42f00d8871bb09944ec80979c61ad84e655 (patch)
tree4ede6eaaea591a0b1c797498a6a8daaaa6cac489 /client/lib/modal.js
parent3b2eb0ffa12a0b3cc2eaa0a1e26ed6532e3f5d93 (diff)
downloadwekan-71b9a42f00d8871bb09944ec80979c61ad84e655.tar.gz
wekan-71b9a42f00d8871bb09944ec80979c61ad84e655.tar.bz2
wekan-71b9a42f00d8871bb09944ec80979c61ad84e655.zip
Allow the header bar customization
This commit also provide a way to escape the Shorcuts page on Sandstorm.
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;
}
};