增加缓存排序功能

This commit is contained in:
Argo-Lenovo 2016-11-19 11:55:54 +08:00
parent 35ff82de51
commit f84bd2b890
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@
result = $.parseJSON(result); result = $.parseJSON(result);
if ($.isArray(result)) { if ($.isArray(result)) {
var html = '<li class="{4}"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp tooltips" data-placement="right" title="{1}">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value tooltips" data-placement="top" data-original-title="{3}">{3}</span><div class="pull-right hidden-phone"><button class="btn btn-danger btn-xs fa fa-trash-o" data-key="{1}"></button></div></div></li>'; var html = '<li class="{4}"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp tooltips" data-placement="right" title="{1}">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value tooltips" data-placement="top" data-original-title="{3}">{3}</span><div class="pull-right hidden-phone"><button class="btn btn-danger btn-xs fa fa-trash-o" data-key="{1}"></button></div></div></li>';
var content = result.map(function (ele) { var content = result.sort(function (x, y) {
return x.Key > y.Key ? 1 : -1;
}).map(function (ele) {
var key = ele.Key.split('-')[0]; var key = ele.Key.split('-')[0];
var css = 'list-default'; var css = 'list-default';
switch (key) { switch (key) {