share/collection.js: Add the navigation buttons to the graphs.
[collection4.git] / share / collection.js
index e9b376a..d3fb11c 100644 (file)
@@ -1,7 +1,7 @@
 function format_instance(inst)
 {
   return ("<li class=\"instance\"><a href=\"" + location.pathname
-      + "?action=show_graph;" + inst.params + "\">" + inst.description
+      + "?action=show_instance;" + inst.params + "\">" + inst.description
       + "</a></li>");
 }
 
@@ -81,6 +81,22 @@ $(document).ready(function() {
     {
       update_search_suggestions ();
     });
+
+    $(".graph-img").append ("<div class=\"graph-buttons presets\">"
+        + "<div class=\"graph-button\" >H</div>"
+        + "<div class=\"graph-button\" >D</div>"
+        + "<div class=\"graph-button\" >W</div>"
+        + "<div class=\"graph-button\" >M</div>"
+        + "<div class=\"graph-button\" >Y</div>"
+        + "<div class=\"graph-button\" >!</div>"
+        + "</div>"
+        + "<div class=\"graph-buttons navigation\">"
+        + "<div class=\"graph-button\" >←</div>"
+        + "<div class=\"graph-button\" >−</div>"
+        + "<div class=\"graph-button\" >+</div>"
+        + "<div class=\"graph-button\" >→</div>"
+        + "</div>"
+        );
 });
 
 /* vim: set sw=2 sts=2 et fdm=marker : */