diff options
author | Jenkins CI <ci@sonarsource.com> | 2014-12-19 11:28:14 +0100 |
---|---|---|
committer | Jenkins CI <ci@sonarsource.com> | 2014-12-19 11:28:14 +0100 |
commit | 4742f1a30dfa08e9cc30b793c310bb693ce14e44 (patch) | |
tree | 2a2d9bab25f7e58ec123c6047d3d7948eb9a5546 /server/sonar-web/src | |
parent | 4f18574ffcc8ff822afaa40a9a12c690b2fa6fad (diff) | |
parent | 863d26c40c1bb032733e912d5dcd8c883e8c1c4b (diff) | |
download | sonarqube-4742f1a30dfa08e9cc30b793c310bb693ce14e44.tar.gz sonarqube-4742f1a30dfa08e9cc30b793c310bb693ce14e44.zip |
Automatic merge from branch-5.0
* origin/branch-5.0:
SONAR-5878 Fix regression when parsing project properties
Fix navigation between issues in a big file
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r-- | server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee index 8454e60e12b..88dbf3311a3 100644 --- a/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee +++ b/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee @@ -90,7 +90,7 @@ define [ selected = @options.app.state.get 'selectedIndex' selectedIssue = @options.app.issues.at selected if selectedIssue.get('component') == @model.get('key') - @scrollToLine selectedIssue.get('line') + @scrollToIssue selectedIssue.get('key') else @unbindShortcuts() @options.app.controller.showComponentViewer selectedIssue @@ -115,14 +115,8 @@ define [ scrollToIssue: (key) -> el = @$("#issue-#{key}") if el.length > 0 - viewTop = el.offset().top - viewBottom = viewTop + el.outerHeight() - windowTop = $(window).scrollTop() - windowBottom = windowTop + $(window).height() - if viewTop < windowTop - $(window).scrollTop viewTop - TOP_OFFSET - if viewBottom > windowBottom - $(window).scrollTop $(window).scrollTop() - windowBottom + viewBottom + BOTTOM_OFFSET + line = el.closest('[data-line-number]').data 'line-number' + this.scrollToLine line else @unbindShortcuts() selected = @options.app.state.get 'selectedIndex' |