]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3972 Show dropdown menu even without clicking on the menu entry
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 26 Nov 2012 11:17:48 +0000 (12:17 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 26 Nov 2012 11:23:01 +0000 (12:23 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_tools.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_user_panel.html.erb

index ecd47f15adf32b67b2cb0985af8532e85a1950b6..2c69acfcbb9cfa03dd8f6d5fa9496814de927354 100644 (file)
@@ -1,7 +1,7 @@
-<li>
-  <a href="#" class="link-more dropdown" onclick="$j('#tools-menu').toggle(); return false;"><%= message('layout.tools') -%></a>
+<li onmouseover="$j('#tools-menu').show();" onmouseout="$j('#tools-menu').hide();">
+  <span class="link-more dropdown"><%= message('layout.tools') -%></span>
   
-  <div id="tools-menu" class="dropdown-menu" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();">
+  <div id="tools-menu" class="dropdown-menu" style="display: none">
     <ul>
       <li><a href="<%= ApplicationController.root_context -%>/dependencies/index"><%= message('dependencies.page') -%></a></li>
     </ul>
index da5f96da4def8b0d20b4587cea0bc240706358b2..0c113dd1fa6391ef40c04cc44ea892d1eaafa63d 100644 (file)
@@ -3,12 +3,15 @@
     var sonarRecentHistory = new Sonar.RecentHistory('<%= ApplicationController.root_context -%>')
                                       .addTranslation('clear', '<%= message('layout.user_panel.recent_history.clear') -%>');
   }
+  
+  var shouldUpdateRecentHistory = true;
 </script>
 
-<li>
-  <a href="#" class="link-more" onclick="if (sonarRecentHistory) { sonarRecentHistory.populateRecentHistoryPanel(); }; $j('#user-panel').toggle(); return false;"><%= current_user ? current_user.name(true) : message('layout.user_panel.me') -%></a>
+<li onmouseover="if (sonarRecentHistory && shouldUpdateRecentHistory) { sonarRecentHistory.populateRecentHistoryPanel(); shouldUpdateRecentHistory = false;}; $j('#user-panel').show();" 
+    onmouseout="$j('#user-panel').hide(); shouldUpdateRecentHistory = true;">
+  <span class="link-more"><%= current_user ? current_user.name(true) : message('layout.user_panel.me') -%></span>
   
-  <div id="user-panel" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();">
+  <div id="user-panel" style="display: none">
     <div id="user-details">
       <% if current_user %>
         <b><%= current_user.name(true) -%></b>