]> source.dussan.org Git - sonarqube.git/commitdiff
New Issues Page: do not show source code for CLOSED issues
authorStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 09:34:31 +0000 (15:34 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 09:34:31 +0000 (15:34 +0600)
sonar-server/src/main/webapp/javascripts/navigator/issues.js

index 79a5edcc69fa7c5f7526aa76ab33be3ba82ae7e3..778dd8f7d5dcacb6e5c31594e499c1e748e33752 100644 (file)
@@ -173,14 +173,20 @@ jQuery(function() {
           app = this.options.app,
           detailView = new window.SS.IssueDetailView({
             model: this.model
-          });
+          }),
+          showCallback = function() {
+            jQuery('.navigator-details').removeClass('navigator-fetching');
+            app.detailsRegion.show(detailView);
+          };
 
       jQuery('.navigator-details').empty().addClass('navigator-fetching');
       jQuery.when(detailView.model.fetch()).done(function() {
-        that.fetchSource(detailView, function() {
-          jQuery('.navigator-details').removeClass('navigator-fetching');
-          app.detailsRegion.show(detailView);
-        });
+        if (that.model.get('status') !== 'CLOSED') {
+          that.fetchSource(detailView, showCallback);
+        } else {
+          showCallback();
+        }
+
       });
     },
 
@@ -807,7 +813,7 @@ jQuery(function() {
 
     onDomRefresh: function() {
       var sourceTitleHeight = this.$('.source_title').outerHeight();
-      jQuery('.navigator-details').css('padding-top', (sourceTitleHeight + 10) + 'px');
+      jQuery('.navigator-details').css('padding-top', (sourceTitleHeight + 10) + 'px');sho
     },