diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-08-25 23:39:00 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-08-26 16:49:41 +0200 |
commit | 9faaf07e0257f622abcaa365408fa836a1cbdea8 (patch) | |
tree | 8d214055307f66534d442bc2be8493f38a7e0334 /client/components/main/layouts.js | |
parent | 46a5e08aa7556b57d6c9b782eb1500811f2c3e6d (diff) | |
download | wekan-9faaf07e0257f622abcaa365408fa836a1cbdea8.tar.gz wekan-9faaf07e0257f622abcaa365408fa836a1cbdea8.tar.bz2 wekan-9faaf07e0257f622abcaa365408fa836a1cbdea8.zip |
Implement a modal system
I decided to create my own and not to use a community package, because
1. it's straightforward
2. it's better integrated with our others libs such as EscapeActions
3. monitoring third-party packages evolutions (eg, CSS changes) is a
lot of work.
This is basically the same rationale than for our other generic UI
components such as the Popup/Popover.
This commit also slightly modify the general layout to remove
unnecessary wrapper DOM nodes.
Diffstat (limited to 'client/components/main/layouts.js')
-rw-r--r-- | client/components/main/layouts.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index 5dbd8c91..11a43313 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -1,5 +1,13 @@ -Meteor.subscribe('boards'); +Meteor.subscribe('boards') + +BlazeLayout.setRoot('body') Template.userFormsLayout.onRendered(function() { - EscapeActions.executeAll(); -}); + EscapeActions.executeAll() +}) + +Template.defaultLayout.events({ + 'click .js-close-modal': () => { + Modal.close() + } +}) |