mirror of https://github.com/hashicorp/consul
ui: hide dropdown after switching dc
parent
1697f5f2b3
commit
35675c53eb
|
@ -78,7 +78,7 @@
|
||||||
{{#if isDropdownVisible}}
|
{{#if isDropdownVisible}}
|
||||||
<ul class="dropdown-menu col-xs-8" style="display:block;">
|
<ul class="dropdown-menu col-xs-8" style="display:block;">
|
||||||
{{#each dc in dcs}}
|
{{#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}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -57,6 +57,10 @@ App.DcController = Ember.Controller.extend({
|
||||||
// Hide and show the dropdown menu
|
// Hide and show the dropdown menu
|
||||||
toggle: function(item){
|
toggle: function(item){
|
||||||
this.toggleProperty('isDropdownVisible');
|
this.toggleProperty('isDropdownVisible');
|
||||||
|
},
|
||||||
|
// Just hide the dropdown menu
|
||||||
|
hideDrop: function(item){
|
||||||
|
this.set('isDropdownVisible', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue