Add a button to clear filters on site settings page

This commit is contained in:
Neil Lalonde 2013-12-20 11:06:07 -05:00
parent 0c45eba037
commit 6135d1d214
4 changed files with 14 additions and 1 deletions

View File

@ -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);
}
}
});

View File

@ -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>

View File

@ -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 {

View File

@ -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'