Frederes
15 Nov 2012, 1:04 AM
Hello,
I want to reorder a Tree using the 'treeviewdragdrop' plugin.
When i move the node into another (changing the parent), the update event (autoSync = true) is fired ans server URL is called.
But when i just move the node inside its parent, after or before its siblings, the server URL is not called and so i can't save the new order/index for this node.
Here my code :
var store = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
actionMethods: 'post',
url: 'get_or_update_nodes.php'
},
autoSync: true,
root: {
text: 'Prixorama',
id: 'root',
expanded: true
},
folderSort: true,
sorters: [{
property: 'left', // i use nested categories, this comes from server database
direction: 'ASC'
}]
});
var tree = Ext.create('Ext.tree.Panel', {
store: store,
rootVisible: true,
collapsible: true,
multiSelect: true,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
allowParentInserts: true,
appendOnly: false
},
},
renderTo: 'tree-div',
height: 500,
width: 500,
title: 'Categories',
useArrows: true,
});
How to solve this ..? Is it a bug ?
Thank you for any help !
Fred
I want to reorder a Tree using the 'treeviewdragdrop' plugin.
When i move the node into another (changing the parent), the update event (autoSync = true) is fired ans server URL is called.
But when i just move the node inside its parent, after or before its siblings, the server URL is not called and so i can't save the new order/index for this node.
Here my code :
var store = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
actionMethods: 'post',
url: 'get_or_update_nodes.php'
},
autoSync: true,
root: {
text: 'Prixorama',
id: 'root',
expanded: true
},
folderSort: true,
sorters: [{
property: 'left', // i use nested categories, this comes from server database
direction: 'ASC'
}]
});
var tree = Ext.create('Ext.tree.Panel', {
store: store,
rootVisible: true,
collapsible: true,
multiSelect: true,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
allowParentInserts: true,
appendOnly: false
},
},
renderTo: 'tree-div',
height: 500,
width: 500,
title: 'Categories',
useArrows: true,
});
How to solve this ..? Is it a bug ?
Thank you for any help !
Fred