v1.18.x
psychobunny 10 years ago
parent df3e007120
commit 97419bbdd9

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

Loading…
Cancel
Save