From 607ac1dc3a004c03fb605c0cdd0b0179d5d77c55 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 2 Oct 2019 17:42:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(#I12XCW):=20=E5=9C=A8=E7=BA=BF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=AE=BF=E9=97=AE=E5=8E=86=E5=8F=B2=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12XCW popover 增加新的属性 sanitize 默认为 true #Issue link #I12XCW --- .../Bootstrap.Admin/wwwroot/js/online.js | 24 +++++++++---------- .../Bootstrap.DataAccess.csproj | 3 ++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/admin/Bootstrap.Admin/wwwroot/js/online.js b/src/admin/Bootstrap.Admin/wwwroot/js/online.js index d1b8f8d6..6211d190 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/js/online.js +++ b/src/admin/Bootstrap.Admin/wwwroot/js/online.js @@ -37,20 +37,18 @@ $(function () { var $this = $(this); if (!$this.data($.fn.popover.Constructor.DATA_KEY)) { var id = $this.attr('data-id'); - $.bc({ - id: id, url: apiUrl, - callback: function (result) { - if (!result) return; - var content = result.map(function (item) { - return $.format("{0}{1}", item.Key, item.Value); - }).join(''); - content = content === '' ? - '已断开' : - $.format('
{0}
访问时间访问地址
', content); - $this.popover({ content: content, placement: $(window).width() < 768 ? 'top' : 'left' }); - $this.popover('show'); - } + var data = $table.bootstrapTable('getData'); + var row = data.filter(function (v) { + return v.ConnectionId === id; }); + var content = row[0].RequestUrls.map(function (item) { + return $.format("{0}{1}", item.Key, item.Value); + }).join(''); + content = content === '' ? + '已断开' : + $.format("
{0}
访问时间访问地址
", content); + $this.popover({ content: content, sanitize: false, placement: $(window).width() < 768 ? 'top' : 'left' }); + $this.popover('show'); } }).on('mouseup', 'button[data-id]', function () { $(this).focus(); diff --git a/src/admin/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj b/src/admin/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj index 13d4e880..13a7775b 100644 --- a/src/admin/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj +++ b/src/admin/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj @@ -6,6 +6,7 @@ + @@ -14,7 +15,7 @@ - +