annotate app/model/Kommentar.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 702bf882f5a8
children debfcc7713e3
rev   line source
313
fcbd60412ba8 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 298
diff changeset
1 /**
fcbd60412ba8 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 298
diff changeset
2 * Model class for Kommentare
fcbd60412ba8 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 298
diff changeset
3 */
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.model.Kommentar', {
326
702bf882f5a8 Inherit form model.base. Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 313
diff changeset
5 extend: 'Lada.model.Base',
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 fields: [
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
7 {name: "kId"},
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 {name: "probeId"},
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 {name: "erzeuger"},
298
53a446d4f424 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
10 {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 {name: "ktext"}
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 ],
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
13 idProperty: "kId",
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 proxy: {
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 type: 'rest',
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 appendId: true, //default
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 url: 'server/rest/kommentare',
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 reader: {
100
8356595f4fdb Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents: 62
diff changeset
19 type: 'json',
8356595f4fdb Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents: 62
diff changeset
20 root: 'data'
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 }
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
22 },
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
23 getEidi: function() {
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
24 var kid = this.get('kId');
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
25 var probeId = this.get('probeId');
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
26 return "/" + kid + "/" + probeId;
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 }
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 });

http://lada.wald.intevation.org