//v.3.6 build 131023 /* Copyright DHTMLX LTD. http://www.dhtmlx.com You allowed to use this component or parts of it under GPL terms To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com */ /** * @desc: adds drag-n-drop capabilities (with possibility to drop into dhtmlxTree) to HTML object. * @param: obj - HTML object, or HTML object ID * @param: func - custom drag processor function, optional * @type: public * @topic: 0 */ dhtmlXTreeObject.prototype.makeDraggable=function(obj,func){ if (typeof(obj)!="object") obj=document.getElementById(obj); dragger=new dhtmlDragAndDropObject(); dropper=new dhx_dragSomethingInTree(); dragger.addDraggableItem(obj,dropper); obj.dragLanding=null; obj.ondragstart=dropper._preventNsDrag; obj.onselectstart=new Function("return false;"); obj.parentObject=new Object; obj.parentObject.img=obj; obj.parentObject.treeNod=dropper; dropper._customDrop=func; } dhtmlXTreeObject.prototype.makeDragable=dhtmlXTreeObject.prototype.makeDraggable; /** * @desc: adds drag-n-drop capabilities (with possibility to drop into dhtmlxTree) to all HTML items with dragInDhtmlXTree attribute * @param: func - custom drag processor function, optional * @type: public * @topic: 0 */ dhtmlXTreeObject.prototype.makeAllDraggable=function(func){ var z=document.getElementsByTagName("div"); for (var i=0; i