From 038b09c4e5da90e8a644e2084b79601cd5bf1e78 Mon Sep 17 00:00:00 2001 From: amplam Date: Thu, 24 Apr 2025 17:06:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BD=93=E8=8F=9C=E5=8D=95=E6=9C=89?= =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95?= =?UTF-8?q?sidebar=20=E5=8F=AF=E5=88=A9=E7=94=A8=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=89=A9=E5=B1=95=E5=B1=9E=E6=80=A7=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0data-href=E5=B1=9E=E6=80=A7=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/assets/js/backend.js b/public/assets/js/backend.js index dab16648..f011bcbb 100755 --- a/public/assets/js/backend.js +++ b/public/assets/js/backend.js @@ -22,6 +22,7 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) { }); $.each(badgeList, function (k, v) { var anchor = top.window.$("li a[addtabs][url='" + k + "']"); + anchor=anchor??top.window.$("li a[addtabs][data-href='" + k + "']"); if (anchor) { top.window.$(".pull-right-container", anchor).html(v); top.window.$(".nav-addtabs li a[node-id='" + anchor.attr("addtabs") + "'] .pull-right-container").html(v); -- Gitee From 9d4a5e04f28ae944736905f442c9f95c7a910361 Mon Sep 17 00:00:00 2001 From: amplam Date: Fri, 25 Apr 2025 10:55:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BD=93=E8=8F=9C=E5=8D=95=E6=9C=89?= =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95?= =?UTF-8?q?sidebar=20=E5=8F=AF=E5=88=A9=E7=94=A8=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=89=A9=E5=B1=95=E5=B1=9E=E6=80=A7=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0data-href=E5=B1=9E=E6=80=A7=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/public/assets/js/backend.js b/public/assets/js/backend.js index f011bcbb..d433b94a 100755 --- a/public/assets/js/backend.js +++ b/public/assets/js/backend.js @@ -22,11 +22,14 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) { }); $.each(badgeList, function (k, v) { var anchor = top.window.$("li a[addtabs][url='" + k + "']"); - anchor=anchor??top.window.$("li a[addtabs][data-href='" + k + "']"); - if (anchor) { - top.window.$(".pull-right-container", anchor).html(v); - top.window.$(".nav-addtabs li a[node-id='" + anchor.attr("addtabs") + "'] .pull-right-container").html(v); - } + if (!anchor||anchor.html()===undefined){ + k = k.replace(Config.moduleurl+'/', ""); + anchor=top.window.$("li a[addtabs][data-href='" + k + "']"); + } + if (anchor&&v) { + top.window.$(".pull-right-container", anchor).html(v); + top.window.$(".nav-addtabs li a[node-id='" + anchor.attr("addtabs") + "'] .pull-right-container").html(v); + } }); }, addtabs: function (url, title, icon) { -- Gitee