-<html>\r
-<head>\r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js"><div id="cls-Ext.layout.TableLayout"></div>/**\r
+<html>
+<head>
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body onload="prettyPrint();">
+ <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.layout.TableLayout"></div>/**\r
* @class Ext.layout.TableLayout\r
* @extends Ext.layout.ContainerLayout\r
* <p>This layout allows you to easily render content into an HTML table. The total number of columns can be\r
renderItem : function(c, position, target){\r
if(c && !c.rendered){\r
c.render(this.getNextCell(c));\r
- if(this.extraCls){\r
- var t = c.getPositionEl ? c.getPositionEl() : c;\r
- t.addClass(this.extraCls);\r
- }\r
+ this.configureItem(c, position);\r
+ }else if(c && !this.isValidParent(c, target)){\r
+ var container = this.getNextCell(c);\r
+ container.insertBefore(c.getDomPositionEl().dom, null);\r
+ c.container = Ext.get(container);\r
+ this.configureItem(c, position);\r
}\r
},\r
\r
// private\r
isValidParent : function(c, target){\r
- return true;\r
+ return c.getDomPositionEl().up('table', 5).dom.parentNode === (target.dom || target);\r
}\r
\r
<div id="prop-Ext.layout.TableLayout-activeItem"></div>/**\r
*/\r
});\r
\r
-Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;</pre> \r
-</body>\r
+Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;</pre>
+</body>
</html>
\ No newline at end of file