Code:
var cItems=[];
Ext.ns("advertisers", "advertisers.stores");
var ReturnedfavsNames;
Ext.regModel('advertisersProperties', {
fields : [
{ name : "id", type : 'int' },
{ name : "name", type : 'string' },
{ name : "catagory", type : 'string' },
{ name : "address", type : 'string' },
{ name : "phone", type : 'string' },
{ name : "website", type : 'string' },
{ name : "logo", type : 'string' },
{ name : "description", type : 'string' },
{ name : "mon_open", type : 'string' },
{ name : "mon_close", type : 'string' },
{ name : "tue_open", type : 'string' },
{ name : "tue_close", type : 'string' },
{ name : "wed_open", type : 'string' },
{ name : "wed_close", type : 'string' },
{ name : "thu_open", type : 'string' },
{ name : "thu_close", type : 'string' },
{ name : "fri_open", type : 'string' },
{ name : "fri_close", type : 'string' },
{ name : "sat_open", type : 'string' },
{ name : "sat_close", type : 'string' },
{ name : "sun_open", type : 'string' },
{ name : "sun_close", type : 'string' },
{ name : "username", type : 'string' },
{ name : "password", type : 'string' },
{ name : "numviewed", type : 'string' },
{ name : "lat", type : 'string' },
{ name : "lon", type : 'string' }
]
});
advertisers.stores.Properties = new Ext.data.Store({
model : 'advertisersProperties',
sorters: [{
property: 'catagory',
direction: 'DESC'
}],
getGroupString : function(record) {
return record.get('catagory');
},
proxy : {
type : 'ajax',
url : '(my website removed).com/ppa/php/get_advertisers.php',
reader : {
type : 'json',
root : 'result',
totalCount : 'total'
}
},
autoLoad : true
});