ui: hide dropdown after switching dc
This commit is contained in:
parent
c93d93f09b
commit
e38aa0d8de
|
@ -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}}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue