From f7d4ac1e57841f2a26e1308fd287a757c8a7ef19 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Fri, 3 Aug 2018 18:12:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E7=A7=BB?= =?UTF-8?q?=E9=99=A4lgbTooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/wwwroot/css/site.css | 4 ++++ Bootstrap.Admin/wwwroot/css/tasks.css | 8 ++------ Bootstrap.Admin/wwwroot/js/Groups.js | 4 ++-- Bootstrap.Admin/wwwroot/js/Longbow.Common.js | 16 +++------------- Bootstrap.Admin/wwwroot/js/Menus.js | 2 +- Bootstrap.Admin/wwwroot/js/Roles.js | 4 ++-- Bootstrap.Admin/wwwroot/js/Settings.js | 6 +++--- Bootstrap.Admin/wwwroot/js/Users.js | 4 ++-- Bootstrap.Admin/wwwroot/js/common-scripts.js | 2 +- Bootstrap.Admin/wwwroot/js/longbow.validate.js | 10 +++++----- Bootstrap.Admin/wwwroot/js/noti.js | 4 ++-- 11 files changed, 27 insertions(+), 37 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/css/site.css b/Bootstrap.Admin/wwwroot/css/site.css index 096914ea..1d12ffd1 100644 --- a/Bootstrap.Admin/wwwroot/css/site.css +++ b/Bootstrap.Admin/wwwroot/css/site.css @@ -502,3 +502,7 @@ label.dropdown-item:first-child { .form-inline .form-row, .form-inline .row { width: 100%; } + +.btn-xs { + padding: 1px 5px; +} diff --git a/Bootstrap.Admin/wwwroot/css/tasks.css b/Bootstrap.Admin/wwwroot/css/tasks.css index d49430e1..7e885678 100644 --- a/Bootstrap.Admin/wwwroot/css/tasks.css +++ b/Bootstrap.Admin/wwwroot/css/tasks.css @@ -29,7 +29,7 @@ .tasks-widget .task-list > li { position: relative; - font-size: 12px; + font-size: 0.75rem; } .tasks-widget .task-list li.last-line { @@ -69,14 +69,10 @@ .tasks-widget .task-list li > .task-title .badge { position: relative; display: inline-block; - top: -19px; + top: -16px; 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: 12px; margin-right: 4px; diff --git a/Bootstrap.Admin/wwwroot/js/Groups.js b/Bootstrap.Admin/wwwroot/js/Groups.js index dbbbdd65..d01b55a1 100644 --- a/Bootstrap.Admin/wwwroot/js/Groups.js +++ b/Bootstrap.Admin/wwwroot/js/Groups.js @@ -29,7 +29,7 @@ $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.GroupName)); $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogRole.modal('show'); } }); @@ -47,7 +47,7 @@ $dialogUserHeader.text($.format('{0}-用户授权窗口', row.GroupName)); $dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogUser.modal('show'); } }); diff --git a/Bootstrap.Admin/wwwroot/js/Longbow.Common.js b/Bootstrap.Admin/wwwroot/js/Longbow.Common.js index 13069bc8..637a9e6d 100644 --- a/Bootstrap.Admin/wwwroot/js/Longbow.Common.js +++ b/Bootstrap.Admin/wwwroot/js/Longbow.Common.js @@ -325,16 +325,6 @@ var op = $.extend({ header: "header", content: ".main-content" }, options); return ($(op.header).outerHeight() + $(op.content).outerHeight() + this.outerHeight() > $(window).height()) ? this.removeClass('fixed') : this.addClass('fixed'); }, - lgbTooltip: function (options) { - if (/show|hide|dispose/.test(options)) { - this.tooltip(options); - if (options === 'dispose') this.removeAttr('data-original-title'); - } - else { - this.tooltip($.extend({ delay: { "show": 100, "hide": 100 } }, options)); - } - return this; - }, lgbPopover: function (options) { if (/show|hide|dispose/.test(options)) { this.popover(options); @@ -369,13 +359,13 @@ $(element).parents('.form-group').addClass(errorClass).removeClass(validClass); }, unhighlight: function (element, errorClass, validClass) { - $(element).lgbTooltip('dispose').parents('.form-group').removeClass(errorClass).addClass(validClass); + $(element).tooltip('dispose').parents('.form-group').removeClass(errorClass).addClass(validClass); }, errorPlacement: function (label, element) { var $ele = $(element); - if (!$ele.attr('data-original-title')) $ele.lgbTooltip({ container: parent }); + if (!$ele.attr('data-original-title')) $ele.tooltip({ container: parent }); $ele.attr('data-original-title', $(label).text()); - $ele.lgbTooltip('show'); + $ele.tooltip('show'); $('#' + $ele.attr('aria-describedby')).addClass(this.settings.errorClass); } }); diff --git a/Bootstrap.Admin/wwwroot/js/Menus.js b/Bootstrap.Admin/wwwroot/js/Menus.js index b435f7f1..a3406fb2 100644 --- a/Bootstrap.Admin/wwwroot/js/Menus.js +++ b/Bootstrap.Admin/wwwroot/js/Menus.js @@ -52,7 +52,7 @@ $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.Name)); $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogRole.modal('show'); } }); diff --git a/Bootstrap.Admin/wwwroot/js/Roles.js b/Bootstrap.Admin/wwwroot/js/Roles.js index e064fd3e..0390d7b1 100644 --- a/Bootstrap.Admin/wwwroot/js/Roles.js +++ b/Bootstrap.Admin/wwwroot/js/Roles.js @@ -35,7 +35,7 @@ $dialogUserHeader.text($.format('{0}-用户授权窗口', row.RoleName)); $dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogUser.modal('show'); } }); @@ -53,7 +53,7 @@ $dialogGroupHeader.text($.format('{0}-部门授权窗口', row.RoleName)); $dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogGroup.modal('show'); } }); diff --git a/Bootstrap.Admin/wwwroot/js/Settings.js b/Bootstrap.Admin/wwwroot/js/Settings.js index b028736d..30783c8d 100644 --- a/Bootstrap.Admin/wwwroot/js/Settings.js +++ b/Bootstrap.Admin/wwwroot/js/Settings.js @@ -70,7 +70,7 @@ swal: false, callback: function (result) { if ($.isArray(result)) { - var html = '
  • {2}{0}{3}
    {7}
  • '; + var html = '
  • {2}{0}{3}
    {7}
  • '; var content = result.sort(function (x, y) { return x.Key > y.Key ? 1 : -1; }).map(function (ele) { @@ -114,7 +114,7 @@ }).join(''); $sortable.append($.format('
  • {0}
  • ', item.Desc)); $sortable.append(content); - $sortable.find('[role="tooltip"]').lgbTooltip({ container: 'body' }); + $sortable.find('[role="tooltip"]').tooltip(); } } }); @@ -148,7 +148,7 @@ listCacheUrl(options); }).last().trigger('click'); $sortable.on('click', '.btn', function () { - $(this).lgbTooltip('dispose'); + $(this).tooltip('dispose'); listCache({ url: $(this).attr('data-url') }); listCacheUrl(); }); diff --git a/Bootstrap.Admin/wwwroot/js/Users.js b/Bootstrap.Admin/wwwroot/js/Users.js index bd23427f..a6433439 100644 --- a/Bootstrap.Admin/wwwroot/js/Users.js +++ b/Bootstrap.Admin/wwwroot/js/Users.js @@ -31,7 +31,7 @@ $dialogRoleHeader.text($.format('{0}-角色授权窗口', row.DisplayName)); $dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogRole.modal('show'); } }); @@ -49,7 +49,7 @@ $dialogGroupHeader.text($.format('{0}-部门授权窗口', row.DisplayName)); $dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) { if (label.title == "") label.title = "未设置"; - }).lgbTooltip(); + }).tooltip(); $dialogGroup.modal('show'); } }); diff --git a/Bootstrap.Admin/wwwroot/js/common-scripts.js b/Bootstrap.Admin/wwwroot/js/common-scripts.js index 2d7440b0..59fb6d4a 100644 --- a/Bootstrap.Admin/wwwroot/js/common-scripts.js +++ b/Bootstrap.Admin/wwwroot/js/common-scripts.js @@ -165,7 +165,7 @@ $(function () { scrollTop: 0 }, 200); }); - $('[role="tooltip"]').lgbTooltip(); + $('[role="tooltip"]').tooltip(); // breadcrumb var arch = $('#nav-accordion').find('a.active').last(); diff --git a/Bootstrap.Admin/wwwroot/js/longbow.validate.js b/Bootstrap.Admin/wwwroot/js/longbow.validate.js index 14cd9686..c956b27b 100644 --- a/Bootstrap.Admin/wwwroot/js/longbow.validate.js +++ b/Bootstrap.Admin/wwwroot/js/longbow.validate.js @@ -74,7 +74,7 @@ var element = document.getElementById(name); var $element = $(element); that.tooltip.call(that, element, false); - $element.lgbTooltip('show'); + $element.tooltip('show'); } }, defaultMessage: function (element, rule) { @@ -87,7 +87,7 @@ settings: $.validator.defaults }, this.defaults(), options) this.$element.on('input.lgb.validate', this.options.childClass, function () { - if (!that.validElement(this)) $(this).lgbTooltip('show'); + if (!that.validElement(this)) $(this).tooltip('show'); }).on('inserted.bs.tooltip', this.options.childClass, function () { $('#' + $(this).attr('aria-describedby')).addClass(that.options.errorClass); }); @@ -124,7 +124,7 @@ var css = this.options.validClass + ' ' + this.options.errorClass; this.$element.find(this.options.childClass).each(function () { var $this = $(this); - $this.lgbTooltip('dispose'); + $this.tooltip('dispose'); $this.parent().removeClass(css); }); }; @@ -154,9 +154,9 @@ var $this = $(element); var $parent = $this.parent(); try { - if (valid) $this.lgbTooltip('dispose'); + if (valid) $this.tooltip('dispose'); else { - if (!$parent.hasClass('has-error')) $this.lgbTooltip({ container: $(window).width() > 768 ? op.container : (this.$element.find('.modal-body') || this.$element.find('.panel-body') || op.container) }); + if (!$parent.hasClass('has-error')) $this.tooltip(); } } catch (e) { diff --git a/Bootstrap.Admin/wwwroot/js/noti.js b/Bootstrap.Admin/wwwroot/js/noti.js index cf1bb2ae..91114b63 100644 --- a/Bootstrap.Admin/wwwroot/js/noti.js +++ b/Bootstrap.Admin/wwwroot/js/noti.js @@ -15,7 +15,7 @@ return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.Id, noti.DisplayName); }).join(''); $taskUsers.append(content); - $('#tasks-users').find('[role="tooltip"]').lgbTooltip(); + $('#tasks-users').find('[role="tooltip"]').tooltip(); } $btnRefreshUser.toggleClass('fa-spin'); } @@ -23,7 +23,7 @@ } listData(); - $btnRefreshUser.lgbTooltip().on('click', function () { + $btnRefreshUser.tooltip().on('click', function () { listData(); });