日期:2014-05-16 浏览次数:20367 次
Ext.namespace("Ext.ux.layout"); Ext.ux.layout.TableFormLayout = Ext.extend(Ext.layout.TableLayout, { monitorResize: true, setContainer: function() { Ext.layout.FormLayout.prototype.setContainer.apply(this, arguments); this.currentRow = 0; this.currentColumn = 0; this.cells = []; }, renderItem : function(c, position, target) { if (c && !c.rendered) { var cell = Ext.get(this.getNextCell(c)); cell.addClass("x-table-layout-column-" + this.currentColumn); Ext.layout.FormLayout.prototype.renderItem.call(this, c, 0, cell); } }, getLayoutTargetSize : Ext.layout.AnchorLayout.prototype.getLayoutTargetSize, getTemplateArgs : Ext.layout.FormLayout.prototype.getTemplateArgs, onLayout : function(ct, target) { Ext.ux.layout.TableFormLayout.superclass.onLayout.call(this, ct, target); if (!target.hasClass("x-table-form-layout-ct")) { target.addClass("x-table-form-layout-ct"); } var viewSize = this.getLayoutTargetSize(ct, target); var aw, ah; if (ct.anchorSize) { if (typeof ct.anchorSize == "number") { aw = ct.anchorSize; } else {