From f2befd8d8e05474a25413fccd6817dceee046e94 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 6 Feb 2014 15:34:31 +0600 Subject: [PATCH] New Issues Page: do not show source code for CLOSED issues --- .../webapp/javascripts/navigator/issues.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 }, -- 2.39.5