Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixes #136
Browse files Browse the repository at this point in the history
new action on subnav and call in the main nav to ensure that the
settings section is reset
  • Loading branch information
tangollama committed Jul 11, 2015
1 parent 4b250e1 commit cdc5f56
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/components/nav-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ export default Ember.Component.extend(UserSession, {
}.on('init'),

callNavAction: "navAction",
callCloseSettings: "closeSettings",

actions: {
toggleContent: function() {
//debugger;
this.set('isShowing', !this.get('isShowing'));
this.sendAction('callNavAction', this.nav);
},

resetNav: function() {
this.sendAction('callCloseSettings');
}
}
});
6 changes: 6 additions & 0 deletions app/controllers/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ export default Ember.Controller.extend(ProgressDialog, UserSession, Navigation,
}
this.currentOpenNav = nav;
this.transitionToRoute(nav.route);
this.set('isShowingSettings', false);
},

toggleSettings: function() {
this.toggleProperty('isShowingSettings');
},

closeSettings: function() {
this.set('isShowingSettings', false);
}

}
});
2 changes: 2 additions & 0 deletions app/templates/components/nav-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<div class="category-sub-items">
{{#each nav.subnav}}
{{#if show}}
<div {{action 'resetNav'}}>
{{#if subroute}}
{{#link-to route subroute class="category-sub-item nav-link"}}
<span {{bind-attr class=":octicon iconClass"}}></span>{{title}}
Expand All @@ -18,6 +19,7 @@
<span {{bind-attr class=":octicon iconClass"}}></span>{{title}}
{{/link-to}}
{{/if}}
</div>
{{/if}}
{{/each}}
</div>
Expand Down

0 comments on commit cdc5f56

Please sign in to comment.