From 2c9743405cfe53eb24f49216cc6209145ecf1d37 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 20 Apr 2016 16:32:47 +0200 Subject: [PATCH] SONAR-7374 Improve the UI when component viewer is loading source code --- .../source-viewer/templates/source-viewer.hbs | 10 ++++++++-- .../src/main/less/components/source.less | 16 ++++++++++++++++ .../resources/org/sonar/l10n/core.properties | 2 ++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs index d5ac6aed718..82df2448ac3 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs +++ b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs @@ -5,7 +5,10 @@ {{#if exist}} {{#if hasSourceBefore}} - +
+ + {{t 'source_viewer.loading_more_code'}} +
{{/if}} @@ -86,7 +89,10 @@
{{#if hasSourceAfter}} - +
+ + {{t 'source_viewer.loading_more_code'}} +
{{/if}} {{else}} diff --git a/server/sonar-web/src/main/less/components/source.less b/server/sonar-web/src/main/less/components/source.less index 5fb2928f08a..ff3050f7493 100644 --- a/server/sonar-web/src/main/less/components/source.less +++ b/server/sonar-web/src/main/less/components/source.less @@ -500,3 +500,19 @@ 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; + } +} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index cd2ad947976..1ccda3b5ea0 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -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... + #------------------------------------------------------------------------------ -- 2.39.5