diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-10-07 13:38:14 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-10-07 13:38:20 +0200 |
commit | 026adeae78d28f4a8da9cdb0fe066047b2fcaa98 (patch) | |
tree | ffe1501b677ee5089f3ea6fa6cc2b022117987ba /server | |
parent | d92dc2e1e899f599abae88a7791926ce9c18005b (diff) | |
download | sonarqube-026adeae78d28f4a8da9cdb0fe066047b2fcaa98.tar.gz sonarqube-026adeae78d28f4a8da9cdb0fe066047b2fcaa98.zip |
SONAR-5597 When clicking on a tab, automatically select its most important filter
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/header.coffee | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/mixins/main-scm.coffee | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/header.coffee b/server/sonar-web/src/main/coffee/component-viewer/header.coffee index 175a4c59221..c39e9f1a7e8 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/header.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/header.coffee @@ -173,7 +173,11 @@ define [ unless active el.addClass 'active' scope = el.data 'scope' - @enableBar scope + @enableBar(scope).done => + @$('.js-filter-unresolved-issues').click() if scope == 'issues' + @$('.js-filter-lines-to-cover').click() if scope == 'coverage' + @$('.js-filter-duplications').click() if scope == 'duplications' + @$('.js-filter-modified-lines').click() if scope == 'scm' changeSettings: -> diff --git a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-scm.coffee b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-scm.coffee index d13be6b4e18..3691672b0b9 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-scm.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-scm.coffee @@ -62,11 +62,11 @@ define [], () -> _filterBySCM: () -> formattedSource = @source.get 'formattedSource' period = @state.get 'period' + @settings.set 'scm', true unless period? return @showAllLines() else periodDate = period.get 'sinceDate' - @settings.set 'scm', true @sourceView.resetShowBlocks() scmBlockLine = 1 predicate = false |