From: Stas Vilchik Date: Thu, 6 Feb 2014 09:34:31 +0000 (+0600) Subject: New Issues Page: do not show source code for CLOSED issues X-Git-Tag: 4.2~230 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f2befd8d8e05474a25413fccd6817dceee046e94;p=sonarqube.git New Issues Page: do not show source code for CLOSED issues --- diff --git a/sonar-server/src/main/webapp/javascripts/navigator/issues.js b/sonar-server/src/main/webapp/javascripts/navigator/issues.js index 79a5edcc69f..778dd8f7d5d 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/issues.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/issues.js @@ -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 },