]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3524 Display a message when leaf is reached
authorJulien Lancelot <julien.lancelot@gmail.com>
Wed, 28 Aug 2013 10:58:59 +0000 (12:58 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Wed, 28 Aug 2013 10:59:10 +0000 (12:59 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb
sonar-server/src/main/webapp/javascripts/application.js

index cd4a4ca5da5d4f9c47c2a7be6e303478df27870b..7e81970d66440394779fb50ada9d35a2c11a5d52 100644 (file)
@@ -1677,7 +1677,7 @@ bulk_deletion.delete_all_ghosts=Delete all ghosts
 #
 #------------------------------------------------------------------------------
 treemap.click_help=Left click to zoom in. Right click to zoom out.
-
+treemap.bootom_level_reached=Zooming in is not possible as you have reached the bottom level
 
 
 #------------------------------------------------------------------------------
index d886ae84746187bc854657af61d12f5706b7b270..20148674d412c1cf1c874e031b682d711dfb645e 100644 (file)
@@ -18,6 +18,7 @@
       <% end %>
       <td>
         <%= image_tag 'loading-small.gif', :id => "tm-loading-#{treemap_id}", :style => 'display:none' -%>
+        <span id="tm-bottom-level-reached-msg-<%= treemap_id %>" class="note" style="display:none;"><%= message('treemap.bootom_level_reached') -%></span>
       </td>
     </tr>
   </table>
index fb468cd78dc965770d03b8a8abfe73dd71cb9cdd..42d5c35c41c056d43f3de2a100385284319dce1a 100644 (file)
@@ -206,8 +206,9 @@ Treemap.prototype.load = function () {
         self.initNodes();
       } else {
         // SONAR-3524
-        // When data is empty, do not display it and revert breadcrumb state
+        // When data is empty, do not display it, revert breadcrumb state and display a message to user
         self.breadcrumb.pop();
+        $j("#tm-bottom-level-reached-msg-" + self.id).show();
       }
       $j("#tm-loading-" + self.id).hide();
     }
@@ -228,6 +229,7 @@ Treemap.prototype.initNodes = function () {
     $j(this).on("contextmenu", function (event) {
       event.stopPropagation();
       event.preventDefault();
+      $j("#tm-bottom-level-reached-msg-" + self.id).hide();
       // right click
       if (self.breadcrumb.length > 1) {
         self.breadcrumb.pop();