diff options
Diffstat (limited to 'client/components/modal')
-rw-r--r-- | client/components/modal/events.js | 14 | ||||
-rw-r--r-- | client/components/modal/helpers.js | 0 | ||||
-rw-r--r-- | client/components/modal/modal.tpl.jade | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/client/components/modal/events.js b/client/components/modal/events.js new file mode 100644 index 00000000..2943f841 --- /dev/null +++ b/client/components/modal/events.js @@ -0,0 +1,14 @@ +Template.modal.events({ + 'click .window-overlay': function(event) { + // We only want to catch the event if the user click on the .window-overlay + // div itself, not a child (ie, not the overlay window) + if (event.target !== event.currentTarget) + return; + Utils.goBoardId(this.card.board()._id); + event.preventDefault(); + }, + 'click .js-close-window': function(event) { + Utils.goBoardId(this.card.board()._id); + event.preventDefault(); + } +}); diff --git a/client/components/modal/helpers.js b/client/components/modal/helpers.js new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/client/components/modal/helpers.js diff --git a/client/components/modal/modal.tpl.jade b/client/components/modal/modal.tpl.jade new file mode 100644 index 00000000..2f40ad75 --- /dev/null +++ b/client/components/modal/modal.tpl.jade @@ -0,0 +1,5 @@ +.window-overlay.show + .window + .window-wrapper.clearfix + a.icon-lg.fa.fa-times.dialog-close-button.js-close-window(title="{{_ 'modal-close-title'}}") + +UI.dynamic(template=template) |