ui: hide dropdown after switching dc

This commit is contained in:
Jack Pearkes 2014-05-01 12:21:32 -04:00
parent c93d93f09b
commit e38aa0d8de
2 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,7 @@
{{#if isDropdownVisible}}
<ul class="dropdown-menu col-xs-8" style="display:block;">
{{#each dc in dcs}}
<li {{action "toggle"}}>{{#link-to 'services' dc}}{{dc}}{{/link-to}}</li>
<li {{action "hideDrop"}}>{{#link-to 'services' dc}}{{dc}}{{/link-to}}</li>
{{/each}}
</ul>
{{/if}}

View File

@ -57,6 +57,10 @@ App.DcController = Ember.Controller.extend({
// Hide and show the dropdown menu
toggle: function(item){
this.toggleProperty('isDropdownVisible');
},
// Just hide the dropdown menu
hideDrop: function(item){
this.set('isDropdownVisible', false);
}
}
})