summaryrefslogtreecommitdiffstats
path: root/client/lib/modal.js
diff options
context:
space:
mode:
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;
}
};