git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 3.1.1 - Released 02/08/2010
[extjs.git]
/
src
/
widgets
/
layout
/
TableLayout.js
diff --git
a/src/widgets/layout/TableLayout.js
b/src/widgets/layout/TableLayout.js
index
c8b3ac7
..
420e4b3
100644
(file)
--- a/
src/widgets/layout/TableLayout.js
+++ b/
src/widgets/layout/TableLayout.js
@@
-1,6
+1,6
@@
/*!
/*!
- * Ext JS Library 3.
0.3
- * Copyright(c) 2006-20
09
Ext JS, LLC
+ * Ext JS Library 3.
1.1
+ * Copyright(c) 2006-20
10
Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
* licensing@extjs.com
* http://www.extjs.com/license
*/
@@
-73,6
+73,10
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
// private
\r
monitorResize:false,
\r
\r
// private
\r
monitorResize:false,
\r
\r
+ type: 'table',
\r
+
\r
+ targetCls: 'x-table-layout-ct',
\r
+
\r
/**
\r
* @cfg {Object} tableAttrs
\r
* <p>An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification
\r
/**
\r
* @cfg {Object} tableAttrs
\r
* <p>An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification
\r
@@
-82,16
+86,16
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
layout: 'table',
\r
layoutConfig: {
\r
tableAttrs: {
\r
layout: 'table',
\r
layoutConfig: {
\r
tableAttrs: {
\r
-
style: {
\r
-
width: '100%'
\r
-
}
\r
+ style: {
\r
+ width: '100%'
\r
+ }
\r
},
\r
columns: 3
\r
}
\r
}</code></pre>
\r
*/
\r
tableAttrs:null,
\r
},
\r
columns: 3
\r
}
\r
}</code></pre>
\r
*/
\r
tableAttrs:null,
\r
-
\r
+
\r
// private
\r
setContainer : function(ct){
\r
Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
\r
// private
\r
setContainer : function(ct){
\r
Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
\r
@@
-100,7
+104,7
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.currentColumn = 0;
\r
this.cells = [];
\r
},
\r
this.currentColumn = 0;
\r
this.cells = [];
\r
},
\r
-
\r
+
\r
// private
\r
onLayout : function(ct, target){
\r
var cs = ct.items.items, len = cs.length, c, i;
\r
// private
\r
onLayout : function(ct, target){
\r
var cs = ct.items.items, len = cs.length, c, i;
\r
@@
-154,7
+158,7
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.getRow(curRow).appendChild(td);
\r
return td;
\r
},
\r
this.getRow(curRow).appendChild(td);
\r
return td;
\r
},
\r
-
\r
+
\r
// private
\r
getNextNonSpan: function(colIndex, rowIndex){
\r
var cols = this.columns;
\r
// private
\r
getNextNonSpan: function(colIndex, rowIndex){
\r
var cols = this.columns;
\r
@@
-171,12
+175,17
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
\r
// private
\r
renderItem : function(c, position, target){
\r
\r
// private
\r
renderItem : function(c, position, target){
\r
+ // Ensure we have our inner table to get cells to render into.
\r
+ if(!this.table){
\r
+ this.table = target.createChild(
\r
+ Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
\r
+ }
\r
if(c && !c.rendered){
\r
c.render(this.getNextCell(c));
\r
this.configureItem(c, position);
\r
}else if(c && !this.isValidParent(c, target)){
\r
var container = this.getNextCell(c);
\r
if(c && !c.rendered){
\r
c.render(this.getNextCell(c));
\r
this.configureItem(c, position);
\r
}else if(c && !this.isValidParent(c, target)){
\r
var container = this.getNextCell(c);
\r
- container.insertBefore(c.get
Dom
PositionEl().dom, null);
\r
+ container.insertBefore(c.getPositionEl().dom, null);
\r
c.container = Ext.get(container);
\r
this.configureItem(c, position);
\r
}
\r
c.container = Ext.get(container);
\r
this.configureItem(c, position);
\r
}
\r
@@
-184,7
+193,7
@@
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
\r
// private
\r
isValidParent : function(c, target){
\r
\r
// private
\r
isValidParent : function(c, target){
\r
- return c.get
Dom
PositionEl().up('table', 5).dom.parentNode === (target.dom || target);
\r
+ return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target);
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r