view app/model/MKommentar.js @ 413:e1af66012ef0 0.6

Reverse displayFields Array before configuring the columns of the result list. Now the displayed columns are in the same order as defined in the query configuration file.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 23 Sep 2013 14:26:09 +0200
parents dec076f1c3ae
children debfcc7713e3
line wrap: on
line source
/**
 * Model class for Kommentare on Messungen
 */
Ext.define('Lada.model.MKommentar', {
    extend: 'Lada.model.Base',
    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;
    }
});

http://lada.wald.intevation.org