}
};
}();
-
-/**
- * @class Roo.LayoutDialog
- * @extends Roo.BasicDialog
- * Dialog which provides adjustments for working with a layout in a Dialog.
- * Add your necessary layout config options to the dialog's config.<br>
- * Example usage (including a nested layout):
- * <pre><code>
-if(!dialog){
- dialog = new Roo.LayoutDialog("download-dlg", {
- modal: true,
- width:600,
- height:450,
- shadow:true,
- minWidth:500,
- minHeight:350,
- autoTabs:true,
- proxyDrag:true,
- // layout config merges with the dialog config
- center:{
- tabPosition: "top",
- alwaysShowTabs: true
- }
- });
- dialog.addKeyListener(27, dialog.hide, dialog);
- dialog.setDefaultButton(dialog.addButton("Close", dialog.hide, dialog));
- dialog.addButton("Build It!", this.getDownload, this);
-
- // we can even add nested layouts
- var innerLayout = new Roo.BorderLayout("dl-inner", {
- east: {
- initialSize: 200,
- autoScroll:true,
- split:true
- },
- center: {
- autoScroll:true
- }
- });
- innerLayout.beginUpdate();
- innerLayout.add("east", new Roo.ContentPanel("dl-details"));
- innerLayout.add("center", new Roo.ContentPanel("selection-panel"));
- innerLayout.endUpdate(true);
-
- var layout = dialog.getLayout();
- layout.beginUpdate();
- layout.add("center", new Roo.ContentPanel("standard-panel",
- {title: "Download the Source", fitToFrame:true}));
- layout.add("center", new Roo.NestedLayoutPanel(innerLayout,
- {title: "Build your own roo.js"}));
- layout.getRegion("center").showPanel(sp);
- layout.endUpdate();
-}
-</code></pre>
- * @constructor
- * @param {String/HTMLElement/Roo.Element} el The id of or container element, or config
- * @param {Object} config configuration options
- */
-Roo.LayoutDialog = function(el, cfg){
-
- var config= cfg;
- if (typeof(cfg) == 'undefined') {
- config = Roo.apply({}, el);
- // not sure why we use documentElement here.. - it should always be body.
- // IE7 borks horribly if we use documentElement.
- // webkit also does not like documentElement - it creates a body element...
- el = Roo.get( document.body || document.documentElement ).createChild();
- //config.autoCreate = true;
- }
-
-
- config.autoTabs = false;
- Roo.LayoutDialog.superclass.constructor.call(this, el, config);
- this.body.setStyle({overflow:"hidden", position:"relative"});
- this.layout = new Roo.BorderLayout(this.body.dom, config);
- this.layout.monitorWindowResize = false;
- this.el.addClass("x-dlg-auto-layout");
- // fix case when center region overwrites center function
- this.center = Roo.BasicDialog.prototype.center;
- this.on("show", this.layout.layout, this.layout, true);
- if (config.items) {
- var xitems = config.items;
- delete config.items;
- Roo.each(xitems, this.addxtype, this);
- }
-
-
-};
-Roo.extend(Roo.LayoutDialog, Roo.BasicDialog, {
- /**
- * Ends update of the layout <strike>and resets display to none</strike>. Use standard beginUpdate/endUpdate on the layout.
- * @deprecated
- */
- endUpdate : function(){
- this.layout.endUpdate();
- },
-
- /**
- * Begins an update of the layout <strike>and sets display to block and visibility to hidden</strike>. Use standard beginUpdate/endUpdate on the layout.
- * @deprecated
- */
- beginUpdate : function(){
- this.layout.beginUpdate();
- },
-
- /**
- * Get the BorderLayout for this dialog
- * @return {Roo.BorderLayout}
- */
- getLayout : function(){
- return this.layout;
- },
-
- showEl : function(){
- Roo.LayoutDialog.superclass.showEl.apply(this, arguments);
- if(Roo.isIE7){
- this.layout.layout();
- }
- },
-
- // private
- // Use the syncHeightBeforeShow config option to control this automatically
- syncBodyHeight : function(){
- Roo.LayoutDialog.superclass.syncBodyHeight.call(this);
- if(this.layout){this.layout.layout();}
- },
-
- /**
- * Add an xtype element (actually adds to the layout.)
- * @return {Object} xdata xtype object data.
- */
-
- addxtype : function(c) {
- return this.layout.addxtype(c);
- }
-});
\ No newline at end of file
/**
* @class Roo.BorderLayout
* @extends Roo.LayoutManager
+ * @children Roo.ContentPanel
* This class represents a common layout manager used in desktop applications. For screenshots and more details,
* please see: <br><br>
* <a href="http://www.jackslocum.com/yui/2006/10/19/cross-browser-web-20-layouts-with-yahoo-ui/">Cross Browser Layouts - Part 1</a><br>
};
Roo.extend(Roo.BorderLayout, Roo.LayoutManager, {
+
+ /**
+ * @cfg {Roo.LayoutRegion} east
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} west
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} north
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} south
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} center
+ */
/**
* Creates and adds a new region if it doesn't already exist.
* @param {String} target The target region key (north, south, east, west or center).
*/
enableToggle: false,
/**
- * @cfg {Mixed} menu
+ * @cfg {Roo.menu.Menu} menu
* Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined).
*/
menu : undefined,
/**
* @class Roo.ContentPanel
* @extends Roo.util.Observable
+ * @children Roo.form.Form Roo.JsonView Roo.View
* A basic ContentPanel element.
* @cfg {Boolean} fitToFrame True for this panel to adjust its size to fit when the region resizes (defaults to false)
* @cfg {Boolean} fitContainer When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container (defaults to false)
- * @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
+ * @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
* @cfg {Boolean} closable True if the panel can be closed/removed
* @cfg {Boolean} background True if the panel should not be activated when it is added (defaults to false)
- * @cfg {String/HTMLElement/Element} resizeEl An element to resize if {@link #fitToFrame} is true (instead of this panel's element)
+ * @cfg {String|HTMLElement|Element} resizeEl An element to resize if {@link #fitToFrame} is true (instead of this panel's element)
* @cfg {Toolbar} toolbar A toolbar for this panel
* @cfg {Boolean} autoScroll True to scroll overflow in this panel (use with {@link #fitToFrame})
* @cfg {String} title The title for this panel
* @cfg {Array} adjustments Values to <b>add</b> to the width/height when doing a {@link #fitToFrame} (default is [0, 0])
* @cfg {String} url Calls {@link #setUrl} with this value
- * @cfg {String} region (center|north|south|east|west) which region to put this panel on (when used with xtype constructors)
- * @cfg {String/Object} params When used with {@link #url}, calls {@link #setUrl} with this value
+ * @cfg {String} region [required] (center|north|south|east|west) which region to put this panel on (when used with xtype constructors)
+ * @cfg {String|Object} params When used with {@link #url}, calls {@link #setUrl} with this value
* @cfg {Boolean} loadOnce When used with {@link #url}, calls {@link #setUrl} with this value
* @cfg {String} content Raw content to fill content panel with (uses setContent on construction.)
* @cfg {String} style Extra style to add to the content panel
* Create a new NestedLayoutPanel.
*
*
- * @param {Roo.BorderLayout} layout The layout for this panel
+ * @param {Roo.BorderLayout} layout [required] The layout for this panel
* @param {String/Object} config A string to set only the title or a config object
*/
Roo.NestedLayoutPanel = function(layout, config)
/**
* @class Roo.PagingToolbar
* @extends Roo.Toolbar
+ * @children Roo.Toolbar.Item Roo.form.Field
* A specialized toolbar that is bound to a {@link Roo.data.Store} and provides automatic paging controls.
* @constructor
* Create a new PagingToolbar
/**
* @class Roo.Toolbar
+ * @children Roo.Toolbar.Item Roo.form.Field
* Basic Toolbar class.
* @constructor
* Creates a new Toolbar
Roo.Toolbar.Button = function(config){
Roo.Toolbar.Button.superclass.constructor.call(this, null, config);
};
-Roo.extend(Roo.Toolbar.Button, Roo.Button, {
+Roo.extend(Roo.Toolbar.Button, Roo.Button,
+{
+
+
render : function(td){
this.td = td;
Roo.Toolbar.Button.superclass.render.call(this, td);
/**
* @class Roo.form.Form
* @extends Roo.form.BasicForm
+ * @children Roo.form.Column Roo.form.FieldSet Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem
* Adds the ability to dynamically render forms with JavaScript to {@link Roo.form.BasicForm}.
* @constructor
* @param {Object} config Configuration options
};
Roo.extend(Roo.form.Form, Roo.form.BasicForm, {
+ /**
+ * @cfg {Roo.Button} buttons[] buttons at bottom of form
+ */
+
/**
* @cfg {Number} labelWidth The width of labels. This property cascades to child containers.
*/
/**
* @class Roo.form.Layout
* @extends Roo.Component
+ * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem
* Creates a container for layout and rendering of fields in an {@link Roo.form.Form}.
* @constructor
* @param {Object} config Configuration options
/**
* @class Roo.form.Row
* @extends Roo.form.Layout
+ * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem
* Creates a row container for layout and rendering of fields in an {@link Roo.form.Form}.
* @constructor
* @param {Object} config Configuration options
/**
* @class Roo.form.FieldSet
* @extends Roo.form.Layout
+ * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem
* Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}.
* @constructor
* @param {Object} config Configuration options
Roo.Resizable
Roo.Editor
Roo.BasicDialog
+Roo.LayoutDialog
Roo.MessageBox
Roo.QuickTips