X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/src/widgets/layout/FormLayout.js
diff --git a/src/widgets/layout/FormLayout.js b/src/widgets/layout/FormLayout.js
index fb971beb..15289581 100644
--- a/src/widgets/layout/FormLayout.js
+++ b/src/widgets/layout/FormLayout.js
@@ -1,8 +1,8 @@
/*!
- * Ext JS Library 3.2.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
*/
/**
* @class Ext.layout.FormLayout
@@ -117,9 +117,9 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
/**
* @cfg {Boolean} trackLabels
- * True to show/hide the field label when the field is hidden. Defaults to false.
+ * True to show/hide the field label when the field is hidden. Defaults to true.
*/
- trackLabels: false,
+ trackLabels: true,
type: 'form',
@@ -158,7 +158,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
labelAdjust: 0
});
}else{
- this.labelSeparator = ct.labelSeparator || this.labelSeparator;
+ this.labelSeparator = Ext.isDefined(ct.labelSeparator) ? ct.labelSeparator : this.labelSeparator;
ct.labelWidth = ct.labelWidth || 100;
if(Ext.isNumber(ct.labelWidth)){
var pad = Ext.isNumber(ct.labelPad) ? ct.labelPad : 5;
@@ -185,6 +185,11 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
onFieldShow: function(c){
c.getItemCt().removeClass('x-hide-' + c.hideMode);
+
+ // Composite fields will need to layout after the container is made visible
+ if (c.isComposite) {
+ c.doLayout();
+ }
},
onFieldHide: function(c){
@@ -241,7 +246,7 @@ new Ext.Template(
/**
* @private
- *
+ *
*/
renderItem : function(c, position, target){
if(c && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
@@ -313,7 +318,7 @@ new Ext.Template(
*/
getTemplateArgs: function(field) {
var noLabelSep = !field.fieldLabel || field.hideLabel;
-
+
return {
id : field.id,
label : field.fieldLabel,