From: Stas Vilchik Date: Wed, 15 Jan 2014 08:46:05 +0000 (+0600) Subject: New Issues Page: Hide results list during request X-Git-Tag: 4.2~688 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=948879f00ac51cb4ec9a3e7c3d7d495c9a1124a0;p=sonarqube.git New Issues Page: Hide results list during request --- 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 df0851186fc..b2e3ae5301b 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/issues-app.js @@ -216,14 +216,22 @@ jQuery(function() { this.storeQuery(query, this.issues.sorting); + var that = this; + this.issuesView.$el.addClass('fetching'); if (firstPage) { this.issues.fetch({ - data: fetchQuery + data: fetchQuery, + success: function() { + that.issuesView.$el.removeClass('fetching'); + } }); } else { this.issues.fetch({ data: fetchQuery, - remove: false + remove: false, + success: function() { + that.issuesView.$el.removeClass('fetching'); + } }); } }; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator.css b/sonar-server/src/main/webapp/stylesheets/navigator.css index 479c74f1043..456acc9d921 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator.css @@ -130,6 +130,18 @@ .navigator-results-list > li.active .line:last-child { border-bottom-color: #e1e1e1; } +.navigator-results-list.fetching { + position: relative; +} +.navigator-results-list.fetching:before { + content: " "; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255, 255, 255, 0.7); +} .navigator-results-no-issues { padding-top: 20%; color: #999; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.css b/sonar-server/src/main/webapp/stylesheets/navigator/base.css index 90e13bebe89..4d4430bf99f 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.css @@ -130,6 +130,18 @@ .navigator-results-list > li.active .line:last-child { border-bottom-color: #e1e1e1; } +.navigator-results-list.fetching { + position: relative; +} +.navigator-results-list.fetching:before { + content: " "; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255, 255, 255, 0.7); +} .navigator-results-no-issues { padding-top: 20%; color: #999; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.less b/sonar-server/src/main/webapp/stylesheets/navigator/base.less index fa3660d7746..98f1d5fe0a0 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.less +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.less @@ -90,7 +90,6 @@ .navigator-results-list { - & > li { padding-top: @navigatorPadding; cursor: pointer; @@ -150,6 +149,18 @@ } + + &.fetching { + position: relative; + + &:before { + content: " "; + position: absolute; + top: 0; bottom: 0; left: 0; right: 0; + background-color: rgba(255, 255, 255, 0.7); + } + } + } .navigator-results-no-issues {