From b26b913011d4db770ba19b9c9326815325d6b8a1 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sat, 19 Nov 2016 11:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=93=E5=AD=98=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E5=88=86=E7=B1=BB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/css/tasks.css | 21 ++++++++++++++ Bootstrap.Admin/Scripts/Profiles.js | 40 +++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/Bootstrap.Admin/Content/css/tasks.css b/Bootstrap.Admin/Content/css/tasks.css index 0dabd81f..04f5ff67 100644 --- a/Bootstrap.Admin/Content/css/tasks.css +++ b/Bootstrap.Admin/Content/css/tasks.css @@ -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; diff --git a/Bootstrap.Admin/Scripts/Profiles.js b/Bootstrap.Admin/Scripts/Profiles.js index 2c6b23ee..2635d417 100644 --- a/Bootstrap.Admin/Scripts/Profiles.js +++ b/Bootstrap.Admin/Scripts/Profiles.js @@ -66,9 +66,45 @@ if (result) { result = $.parseJSON(result); if ($.isArray(result)) { - var html = '
  • {2}{0}{3}
  • '; + var html = '
  • {2}{0}{3}
  • '; 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();