Roo/ContentPanel.js
[roojs1] / Roo / ContentPanel.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11 /**
12  * @class Roo.ContentPanel
13  * @extends Roo.util.Observable
14  * @children Roo.form.Form Roo.JsonView Roo.View
15  * A basic ContentPanel element.
16  * @cfg {Boolean}   fitToFrame    True for this panel to adjust its size to fit when the region resizes  (defaults to false)
17  * @cfg {Boolean}   fitContainer   When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container  (defaults to false)
18  * @cfg {Boolean|Object} autoCreate True to auto generate the DOM element for this panel, or a {@link Roo.DomHelper} config of the element to create
19  * @cfg {Boolean}   closable      True if the panel can be closed/removed
20  * @cfg {Boolean}   background    True if the panel should not be activated when it is added (defaults to false)
21  * @cfg {String|HTMLElement|Element} resizeEl An element to resize if {@link #fitToFrame} is true (instead of this panel's element)
22  * @cfg {Roo.Toolbar}   toolbar       A toolbar for this panel
23  * @cfg {Boolean} autoScroll    True to scroll overflow in this panel (use with {@link #fitToFrame})
24  * @cfg {String} title          The title for this panel
25  * @cfg {Array} adjustments     Values to <b>add</b> to the width/height when doing a {@link #fitToFrame} (default is [0, 0])
26  * @cfg {String} url            Calls {@link #setUrl} with this value
27  * @cfg {String} region [required]   (center|north|south|east|west) which region to put this panel on (when used with xtype constructors)
28  * @cfg {String|Object} params  When used with {@link #url}, calls {@link #setUrl} with this value
29  * @cfg {Boolean} loadOnce      When used with {@link #url}, calls {@link #setUrl} with this value
30  * @cfg {String}    content        Raw content to fill content panel with (uses setContent on construction.)
31  * @cfg {String}    style  Extra style to add to the content panel
32  * @cfg {Roo.menu.Menu} menu  popup menu
33
34  * @constructor
35  * Create a new ContentPanel.
36  * @param {String/HTMLElement/Roo.Element} el The container element for this panel
37  * @param {String/Object} config A string to set only the title or a config object
38  * @param {String} content (optional) Set the HTML content for this panel
39  * @param {String} region (optional) Used by xtype constructors to add to regions. (values center,east,west,south,north)
40  */
41 Roo.ContentPanel = function(el, config, content){
42     
43      
44     /*
45     if(el.autoCreate || el.xtype){ // xtype is available if this is called from factory
46         config = el;
47         el = Roo.id();
48     }
49     if (config && config.parentLayout) { 
50         el = config.parentLayout.el.createChild(); 
51     }
52     */
53     if(el.autoCreate){ // xtype is available if this is called from factory
54         config = el;
55         el = Roo.id();
56     }
57     this.el = Roo.get(el);
58     if(!this.el && config && config.autoCreate){
59         if(typeof config.autoCreate == "object"){
60             if(!config.autoCreate.id){
61                 config.autoCreate.id = config.id||el;
62             }
63             this.el = Roo.DomHelper.append(document.body,
64                         config.autoCreate, true);
65         }else{
66             this.el = Roo.DomHelper.append(document.body,
67                         {tag: "div", cls: "x-layout-inactive-content", id: config.id||el}, true);
68         }
69     }
70     
71     
72     this.closable = false;
73     this.loaded = false;
74     this.active = false;
75     if(typeof config == "string"){
76         this.title = config;
77     }else{
78         Roo.apply(this, config);
79     }
80     
81     if (this.toolbar && !this.toolbar.el && this.toolbar.xtype) {
82         this.wrapEl = this.el.wrap();
83         this.toolbar.container = this.el.insertSibling(false, 'before');
84         this.toolbar = new Roo.Toolbar(this.toolbar);
85     }
86     
87     // xtype created footer. - not sure if will work as we normally have to render first..
88     if (this.footer && !this.footer.el && this.footer.xtype) {
89         if (!this.wrapEl) {
90             this.wrapEl = this.el.wrap();
91         }
92     
93         this.footer.container = this.wrapEl.createChild();
94          
95         this.footer = Roo.factory(this.footer, Roo);
96         
97     }
98     
99     if(this.resizeEl){
100         this.resizeEl = Roo.get(this.resizeEl, true);
101     }else{
102         this.resizeEl = this.el;
103     }
104     // handle view.xtype
105     
106  
107     
108     
109     this.addEvents({
110         /**
111          * @event activate
112          * Fires when this panel is activated. 
113          * @param {Roo.ContentPanel} this
114          */
115         "activate" : true,
116         /**
117          * @event deactivate
118          * Fires when this panel is activated. 
119          * @param {Roo.ContentPanel} this
120          */
121         "deactivate" : true,
122
123         /**
124          * @event resize
125          * Fires when this panel is resized if fitToFrame is true.
126          * @param {Roo.ContentPanel} this
127          * @param {Number} width The width after any component adjustments
128          * @param {Number} height The height after any component adjustments
129          */
130         "resize" : true,
131         
132          /**
133          * @event render
134          * Fires when this tab is created
135          * @param {Roo.ContentPanel} this
136          */
137         "render" : true
138          
139         
140     });
141     
142
143     
144     
145     if(this.autoScroll){
146         this.resizeEl.setStyle("overflow", "auto");
147     } else {
148         // fix randome scrolling
149         this.el.on('scroll', function() {
150             Roo.log('fix random scolling');
151             this.scrollTo('top',0); 
152         });
153     }
154     content = content || this.content;
155     if(content){
156         this.setContent(content);
157     }
158     if(config && config.url){
159         this.setUrl(this.url, this.params, this.loadOnce);
160     }
161     
162     
163     
164     Roo.ContentPanel.superclass.constructor.call(this);
165     
166     if (this.view && typeof(this.view.xtype) != 'undefined') {
167         this.view.el = this.el.appendChild(document.createElement("div"));
168         this.view = Roo.factory(this.view); 
169         this.view.render  &&  this.view.render(false, '');  
170     }
171     
172     
173     this.fireEvent('render', this);
174 };
175
176 Roo.extend(Roo.ContentPanel, Roo.util.Observable, {
177     tabTip:'',
178     setRegion : function(region){
179         this.region = region;
180         if(region){
181            this.el.replaceClass("x-layout-inactive-content", "x-layout-active-content");
182         }else{
183            this.el.replaceClass("x-layout-active-content", "x-layout-inactive-content");
184         } 
185     },
186     
187     /**
188      * Returns the toolbar for this Panel if one was configured. 
189      * @return {Roo.Toolbar} 
190      */
191     getToolbar : function(){
192         return this.toolbar;
193     },
194     
195     setActiveState : function(active){
196         this.active = active;
197         if(!active){
198             this.fireEvent("deactivate", this);
199         }else{
200             this.fireEvent("activate", this);
201         }
202     },
203     /**
204      * Updates this panel's element
205      * @param {String} content The new content
206      * @param {Boolean} loadScripts (optional) true to look for and process scripts
207     */
208     setContent : function(content, loadScripts){
209         this.el.update(content, loadScripts);
210     },
211
212     ignoreResize : function(w, h){
213         if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
214             return true;
215         }else{
216             this.lastSize = {width: w, height: h};
217             return false;
218         }
219     },
220     /**
221      * Get the {@link Roo.UpdateManager} for this panel. Enables you to perform Ajax updates.
222      * @return {Roo.UpdateManager} The UpdateManager
223      */
224     getUpdateManager : function(){
225         return this.el.getUpdateManager();
226     },
227      /**
228      * Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use {@link #setUrl}.
229      * @param {Object/String/Function} url The url for this request or a function to call to get the url or a config object containing any of the following options:
230 <pre><code>
231 panel.load({
232     url: "your-url.php",
233     params: {param1: "foo", param2: "bar"}, // or a URL encoded string
234     callback: yourFunction,
235     scope: yourObject, //(optional scope)
236     discardUrl: false,
237     nocache: false,
238     text: "Loading...",
239     timeout: 30,
240     scripts: false
241 });
242 </code></pre>
243      * The only required property is <i>url</i>. The optional properties <i>nocache</i>, <i>text</i> and <i>scripts</i>
244      * are shorthand for <i>disableCaching</i>, <i>indicatorText</i> and <i>loadScripts</i> and are used to set their associated property on this panel UpdateManager instance.
245      * @param {String/Object} params (optional) The parameters to pass as either a URL encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}
246      * @param {Function} callback (optional) Callback when transaction is complete -- called with signature (oElement, bSuccess, oResponse)
247      * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used URL. If true, it will not store the URL.
248      * @return {Roo.ContentPanel} this
249      */
250     load : function(){
251         var um = this.el.getUpdateManager();
252         um.update.apply(um, arguments);
253         return this;
254     },
255
256
257     /**
258      * Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded from that URL.
259      * @param {String/Function} url The URL to load the content from or a function to call to get the URL
260      * @param {String/Object} params (optional) The string params for the update call or an object of the params. See {@link Roo.UpdateManager#update} for more details. (Defaults to null)
261      * @param {Boolean} loadOnce (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this panel is activated. (Defaults to false)
262      * @return {Roo.UpdateManager} The UpdateManager
263      */
264     setUrl : function(url, params, loadOnce){
265         if(this.refreshDelegate){
266             this.removeListener("activate", this.refreshDelegate);
267         }
268         this.refreshDelegate = this._handleRefresh.createDelegate(this, [url, params, loadOnce]);
269         this.on("activate", this.refreshDelegate);
270         return this.el.getUpdateManager();
271     },
272     
273     _handleRefresh : function(url, params, loadOnce){
274         if(!loadOnce || !this.loaded){
275             var updater = this.el.getUpdateManager();
276             updater.update(url, params, this._setLoaded.createDelegate(this));
277         }
278     },
279     
280     _setLoaded : function(){
281         this.loaded = true;
282     }, 
283     
284     /**
285      * Returns this panel's id
286      * @return {String} 
287      */
288     getId : function(){
289         return this.el.id;
290     },
291     
292     /** 
293      * Returns this panel's element - used by regiosn to add.
294      * @return {Roo.Element} 
295      */
296     getEl : function(){
297         return this.wrapEl || this.el;
298     },
299     
300     adjustForComponents : function(width, height)
301     {
302         //Roo.log('adjustForComponents ');
303         if(this.resizeEl != this.el){
304             width -= this.el.getFrameWidth('lr');
305             height -= this.el.getFrameWidth('tb');
306         }
307         if(this.toolbar){
308             var te = this.toolbar.getEl();
309             height -= te.getHeight();
310             te.setWidth(width);
311         }
312         if(this.footer){
313             var te = this.footer.getEl();
314             //Roo.log("footer:" + te.getHeight());
315             
316             height -= te.getHeight();
317             te.setWidth(width);
318         }
319         
320         
321         if(this.adjustments){
322             width += this.adjustments[0];
323             height += this.adjustments[1];
324         }
325         return {"width": width, "height": height};
326     },
327     
328     setSize : function(width, height){
329         if(this.fitToFrame && !this.ignoreResize(width, height)){
330             if(this.fitContainer && this.resizeEl != this.el){
331                 this.el.setSize(width, height);
332             }
333             var size = this.adjustForComponents(width, height);
334             this.resizeEl.setSize(this.autoWidth ? "auto" : size.width, this.autoHeight ? "auto" : size.height);
335             this.fireEvent('resize', this, size.width, size.height);
336         }
337     },
338     
339     /**
340      * Returns this panel's title
341      * @return {String} 
342      */
343     getTitle : function(){
344         return this.title;
345     },
346     
347     /**
348      * Set this panel's title
349      * @param {String} title
350      */
351     setTitle : function(title){
352         this.title = title;
353         if(this.region){
354             this.region.updatePanelTitle(this, title);
355         }
356     },
357     
358     /**
359      * Returns true is this panel was configured to be closable
360      * @return {Boolean} 
361      */
362     isClosable : function(){
363         return this.closable;
364     },
365     
366     beforeSlide : function(){
367         this.el.clip();
368         this.resizeEl.clip();
369     },
370     
371     afterSlide : function(){
372         this.el.unclip();
373         this.resizeEl.unclip();
374     },
375     
376     /**
377      *   Force a content refresh from the URL specified in the {@link #setUrl} method.
378      *   Will fail silently if the {@link #setUrl} method has not been called.
379      *   This does not activate the panel, just updates its content.
380      */
381     refresh : function(){
382         if(this.refreshDelegate){
383            this.loaded = false;
384            this.refreshDelegate();
385         }
386     },
387     
388     /**
389      * Destroys this panel
390      */
391     destroy : function(){
392         this.el.removeAllListeners();
393         var tempEl = document.createElement("span");
394         tempEl.appendChild(this.el.dom);
395         tempEl.innerHTML = "";
396         this.el.remove();
397         this.el = null;
398     },
399     
400     /**
401      * form - if the content panel contains a form - this is a reference to it.
402      * @type {Roo.form.Form}
403      */
404     form : false,
405     /**
406      * view - if the content panel contains a view (Roo.DatePicker / Roo.View / Roo.JsonView)
407      *    This contains a reference to it.
408      * @type {Roo.View}
409      */
410     view : false,
411     
412       /**
413      * Adds a xtype elements to the panel - currently only supports Forms, View, JsonView.
414      * <pre><code>
415
416 layout.addxtype({
417        xtype : 'Form',
418        items: [ .... ]
419    }
420 );
421
422 </code></pre>
423      * @param {Object} cfg Xtype definition of item to add.
424      */
425     
426     addxtype : function(cfg) {
427         // add form..
428         if (cfg.xtype.match(/^Form$/)) {
429             
430             var el;
431             //if (this.footer) {
432             //    el = this.footer.container.insertSibling(false, 'before');
433             //} else {
434                 el = this.el.createChild();
435             //}
436
437             this.form = new  Roo.form.Form(cfg);
438             
439             
440             if ( this.form.allItems.length) {
441                 this.form.render(el.dom);
442             }
443             return this.form;
444         }
445         // should only have one of theses..
446         if ([ 'View', 'JsonView', 'DatePicker'].indexOf(cfg.xtype) > -1) {
447             // views.. should not be just added - used named prop 'view''
448             
449             cfg.el = this.el.appendChild(document.createElement("div"));
450             // factory?
451             
452             var ret = new Roo.factory(cfg);
453              
454              ret.render && ret.render(false, ''); // render blank..
455             this.view = ret;
456             return ret;
457         }
458         return false;
459     }
460 });
461
462 /**
463  * @class Roo.GridPanel
464  * @extends Roo.ContentPanel
465  * @constructor
466  * Create a new GridPanel.
467  * @param {Roo.grid.Grid} grid The grid for this panel
468  * @param {String/Object} config A string to set only the panel's title, or a config object
469  */
470 Roo.GridPanel = function(grid, config){
471     
472   
473     this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue
474         {tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true);
475         
476     this.wrapper.dom.appendChild(grid.getGridEl().dom);
477     
478     Roo.GridPanel.superclass.constructor.call(this, this.wrapper, config);
479     
480     if(this.toolbar){
481         this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);
482     }
483     // xtype created footer. - not sure if will work as we normally have to render first..
484     if (this.footer && !this.footer.el && this.footer.xtype) {
485         
486         this.footer.container = this.grid.getView().getFooterPanel(true);
487         this.footer.dataSource = this.grid.dataSource;
488         this.footer = Roo.factory(this.footer, Roo);
489         
490     }
491     
492     grid.monitorWindowResize = false; // turn off autosizing
493     grid.autoHeight = false;
494     grid.autoWidth = false;
495     this.grid = grid;
496     this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel");
497 };
498
499 Roo.extend(Roo.GridPanel, Roo.ContentPanel, {
500     getId : function(){
501         return this.grid.id;
502     },
503     
504     /**
505      * Returns the grid for this panel
506      * @return {Roo.grid.Grid} 
507      */
508     getGrid : function(){
509         return this.grid;    
510     },
511     
512     setSize : function(width, height){
513         if(!this.ignoreResize(width, height)){
514             var grid = this.grid;
515             var size = this.adjustForComponents(width, height);
516             grid.getGridEl().setSize(size.width, size.height);
517             grid.autoSize();
518         }
519     },
520     
521     beforeSlide : function(){
522         this.grid.getView().scroller.clip();
523     },
524     
525     afterSlide : function(){
526         this.grid.getView().scroller.unclip();
527     },
528     
529     destroy : function(){
530         this.grid.destroy();
531         delete this.grid;
532         Roo.GridPanel.superclass.destroy.call(this); 
533     }
534 });
535
536
537 /**
538  * @class Roo.NestedLayoutPanel
539  * @extends Roo.ContentPanel
540  * @constructor
541  * Create a new NestedLayoutPanel.
542  * 
543  * 
544  * @param {Roo.BorderLayout} layout [required] The layout for this panel
545  * @param {String/Object} config A string to set only the title or a config object
546  */
547 Roo.NestedLayoutPanel = function(layout, config)
548 {
549     // construct with only one argument..
550     /* FIXME - implement nicer consturctors
551     if (layout.layout) {
552         config = layout;
553         layout = config.layout;
554         delete config.layout;
555     }
556     if (layout.xtype && !layout.getEl) {
557         // then layout needs constructing..
558         layout = Roo.factory(layout, Roo);
559     }
560     */
561     
562     
563     Roo.NestedLayoutPanel.superclass.constructor.call(this, layout.getEl(), config);
564     
565     layout.monitorWindowResize = false; // turn off autosizing
566     this.layout = layout;
567     this.layout.getEl().addClass("x-layout-nested-layout");
568     
569     
570     
571     
572 };
573
574 Roo.extend(Roo.NestedLayoutPanel, Roo.ContentPanel, {
575
576     setSize : function(width, height){
577         if(!this.ignoreResize(width, height)){
578             var size = this.adjustForComponents(width, height);
579             var el = this.layout.getEl();
580             el.setSize(size.width, size.height);
581             var touch = el.dom.offsetWidth;
582             this.layout.layout();
583             // ie requires a double layout on the first pass
584             if(Roo.isIE && !this.initialized){
585                 this.initialized = true;
586                 this.layout.layout();
587             }
588         }
589     },
590     
591     // activate all subpanels if not currently active..
592     
593     setActiveState : function(active){
594         this.active = active;
595         if(!active){
596             this.fireEvent("deactivate", this);
597             return;
598         }
599         
600         this.fireEvent("activate", this);
601         // not sure if this should happen before or after..
602         if (!this.layout) {
603             return; // should not happen..
604         }
605         var reg = false;
606         for (var r in this.layout.regions) {
607             reg = this.layout.getRegion(r);
608             if (reg.getActivePanel()) {
609                 //reg.showPanel(reg.getActivePanel()); // force it to activate.. 
610                 reg.setActivePanel(reg.getActivePanel());
611                 continue;
612             }
613             if (!reg.panels.length) {
614                 continue;
615             }
616             reg.showPanel(reg.getPanel(0));
617         }
618         
619         
620         
621         
622     },
623     
624     /**
625      * Returns the nested BorderLayout for this panel
626      * @return {Roo.BorderLayout} 
627      */
628     getLayout : function(){
629         return this.layout;
630     },
631     
632      /**
633      * Adds a xtype elements to the layout of the nested panel
634      * <pre><code>
635
636 panel.addxtype({
637        xtype : 'ContentPanel',
638        region: 'west',
639        items: [ .... ]
640    }
641 );
642
643 panel.addxtype({
644         xtype : 'NestedLayoutPanel',
645         region: 'west',
646         layout: {
647            center: { },
648            west: { }   
649         },
650         items : [ ... list of content panels or nested layout panels.. ]
651    }
652 );
653 </code></pre>
654      * @param {Object} cfg Xtype definition of item to add.
655      */
656     addxtype : function(cfg) {
657         return this.layout.addxtype(cfg);
658     
659     }
660 });
661
662 Roo.ScrollPanel = function(el, config, content){
663     config = config || {};
664     config.fitToFrame = true;
665     Roo.ScrollPanel.superclass.constructor.call(this, el, config, content);
666     
667     this.el.dom.style.overflow = "hidden";
668     var wrap = this.el.wrap({cls: "x-scroller x-layout-inactive-content"});
669     this.el.removeClass("x-layout-inactive-content");
670     this.el.on("mousewheel", this.onWheel, this);
671
672     var up = wrap.createChild({cls: "x-scroller-up", html: "&#160;"}, this.el.dom);
673     var down = wrap.createChild({cls: "x-scroller-down", html: "&#160;"});
674     up.unselectable(); down.unselectable();
675     up.on("click", this.scrollUp, this);
676     down.on("click", this.scrollDown, this);
677     up.addClassOnOver("x-scroller-btn-over");
678     down.addClassOnOver("x-scroller-btn-over");
679     up.addClassOnClick("x-scroller-btn-click");
680     down.addClassOnClick("x-scroller-btn-click");
681     this.adjustments = [0, -(up.getHeight() + down.getHeight())];
682
683     this.resizeEl = this.el;
684     this.el = wrap; this.up = up; this.down = down;
685 };
686
687 Roo.extend(Roo.ScrollPanel, Roo.ContentPanel, {
688     increment : 100,
689     wheelIncrement : 5,
690     scrollUp : function(){
691         this.resizeEl.scroll("up", this.increment, {callback: this.afterScroll, scope: this});
692     },
693
694     scrollDown : function(){
695         this.resizeEl.scroll("down", this.increment, {callback: this.afterScroll, scope: this});
696     },
697
698     afterScroll : function(){
699         var el = this.resizeEl;
700         var t = el.dom.scrollTop, h = el.dom.scrollHeight, ch = el.dom.clientHeight;
701         this.up[t == 0 ? "addClass" : "removeClass"]("x-scroller-btn-disabled");
702         this.down[h - t <= ch ? "addClass" : "removeClass"]("x-scroller-btn-disabled");
703     },
704
705     setSize : function(){
706         Roo.ScrollPanel.superclass.setSize.apply(this, arguments);
707         this.afterScroll();
708     },
709
710     onWheel : function(e){
711         var d = e.getWheelDelta();
712         this.resizeEl.dom.scrollTop -= (d*this.wheelIncrement);
713         this.afterScroll();
714         e.stopEvent();
715     },
716
717     setContent : function(content, loadScripts){
718         this.resizeEl.update(content, loadScripts);
719     }
720
721 });
722
723
724
725 /**
726  * @class Roo.TreePanel
727  * @extends Roo.ContentPanel
728  * Treepanel component
729  * 
730  * @constructor
731  * Create a new TreePanel. - defaults to fit/scoll contents.
732  * @param {String/Object} config A string to set only the panel's title, or a config object
733  */
734 Roo.TreePanel = function(config){
735     var el = config.el;
736     var tree = config.tree;
737     delete config.tree; 
738     delete config.el; // hopefull!
739     
740     // wrapper for IE7 strict & safari scroll issue
741     
742     var treeEl = el.createChild();
743     config.resizeEl = treeEl;
744     
745     
746     
747     Roo.TreePanel.superclass.constructor.call(this, el, config);
748  
749  
750     this.tree = new Roo.tree.TreePanel(treeEl , tree);
751     //console.log(tree);
752     this.on('activate', function()
753     {
754         if (this.tree.rendered) {
755             return;
756         }
757         //console.log('render tree');
758         this.tree.render();
759     });
760     // this should not be needed.. - it's actually the 'el' that resizes?
761     // actuall it breaks the containerScroll - dragging nodes auto scroll at top
762     
763     //this.on('resize',  function (cp, w, h) {
764     //        this.tree.innerCt.setWidth(w);
765     //        this.tree.innerCt.setHeight(h);
766     //        //this.tree.innerCt.setStyle('overflow-y', 'auto');
767     //});
768
769         
770     
771 };
772
773 Roo.extend(Roo.TreePanel, Roo.ContentPanel, {   
774     fitToFrame : true,
775     autoScroll : true,
776     /*
777      * @cfg {Roo.tree.TreePanel} tree [required] The tree TreePanel, with config etc.
778      */
779     tree : false
780
781 });
782
783
784
785
786
787
788
789
790
791
792