|
|||||||
![]() |
|
|
Thread Tools |
|
#91
|
|||
|
|||
|
Easy fix:
// create context menu
if(true === this.editable && true === this.contextMenu) {
this.contextMenu = new Ext.menu.Menu({
items: [
new Ext.menu.TextItem({text:'', style:'font-weight:bold;margin:0px 4px 0px 27px;line-height:18px'})
,'-'
,this.actions.reloadTree
,this.actions.expandAll
,this.actions.collapseAll
,'-'
,this.actions.expandNode
,this.actions.collapseNode
,'-'
,this.actions.renameNode
,'-'
,this.actions.appendChild
,this.actions.insertChild
,'-'
,this.actions.removeNode
]
});
}
items: SIMPLES!! w://
__________________
-------------------------------------------- collaborate & fix: http://jsbin.com/ verify: http://www.jslint.com/ beutify: http://jsbeautifier.org/ |
|
#92
|
||||
|
||||
|
Thank you very much for finding and providing the fix.
__________________
Jozef Sakalos, aka Saki A lot of valuable info at: Saki's Extensions and Plugins Saki's Extensions and Plugins Docs Saki's Examples, Latest: Grid in Card Layout Saki's Blog, Featured: Writing a Big Application in Ext, Latest: What the hell is mon and mun? |
|
#93
|
|||
|
|||
|
Hi,
Despite the patch I have the following error when I do a right click on the tree: menu.getEl() is undefined var xy = menu.getEl().getAlignToXY(alignEl, 'tl-tl', [0, 18]);\n |
|
#94
|
||||
|
||||
|
I've tested with latest svn and if I replaced [] with items:[] in the context menu config then it worked.
__________________
Jozef Sakalos, aka Saki A lot of valuable info at: Saki's Extensions and Plugins Saki's Extensions and Plugins Docs Saki's Examples, Latest: Grid in Card Layout Saki's Blog, Featured: Writing a Big Application in Ext, Latest: What the hell is mon and mun? |
|
#95
|
||||
|
||||
|
Quote:
I applied all the fixes outlined in the previous posts. The Remote Tree Panel works correctly if I specify editable: true in the config options. Tested in ExtJS 3.0.0 in Firefox. |
|
#96
|
|||
|
|||
|
Hi Saki,
First, let me thank you so much for all your knowledge that you share. Now my doubts ![]() 1- I assume that your remote tree doesn't show checkboxes right? I sent checked attribute on json data, and no checkboxes were rendered! 2- I know that you developed a CheckTreePanel. The behaviour is the same from remotetree? What I need to know is if I can use a context menu (remotetree) on this type of tree. 3- I found the remotetree filter too slow. The browser hangs up. Not so much on Firefox (maybe 5seconds), but definitely on IE7. I have 940 nodes (15 main parents, and lot of childs and 2nd-childs, 3rd-childs...). Is there a way to improve the search? I altered the filter to search only when at least were typed 4 letters, but no improvement. Because the filter the first time has to search all tree ![]() Thanks in advance. |
|
#97
|
||||
|
||||
|
1 & 2 - the purposes are different: RemoteTree: to edit tree, CheckboxTree: to select nodes
3. quite a lot of nodes... I haven't optimized anything for such a lot...
__________________
Jozef Sakalos, aka Saki A lot of valuable info at: Saki's Extensions and Plugins Saki's Extensions and Plugins Docs Saki's Examples, Latest: Grid in Card Layout Saki's Blog, Featured: Writing a Big Application in Ext, Latest: What the hell is mon and mun? |
|
#98
|
|||
|
|||
|
Hi,
Hmmm but it's fairly easy to add a contextmenu on checktreepanel? If I "merge" the source code from remotetree and checktreepanel, I would manage to get it working without too much trouble, for a newbie (medium javascript understanding)? 3- I was afraid that the rendering would be slow, but after all, the filter turned out to be the problem. I guess that I will perform a custom filter, that will be loading/rendering the tree again but filtered on the database. |
|
#99
|
||||
|
||||
|
Saki - GREAT extension! You've saved me a lot of work.
I'm attempting to change the default textfield editor to a textarea, since my application needs more "breathing room" for editing. For some reason, the width attribute is not being honored... Here is my config for the tree so far (I haven't needed to modify the extension code at all): accred.tree = new Ext.ux.tree.RemoteTreePanel({
id:'remotetree'
,autoScroll:true
,rootVisible:true
,allowLeafAppend:false
,editorFieldConfig:new Ext.form.TextArea({
allowBlank:false
,width:600
})
,root:{
nodeType:'async'
,id:'0'
,text:'Accreditation'
,expanded:true
,uiProvider:false
}
,loader:{
url:'content/accred/qry_accredform.cfm'
,preloadChildren:true
,baseParams:{
cmd:'getTree'
,treeTable:'so_accred_items'
,treeID:1
}
}
});
Also, the next step for me is to build a form below the tree that gets the node data (or loads it via an AJAX call) when the node is selected in the tree. I'm still very much an Ext n00b, so any assistance pointing me in the right direction would be greatly appreciated. ![]() Thanks! |
|
#100
|
||||
|
||||
|
I think that Ext automatically sizes the tree editor to the width of tree. Take a look at Ext code.
__________________
Jozef Sakalos, aka Saki A lot of valuable info at: Saki's Extensions and Plugins Saki's Extensions and Plugins Docs Saki's Examples, Latest: Grid in Card Layout Saki's Blog, Featured: Writing a Big Application in Ext, Latest: What the hell is mon and mun? |
![]() |
| Thread Tools | |
|
|