Add a button to clear filters on site settings page
This commit is contained in:
parent
0c45eba037
commit
6135d1d214
|
@ -57,6 +57,13 @@ Discourse.AdminSiteSettingsController = Ember.ArrayController.extend(Discourse.P
|
|||
});
|
||||
|
||||
this.set('model', matchesGroupedByCategory);
|
||||
}, 250).observes('filter', 'onlyOverridden')
|
||||
}, 250).observes('filter', 'onlyOverridden'),
|
||||
|
||||
actions: {
|
||||
clearFilter: function() {
|
||||
this.set('filter', '');
|
||||
this.set('onlyOverridden', false);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
</div>
|
||||
<div class='controls'>
|
||||
{{textField value=filter placeholderKey="type_to_filter"}}
|
||||
<button {{action clearFilter}} class="btn">{{i18n admin.site_settings.clear_filter}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -144,6 +144,10 @@ td {border-bottom: 1px solid #ddd; border-top: 1px solid #ddd;}
|
|||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.btn {
|
||||
background: darken(#e8e8e8, 5%);
|
||||
&:hover { background: #aaa; }
|
||||
}
|
||||
}
|
||||
|
||||
.site-settings-nav {
|
||||
|
|
|
@ -1450,6 +1450,7 @@ en:
|
|||
reset: 'reset to default'
|
||||
none: 'none'
|
||||
no_results: "No results found."
|
||||
clear_filter: "Clear"
|
||||
categories:
|
||||
all_results: 'All'
|
||||
required: 'Required'
|
||||
|
|
Loading…
Reference in New Issue