* @type Boolean
*/
isReady : false,
+ /**
+ * Turn on debugging output (currently only the factory uses this)
+ * @type Boolean
+ */
+
+ debug: false,
/**
* True to automatically uncache orphaned Roo.Elements periodically (defaults to true)
return c;
}
if (ns[c.xtype]) {
- if (Roo.debug) console.log("Roo.Factory(" + c.xtype + ")");
+ if (Roo.debug) Roo.log("Roo.Factory(" + c.xtype + ")");
var ret = new ns[c.xtype](c);
ret.xns = false;
return ret;
*/
log : function(s)
{
- if ((typeof(console) == 'undefined') || typeof(console.log) == 'undefined')) {
+ if ((typeof(console) == 'undefined') || (typeof(console.log) == 'undefined')) {
return; // alerT?
}
console.log(s);
- }
+ },
/**
* Takes an object and converts it to an encoded URL. e.g. Roo.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2". Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value.
* @param {Object} o
* you may want to set this to true.
* @type Boolean
*/
- useShims : ((isIE && !isIE7) || (isGecko && isMac))
+ useShims : ((isIE && !isIE7) || (isGecko && isMac)),
+
+
+
+ /**
+ * Selects a single element as a Roo Element
+ * @param {String} selector The selector/xpath query
+ * @param {Node} root (optional) The start of the query (defaults to document).
+ * @return {Roo.Element}
+ */
+ selectNode : element(selector, root)
+ {
+ var node = Roo.DomQuery.selectNode(selector,root);
+ return node ? Roo.get(node) : false;
+ }
+
});