]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/javascript/yui3/build/recordset/recordset-filter-min.js
Release 6.5.0
[Github/sugarcrm.git] / include / javascript / yui3 / build / recordset / recordset-filter-min.js
1 /*
2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
5 version: 3.3.0
6 build: 3167
7 */
8 YUI.add("recordset-filter",function(D){var C=D.Array,B=D.Lang;function A(E){A.superclass.constructor.apply(this,arguments);}D.mix(A,{NS:"filter",NAME:"recordsetFilter",ATTRS:{}});D.extend(A,D.Plugin.Base,{initializer:function(E){},destructor:function(E){},filter:function(H,E){var G=this.get("host").get("records"),I=[],F=H;if(B.isString(H)&&B.isValue(E)){F=function(J){if(J.getValue(H)===E){return true;}else{return false;}};}I=C.filter(G,F);return new D.Recordset({records:I});},reject:function(E){return new D.Recordset({records:C.reject(this.get("host").get("records"),E)});},grep:function(E){return new D.Recordset({records:C.grep(this.get("host").get("records"),E)});}});D.namespace("Plugin").RecordsetFilter=A;},"3.3.0",{requires:["recordset-base","array-extras","plugin"]});