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