From b5b4fc5fd3c9d6c0c0f9c66e5751d0a73e6515f4 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Wed, 17 Oct 2018 18:12:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9Alongbow.common?= =?UTF-8?q?=E7=BB=84=E4=BB=B6lgbInfo=E6=96=B9=E6=B3=95=E8=8E=B7=E5=8F=96co?= =?UTF-8?q?ntainer=E5=B1=9E=E6=80=A7=E9=94=99=E8=AF=AF=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0placement=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/wwwroot/js/longbow.common.js | 6 ++++-- Bootstrap.Client/wwwroot/js/longbow.common.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/js/longbow.common.js b/Bootstrap.Admin/wwwroot/js/longbow.common.js index 8f8d168b..81db3f90 100644 --- a/Bootstrap.Admin/wwwroot/js/longbow.common.js +++ b/Bootstrap.Admin/wwwroot/js/longbow.common.js @@ -309,13 +309,15 @@ var $element = $(this); $element.append($.format('')); }); - var container = $(this).parent().attr('data-container') || '#dialogNew'; + var container = this.attr('data-container') || '#dialogNew'; this.find('[data-toggle="popover"]').popover($.extend({ title: function () { return $(this).parent().text(); }, content: function () { return $(this).parent().attr('data-content'); - }, trigger: 'focus', html: true, container: container + }, trigger: 'focus', html: true, container: container, placement: function () { + return $(this.element).parent().attr('data-placement') || 'auto'; + } }, option)); return this; }, diff --git a/Bootstrap.Client/wwwroot/js/longbow.common.js b/Bootstrap.Client/wwwroot/js/longbow.common.js index 22ec2323..2a029144 100644 --- a/Bootstrap.Client/wwwroot/js/longbow.common.js +++ b/Bootstrap.Client/wwwroot/js/longbow.common.js @@ -370,13 +370,15 @@ var $element = $(this); $element.append($.format('')); }); - var container = $(this).parent().attr('data-container') || '#dialogNew'; + var container = this.attr('data-container') || '#dialogNew'; this.find('[data-toggle="popover"]').popover($.extend({ title: function () { return $(this).parent().text(); }, content: function () { return $(this).parent().attr('data-content'); - }, trigger: 'focus', html: true, container: container + }, trigger: 'focus', html: true, container: container, placement: function () { + return $(this.element).parent().attr('data-placement') || 'auto'; + } }, option)); return this; },