From cfde80a66144d9ff710de5628919e4a179ea1a09 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 3 Feb 2014 15:31:29 +0600 Subject: [PATCH] New Issues Page: fix pagination issues --- .../javascripts/navigator/issues-app.js | 11 +++++----- .../src/main/webapp/stylesheets/navigator.css | 16 +++++++++++++++ .../webapp/stylesheets/navigator/base.css | 16 +++++++++++++++ .../webapp/stylesheets/navigator/base.less | 20 +++++++++++++++++++ 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js b/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js index 0a46c40d436..efe44e91529 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js @@ -297,7 +297,7 @@ jQuery(function() { this.storeQuery(query, this.issues.sorting); var that = this; - this.issuesView.$el.empty().addClass('navigator-fetching'); + this.issuesView.$el.addClass('navigator-fetching'); if (firstPage) { this.issues.fetch({ data: fetchQuery, @@ -305,6 +305,7 @@ jQuery(function() { that.issuesView.$el.removeClass('navigator-fetching'); } }); + this.detailsRegion.reset(); } else { this.issues.fetch({ data: fetchQuery, @@ -314,8 +315,6 @@ jQuery(function() { } }); } - - this.detailsRegion.reset(); }; @@ -326,8 +325,10 @@ jQuery(function() { NavigatorApp.fetchNextPage = function() { - this.issuesPage++; - this.fetchIssues(false); + if (this.issuesPage < this.issues.paging.pages) { + this.issuesPage++; + this.fetchIssues(false); + } }; }); diff --git a/sonar-server/src/main/webapp/stylesheets/navigator.css b/sonar-server/src/main/webapp/stylesheets/navigator.css index bf2941c6666..5c131c26b33 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator.css @@ -206,6 +206,18 @@ .navigator-results-list > li.active + li { border-top-color: #4B9FD5; } +.navigator-results-list.navigator-fetching > li .line-nowrap { + text-overflow: clip; + /* thanks to FF */ + +} +.navigator-results-list.navigator-fetching:before { + position: fixed; + top: 134px; + bottom: 0; + left: 0; + width: 319px; +} .navigator-results-no-issues { padding-top: 20%; color: #999; @@ -224,6 +236,7 @@ top: 104px; left: 320px; right: 0; + padding: 10px; border-bottom: 1px solid #e1e1e1; background-color: #fff; } @@ -248,6 +261,9 @@ padding-right: 0; border-right: 0; } +.navigator-details .rule-desc { + float: none; +} .navigator-actions { padding: 0 10px 0 0; border-right: 1px solid #e1e1e1; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.css b/sonar-server/src/main/webapp/stylesheets/navigator/base.css index f6051ffe963..625cf369e22 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.css @@ -206,6 +206,18 @@ .navigator-results-list > li.active + li { border-top-color: #4B9FD5; } +.navigator-results-list.navigator-fetching > li .line-nowrap { + text-overflow: clip; + /* thanks to FF */ + +} +.navigator-results-list.navigator-fetching:before { + position: fixed; + top: 134px; + bottom: 0; + left: 0; + width: 319px; +} .navigator-results-no-issues { padding-top: 20%; color: #999; @@ -224,6 +236,7 @@ top: 104px; left: 320px; right: 0; + padding: 10px; border-bottom: 1px solid #e1e1e1; background-color: #fff; } @@ -248,6 +261,9 @@ padding-right: 0; border-right: 0; } +.navigator-details .rule-desc { + float: none; +} .navigator-actions { padding: 0 10px 0 0; border-right: 1px solid #e1e1e1; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.less b/sonar-server/src/main/webapp/stylesheets/navigator/base.less index 241c1c28d10..3616620f2e3 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.less +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.less @@ -239,6 +239,21 @@ & > li.active + li { border-top-color: #4B9FD5; } + + &.navigator-fetching { + + & > li .line-nowrap { + text-overflow: clip; /* thanks to FF */ + } + + &:before { + position: fixed; + top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorStatusHeight; + bottom: 0; + left: 0; + width: @navigatorResultsWidth - 1px; + } + } } .navigator-results-no-issues { @@ -264,6 +279,7 @@ top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight; left: @navigatorResultsWidth; right: 0; + padding: @navigatorPadding; border-bottom: 1px solid @navigatorBorderLightColor; background-color: #fff; } @@ -292,6 +308,10 @@ } } } + + .rule-desc { + float: none; + } } -- 2.39.5