1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| infoProjetAccueil = Ext.extend(Ext.data.JsonStore, {
constructor: function(cfg) {
cfg = cfg || {};
infoProjetAccueil.superclass.constructor.call(this, Ext.apply({
storeId: 'infoProjetAccueil',
url: 'php/webServiceAccueil.php',
root: 'results',
idProperty: 'postid',
totalProperty: 'totalCount',
sortField: 'postid',
baseParams: {
task: 'LISTING'
},
fields: [
{
name: 'postid',
mapping: 'postid'
},
{
name: 'title',
mapping: 'title'
},
{
name: 'intro',
mapping: 'intro'
},
{
name: 'content',
mapping: 'content'
},
{
name: 'name',
mapping: 'name'
},
{
name: 'dateCreated',
type: 'date',
dateFormat: 'timestamp',
mapping: 'dateCreated'
}
]
}, cfg));
}
});
new infoProjetAccueil().load(); |
Partager