增加功能:网站设置页面增加缓存剩余时间显示,单位秒

This commit is contained in:
Argo-Lenovo 2017-04-03 18:32:51 +08:00
parent fc8729903a
commit 83b3b95143
2 changed files with 12 additions and 7 deletions

View File

@ -53,7 +53,7 @@
.tasks-widget .task-list li > .task-title .task-value {
position: absolute;
left: 190px;
right: 40px;
right: 62px;
top: 15px;
display: inline-block;
}
@ -82,6 +82,11 @@
margin-right: 4px;
}
.tasks-widget .task-list li > .task-title .hidden-phone > span {
margin-right: 6px;
vertical-align: middle;
}
.tasks-widget .task-list li > .task-title .hidden-phone button.btn-xs {
font-size: 12px;
line-height: 1.5;

View File

@ -105,7 +105,7 @@
if (result && options.key == '') {
result = $.parseJSON(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" role="tooltip" title="{1}">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value" title="{3}">{3}</span><div class="pull-right hidden-phone"><button class="btn btn-danger btn-xs fa fa-trash-o" title="{1}" data-key="{1}" data-url="{5}" role="tooltip" data-placement="left"></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" role="tooltip" title="{1}">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value" title="{3}">{3}</span><div class="pull-right hidden-phone"><span>{6}</span><button class="btn btn-danger btn-xs fa fa-trash-o" title="{1}" data-key="{1}" data-url="{5}" role="tooltip" data-placement="left"></button></div></div></li>';
var content = result.sort(function (x, y) {
return x.Key > y.Key ? 1 : -1;
}).map(function (ele) {
@ -145,7 +145,7 @@
default:
break;
}
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, css, options.url);
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, css, options.url, Math.max(1, 600 - Math.round((new Date() - new Date(ele.CreateTime)) / 1000)));
}).join('');
$sortable.append($.format('<li class="title">{0}-{1}</li>', options.item.Desc, options.item.Key));
$sortable.append(content);