Mercurial > lada > lada-client
view app/model/Zusatzwert.js @ 136:4dc84682110d
Removed nested elements in Zusatzwerte. Change getting aditional info for
Probenzusätze in the Zusatzwert listing.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 26 Jun 2013 10:18:08 +0200 |
parents | 968806c1a3cb |
children | a7eea094d3d6 |
line wrap: on
line source
Ext.define('Lada.model.Zusatzwert', { extend: 'Ext.data.Model', fields: [ {name: "id"}, {name: "pzsId", mapping: "id.pzsId"}, {name: "probeId", mapping: "id.probeId"}, {name: "nwgZuMesswert", type: 'float'}, {name: "messwertPzs", type: 'float'}, {name: "messfehler", type: 'float'}, {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()} ], idProperty: "id", proxy: { type: 'rest', appendId: true, //default url: 'server/rest/zusatzwert', reader: { type: 'json', root: 'data' }, writer: { type: 'json', writeEverything : true } }, getEidi: function () { var pzsId = this.get('pzsId'); var probeId = this.get('probeId'); return "/" + pzsId + "/" + probeId; } }); function buildId(v, record){ return record.get('probeId') + ',' + record.get('pzsId'); } function ts2date(v, record){ // Converts a timestamp into a date object. return new Date(v); }