]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_sidebar.html.erb
Implement a generic system for updating coordinates on links
[rails.git] / app / views / site / _sidebar.html.erb
index dd15ef7ba64b2e00ac17de7da3066d3a11c38f0f..f7e7229c89432bcb9b0835965534b5c090b58e98 100644 (file)
@@ -1,8 +1,8 @@
 <div id="sidebar">
   <table class="sidebar_title" width="100%">
     <tr>
-      <td align="left" id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
-      <td align="right"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
+      <td id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
+      <td id="sidebar_close"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
     </tr>
   </table>
   <div id="sidebar_content">
@@ -21,6 +21,8 @@
        onclose = null;
     }
 
+    if (options.title) { $("sidebar_title").innerHTML = options.title; }
+
     if (options.width) { $("sidebar").style.width = options.width; }
     else { $("sidebar").style.width = "30%"; }
 
     $("sidebar_title").innerHTML = title;
     $("sidebar_content").innerHTML = content;
   }
-
-  function sidebarOpen(title) {
-    return $("sidebar").style.display == "block" &&
-           $("sidebar_title").innerHTML == title;
-  }
 // -->
 </script>