]> source.dussan.org Git - sonarqube.git/commitdiff
Fix issue with the component viewer
authorStas Vilchik <vilchiks@gmail.com>
Thu, 17 Jul 2014 12:41:37 +0000 (18:41 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 17 Jul 2014 12:41:37 +0000 (18:41 +0600)
when it has one issue selected

sonar-server/src/main/coffee/component-viewer/app.coffee

index f398d217ba9a07fe8cbae27b190ce48b7092ff86..7994287166a7187f3b52f4541e00960b5cce5b63 100644 (file)
@@ -34,10 +34,11 @@ requirejs [
     viewerRegion: '#component-viewer'
 
 
-  App.requestComponentViewer = (s) ->
+  App.requestComponentViewer = (s, currentIssue) ->
     if s?
       settings = issues: false, coverage: false, duplications: false, scm: false, workspace: false
       s.split(',').forEach (d) -> settings[d] = true
+      settings.issues = false if currentIssue?
     else settings = null
     unless App.componentViewer?
       App.componentViewer = new ComponentViewer settings: settings
@@ -53,7 +54,7 @@ requirejs [
       t = d.split '='
       params[t[0]] = decodeURIComponent t[1]
 
-    viewer = App.requestComponentViewer params.settings
+    viewer = App.requestComponentViewer params.settings, params.currentIssue
     if params.component?
       loadIssue = (key) ->
         $.get API_ISSUE, key: key, (r) =>