annotate app/model/Kommentar.js @ 316:7de16725d251

Added docstring
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 08:05:32 +0200
parents fcbd60412ba8
children 702bf882f5a8
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', {
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.data.Model',
298
53a446d4f424 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
6 requires: ['Lada.lib.Helpers'],
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
7 fields: [
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
8 {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
9 {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
10 {name: "erzeuger"},
298
53a446d4f424 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
11 {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
12 {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
13 ],
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
14 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
15 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
16 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
17 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
18 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
19 reader: {
100
8356595f4fdb Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents: 62
diff changeset
20 type: 'json',
8356595f4fdb Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents: 62
diff changeset
21 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
22 }
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
23 },
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
24 getEidi: function() {
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
25 var kid = this.get('kId');
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
26 var probeId = this.get('probeId');
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 107
diff changeset
27 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
28 }
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 });

http://lada.wald.intevation.org