]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_sidebar.rhtml
Split out sidebar code from the search code so it can be reused for the
[rails.git] / app / views / site / _sidebar.rhtml
diff --git a/app/views/site/_sidebar.rhtml b/app/views/site/_sidebar.rhtml
new file mode 100644 (file)
index 0000000..ae557f9
--- /dev/null
@@ -0,0 +1,29 @@
+<div id="sidebar">
+  <table class="sidebar_title" width="100%">
+    <tr>
+      <td align="left" id="sidebar_title">Search Results</td>
+      <td align="right"><a href="javascript:closeSidebar()">Close</a></td>
+    </tr>
+  </table>
+  <div id="sidebar_content">
+  </div>
+</div>
+
+<script type="text/javascript">
+<!--
+  function openSidebar() {
+    $("sidebar").style.display = "block";
+    <%= onopen %>
+  }
+
+  function closeSidebar() {
+    $("sidebar").style.display = "none";
+    <%= onclose %>
+  }
+
+  function updateSidebar(title, content) {
+    $("sidebar_title").innerHTML = title;
+    $("sidebar_content").innerHTML = content;
+  }
+// -->
+</script>