torsten@313: /** torsten@313: * Model class for Kommentare torsten@313: */ torsten@53: Ext.define('Lada.model.Kommentar', { torsten@53: extend: 'Ext.data.Model', torsten@298: requires: ['Lada.lib.Helpers'], torsten@53: fields: [ torsten@144: {name: "kId"}, torsten@53: {name: "probeId"}, torsten@53: {name: "erzeuger"}, torsten@298: {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, torsten@53: {name: "ktext"} torsten@53: ], torsten@144: idProperty: "kId", torsten@53: proxy: { torsten@53: type: 'rest', torsten@53: appendId: true, //default torsten@53: url: 'server/rest/kommentare', torsten@53: reader: { torsten@100: type: 'json', torsten@100: root: 'data' torsten@53: } torsten@144: }, torsten@144: getEidi: function() { torsten@144: var kid = this.get('kId'); torsten@144: var probeId = this.get('probeId'); torsten@144: return "/" + kid + "/" + probeId; torsten@53: } torsten@53: });