Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/ContainerLayout.html view on Meta::CPAN
if (this.extraCls) {
var t = c.getPositionEl ? c.getPositionEl() : c;
t.addClass(this.extraCls);
}
// If we are forcing a layout, do so *before* we hide so elements have height/width
if (c.doLayout && this.forceLayout) {
c.doLayout();
}
if (this.renderHidden && c != this.activeItem) {
c.hide();
}
},
<span id='Ext-layout-ContainerLayout-method-onRemove'> onRemove: function(c){
</span> if(this.activeItem == c){
delete this.activeItem;
}
if(c.rendered && this.extraCls){
var t = c.getPositionEl ? c.getPositionEl() : c;
t.removeClass(this.extraCls);
}
},
<span id='Ext-layout-ContainerLayout-method-afterRemove'> afterRemove: function(c){
</span> if(c.removeRestore){
c.removeMode = 'container';
delete c.removeRestore;
}
},
<span id='Ext-layout-ContainerLayout-method-onResize'> // private
</span> onResize: function(){
var ct = this.container,
b;
if(ct.collapsed){
return;
}
if(b = ct.bufferResize && ct.shouldBufferLayout()){
if(!this.resizeTask){
this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this);
this.resizeBuffer = Ext.isNumber(b) ? b : 50;
}
ct.layoutPending = true;
this.resizeTask.delay(this.resizeBuffer);
}else{
this.runLayout();
}
},
<span id='Ext-layout-ContainerLayout-method-runLayout'> runLayout: function(){
</span> var ct = this.container;
this.layout();
ct.onLayout();
delete ct.layoutPending;
},
<span id='Ext-layout-ContainerLayout-method-setContainer'> // private
</span> setContainer : function(ct){
/*
* This monitorResize flag will be renamed soon as to avoid confusion
* with the Container version which hooks onWindowResize to doLayout
*
* monitorResize flag in this context attaches the resize event between
* a container and it's layout
*/
if(this.monitorResize && ct != this.container){
var old = this.container;
if(old){
old.un(old.resizeEvent, this.onResize, this);
}
if(ct){
ct.on(ct.resizeEvent, this.onResize, this);
}
}
this.container = ct;
},
<span id='Ext-layout-ContainerLayout-method-parseMargins'> /**
</span> * Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations
* (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)
* @param {Number|String} v The encoded margins
* @return {Object} An object with margin sizes for top, right, bottom and left
*/
parseMargins : function(v){
if (Ext.isNumber(v)) {
v = v.toString();
}
var ms = v.split(' '),
len = ms.length;
if (len == 1) {
ms[1] = ms[2] = ms[3] = ms[0];
} else if(len == 2) {
ms[2] = ms[0];
ms[3] = ms[1];
} else if(len == 3) {
ms[3] = ms[1];
}
return {
top :parseInt(ms[0], 10) || 0,
right :parseInt(ms[1], 10) || 0,
bottom:parseInt(ms[2], 10) || 0,
left :parseInt(ms[3], 10) || 0
};
},
<span id='Ext-layout-ContainerLayout-property-fieldTpl'> /**
</span> * The {@link Ext.Template Ext.Template} used by Field rendering layout classes (such as
* {@link Ext.layout.FormLayout}) to create the DOM structure of a fully wrapped,
* labeled and styled form Field. A default Template is supplied, but this may be
* overriden to create custom field structures. The template processes values returned from
* {@link Ext.layout.FormLayout#getTemplateArgs}.
* @property fieldTpl
* @type Ext.Template
*/
fieldTpl: (function() {
var t = new Ext.Template(
'<div class="x-form-item {itemCls}" tabIndex="-1">',
'<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
( run in 1.948 second using v1.01-cache-2.11-cpan-adec679a428 )