in /nodes, click row to show info[]
[arvados.git] / app / assets / javascripts / nodes.js
index dee720facdcda703fe5067aef3fcec32c121f50b..a734426a756187aab66f4f10f6b2ceade2685eb0 100644 (file)
@@ -1,2 +1,17 @@
+// -*- mode: javascript; js-indent-level: 4; indent-tabs-mode: nil; -*-
 // Place all the behaviors and hooks related to the matching controller here.
 // All this logic will automatically be available in application.js.
+
+var loaded_nodes_js;
+$(function(){
+    if (loaded_nodes_js) return; loaded_nodes_js = true;
+
+    $('[data-showhide-selector]').on('click', function(e){
+        var x = $($(this).attr('data-showhide-selector'));
+        if (x.css('display') == 'none')
+            x.show();
+        else
+            x.hide();
+    });
+    $('[data-showhide-default]').hide();
+});