]> git.openstreetmap.org Git - rails.git/blob - app/views/site/_sidebar.rhtml
keys change depending on zoom level; force 210px sidebar width for keys
[rails.git] / app / views / site / _sidebar.rhtml
1 <div id="sidebar">
2   <table class="sidebar_title" width="100%">
3     <tr>
4       <td align="left" id="sidebar_title">Search Results</td>
5       <td align="right"><a href="javascript:closeSidebar()">Close</a></td>
6     </tr>
7   </table>
8   <div id="sidebar_content">
9   </div>
10 </div>
11
12 <script type="text/javascript">
13 <!--
14   function openSidebar() {
15         if (arguments.length) { $("sidebar").style.width = arguments[0]; }
16                          else { $("sidebar").style.width = "30%"; }
17     $("sidebar").style.display = "block";
18     <%= onopen %>
19   }
20
21   function closeSidebar() {
22     $("sidebar").style.display = "none";
23     <%= onclose %>
24   }
25
26   function updateSidebar(title, content) {
27     $("sidebar_title").innerHTML = title;
28     $("sidebar_content").innerHTML = content;
29   }
30 // -->
31 </script>