From 285069d7a9b0f216dff9fffaa9c7fd89f8f3cbb2 Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Sat, 14 Jan 2017 16:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89=E4=BD=BF?= =?UTF-8?q?=E7=94=A8tipso=E6=8F=90=E7=A4=BA=E6=A1=86=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E7=94=A8=E7=B3=BB=E7=BB=9F=E8=87=AA=E5=B8=A6=E7=9A=84tooltip?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 2 +- Bootstrap.Admin/Scripts/Groups.js | 8 ++++---- Bootstrap.Admin/Scripts/Menus.js | 4 ++-- Bootstrap.Admin/Scripts/Profiles.js | 10 +++------- Bootstrap.Admin/Scripts/Roles.js | 8 ++++---- Bootstrap.Admin/Scripts/Users.js | 8 ++++---- Bootstrap.Admin/Scripts/noti.js | 6 +++--- Bootstrap.Admin/Views/Admin/Notifications.cshtml | 2 +- Bootstrap.Admin/Views/Admin/Profiles.cshtml | 2 +- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 11435eb6..b94fca6b 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -118,7 +118,7 @@ url: this.url, data: {}, method: "POST", - htmlTemplate: '
', + htmlTemplate: '
', title: this.title, swal: true, modal: null, diff --git a/Bootstrap.Admin/Scripts/Groups.js b/Bootstrap.Admin/Scripts/Groups.js index a8632651..a67dfb75 100644 --- a/Bootstrap.Admin/Scripts/Groups.js +++ b/Bootstrap.Admin/Scripts/Groups.js @@ -27,9 +27,9 @@ return $.format(htmlTemplate, element.ID, element.RoleName, element.Checked, element.Description); }).join('') $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.GroupName)); - $dialogRoleForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogRole.modal('show'); } }); @@ -45,9 +45,9 @@ return $.format(htmlTemplate, element.ID, element.DisplayName, element.Checked, element.UserName); }).join(''); $dialogUserHeader.text($.format('{0}-用户授权窗口', row.GroupName)); - $dialogUserForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogUser.modal('show'); } }); diff --git a/Bootstrap.Admin/Scripts/Menus.js b/Bootstrap.Admin/Scripts/Menus.js index 0c9f175c..a1c8ed21 100644 --- a/Bootstrap.Admin/Scripts/Menus.js +++ b/Bootstrap.Admin/Scripts/Menus.js @@ -48,9 +48,9 @@ return $.format(htmlTemplate, element.ID, element.RoleName, element.Checked, element.Description); }).join('') $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.Name)); - $dialogRoleForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogRole.modal('show'); } }); diff --git a/Bootstrap.Admin/Scripts/Profiles.js b/Bootstrap.Admin/Scripts/Profiles.js index da752439..385edf4f 100644 --- a/Bootstrap.Admin/Scripts/Profiles.js +++ b/Bootstrap.Admin/Scripts/Profiles.js @@ -105,7 +105,7 @@ if (result && options.key == '') { result = $.parseJSON(result); if ($.isArray(result)) { - var html = '
  • {2}{0}{3}
  • '; + var html = '
  • {2}{0}{3}
  • '; var content = result.sort(function (x, y) { return x.Key > y.Key ? 1 : -1; }).map(function (ele) { @@ -149,7 +149,7 @@ }).join(''); $sortable.append($.format('
  • {0}-{1}
  • ', options.item.Desc, options.item.Key)); $sortable.append(content); - if (!$.browser.versions.mobile) $sortable.find('.tipso_style').tipso({ position: 'left', width: 400 }); + if (!$.browser.versions.mobile) $sortable.find('[role="tooltip"]').tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); } } } @@ -157,12 +157,8 @@ } $('#refreshCache').click(function () { listCacheUrl(); }).trigger('click'); $('#clearCache').click(function () { listCacheUrl({ clear: true }); }); - if (!$.browser.versions.mobile) { - $('#refreshCache').tipso({ width: 70, position: 'left' }); - $('#clearCache').tipso({ width: 180, position: 'left' }); - } $sortable.on('click', '.btn', function () { - if ($(this).hasClass('tipso_style')) $(this).tipso('hide').tipso('destroy'); + $(this).tooltip('destroy'); listCache({ key: $(this).attr('data-key'), url: $(this).attr('data-url') }); listCacheUrl(); }); diff --git a/Bootstrap.Admin/Scripts/Roles.js b/Bootstrap.Admin/Scripts/Roles.js index 02e357bd..431aaec3 100644 --- a/Bootstrap.Admin/Scripts/Roles.js +++ b/Bootstrap.Admin/Scripts/Roles.js @@ -33,9 +33,9 @@ return $.format(htmlTemplate, element.ID, element.DisplayName, element.Checked, element.UserName); }).join(''); $dialogUserHeader.text($.format('{0}-用户授权窗口', row.RoleName)); - $dialogUserForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogUser.modal('show'); } }); @@ -51,9 +51,9 @@ return $.format(htmlTemplate, element.ID, element.GroupName, element.Checked, element.Description); }).join(''); $dialogGroupHeader.text($.format('{0}-部门授权窗口', row.RoleName)); - $dialogGroupForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogGroup.modal('show'); } }); diff --git a/Bootstrap.Admin/Scripts/Users.js b/Bootstrap.Admin/Scripts/Users.js index 5ebc1c61..19abe3c0 100644 --- a/Bootstrap.Admin/Scripts/Users.js +++ b/Bootstrap.Admin/Scripts/Users.js @@ -29,9 +29,9 @@ return $.format(htmlTemplate, element.ID, element.RoleName, element.Checked, element.Description); }).join('') $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.DisplayName)); - $dialogRoleForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogRole.modal('show'); } }); @@ -47,9 +47,9 @@ return $.format(htmlTemplate, element.ID, element.GroupName, element.Checked, element.Description); }).join(''); $dialogGroupHeader.text($.format('{0}-部门授权窗口', row.DisplayName)); - $dialogGroupForm.html(html).find('.tipso_style').each(function (index, label) { + $dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).tipso(); + }).tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $dialogGroup.modal('show'); } }); diff --git a/Bootstrap.Admin/Scripts/noti.js b/Bootstrap.Admin/Scripts/noti.js index cf2e9768..8277535c 100644 --- a/Bootstrap.Admin/Scripts/noti.js +++ b/Bootstrap.Admin/Scripts/noti.js @@ -1,7 +1,7 @@ $(function () { var $btnRefreshUser = $('#refreshUsers'); var htmlNewUsersHeader = '
  • 登陆名称显示名称/备注注册时间
    操作
  • '; - var htmlNewUsers = '
  • {0}{4}:{1}{2}
  • '; + var htmlNewUsers = '
  • {0}{4}:{1}{2}
  • '; function listData() { $btnRefreshUser.toggleClass('fa-spin'); @@ -15,7 +15,7 @@ return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.ID, noti.DisplayName); }).join(''); $taskUsers.append(content); - if (!$.browser.versions.mobile) $('#tasks-users').find('.tipso_style').tipso({ position: 'top', width: 100 }); + if (!$.browser.versions.mobile) $('#tasks-users').find('[role="tooltip"]').tooltip({ delay: { "show": 500, "hide": 100 } }); } $btnRefreshUser.toggleClass('fa-spin'); } @@ -26,7 +26,7 @@ $btnRefreshUser.on('click', function () { listData(); }); - if (!$.browser.versions.mobile) $btnRefreshUser.tipso({ position: 'left', width: 100 }); + if (!$.browser.versions.mobile) $btnRefreshUser.tooltip({ container: 'body', delay: { "show": 500, "hide": 100 } }); $('#tasks-users').on('click', 'button', function () { var id = $(this).attr('data-id'); diff --git a/Bootstrap.Admin/Views/Admin/Notifications.cshtml b/Bootstrap.Admin/Views/Admin/Notifications.cshtml index 5c7540c6..b93c23bf 100644 --- a/Bootstrap.Admin/Views/Admin/Notifications.cshtml +++ b/Bootstrap.Admin/Views/Admin/Notifications.cshtml @@ -12,7 +12,7 @@ }
    -
    用户注册
    +
    用户注册
      diff --git a/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/Bootstrap.Admin/Views/Admin/Profiles.cshtml index e7eede05..a52910e0 100644 --- a/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -64,7 +64,7 @@
    -
    网站缓存
    +
    网站缓存