mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-18 13:32:58 +01:00
closes #2980
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
'use strict';
|
||||
/* globals define, config, socket, app, ajaxify, templates */
|
||||
|
||||
define('sort', function() {
|
||||
define('sort', ['components'], function(components) {
|
||||
var module = {};
|
||||
|
||||
module.handleSort = function (field, method, gotoOnSave) {
|
||||
var threadSort = $('.thread-sort');
|
||||
var threadSort = components.get('thread/sort');
|
||||
threadSort.find('i').removeClass('fa-check');
|
||||
var currentSetting = threadSort.find('a[data-sort="' + config[field] + '"]');
|
||||
currentSetting.find('i').addClass('fa-check');
|
||||
|
||||
$('.thread-sort').on('click', 'a', function() {
|
||||
threadSort.on('click', 'a', function() {
|
||||
var newSetting = $(this).attr('data-sort');
|
||||
socket.emit(method, newSetting, function(err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user