Skip to content

Commit

Permalink
#3413 - more js tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
YegorKozlov committed Aug 16, 2024
1 parent 6aa0a94 commit 13ef794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
-->
<sly
data-sly-use.redirectsTemplate="../template.html"
data-sly-call="${redirectsTemplate.row @ redirectResource = resource}"
data-sly-call="${redirectsTemplate.row @ redirectResource = resource, allowRearrange = true}"
/>

0 comments on commit 13ef794

Please sign in to comment.