调整缓存列表样式,缓存时间在Key右上角,支持删除指定缓存
This commit is contained in:
parent
e6f310fe89
commit
dd67c1b360
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
.tasks-widget .task-list > li {
|
.tasks-widget .task-list > li {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 10px 5px;
|
|
||||||
border-bottom: 1px dashed #eaeaea;
|
border-bottom: 1px dashed #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +49,7 @@
|
||||||
.tasks-widget .task-list li > .task-title {
|
.tasks-widget .task-list li > .task-title {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
height: 46px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-widget .task-list li > .task-title .task-value {
|
.tasks-widget .task-list li > .task-title .task-value {
|
||||||
|
@ -59,20 +59,26 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 190px;
|
left: 190px;
|
||||||
right: 40px;
|
right: 40px;
|
||||||
|
top: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
padding-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-widget .task-list li > .task-title .badge {
|
.tasks-widget .task-list li > .task-title .badge {
|
||||||
position: absolute;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
left: 25px;
|
top: -19px;
|
||||||
top: 2px;
|
left: -12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-widget .task-list li > .task-title .label-success {
|
.tasks-widget .task-list li > .task-title .label-success {
|
||||||
background-color: #5cb85c;
|
background-color: #5cb85c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tasks-widget .task-list li > .task-title .hidden-phone {
|
||||||
|
padding-top: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.tasks-widget .task-list li > .task-config {
|
.tasks-widget .task-list li > .task-config {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
@ -86,6 +92,7 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
padding-top: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-widget .task-list li.task-done .task-title-sp {
|
.tasks-widget .task-list li.task-done .task-title-sp {
|
||||||
|
@ -129,7 +136,7 @@
|
||||||
#sortable li i {
|
#sortable li i {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 6px;
|
left: 6px;
|
||||||
padding: 4px 10px 0 10px;
|
padding: 19px 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +145,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-sortable > li {
|
.ui-sortable > li {
|
||||||
padding: 18px 0 15px 35px !important;
|
padding-left: 35px !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #f5f6f8;
|
background: #f5f6f8;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
|
|
|
@ -1,22 +1,32 @@
|
||||||
$(function () {
|
$(function () {
|
||||||
var html = '<li class="list-primary"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value">{3}</span><div class="pull-right hidden-phone"><button class="btn btn-danger btn-xs fa fa-trash-o" data-val="{1}"></button></div></div></li>';
|
var html = '<li class="list-primary"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp">{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 tooltips" data-key="{1}" data-placement="left" data-original-title="{1}"></button></div></div></li>';
|
||||||
$.ajax({
|
|
||||||
url: '../../CacheList.axd',
|
function listCache(options) {
|
||||||
type: 'GET',
|
$.ajax({
|
||||||
success: function (result) {
|
url: options.url,
|
||||||
if (result) {
|
type: 'GET',
|
||||||
result = $.parseJSON(result);
|
success: function (result) {
|
||||||
if ($.isArray(result)) {
|
if (result) {
|
||||||
var content = result.map(function (ele) {
|
result = $.parseJSON(result);
|
||||||
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value);
|
if ($.isArray(result)) {
|
||||||
}).join('');
|
var content = result.map(function (ele) {
|
||||||
$('#sortable').append(content);
|
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value);
|
||||||
|
}).join('');
|
||||||
|
$('#sortable').html(content);
|
||||||
|
$('.tooltips').tooltip();
|
||||||
|
$('#sortable .btn').click(function () {
|
||||||
|
var key = $(this).attr('data-key');
|
||||||
|
listCache({ url: $.format('../../CacheList.axd?cacheKey={0}', key) });
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||||
}
|
}
|
||||||
else {
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
listCache({ url: '../../CacheList.axd' });
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue