rafaelob
|
|
« on: September 10, 2013, 12:01:53 PM » |
|
Dear, I have troubles with draggable in EasyUi 1.3.4: This section of code works well in 1.3.3 $('#tt').tree({ url: 'tree.json', onLoadSuccess: function(node, data) { $('.tree-node').draggable({ revert: true, onStopDrag: function() { // $(this).css("position", ""); } });}});
When the data is loaded, i put a draggable in nodes of tree(I dont want use the property dnd of tree, because that i want is move the nodes to outside of tree, not inside) It was working in 1.3.3, but in 1.3.4 dont! I verified that the problem is inside the file jquery.easyui.min, when i replace it for 1.3.3 version its works again. I dont know what has changed in this file of version 1.3.3 to 1.3.4, but some modifications broke the draggable, if i execute the code of draggable in console of firefox, not works too.(the .tree-node is a div, if a put the draggable in an element span inside the .tree-node, the draggable works in this element). I tested that draggable in 1.3.4 works well in other situations (If i copy the html of an node of tree) <div class="tree-node" node-id="p3" style=""><span class="tree-indent"></span><span class="tree-indent"></span><span class="tree-indent"></span><span class="tree-indent"></span><span class="tree-indent"></span><span class="tree-icon tree-file icon-hard-hat-military"></span><span class="tree-title">1º Pel/1ª Cia/19º BC</span></div>
and execute $('.tree-node').draggable( ); This element become a draggable, but the same element <div class="tree-node" ..... </div> inside of tree with class .tree-node doesnt become a draggable) I dont know why its happens, if you reproduce this code you will verify the same problem, the nodes of tree doesnt become a draggable as in 1.3.3. As i said the problem is not in tree.js or draggable.js, but in jquery.easyui.min. (Chrome, FireFox, IE last versions) Regards, tree.json [ { "id":"f1", "text":"Exército", "iconCls":"icon-star", "attributes":{"root":true,"pelotao":false}, "children":[ { "id":"r1", "text":"6ª RM", "iconCls": "icon-home", "attributes":{ "pelotao": false }, "children":[{ "id":"o10", "text":"19º Batalhão de Caçadores", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[{ "id":"c4", "text":"1ª Cia/19º BC", "iconCls":"icon-hard-hat", "attributes":{ "pelotao": false }, "children":[{ "id":"p3", "text":"1º Pel/1ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p2", "text":"2º Pel/1ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p4", "text":"3º Pel/1ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] }] },{ "id":"c5", "text":"2ª Cia/19º BC", "iconCls":"icon-hard-hat", "attributes":{ "pelotao": false }, "children":[{ "id":"p5", "text":"1º Pel/2ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p6", "text":"2º Pel/2ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p7", "text":"3º Pel/2ª Cia/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] }] },{ "id":"c6", "text":"CCAp/19º BC", "iconCls":"icon-hard-hat", "attributes":{ "pelotao": false }, "children":[{ "id":"p8", "text":"1º Pel/CCAp/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p9", "text":"2º Pel/CCAp/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] },{ "id":"p10", "text":"3º Pel/CCAp/19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] }] },{ "id":"c7", "text":"Cmdo 19º BC", "iconCls":"icon-hard-hat", "attributes":{ "pelotao": false }, "children":[{ "id":"p11", "text":"Cmdo/Cmdo 19º BC", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] }] }] },{ "id":"o4", "text":"4ª Cia Gd", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[{ "id":"c2", "text":"1ª Cia/4ª Cia Gd", "iconCls":"icon-hard-hat", "attributes":{ "pelotao": false }, "children":[{ "id":"p1", "text":"1º pel/1ª Cia/4ªCia Gd", "iconCls":"icon-hard-hat-military", "attributes":{ "pelotao": true }, "children":[] }] }] },{ "id":"o2", "text":"51º CT", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o6", "text":"6º D Sup", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o3", "text":"Cia Cmdo/6", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o5", "text":"Cia PE/6", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o1", "text":"Comando da 6ª Região Militar", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o7", "text":"EsAEx/CMS", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o8", "text":"HGeS", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] },{ "id":"o9", "text":"Pq R Mnt/6", "iconCls":"icon-shield", "attributes":{ "pelotao": false }, "children":[] }] } ] } ]
|
|
« Last Edit: September 10, 2013, 12:06:37 PM by rafaelob »
|
Logged
|
|
|
|