even faster admin-support redraw

pull/1/head
ansuz 3 years ago
parent 1d93d4c45a
commit 5a5f102a49

@ -1095,26 +1095,30 @@ define([
}; };
var _reorder = function () { var _reorder = function () {
var hashKeys = Object.keys(hashesById); var orderAnswered = [];
var orderPremium = [];
var orderNormal = [];
var orderClosed = [];
var orderAnswered = hashKeys.filter(function (id) { Object.keys(hashesById).forEach(function (id) {
var d = getTicketData(id); var d = getTicketData(id);
return d && d.lastAdmin && !d.closed; if (!d) { return; }
}).sort(sort); if (d.closed) {
var orderPremium = hashKeys.filter(function (id) { return void orderClosed.push(id);
var d = getTicketData(id); }
return d && d.premium && !d.lastAdmin && !d.closed; if (d.lastAdmin /* && !d.closed */) {
}).sort(sort); return void orderAnswered.push(id);
var orderNormal = hashKeys.filter(function (id) { }
var d = getTicketData(id); if (d.premium /* && !d.lastAdmin && !d.closed */) {
return d && !d.premium && !d.lastAdmin && !d.closed; return void orderPremium.push(id);
}).sort(sort); }
var orderClosed = hashKeys.filter(function (id) { orderNormal.push(id);
var d = getTicketData(id); //if (!d.premium && !d.lastAdmin && !d.closed) { return void orderNormal.push(id); }
return d && d.closed; });
}).sort(sort);
var cols = [$col1, $col2, $col3, $col4]; var cols = [$col1, $col2, $col3, $col4];
[orderPremium, orderNormal, orderAnswered, orderClosed].forEach(function (list, j) { [orderPremium, orderNormal, orderAnswered, orderClosed].forEach(function (list, j) {
list.sort(sort);
list.forEach(function (id, i) { list.forEach(function (id, i) {
var $t = $div.find('[data-id="'+id+'"]'); var $t = $div.find('[data-id="'+id+'"]');
var d = getTicketData(id); var d = getTicketData(id);

Loading…
Cancel
Save