2014-04-01 70 views

回答

0

我已经通过在数组上存储密钥并使用该数组更新显示顺序索引的数据库来解决了我的问题。

dynatree: 
onDrop: function (node, sourceNode, hitMode, ui, draggable) { 
{ 
var resultsToClientNode = []; 
sourceNode.move(node, hitMode); 
$.map(sourceNode.getParent().getChildren(), function (nodelist) { 
    if (nodelist.data.addClass == sourceNode.data.addClass) { 
     resultsToClientNode.push(nodelist.data.key); 
    } 
}); 
// This array "resultsToClientNode" holds your node on DragDroped order. 
// Call ajax to update in database.' 
}