PDA

View Full Version : TreeViewDragDrop not work when config href of nodeInterFace was set



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"
}]
}]

mitchellsimoens
10 Feb 2012, 4:29 AM
It looks like the NodeInterface may be swallowing something due to the link as you can still drag the icon.

volcom721
12 Feb 2012, 10:12 PM
Hello mitchellsimoensHe:
First, thank you for your answer, but i try to mark the config 'icon'
and then reload web page, drag function still not work, has some option
i need to setting? thank for your help!


//after modify json data(mark the config 'icon' ):
[{"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", }] }]