Skip to content

Commit

Permalink
Mobile nav menu fixes
Browse files Browse the repository at this point in the history
issue #5483 & #5652
- trigger the close menus action every time a route transition is successful
- close nav menu when clicking "collapse sidebar" button (action chain was incomplete)
  • Loading branch information
kevinansfield committed Aug 20, 2015
1 parent f1a602e commit cbb106e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/client/app/routes/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default Ember.Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
});
},

didTransition: function () {
this.send('closeMenus');
},

signedIn: function () {
this.send('loadServerNotifications', true);
},
Expand Down
2 changes: 1 addition & 1 deletion core/client/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="gh-viewport {{if autoNav 'gh-autonav'}} {{if showSettingsMenu 'settings-menu-expanded'}} {{if showMobileMenu 'mobile-menu-expanded'}}">
{{#unless signedOut}}
{{gh-nav-menu open=autoNavOpen onMouseEnter="openAutoNav" toggleMaximise="toggleAutoNav" openModal="openModal"}}
{{gh-nav-menu open=autoNavOpen onMouseEnter="openAutoNav" toggleMaximise="toggleAutoNav" openModal="openModal" closeMobileMenu="closeMobileMenu"}}
{{/unless}}

{{#gh-main onMouseEnter="closeAutoNav" data-notification-count=topNotificationCount}}
Expand Down

0 comments on commit cbb106e

Please sign in to comment.