This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/topic-list-header.js.es6

24 lines
557 B
JavaScript

import StringBuffer from 'discourse/mixins/string-buffer';
export default Ember.Component.extend(StringBuffer, {
tagName: 'tr',
rerenderTriggers: ['order', 'ascending'],
rawTemplate: 'components/topic-list-header.raw',
click: function(e) {
var target = $(e.target);
if(target.parents().andSelf().hasClass('bulk-select')){
this.sendAction('toggleBulkSelect');
} else {
var th = target.closest('th.sortable');
if(th.length > 0) {
this.sendAction('changeSort', th.data('sort-order'));
}
}
},
});