From dd67c1b3602339128a2465f5571fa96daae13b29 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Fri, 4 Nov 2016 17:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=93=E5=AD=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=BC=93=E5=AD=98=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=9C=A8Key=E5=8F=B3=E4=B8=8A=E8=A7=92=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=A0=E9=99=A4=E6=8C=87=E5=AE=9A=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/css/tasks.css | 371 +++++++++++++------------- Bootstrap.Admin/Scripts/Profiles.js | 46 ++-- 2 files changed, 217 insertions(+), 200 deletions(-) diff --git a/Bootstrap.Admin/Content/css/tasks.css b/Bootstrap.Admin/Content/css/tasks.css index 6c14aacd..c79e49fe 100644 --- a/Bootstrap.Admin/Content/css/tasks.css +++ b/Bootstrap.Admin/Content/css/tasks.css @@ -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; + } +} diff --git a/Bootstrap.Admin/Scripts/Profiles.js b/Bootstrap.Admin/Scripts/Profiles.js index 5d66b8aa..5c237803 100644 --- a/Bootstrap.Admin/Scripts/Profiles.js +++ b/Bootstrap.Admin/Scripts/Profiles.js @@ -1,22 +1,32 @@ $(function () { - var html = '
  • {2}{0}{3}
  • '; - $.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 = '
  • {2}{0}{3}
  • '; + + 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' }); }); \ No newline at end of file