Sha256: b4706c45df6bb6ac86dbf64b145ebb88fd7b1074af9c9f61ad376dfabbb1243f
Contents?: true
Size: 1.11 KB
Versions: 28
Compression:
Stored size: 1.11 KB
Contents
jQuery(function($){ //----- Helper Functions ----------------------------------------------------- //In all of this code, we are defining functions that we use later //None of this actually manipulates the DOM in any way //This is used to get the id part of an elementId //For example, if you have section_node_5, //you pass this 'section_node_5', 'section_node' //and this returns 5 var getId = function(elementId, s) { return elementId.replace(s,'') } var nodeOnDoubleClick = function() { if($('#edit_button').hasClass('disabled')) { //$('#view_button').click() location.href = $('#view_button')[0].href } else { //$('#edit_button').click() location.href = $('#edit_button')[0].href } } var addNodeOnDoubleClick = function() { $('#blocks tr').dblclick(nodeOnDoubleClick) } //----- Init ----------------------------------------------------------------- //In other words, stuff that happens when the page loads //This is where we actually manipulate the DOM, fire events, etc. addNodeOnDoubleClick() })
Version data entries
28 entries across 28 versions & 8 rubygems