From abf62de0cc4e5c93758c7b7090819d01932c0028 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 27 Nov 2016 17:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E7=99=BB?= =?UTF-8?q?=E9=99=86=E7=AA=97=E5=8F=A3=E6=B2=A1=E6=9C=89tips=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 8638c516..6ed4a403 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -146,19 +146,22 @@ rules: $.extend({}, rules), messages: $.extend({}, messages), highlight: function (element, errorClass, validClass) { - $(element).parents('.form-group').addClass(errorClass).removeClass(validClass); - $(element).tipso({ + var $ele = $(element); + $ele.parents('.form-group').addClass(errorClass).removeClass(validClass); + if ($ele.hasClass('tipso_style')) $ele.tipso({ useTitle: false, position: 'top', background: '#a94442' }); }, unhighlight: function (element, errorClass, validClass) { - $(element).parents('.form-group').removeClass(errorClass).addClass(validClass); - $(element).tipso('hide').tipso('destroy'); + var $ele = $(element); + $ele.parents('.form-group').removeClass(errorClass).addClass(validClass); + if ($ele.hasClass('tipso_style')) $ele.tipso('hide').tipso('destroy'); }, errorPlacement: function (label, element) { - $(element).tipso('update', 'content', $(label).text()); + var $ele = $(element); + if ($ele.hasClass('tipso_style')) $ele.tipso('update', 'content', $(label).text()); } }); if (handler && $.isArray(handler.button)) {