view app/model/Kommentar.js @ 471:dd2b468dc1c2

Added hints on installation
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 14 Jan 2014 15:45:28 +0100
parents 702bf882f5a8
children debfcc7713e3
line wrap: on
line source
/**
 * Model class for Kommentare
 */
Ext.define('Lada.model.Kommentar', {
    extend: 'Lada.model.Base',
    fields: [
        {name: "kId"},
        {name: "probeId"},
        {name: "erzeuger"},
        {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
        {name: "ktext"}
    ],
    idProperty: "kId",
    proxy: {
        type: 'rest',
        appendId: true, //default
        url: 'server/rest/kommentare',
        reader: {
            type: 'json',
            root: 'data'
        }
    },
    getEidi: function() {
        var kid =  this.get('kId');
        var probeId = this.get('probeId');
        return "/" + kid + "/" + probeId;
    }
});

http://lada.wald.intevation.org