From 23895b2b36db022bdfcc195db5871907c2fbbebf Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 22 Jul 2015 09:51:41 +0930 Subject: [PATCH] Hide the drawer/modal when constructing all pages Might be better to do this on config... also extract it into a parent "Page" component --- framework/core/js/forum/src/components/DiscussionPage.js | 2 ++ framework/core/js/forum/src/components/IndexPage.js | 2 ++ framework/core/js/forum/src/components/NotificationsPage.js | 1 + framework/core/js/forum/src/components/SettingsPage.js | 1 - framework/core/js/forum/src/components/UserPage.js | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/core/js/forum/src/components/DiscussionPage.js b/framework/core/js/forum/src/components/DiscussionPage.js index ec1e04ae0..dfd622808 100644 --- a/framework/core/js/forum/src/components/DiscussionPage.js +++ b/framework/core/js/forum/src/components/DiscussionPage.js @@ -53,6 +53,8 @@ export default class DiscussionPage extends mixin(Component, evented) { // button. app.history.push('discussion'); app.current = this; + app.drawer.hide(); + app.modal.close(); app.session.on('loggedIn', this.loggedInHandler = this.refresh.bind(this)); } diff --git a/framework/core/js/forum/src/components/IndexPage.js b/framework/core/js/forum/src/components/IndexPage.js index 0b203518a..4886eb7f9 100644 --- a/framework/core/js/forum/src/components/IndexPage.js +++ b/framework/core/js/forum/src/components/IndexPage.js @@ -48,6 +48,8 @@ export default class IndexPage extends Component { app.history.push('index'); app.current = this; + app.drawer.hide(); + app.modal.close(); } onunload() { diff --git a/framework/core/js/forum/src/components/NotificationsPage.js b/framework/core/js/forum/src/components/NotificationsPage.js index c7d83854c..dc7ea02d8 100644 --- a/framework/core/js/forum/src/components/NotificationsPage.js +++ b/framework/core/js/forum/src/components/NotificationsPage.js @@ -12,6 +12,7 @@ export default class NotificationsPage extends Component { app.current = this; app.history.push('notifications'); app.drawer.hide(); + app.modal.close(); } view() { diff --git a/framework/core/js/forum/src/components/SettingsPage.js b/framework/core/js/forum/src/components/SettingsPage.js index cb68028b8..c17bfb18a 100644 --- a/framework/core/js/forum/src/components/SettingsPage.js +++ b/framework/core/js/forum/src/components/SettingsPage.js @@ -19,7 +19,6 @@ export default class SettingsPage extends UserPage { this.init(app.session.user); app.setTitle(app.trans('core.settings')); - app.drawer.hide(); } content() { diff --git a/framework/core/js/forum/src/components/UserPage.js b/framework/core/js/forum/src/components/UserPage.js index 4632513fa..775ab1b7f 100644 --- a/framework/core/js/forum/src/components/UserPage.js +++ b/framework/core/js/forum/src/components/UserPage.js @@ -29,6 +29,7 @@ export default class UserPage extends Component { app.history.push('user'); app.current = this; app.drawer.hide(); + app.modal.close(); } view() {