Mercurial > lada > lada-client
view app/model/MKommentar.js @ 305:2af694c73dd7
Use ts2date function from lib.Helpers. Remove old code
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 15:24:00 +0200 |
parents | 7b30c20ad1aa |
children | 7de16725d251 |
line wrap: on
line source
Ext.define('Lada.model.MKommentar', { extend: 'Ext.data.Model', requires: ['Lada.lib.Helpers'], fields: [ {name: "id"}, {name: "kid"}, {name: "messungsId"}, {name: "probeId"}, {name: "erzeuger"}, {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.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; } });