]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7374 Improve the UI when component viewer is loading source code
authorStas Vilchik <vilchiks@gmail.com>
Wed, 20 Apr 2016 14:32:47 +0000 (16:32 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 20 Apr 2016 14:32:47 +0000 (16:32 +0200)
server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs
server/sonar-web/src/main/less/components/source.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index d5ac6aed718f638a4e2490239935427beaf043d2..82df2448ac32722fc8ba4a60947c54235f8abd0f 100644 (file)
@@ -5,7 +5,10 @@
   {{#if exist}}
 
     {{#if hasSourceBefore}}
-      <i class="spinner js-component-viewer-source-before"></i>
+      <div class="source-viewer-more-code">
+        <i class="spinner js-component-viewer-source-before"></i>
+        <span class="note spacer-left">{{t 'source_viewer.loading_more_code'}}</span>
+      </div>
     {{/if}}
 
     <table class="source-table">
     </table>
 
     {{#if hasSourceAfter}}
-      <i class="spinner js-component-viewer-source-after"></i>
+      <div class="source-viewer-more-code">
+        <i class="spinner js-component-viewer-source-after"></i>
+        <span class="note spacer-left">{{t 'source_viewer.loading_more_code'}}</span>
+      </div>
     {{/if}}
 
   {{else}}
index 5fb2928f08ab0b61cc0e5afbf96cab0c8389f3ec..ff3050f74938f65ffdafd585ed655744560184eb 100644 (file)
     display: none;
   }
 }
+
+.source-viewer-more-code {
+  padding: 40px 0;
+  border-bottom: 1px solid @barBorderColor;
+  background-color: @barBackgroundColor;
+  text-align: center;
+
+  .spinner {
+    top: -1px;
+  }
+
+  .source-table + & {
+    border-bottom: none;
+    border-top: 1px solid @barBorderColor;
+  }
+}
index cd2ad947976279e3ac07f73a1028b0955dd7dc8f..1ccda3b5ea03bf194bb74eed093ad58ca6d20ff7 100644 (file)
@@ -2985,6 +2985,8 @@ source_viewer.tooltip.it.partially-covered=Partially covered by integration test
 source_viewer.tooltip.it.uncovered=Not covered by integration tests.
 source_viewer.tooltip.new_code=New {0}.
 
+source_viewer.loading_more_code=Loading More Code...
+
 
 
 #------------------------------------------------------------------------------