Mercurial > lada > lada-client
view app/model/Status.js @ 238:2a23fcca8ead
On Default the proben list will have no columns at all. The are added
dynamically later when the user selects a search query.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 23 Jul 2013 11:29:37 +0200 |
parents | d27017394c8f |
children | 59c1d9ad6555 |
line wrap: on
line source
Ext.define('Lada.model.Status', { extend: 'Ext.data.Model', fields: [ {name: "sid"}, {name: "messungsId"}, {name: "probeId"}, {name: "erzeuger"}, {name: "status", defaultValue: 1}, {name: "sdatum", type: 'date', convert: ts2date, defaultValue: new Date()}, {name: "skommentar"} ], idProperty: "sid", proxy: { type: 'rest', appendId: true, //default url: 'server/rest/status', reader: { type: 'json', root: 'data' } }, getEidi: function() { var sid = this.get('sid'); var messId = this.get('messungsId'); var probeId = this.get('probeId'); return "/" + sid + "/" + messId + "/" + probeId; } }); function ts2date(v, record){ // Converts a timestamp into a date object. return new Date(v); }