diff --git a/Bootstrap.Admin/Content/css/site.css b/Bootstrap.Admin/Content/css/site.css index 1dc7a52e..638ef926 100644 --- a/Bootstrap.Admin/Content/css/site.css +++ b/Bootstrap.Admin/Content/css/site.css @@ -396,9 +396,39 @@ a, a:hover, a:focus { -webkit-border-radius: 4px 4px 0px 0px; } + .notify-row .dropdown-menu .content { + position: absolute; + left: 36px; + right: 44px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + } + + .notify-row .dropdown-menu .label { + display: inline-block; + height: 18px; + width: 20px; + padding: 5px; + margin-right: 5px; + } + + .notify-row .dropdown-menu .small { + font-size: 10px; + font-style: italic; + font-weight: bold; + float: right; + padding-top: 2px; + } + .notify-row .dropdown-menu.tasks-bar .desc { font-size: 13px; font-weight: normal; + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .notify-row .dropdown-menu.tasks-bar .percent { @@ -406,13 +436,13 @@ a, a:hover, a:focus { float: right; font-size: 13px; font-weight: 600; - padding-left: 10px; - margin-top: -4px; } .notify-row .dropdown-menu.tasks-bar .progress { - margin-bottom: 0 !important; + margin-top: 4px; height: 10px; + margin-right: 34px; + margin-bottom: 0; } .notify-row .dropdown-menu.inbox .photo img { @@ -451,33 +481,6 @@ a, a:hover, a:focus { margin-top: 2px; } - - .notify-row .dropdown-menu .label { - display: inline-block; - height: 18px; - width: 20px; - padding: 5px; - margin-right: 5px; - } - - .notify-row .dropdown-menu .small { - font-size: 10px; - font-style: italic; - font-weight: bold; - float: right; - padding-top: 2px; - } - - .notify-row .dropdown-menu li a div { - position: absolute; - left: 36px; - right: 44px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: inline-block; - } - .dropdown-menu.menu { top: 50px; left: 6px; diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index 903c2e8f..b87f48a7 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -54,11 +54,21 @@ callback: function (result) { $('#logoutNoti').text(result.NewUsersCount); + // tasks + // new users + $('#msgHeaderTask').text(result.NewUsersCount); + $('#msgHeaderTaskBadge').text(result.NewUsersCount); + var htmlUserTemplate = '
  • {0}-{2}{1}%
    {1}% 完成
  • '; + var html = result.Tasks.map(function (u) { + return $.format(htmlUserTemplate, u.TaskName, u.TaskProgress, u.AssignDisplayName, u.ID); + }).join(''); + $(html).insertAfter($('#msgHeaderTaskContent')); + // new users $('#msgHeaderUser').text(result.NewUsersCount); $('#msgHeaderUserBadge').text(result.NewUsersCount); - var htmlUserTemplate = '
  • {1}({0})
    {3}
  • '; - var html = result.Users.map(function (u) { + htmlUserTemplate = '
  • {1}({0})
    {3}
  • '; + html = result.Users.map(function (u) { return $.format(htmlUserTemplate, u.UserName, u.DisplayName, u.Description, u.Period); }).join(''); $(html).insertAfter($('#msgHeaderUserContent')); @@ -66,7 +76,7 @@ // apps $('#msgHeaderApp').text(result.AppExceptionsCount); $('#msgHeaderAppBadge').text(result.AppExceptionsCount); - htmlUserTemplate = '
  • {0}
    {2}
  • '; + htmlUserTemplate = '
  • {0}
    {2}
  • '; html = result.Apps.map(function (u) { return $.format(htmlUserTemplate, u.ExceptionType, u.Message, u.Period); }).join(''); @@ -75,7 +85,7 @@ // dbs $('#msgHeaderDb').text(result.DbExceptionsCount); $('#msgHeaderDbBadge').text(result.DbExceptionsCount); - htmlUserTemplate = '
  • {0}
    {2}
  • '; + htmlUserTemplate = '
  • {0}
    {2}
  • '; html = result.Dbs.map(function (u) { return $.format(htmlUserTemplate, u.ErrorPage, u.Message, u.Period); }).join(''); diff --git a/Bootstrap.Admin/Controllers/NotificationsController.cs b/Bootstrap.Admin/Controllers/NotificationsController.cs index 7701a9b3..b2a228ae 100644 --- a/Bootstrap.Admin/Controllers/NotificationsController.cs +++ b/Bootstrap.Admin/Controllers/NotificationsController.cs @@ -66,7 +66,6 @@ namespace Bootstrap.Admin.Controllers else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes); }); ret.DbExceptionsCount = dbs.Count(); - return ret; } /// diff --git a/Bootstrap.Admin/Views/Shared/Header.cshtml b/Bootstrap.Admin/Views/Shared/Header.cshtml index 4e9435fa..2646428a 100644 --- a/Bootstrap.Admin/Views/Shared/Header.cshtml +++ b/Bootstrap.Admin/Views/Shared/Header.cshtml @@ -29,12 +29,12 @@