调整缓存列表样式,缓存时间在Key右上角,支持删除指定缓存
This commit is contained in:
parent
e6f310fe89
commit
dd67c1b360
|
@ -1,182 +1,189 @@
|
|||
/*--------------Tasks Widget--------------*/
|
||||
|
||||
.task-content {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-content:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer:after,
|
||||
.tasks-widget .task-footer:before {
|
||||
content: "";
|
||||
display: table;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list > li {
|
||||
position: relative;
|
||||
padding: 10px 5px;
|
||||
border-bottom: 1px dashed #eaeaea;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.last-line {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-bell {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-checkbox {
|
||||
float: left;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title {
|
||||
overflow: hidden;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .task-value {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 190px;
|
||||
right: 40px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .badge {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
left: 25px;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .label-success {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-config {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li .task-title .task-title-sp {
|
||||
margin-right: 5px;
|
||||
max-width: 170px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done .task-title-sp {
|
||||
text-decoration: line-through;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done:hover {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li:hover {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li .task-config {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li:hover > .task-config {
|
||||
display: block;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
#sortable {
|
||||
list-style-type: none;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sortable li {
|
||||
padding-left: 3em;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#sortable li i {
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
padding: 4px 10px 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#sortable li input[type=checkbox] {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.ui-sortable > li {
|
||||
padding: 18px 0 15px 35px !important;
|
||||
position: relative;
|
||||
background: #f5f6f8;
|
||||
margin-bottom: 2px;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-primary {
|
||||
border-left: 3px solid #41CAC0;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-success {
|
||||
border-left: 3px solid #78CD51;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-danger {
|
||||
border-left: 3px solid #FF6C60;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-warning {
|
||||
border-left: 3px solid #F1C500;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-info {
|
||||
border-left: 3px solid #58C9F3;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-inverse {
|
||||
border-left: 3px solid #BEC3C7;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 320px) {
|
||||
|
||||
.tasks-widget .task-config-btn {
|
||||
float: inherit;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list-projects li > .label {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
/*--------------Tasks Widget--------------*/
|
||||
|
||||
.task-content {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-content:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer:after,
|
||||
.tasks-widget .task-footer:before {
|
||||
content: "";
|
||||
display: table;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.tasks-widget .task-footer:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list > li {
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eaeaea;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.last-line {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-bell {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-checkbox {
|
||||
float: left;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title {
|
||||
overflow: hidden;
|
||||
margin-right: 10px;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .task-value {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 190px;
|
||||
right: 40px;
|
||||
top: 16px;
|
||||
display: inline-block;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .badge {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
top: -19px;
|
||||
left: -12px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .label-success {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-title .hidden-phone {
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li > .task-config {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li .task-title .task-title-sp {
|
||||
margin-right: 5px;
|
||||
max-width: 170px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-block;
|
||||
padding-top: 17px;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done .task-title-sp {
|
||||
text-decoration: line-through;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li.task-done:hover {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li:hover {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li .task-config {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list li:hover > .task-config {
|
||||
display: block;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
#sortable {
|
||||
list-style-type: none;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sortable li {
|
||||
padding-left: 3em;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#sortable li i {
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
padding: 19px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#sortable li input[type=checkbox] {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.ui-sortable > li {
|
||||
padding-left: 35px !important;
|
||||
position: relative;
|
||||
background: #f5f6f8;
|
||||
margin-bottom: 2px;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-primary {
|
||||
border-left: 3px solid #41CAC0;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-success {
|
||||
border-left: 3px solid #78CD51;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-danger {
|
||||
border-left: 3px solid #FF6C60;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-warning {
|
||||
border-left: 3px solid #F1C500;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-info {
|
||||
border-left: 3px solid #58C9F3;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-inverse {
|
||||
border-left: 3px solid #BEC3C7;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 320px) {
|
||||
|
||||
.tasks-widget .task-config-btn {
|
||||
float: inherit;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tasks-widget .task-list-projects li > .label {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,32 @@
|
|||
$(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>';
|
||||
$.ajax({
|
||||
url: '../../CacheList.axd',
|
||||
type: 'GET',
|
||||
success: function (result) {
|
||||
if (result) {
|
||||
result = $.parseJSON(result);
|
||||
if ($.isArray(result)) {
|
||||
var content = result.map(function (ele) {
|
||||
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value);
|
||||
}).join('');
|
||||
$('#sortable').append(content);
|
||||
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>';
|
||||
|
||||
function listCache(options) {
|
||||
$.ajax({
|
||||
url: options.url,
|
||||
type: 'GET',
|
||||
success: function (result) {
|
||||
if (result) {
|
||||
result = $.parseJSON(result);
|
||||
if ($.isArray(result)) {
|
||||
var content = result.map(function (ele) {
|
||||
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