Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: User Extensions and Plugins

Reply
 
Thread Tools
  #91  
Old 08-24-2009, 09:49 AM
wayned@escc wayned@escc is offline
Ext User
 
Join Date: Feb 2009
Posts: 60
wayned@escc is on a distinguished road
Default

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
            ]
            });
        }
note the
items:
part

SIMPLES!!

w://
__________________
--------------------------------------------

collaborate & fix: http://jsbin.com/
verify: http://www.jslint.com/
beutify: http://jsbeautifier.org/
Reply With Quote
  #92  
Old 08-25-2009, 03:06 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

Thank you very much for finding and providing the fix.
Reply With Quote
  #93  
Old 09-11-2009, 10:08 AM
buzux buzux is offline
Ext JS Premium Member
 
Join Date: Nov 2008
Location: France
Posts: 11
buzux is on a distinguished road
Default

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
Ubuntu 8.04, FF 3.0.14, Ext JS 3.0.1
Reply With Quote
  #94  
Old 09-11-2009, 06:18 PM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

I've tested with latest svn and if I replaced [] with items:[] in the context menu config then it worked.
Reply With Quote
  #95  
Old 09-26-2009, 09:31 AM
tonedeaf's Avatar
tonedeaf tonedeaf is offline
Ext User
 
Join Date: Dec 2007
Posts: 80
tonedeaf is on a distinguished road
Default

Quote:
Originally Posted by jsakalos View Post
I've tested with latest svn and if I replaced [] with items:[] in the context menu config then it worked.
I get the same error msg "this.contextMenu.on is not a function" when I try to create a RemoteTreePanel with editable: false in the config object.
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.
Reply With Quote
  #96  
Old 10-06-2009, 01:14 PM
farracha farracha is offline
Ext User
 
Join Date: Jul 2007
Posts: 27
farracha is on a distinguished road
Default Checkboxes

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.
Reply With Quote
  #97  
Old 10-07-2009, 08:15 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

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...
Reply With Quote
  #98  
Old 10-07-2009, 09:03 AM
farracha farracha is offline
Ext User
 
Join Date: Jul 2007
Posts: 27
farracha is on a distinguished road
Default

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.
Reply With Quote
  #99  
Old 11-03-2009, 04:00 PM
cchain's Avatar
cchain cchain is offline
Ext User
 
Join Date: May 2009
Location: San Diego, CA
Posts: 7
cchain is on a distinguished road
Default textArea in RTP?

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
         }
     }
 });
I see the textarea, and it updates properly, but it seems to be locked to 242 pixels in width. Any suggestions?

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!
Reply With Quote
  #100  
Old 11-04-2009, 07:32 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

I think that Ext automatically sizes the tree editor to the width of tree. Take a look at Ext code.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 04:01 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.