X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/FormLayout.html?ds=inline diff --git a/docs/source/FormLayout.html b/docs/source/FormLayout.html index 375a5f9d..bebf48f8 100644 --- a/docs/source/FormLayout.html +++ b/docs/source/FormLayout.html @@ -1,17 +1,12 @@ - -
-/*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** + + + +The source code + + + + +/** * @class Ext.layout.FormLayout * @extends Ext.layout.AnchorLayout *This layout manager is specifically designed for rendering and managing child Components of @@ -121,17 +116,19 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { * @type String * @property labelStyle */ - +
/** * @cfg {Boolean} trackLabels * True to show/hide the field label when the field is hidden. Defaults to false. */ trackLabels: false, - + + type: 'form', + onRemove: function(c){ Ext.layout.FormLayout.superclass.onRemove.call(this, c); - if(this.trackLabels && !this.isHide(c)){ + if(this.trackLabels){ c.un('show', this.onFieldShow, this); c.un('hide', this.onFieldHide, this); } @@ -139,7 +136,9 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { var el = c.getPositionEl(), ct = c.getItemCt && c.getItemCt(); if(c.rendered && ct){ - el.insertAfter(ct); + if (el && el.dom) { + el.insertAfter(ct); + } Ext.destroy(ct); Ext.destroyMembers(c, 'label', 'itemCt'); if(c.customItemCt){ @@ -147,7 +146,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { } } }, - + // private setContainer : function(ct){ Ext.layout.FormLayout.superclass.setContainer.call(this, ct); @@ -181,17 +180,18 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { } } }, - + + // private isHide: function(c){ return c.hideLabel || this.container.hideLabels; }, - + onFieldShow: function(c){ c.getItemCt().removeClass('x-hide-' + c.hideMode); }, - + onFieldHide: function(c){ - c.getItemCt().addClass('x-hide-' + c.hideMode); + c.getItemCt().addClass('x-hide-' + c.hideMode); }, //private @@ -254,11 +254,6 @@ new Ext.Template( }else{ c.itemCt = this.fieldTpl.append(target, args, true); } - if(!c.rendered){ - c.render('x-form-el-' + c.id); - }else if(!this.isValidParent(c, target)){ - Ext.fly('x-form-el-' + c.id).appendChild(c.getPositionEl()); - } if(!c.getItemCt){ // Non form fields don't have getItemCt, apply it here // This will get cleaned up in onRemove @@ -270,7 +265,12 @@ new Ext.Template( }); } c.label = c.getItemCt().child('label.x-form-item-label'); - if(this.trackLabels && !this.isHide(c)){ + if(!c.rendered){ + c.render('x-form-el-' + c.id); + }else if(!this.isValidParent(c, target)){ + Ext.fly('x-form-el-' + c.id).appendChild(c.getPositionEl()); + } + if(this.trackLabels){ if(c.hidden){ this.onFieldHide(c); } @@ -308,7 +308,7 @@ new Ext.Template( *