##// END OF EJS Templates
Tab left/right buttons for project menu (#20632)....
Jean-Philippe Lang -
r14685:2ec87100a91f
parent child
Show More
@@ -13,11 +13,6
13 13 </div>
14 14 </div>
15 15
16 <script>
17 $(document).ready(displayTabsButtons);
18 $(window).resize(displayTabsButtons);
19 </script>
20
21 16 <% tabs.each do |tab| -%>
22 17 <%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ),
23 18 :id => "tab-content-#{tab[:name]}",
@@ -87,8 +87,12
87 87 <h1><%= page_header_title %></h1>
88 88
89 89 <% if display_main_menu?(@project) %>
90 <div id="main-menu">
90 <div id="main-menu" class="tabs">
91 91 <%= render_main_menu(@project) %>
92 <div class="tabs-buttons" style="display:none;">
93 <button class="tab-left" onclick="moveTabLeft(this); return false;"></button>
94 <button class="tab-right" onclick="moveTabRight(this); return false;"></button>
95 </div>
92 96 </div>
93 97 <% end %>
94 98 </div>
@@ -90,7 +90,7 module Redmine
90 90 menu_items_for(menu, project) do |node|
91 91 links << render_menu_node(node, project)
92 92 end
93 links.empty? ? nil : content_tag('ul', links.join("\n").html_safe)
93 links.empty? ? nil : content_tag('ul', links.join.html_safe)
94 94 end
95 95
96 96 def render_menu_node(node, project=nil)
@@ -620,6 +620,13 function setupAjaxIndicator() {
620 620 });
621 621 }
622 622
623 function setupTabs() {
624 if($('.tabs').length > 0) {
625 displayTabsButtons();
626 $(window).resize(displayTabsButtons);
627 }
628 }
629
623 630 function hideOnLoad() {
624 631 $('.hol').hide();
625 632 }
@@ -677,3 +684,4 $(document).ready(setupAjaxIndicator);
677 684 $(document).ready(hideOnLoad);
678 685 $(document).ready(addFormObserversForDoubleSubmit);
679 686 $(document).ready(defaultFocus);
687 $(document).ready(setupTabs);
@@ -10,7 +10,7 h4 {border-bottom: 1px dotted #bbb;}
10 10 pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
11 11
12 12 /***** Layout *****/
13 #wrapper {background: white;}
13 #wrapper {background: white;overflow: hidden;}
14 14
15 15 #top-menu {background: #3E5B76; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
16 16 #top-menu ul {margin: 0; padding: 0;}
@@ -31,14 +31,15 pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
31 31 #header h1 a.ancestor { font-size: 80%; }
32 32 #quick-search {float:right;}
33 33
34 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
35 #main-menu ul {margin: 0; padding: 0;}
34 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px; width: 100%;}
35 #main-menu ul {margin: 0; padding: 0; width: 100%; white-space: nowrap;}
36 36 #main-menu li {
37 float:left;
37 float:none;
38 38 list-style-type:none;
39 39 margin: 0px 2px 0px 0px;
40 40 padding: 0px 0px 0px 0px;
41 41 white-space:nowrap;
42 display:inline-block;
42 43 }
43 44 #main-menu li a {
44 45 display: block;
@@ -50,6 +51,11 pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
50 51 }
51 52 #main-menu li a:hover {background:#759FCF; color:#fff;}
52 53 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
54 #main-menu .tabs-buttons {
55 right: 6px;
56 background-color: transparent;
57 border-bottom-color: transparent;
58 }
53 59
54 60 #admin-menu ul {margin: 0; padding: 0;}
55 61 #admin-menu li {margin: 0; padding: 0 0 6px 0; list-style-type:none;}
General Comments 0
You need to be logged in to leave comments. Login now