From 717d29f028f4b1b4e97dd4f16f7de246d363508f Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Sat, 14 Jan 2017 17:23:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=AA=8C=E8=AF=81=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=84=9A=E6=9C=AC=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index b94fca6b..f955b5ca 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -241,6 +241,9 @@ that.animate({ marginTop: "+=" + getHeight() }); }, autoValidate: function (rules, messages, handler) { + var parent = 'body'; + var $wrapper = $('#dialogNew'); + if ($wrapper.length == 1) parent = '#dialogNew'; // validate var $this = $(this); if (messages && $.isArray(messages.button)) { @@ -264,7 +267,7 @@ }, errorPlacement: function (label, element) { var $ele = $(element); - if (!$ele.attr('data-original-title')) $ele.tooltip({ container: '#dialogNew', delay: { "show": 500, "hide": 100 } }); + if (!$ele.attr('data-original-title')) $ele.tooltip({ container: parent, delay: { "show": 500, "hide": 100 } }); $ele.attr('data-original-title', $(label).text()); $ele.tooltip('show') }