/** * @class Ext.ux.grid.menu.ListMenu * @extends Ext.menu.Menu * This is a supporting class for {@link Ext.ux.grid.filter.ListFilter}. * Although not listed as configuration options for this class, this class * also accepts all configuration options from {@link Ext.ux.grid.filter.ListFilter}. */ Ext.define('Ext.ux.grid.menu.ListMenu', { extend: 'Ext.menu.Menu', /** * @cfg {String} labelField * Defaults to 'text'. */ labelField : 'text', /** * @cfg {String} paramPrefix * Defaults to 'Loading...'. */ loadingText : 'Loading...', /** * @cfg {Boolean} loadOnShow * Defaults to true. */ loadOnShow : true, /** * @cfg {Boolean} single * Specify true to group all items in this list into a single-select * radio button group. Defaults to false. */ single : false, constructor : function (cfg) { this.selected = []; this.addEvents( /** * @event checkchange * Fires when there is a change in checked items from this list * @param {Object} item Ext.menu.CheckItem * @param {Object} checked The checked value that was set */ 'checkchange' ); this.callParent([cfg = cfg || {}]); if(!cfg.store && cfg.options){ var options = []; for(var i=0, len=cfg.options.length; i