]> git.openstreetmap.org Git - rails.git/commitdiff
experimental pop-out map key
authorRichard Fairhurst <richard@systemed.net>
Mon, 8 Oct 2007 22:10:26 +0000 (22:10 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 8 Oct 2007 22:10:26 +0000 (22:10 +0000)
app/views/site/_search.rhtml
app/views/site/index.rhtml
public/images/keymapnik11.png [new file with mode: 0644]
public/images/keymapnik12.png [new file with mode: 0644]

index 84f44f0f44f9231c8c159b8fd265082f4608b639..c874e180ccaa08bb7a3d36bef53ec0c6e4957e51 100644 (file)
@@ -1,7 +1,7 @@
 <div id="search_results">
   <table class="search_results_title" width="100%">
     <tr>
-      <td align="left">Search Results</td>
+      <td align="left" id="search_title">Search Results</td>
       <td align="right"><a href="javascript:closeSearchResults()">Close</a></td>
     </tr>
   </table>
 
 <script type="text/javascript">
 <!--
+  function showKey() {
+    $("search_results").style.display = "block";
+    $("search_results_content").innerHTML = "<p><img src='images/keymapnik11.png' /></p>";
+    $("search_title").innerHTML = "Map key";
+       resizeMap();
+  }
+
   function startSearch() {
     $("search_results_content").innerHTML = "<p class='search_results_entry'>Searching...</p>";
+    $("search_title").innerHTML = "Search Results";
     $("search_field").style.display = "none";
     $("search_active").style.display = "inline";
   }
index bbd1a8a775887af67802e247c489a814ccf9d8eb..8615c59be460391468283d4c0439f5281388159d 100644 (file)
@@ -5,7 +5,7 @@
 <% end %>
 
 <% content_for :left_menu do %>
-<%= link_to "Map key", "http://wiki.openstreetmap.org/index.php/Map_Key" %>
+<%= link_to_function "Map key", "showKey();" %>
 <% end %>
 
 <%= render :partial => 'search', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
diff --git a/public/images/keymapnik11.png b/public/images/keymapnik11.png
new file mode 100644 (file)
index 0000000..8493675
Binary files /dev/null and b/public/images/keymapnik11.png differ
diff --git a/public/images/keymapnik12.png b/public/images/keymapnik12.png
new file mode 100644 (file)
index 0000000..0260b9f
Binary files /dev/null and b/public/images/keymapnik12.png differ