2 <table class="sidebar_title" width="100%">
4 <td align="left" id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
5 <td align="right"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
8 <div id="sidebar_content">
12 <script type="text/javascript">
16 function openSidebar(options) {
17 options = options || {};
24 if (options.width) { $("sidebar").style.width = options.width; }
25 else { $("sidebar").style.width = "30%"; }
27 $("sidebar").style.display = "block";
31 onclose = options.onclose;
34 function closeSidebar() {
35 $("sidebar").style.display = "none";
45 function updateSidebar(title, content) {
46 $("sidebar_title").innerHTML = title;
47 $("sidebar_content").innerHTML = content;
50 function sidebarOpen(title) {
51 return $("sidebar").style.display == "block" &&
52 $("sidebar_title").innerHTML == title;