mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 06:03:38 +08:00
Merge pull request #4559 from techAPJ/select-all
FEATURE: batch select topics
This commit is contained in:
commit
7cfda43ae3
|
@ -125,6 +125,14 @@ export default Ember.Component.extend({
|
||||||
this.rerender();
|
this.rerender();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onClick('button.bulk-select-all', function(){
|
||||||
|
$('input.bulk-select:not(:checked)').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
onClick('button.bulk-clear-all', function(){
|
||||||
|
$('input.bulk-select:checked').click();
|
||||||
|
});
|
||||||
|
|
||||||
onClick('th.sortable', function(e2){
|
onClick('th.sortable', function(e2){
|
||||||
this.sendAction('changeSort', e2.data('sort-order'));
|
this.sendAction('changeSort', e2.data('sort-order'));
|
||||||
this.rerender();
|
this.rerender();
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
{{~#if showBulkToggle}}
|
{{~#if showBulkToggle}}
|
||||||
<button class='btn bulk-select' title='{{i18n "topics.bulk.toggle"}}'><i class='fa fa-list'></i></button>
|
<button class='btn bulk-select' title='{{i18n "topics.bulk.toggle"}}'><i class='fa fa-list'></i></button>
|
||||||
{{/if ~}}
|
{{/if ~}}
|
||||||
|
{{~#if bulkSelectEnabled}}
|
||||||
|
<span class='bulk-select-topics'>
|
||||||
|
<button class='btn bulk-select-all'>{{i18n "topics.bulk.select_all"}}</button>
|
||||||
|
<button class='btn bulk-clear-all'>{{i18n "topics.bulk.clear_all"}}</button>
|
||||||
|
</span>
|
||||||
|
{{/if ~}}
|
||||||
{{view.localizedName}}
|
{{view.localizedName}}
|
||||||
{{~#if view.isSorting}}
|
{{~#if view.isSorting}}
|
||||||
<i class='{{view.sortClass}}'></i>
|
<i class='{{view.sortClass}}'></i>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{{#if bulkSelectEnabled}}
|
{{#if bulkSelectEnabled}}
|
||||||
<th class='star'>
|
<th class='star'>
|
||||||
<button class='btn bulk-select' title='{{i18n "topics.bulk.toggle"}}'><i class='fa fa-list'></i></button>
|
<button class='btn bulk-select' title='{{i18n "topics.bulk.toggle"}}'><i class='fa fa-list'></i></button>
|
||||||
</th>
|
</th>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{raw "topic-list-header-column" order='default' name='topic.title' showBulkToggle=toggleInTitle}}
|
{{raw "topic-list-header-column" order='default' name='topic.title' bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle}}
|
||||||
{{#unless hideCategory}}
|
{{#unless hideCategory}}
|
||||||
{{raw "topic-list-header-column" sortable=sortable order='category' name='category_title'}}
|
{{raw "topic-list-header-column" sortable=sortable order='category' name='category_title'}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
|
@ -1272,6 +1272,8 @@ en:
|
||||||
topics:
|
topics:
|
||||||
new_messages_marker: "last visit"
|
new_messages_marker: "last visit"
|
||||||
bulk:
|
bulk:
|
||||||
|
select_all: "Select All"
|
||||||
|
clear_all: "Clear All"
|
||||||
unlist_topics: "Unlist Topics"
|
unlist_topics: "Unlist Topics"
|
||||||
reset_read: "Reset Read"
|
reset_read: "Reset Read"
|
||||||
delete: "Delete Topics"
|
delete: "Delete Topics"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user