/**
* Filters this composite to only elements that match the passed selector.
* @param {String} selector A string CSS selector
+ * @param {Boolean} inverse return inverse filter (not matches)
* @return {CompositeElement} this
*/
- filter : function(selector){
+ filter : function(selector, inverse){
var els = [];
+ inverse = inverse || false;
this.each(function(el){
- if(el.is(selector)){
+ var match = inverse ? !el.is(selector) : el.is(selector);
+ if(match){
els[els.length] = el.dom;
}
});
*/
this.encode = function(o)
{
- // should this be extended to fully wrap ..
+ // should this be extended to fully wrap stringify..
if(typeof o == "undefined" || o === null){
return "null";
* Shorthand for {@link Roo.util.JSON#encode}
* @member Roo encode
* @method */
-Roo.encode = typeof(JSON) != 'undefined' && JSON. ? JSON. : Roo.util.JSON.encode;
+Roo.encode = typeof(JSON) != 'undefined' && JSON.stringify ? JSON.stringify : Roo.util.JSON.encode;
/**
* Shorthand for {@link Roo.util.JSON#decode}
* @member Roo decode