From b5b87c1b87c5484af283f2019a1a602fd4ff5e42 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 15 May 2013 17:02:33 +0200 Subject: [PATCH] SONAR-3755 fix nested tags "issue" --- sonar-server/src/main/webapp/javascripts/issue.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sonar-server/src/main/webapp/javascripts/issue.js b/sonar-server/src/main/webapp/javascripts/issue.js index e6fac587d57..480a55b82de 100644 --- a/sonar-server/src/main/webapp/javascripts/issue.js +++ b/sonar-server/src/main/webapp/javascripts/issue.js @@ -41,9 +41,11 @@ function postIssueForm(elt) { data: formElt.serialize()} ).success(function (htmlResponse) { var issueElt = formElt.closest('[data-issue-key]'); - issueElt.empty().append(htmlResponse); + var replaced = $j(htmlResponse); + issueElt.replaceWith(replaced); + // re-enable the links opening modal popups - issueElt.find('.open-modal').modal(); + replaced.find('.open-modal').modal(); } ).fail(function (jqXHR, textStatus) { closeIssueForm(elt); @@ -63,9 +65,10 @@ function doIssueAction(elt, action, parameters) { data: parameters } ).success(function (htmlResponse) { - issueElt.empty().append(htmlResponse); + var replaced = $j(htmlResponse); + issueElt.replaceWith(replaced); // re-enable the links opening modal popups - issueElt.find('.open-modal').modal(); + replaced.find('.open-modal').modal(); } ).fail(function (jqXHR, textStatus) { closeIssueForm(elt); -- 2.39.5