Skip to content
Permalink
Browse files

switch toggles

  • Loading branch information...
angusmcleod committed May 16, 2019
1 parent 7acbc71 commit 64add2f9a8901a6bdb085889abab9dd5cd543551
@@ -94,6 +94,11 @@ export default Ember.Component.extend({
return !showSortControls && isAdmin; return !showSortControls && isAdmin;
}, },


@computed('visible')
toggleIcon(visible) {
return visible ? 'chevron-down' : 'chevron-right';
},

saveSort() { saveSort() {
const category = this.get('category'); const category = this.get('category');
const topics = this.get('sortedTopics'); const topics = this.get('sortedTopics');
@@ -1,9 +1,8 @@
<div class="{{categoryClass}}"> <div class="{{categoryClass}}">
<a {{action 'toggleList'}}> <a {{action 'goToCategory'}}>
{{category.name}} {{category.name}}
</a> </a>
<div class="controls"> <div class="controls">
{{d-button action='goToCategory' icon="chevron-right"}}
{{#if visible}} {{#if visible}}
{{conditional-loading-spinner condition=saving size="small"}} {{conditional-loading-spinner condition=saving size="small"}}
{{#if showSortControls}} {{#if showSortControls}}
@@ -14,6 +13,7 @@
{{d-button action="toggleSortControls" icon="list"}} {{d-button action="toggleSortControls" icon="list"}}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{d-button action='toggleList' icon=toggleIcon}}
</div> </div>
</div> </div>


0 comments on commit 64add2f

Please sign in to comment.
You can’t perform that action at this time.