traverseDOMTree : function(cb, currentElement, depth) {
- if (!currentElement) {
+ if (!currentElement ) {
return;
}
//console.log(currentElement);
- if (currentElement.className.match(/roo-dynamic/)) {
+ if (currentElement.className && currentElement.className.match(/roo-dynamic/)) {
return;
}
return;
}
+ if (nodeName.match(/^#/)) { // comments?
+ return;
+ }
return;
}
if (nodeName != 'BODY') {
-
-
+ //Roo.log(currentElement);
+ if (currentElement.hasAttribute('flexy:include')) {
+
+
+ cb( '<flexy:include src="'+currentElement.getAttribute('flexy:include')+'"></flexy:include>');
+ return;
+ }
var i = 0;
// Prints the node tagName, such as <A>, <IMG>, etc
} else {
tagName = false;
}
- if (currentElement.hasAttribute('flexy:include')) {
- cb( tagName ? "</"+tagName+">" : '');
- }
+
// Traverse the tree
i = 0;
//Roo.log("add flexy:if");
tree.el.attr('flexy:include', tree['flexy:include']);
}
- Roo.log("Add xtype")
+ //Roo.log("Add xtype")
tree.el.attr('xtype', tree['|xns'] + '.' + tree['xtype']);
if (!tree.items || !tree.items.length) { return; }