sábado, 2 de fevereiro de 2013
frase do dia
quanto mais estudo mais ciente fico da minha insignificancia.
domingo, 26 de agosto de 2012
DhtmlGoodies - getNodeOrders method
DhtmlGoodies has a nice drag n´drop treeview component.
If you change 2 lines in method getNodeOrders (inside the script JSDragDropTree) you will be able to set up a char ID to the tree nodes. This was the only issue I encountered.
Edit the drag-drop-folder-tree.js script
inside the function getNodeOrders
replace this line:
var numericID = li.id.replace(/[^0-9]/gi,'');
with
and replace this
var numericParentID = li.parentNode.parentNode.id.replace(/[^0-9]/gi,'');
with this
var numericParentID = li.parentNode.parentNode.id;
Thats it! Now JSDrapDropTree will work with char nodes IDs.
DhtmlGoodies - http://www.dhtmlgoodies.com/
If you change 2 lines in method getNodeOrders (inside the script JSDragDropTree) you will be able to set up a char ID to the tree nodes. This was the only issue I encountered.
Edit the drag-drop-folder-tree.js script
inside the function getNodeOrders
,getNodeOrders : function(initObj,saveString)
...replace this line:
var numericID = li.id.replace(/[^0-9]/gi,'');
with
var numericID = li.id;
and replace this
var numericParentID = li.parentNode.parentNode.id.replace(/[^0-9]/gi,'');
with this
var numericParentID = li.parentNode.parentNode.id;
Thats it! Now JSDrapDropTree will work with char nodes IDs.
DhtmlGoodies - http://www.dhtmlgoodies.com/
Assinar:
Postagens (Atom)