public/js/garp.filtermenu.js
/**
		 * Applies the selected filter and reflects the UI
		 * @param {Object} menu item
		 */
Applies the selected filter and reflects the UI
@param {Object} menu item
Applies the selected filter and reflects the UI @param { Object } menu item
function applyFilter(item){
			var grid = tb.ownerCt;
			var storeParams = grid.getStore().baseParams;
			if (!storeParams.query) {
				storeParams.query = {};
			}
			delete storeParams.query.online_status;
			delete storeParams.query.author_id;
			if(typeof Garp.dataTypes[Garp.currentModel].clearFilters == 'function'){
				Garp.dataTypes[Garp.currentModel].clearFilters();
			} else if (item.ref == 'all'){
				storeParams.query = {};
			}
			switch (item.ref) {
				case 'published':
					Ext.apply(storeParams.query, {
						online_status: '1'
					});
					break;
				case 'drafts':
					Ext.apply(storeParams.query, {
						online_status: '0'
					});
					break;
				case 'my':
					Ext.apply(storeParams.query, {
						author_id: Garp.localUser.id
					});
					break;
				default:
					break;
			}
			grid.getStore().reload();
			return true;
		}
function applyFilter ( item ) { var grid = tb . ownerCt ; var storeParams = grid . getStore ( ) . baseParams ; if ( ! storeParams . query ) { storeParams . query = { } ; } delete storeParams . query . online_status ; delete storeParams . query . author_id ; if ( typeof Garp . dataTypes [ Garp . currentModel ] . clearFilters == 'function' ) { Garp . dataTypes [ Garp . currentModel ] . clearFilters ( ) ; } else if ( item . ref == 'all' ) { storeParams . query = { } ; } switch ( item . ref ) { case 'published' : Ext . apply ( storeParams . query , { online_status : '1' } ) ; break ; case 'drafts' : Ext . apply ( storeParams . query , { online_status : '0' } ) ; break ; case 'my' : Ext . apply ( storeParams . query , { author_id : Garp . localUser . id } ) ; break ; default : break ; } grid . getStore ( ) . reload ( ) ; return true ; }
Applies the selected filter and reflects the UI
 @param {Object} menu item
Applies the selected filter and reflects the UI @param { Object } menu item