From cc0ca65fabf63eac0fea0f5888b11c25c5a7dce2 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 27 Nov 2016 22:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=98=AF=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=8F=96=E6=B6=88tip=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 4 ++-- Bootstrap.Admin/Content/js/common-scripts.js | 3 ++- Bootstrap.Admin/Scripts/Profiles.js | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 9e2f8b46..eeb02474 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -148,7 +148,7 @@ highlight: function (element, errorClass, validClass) { var $ele = $(element); $ele.parents('.form-group').addClass(errorClass).removeClass(validClass); - if ($.isFunction($ele.tipso)) $ele.tipso({ + if (!$.browser.versions.mobile && $.isFunction($ele.tipso)) $ele.tipso({ useTitle: false, position: 'top', background: '#a94442' @@ -161,7 +161,7 @@ }, errorPlacement: function (label, element) { var $ele = $(element); - if ($.isFunction($ele.tipso)) $ele.tipso('update', 'content', $(label).text()); + if (!$.browser.versions.mobile && $.isFunction($ele.tipso)) $ele.tipso('update', 'content', $(label).text()); } }); if (handler && $.isArray(handler.button)) { diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index f0975a46..f2ac0f08 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -15,7 +15,8 @@ $('#main-content, .content-body, body').animate({ scrollTop: 0 }, 200); - }).tipso({ position: 'left', background: '#333', width: 70 }); + }); + if (!$.browser.versions.mobile) $("#gotoTop").tipso({ position: 'left', background: '#333', width: 70 }); // breadcrumb var arch = $('#nav-accordion').find('a.active').last(); diff --git a/Bootstrap.Admin/Scripts/Profiles.js b/Bootstrap.Admin/Scripts/Profiles.js index 30b26139..7d050588 100644 --- a/Bootstrap.Admin/Scripts/Profiles.js +++ b/Bootstrap.Admin/Scripts/Profiles.js @@ -90,7 +90,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) { @@ -134,13 +134,17 @@ }).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 }); } } } }); } - $('#refreshCache').tipso({ position: 'left', width: 70 }).click(function () { listCacheUrl(); }).trigger('click'); - $('#clearCache').tipso({ position: 'left', width: 70 }).click(function () { listCacheUrl({ clear: true }); }); + $('#refreshCache').click(function () { listCacheUrl(); }).trigger('click'); + $('#clearCache').click(function () { listCacheUrl({ clear: true }); }); + if (!$.browser.versions.mobile) { + $('#refreshCache, #clearCache').tipso({ width: 70, position: 'left' }); + } $sortable.on('click', '.btn', function () { console.log($(this).attr('data-key')); listCache({ key: $(this).attr('data-key'), url: $(this).attr('data-url') });