X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/examples/grid-filtering/grid/filter/ListFilter.js?ds=sidebyside diff --git a/examples/grid-filtering/grid/filter/ListFilter.js b/examples/grid-filtering/grid/filter/ListFilter.js deleted file mode 100644 index 2e5498ff..00000000 --- a/examples/grid-filtering/grid/filter/ListFilter.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.grid.filter.ListFilter = Ext.extend(Ext.grid.filter.Filter, { - labelField: 'text', - loadingText: 'Loading...', - loadOnShow: true, - value: [], - loaded: false, - phpMode: false, - - init: function(){ - this.menu.add('' + this.loadingText + ''); - - if(this.store && this.loadOnShow) { - this.menu.on('show', this.onMenuLoad, this); - } else if(this.options) { - var options = []; - for(var i=0, len=this.options.length; i -1, - hideOnClick: false - }); - - item.itemId = records[i].id; - item.on('checkchange', this.checkChange, this); - - this.menu.add(item); - } - - this.setActive(this.isActivatable()); - this.loaded = true; - - if(visible) { - this.menu.show(); //Adaptor will re-invoke with previous arguments - } - }, - - checkChange: function(item, checked) { - var value = []; - this.menu.items.each(function(item) { - if(item.checked) { - value.push(item.itemId); - } - },this); - this.value = value; - - this.setActive(this.isActivatable()); - this.fireEvent("update", this); - }, - - isActivatable: function() { - return this.value.length > 0; - }, - - setValue: function(value) { - var value = this.value = [].concat(value); - - if(this.loaded) { - this.menu.items.each(function(item) { - item.setChecked(false, true); - for(var i=0, len=value.length; i -1; - } -}); \ No newline at end of file