]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3755 fix nested tags "issue"
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 15 May 2013 15:02:33 +0000 (17:02 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 15 May 2013 15:02:33 +0000 (17:02 +0200)
sonar-server/src/main/webapp/javascripts/issue.js

index e6fac587d57500cf9548cc1b6f6b6adc0f01142b..480a55b82de345dab69fe2918853918868394ddc 100644 (file)
@@ -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);