@@ -1,26 +1,26 | |||
|
1 | 1 | <div class="tabs"> |
|
2 | 2 | <ul> |
|
3 | 3 | <% tabs.each do |tab| -%> |
|
4 | 4 | <li><%= link_to l(tab[:label]), { :tab => tab[:name] }, |
|
5 | 5 | :id => "tab-#{tab[:name]}", |
|
6 | 6 | :class => (tab[:name] != selected_tab ? nil : 'selected'), |
|
7 | 7 | :onclick => "showTab('#{tab[:name]}', this.href); this.blur(); return false;" %></li> |
|
8 | 8 | <% end -%> |
|
9 | 9 | </ul> |
|
10 | 10 | <div class="tabs-buttons" style="display:none;"> |
|
11 |
<button class="tab-left" onclick="moveTabLeft(this) |
|
|
12 |
<button class="tab-right" onclick="moveTabRight(this) |
|
|
11 | <button class="tab-left" type="button" onclick="moveTabLeft(this);"></button> | |
|
12 | <button class="tab-right" type="button" onclick="moveTabRight(this);"></button> | |
|
13 | 13 | </div> |
|
14 | 14 | </div> |
|
15 | 15 | |
|
16 | 16 | <script> |
|
17 | 17 | $(document).ready(displayTabsButtons); |
|
18 | 18 | $(window).resize(displayTabsButtons); |
|
19 | 19 | </script> |
|
20 | 20 | |
|
21 | 21 | <% tabs.each do |tab| -%> |
|
22 | 22 | <%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ), |
|
23 | 23 | :id => "tab-content-#{tab[:name]}", |
|
24 | 24 | :style => (tab[:name] != selected_tab ? 'display:none' : nil), |
|
25 | 25 | :class => 'tab-content') %> |
|
26 | 26 | <% end -%> |
General Comments 0
You need to be logged in to leave comments.
Login now