]> git.openstreetmap.org Git - rails.git/blob - app/views/site/_sidebar.rhtml
waterway=stream,natural=peak
[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
18     $("sidebar").style.display = "block";
19
20     <%= onopen %>
21   }
22
23   function closeSidebar() {
24     $("sidebar").style.display = "none";
25
26     <%= onclose %>
27   }
28
29   function updateSidebar(title, content) {
30     $("sidebar_title").innerHTML = title;
31     $("sidebar_content").innerHTML = content;
32   }
33
34   function sidebarOpen(title) {
35     return $("sidebar").style.display == "block" &&
36            $("sidebar_title").innerHTML == title;
37   }
38 // -->
39 </script>