From 13ef794ff9ce45ac739b3094e06d0eba95acd3e9 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Fri, 16 Aug 2024 15:30:42 +0300 Subject: [PATCH] #3413 - more js tweaks --- .../utilities/manage-redirects/clientlibs/app.js | 9 ++++++--- .../manage-redirects/redirect-row/redirect-row.html | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/clientlibs/app.js b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/clientlibs/app.js index bc9cfcdd30..64af5c06a7 100755 --- a/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/clientlibs/app.js +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/clientlibs/app.js @@ -115,15 +115,18 @@ $.ajax({ url: redirectPath + ".html" }).done(function (trHtml) { + var tr; if (response.isCreate) { var editRedirectTable = $(TABLE_SELECTOR); - var tr = editRedirectTable + tr = editRedirectTable .find("tbody")[0] .appendChild(document.createElement("tr")); - $(tr).replaceWith(trHtml); + tr.id = redirectId; + tr.dataset.path = redirectPath; } else { - $("#" + redirectId).replaceWith(trHtml); + tr = $("#" + redirectId)[0]; } + tr.innerHTML = trHtml; var ui = $(window).adaptTo("foundation-ui"); ui.clearWait(); }); diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/redirect-row/redirect-row.html b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/redirect-row/redirect-row.html index 22df49caa4..304a5e0cfb 100644 --- a/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/redirect-row/redirect-row.html +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/manage-redirects/redirect-row/redirect-row.html @@ -21,5 +21,5 @@ -->