Mercurial > lada > lada-client
view app/model/MKommentar.js @ 247:fa108c53da5a
Removed data from store. queries are now loaded from the server.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 24 Jul 2013 14:51:44 +0200 |
parents | d3f4a39bf89e |
children | 7b30c20ad1aa |
line wrap: on
line source
Ext.define('Lada.model.MKommentar', { extend: 'Ext.data.Model', fields: [ {name: "id"}, {name: "kid"}, {name: "messungsId"}, {name: "probeId"}, {name: "erzeuger"}, {name: "kdatum", type: 'date', convert: ts2date, defaultValue: new Date()}, {name: "ktext"} ], idProperty: "id", proxy: { type: 'rest', appendId: true, //default url: 'server/rest/messkommentare', reader: { type: 'json', root: 'data' } }, getEidi: function() { var kid = this.get('kid'); var messId = this.get('messungsId'); var probeId = this.get('probeId'); return "/" + kid + "/" + messId + "/" + probeId; } }); function ts2date(v, record){ // Converts a timestamp into a date object. return new Date(v); }