Added start of inventory summary view and cleaned up inventory template location
[htsworkflow.git] / htsworkflow / frontend / static / js / htsw-inventory.js
index 6f44e5026a4f7765509e2d7a1c775fa544b5c35a..3cbca3f456196094c82bf8ec9c0ec381c146b2ef 100644 (file)
@@ -1,4 +1,11 @@
 
+var inventory_item_dblclick_handler = function(grid, row_index, e){
+    //quick_msg('Choose Row: ' + row_index);
+    var rec = grid.getStore().getAt(row_index);
+    //quick_msg('UUID: ' + rec.get('uuid'));
+    goto_url('/inventory/'+rec.get('uuid')+'/');
+}
+
 var getInventoryDataGrid = function(){
     
     var Item = Ext.data.Record.create([
@@ -73,9 +80,11 @@ var getInventoryDataGrid = function(){
         iconCls: 'icon-grid',
         id: 'inventory_item_panel',
         stateId: 'inventory_item_panel_state',
-        stateful: true,
+        stateful: true
         //renderTo: 'grid_target'
     });
     
+    grid.on('rowdblclick', inventory_item_dblclick_handler);
+    
     return grid;
 }
\ No newline at end of file