]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6160 Show a notification when user reaches the last issue / rule
authorStas Vilchik <vilchiks@gmail.com>
Tue, 15 Sep 2015 08:51:56 +0000 (10:51 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 15 Sep 2015 08:51:56 +0000 (10:51 +0200)
server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list.hbs
server/sonar-web/src/main/js/apps/issues/templates/issues-workspace-list.hbs
server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
server/sonar-web/src/main/less/components/search-navigator.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 37421cb75c2dac4078fc8aa79b48ba40a014338e..a4020b2662792ef84019227184cd542adb74ba4b 100644 (file)
@@ -1,5 +1,6 @@
 <div class="js-list"></div>
 
-<div class="search-navigator-workspace-list-more js-more">
-  <i class="spinner"></i>
+<div class="search-navigator-workspace-list-more">
+  <span class="js-more"><i class="spinner"></i></span>
+  <div class="js-last-element-reached bordered-top note">&nbsp;<br>{{t 'the_end'}}</div>
 </div>
index 37421cb75c2dac4078fc8aa79b48ba40a014338e..a4020b2662792ef84019227184cd542adb74ba4b 100644 (file)
@@ -1,5 +1,6 @@
 <div class="js-list"></div>
 
-<div class="search-navigator-workspace-list-more js-more">
-  <i class="spinner"></i>
+<div class="search-navigator-workspace-list-more">
+  <span class="js-more"><i class="spinner"></i></span>
+  <div class="js-last-element-reached bordered-top note">&nbsp;<br>{{t 'the_end'}}</div>
 </div>
index a9c1831c835eb264210ea0f1b588941895913a4a..90092b1bb028f44520ba693a9ddeadab4814b66a 100644 (file)
@@ -24,7 +24,8 @@ define(function () {
   return Marionette.CompositeView.extend({
 
     ui: {
-      loadMore: '.js-more'
+      loadMore: '.js-more',
+      lastElementReached: '.js-last-element-reached'
     },
 
     childViewOptions: function () {
@@ -49,8 +50,14 @@ define(function () {
       this.unbindShortcuts();
     },
 
+    onRender: function () {
+      this.toggleLoadMore();
+    },
+
     toggleLoadMore: function () {
-      this.ui.loadMore.toggle(!this.options.app.state.get('maxResultsReached'));
+      var maxResultsReached = this.options.app.state.get('maxResultsReached');
+      this.ui.loadMore.toggle(!maxResultsReached);
+      this.ui.lastElementReached.toggle(maxResultsReached);
     },
 
     bindScrollEvents: function () {
index 957c1180fbb774112134e2065c7f660d3b2d9e6e..1f15099c2fed97ea43a7052221fa7f0df39d6db5 100644 (file)
 
 .search-navigator-workspace-list-more {
   margin-top: 10px;
+  margin-bottom: 10px;
   padding: 5px 10px;
   text-align: center;
 }
index 4a5d04c377ca5d00c08631d838276e861be1456f..5fb13b140bc2c0459c6239a9eb264bd02ac92b0d 100644 (file)
@@ -158,6 +158,7 @@ sub_views=Sub-views
 table=Table
 technical_debt=Technical Debt
 template=Template
+the_end=The End
 title=Title
 to=To
 to.downcase=to