volcom721
10 Feb 2012, 12:24 AM
Hello, every one!
I find a problem there:-?, when i enable the plugin of TreeViewDragDrop for tree panel, and i setting the config href( example href="javascript:loadNotify(0)" ) of nodeInterFace. I find the tree node can't drag, but if i don't set the config href, the tree node just can be drag. Has some one know why?:-/ or help me! I would be very grateful.
sample Code:
/*
*Tree Store
**/
var treeStore = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: '../Svr.php',
extraParams : { op:'getList'},
reader: { type: 'json' },
},
root: {
text: 'List',
id: 'treeRoot',
expanded: true
}
});
/*
* App Menu Tree panel
* */
var menuTree = Ext.create('Ext.tree.Panel', {
id: 'listTree',
store: treeStore,
rootVisible: true,
viewConfig:{
plugins: {
ptype:'treeviewdragdrop',
ddGroup: 'treeDD'
}
},
dockedItems: [{
xtype: 'toolbar',
style:{float:'right'},
items: [{
icon:'../images/open16x16.png',
handler: function(){
menuTree.expandAll();
}
}, {
icon:'../images/close16x16.png',
handler: function(){
menuTree.collapseAll();
}
}]
}]
});
Json Data:
[{"text":"User Info"
,"iconCls":"userInfoIconCls"
,"icon":"images/big/userInfo.png"
,"leaf":"false","children":[{
"text":"Bill",
"cls":"user1",
"iconCls":"userNode"
,"icon":"images/bill.png"
,"href":"callUserInfo()"
,"leaf":"true"
}]
}]
I find a problem there:-?, when i enable the plugin of TreeViewDragDrop for tree panel, and i setting the config href( example href="javascript:loadNotify(0)" ) of nodeInterFace. I find the tree node can't drag, but if i don't set the config href, the tree node just can be drag. Has some one know why?:-/ or help me! I would be very grateful.
sample Code:
/*
*Tree Store
**/
var treeStore = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: '../Svr.php',
extraParams : { op:'getList'},
reader: { type: 'json' },
},
root: {
text: 'List',
id: 'treeRoot',
expanded: true
}
});
/*
* App Menu Tree panel
* */
var menuTree = Ext.create('Ext.tree.Panel', {
id: 'listTree',
store: treeStore,
rootVisible: true,
viewConfig:{
plugins: {
ptype:'treeviewdragdrop',
ddGroup: 'treeDD'
}
},
dockedItems: [{
xtype: 'toolbar',
style:{float:'right'},
items: [{
icon:'../images/open16x16.png',
handler: function(){
menuTree.expandAll();
}
}, {
icon:'../images/close16x16.png',
handler: function(){
menuTree.collapseAll();
}
}]
}]
});
Json Data:
[{"text":"User Info"
,"iconCls":"userInfoIconCls"
,"icon":"images/big/userInfo.png"
,"leaf":"false","children":[{
"text":"Bill",
"cls":"user1",
"iconCls":"userNode"
,"icon":"images/bill.png"
,"href":"callUserInfo()"
,"leaf":"true"
}]
}]