增加缓存颜色分类功能
This commit is contained in:
parent
6e66dd53e1
commit
b26b913011
|
@ -194,6 +194,27 @@
|
|||
border-left: 3px solid #BEC3C7;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-default {
|
||||
border-left: 3px solid #BEC3C7;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-Exception {
|
||||
border-left: 3px solid red;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-Message {
|
||||
border-left: 3px solid #00ff00;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-Task {
|
||||
border-left: 3px solid #2083a0;
|
||||
}
|
||||
|
||||
.ui-sortable li.list-Notification {
|
||||
border-left: 3px solid #b7d8e2;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 548px) {
|
||||
.tasks-widget .task-list li .task-title.notifi .task-value {
|
||||
right: 66px;
|
||||
|
|
|
@ -66,9 +66,45 @@
|
|||
if (result) {
|
||||
result = $.parseJSON(result);
|
||||
if ($.isArray(result)) {
|
||||
var html = '<li class="list-primary"><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) {
|
||||
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value);
|
||||
var key = ele.Key.split('-')[0];
|
||||
var css = 'list-default';
|
||||
switch (key) {
|
||||
case "MenuHelper":
|
||||
css = 'list-primary';
|
||||
break;
|
||||
case "UserHelper":
|
||||
css = 'list-success';
|
||||
break;
|
||||
case "RoleHelper":
|
||||
css = 'list-danger';
|
||||
break;
|
||||
case "GroupHelper":
|
||||
css = 'list-warning';
|
||||
break;
|
||||
case "LogHelper":
|
||||
css = 'list-info';
|
||||
break;
|
||||
case "DictHelper":
|
||||
css = 'list-inverse';
|
||||
break;
|
||||
case "ExceptionHelper":
|
||||
css = 'list-Exception';
|
||||
break;
|
||||
case "MessageHelper":
|
||||
css = 'list-Message';
|
||||
break;
|
||||
case "TaskHelper":
|
||||
css = 'list-Task';
|
||||
break;
|
||||
case "NotificationHelper":
|
||||
css = 'list-Notification';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, css);
|
||||
}).join('');
|
||||
$('#sortable').html(content);
|
||||
$('.tooltips').tooltip();
|
||||
|
|
Loading…
Reference in New Issue