diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-07-28 14:47:23 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-07-28 14:47:23 +0200 |
commit | ae131b662ea8b3d5da1acf9a95d661b530b7b556 (patch) | |
tree | fda3018b378400b06ecd4561d387973c953e2cef /server/sonar-web | |
parent | d8324a360fb4c6e614db7a242f41fd7c5402d042 (diff) | |
download | sonarqube-ae131b662ea8b3d5da1acf9a95d661b530b7b556.tar.gz sonarqube-ae131b662ea8b3d5da1acf9a95d661b530b7b556.zip |
SONAR-5480 Make it possible to "un-choose" filters and selected line
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/source.coffee | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/source.coffee b/server/sonar-web/src/main/coffee/component-viewer/source.coffee index c4a9b5c9619..f0c17c7a127 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/source.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/source.coffee @@ -155,11 +155,13 @@ define [ highlightLine: (e) -> - @$(".#{HIGHLIGHTED_ROW_CLASS}").removeClass HIGHLIGHTED_ROW_CLASS row = $(e.currentTarget).closest('.row') - row.addClass HIGHLIGHTED_ROW_CLASS - @highlightedLine = row.data 'line-number' - @showLineActionsPopup(e) if @options.main.state.get 'canCreateManualIssue' + highlighted = row.is ".#{HIGHLIGHTED_ROW_CLASS}" + @$(".#{HIGHLIGHTED_ROW_CLASS}").removeClass HIGHLIGHTED_ROW_CLASS + unless highlighted + row.addClass HIGHLIGHTED_ROW_CLASS + @highlightedLine = row.data 'line-number' + @showLineActionsPopup(e) highlightCurrentLine: -> |