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

Added docstring
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 08:05:32 +0200
parents 7b30c20ad1aa
children dec076f1c3ae
rev   line source
316
7de16725d251 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 301
diff changeset
1 /**
7de16725d251 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 301
diff changeset
2 * Model class for Kommentare on Messungen
7de16725d251 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 301
diff changeset
3 */
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.model.MKommentar', {
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.data.Model',
301
7b30c20ad1aa Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 227
diff changeset
6 requires: ['Lada.lib.Helpers'],
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 fields: [
179
f1f0351b6e2f Show List of Messungskommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 161
diff changeset
8 {name: "id"},
227
d3f4a39bf89e Set IdProperty and fix creating and updating mkommentar
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 203
diff changeset
9 {name: "kid"},
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 {name: "messungsId"},
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 {name: "probeId"},
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 {name: "erzeuger"},
301
7b30c20ad1aa Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 227
diff changeset
13 {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 {name: "ktext"}
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 ],
179
f1f0351b6e2f Show List of Messungskommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 161
diff changeset
16 idProperty: "id",
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 proxy: {
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 type: 'rest',
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 appendId: true, //default
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 url: 'server/rest/messkommentare',
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 reader: {
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 type: 'json',
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 root: 'data'
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 }
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 },
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 getEidi: function() {
227
d3f4a39bf89e Set IdProperty and fix creating and updating mkommentar
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 203
diff changeset
27 var kid = this.get('kid');
161
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 var messId = this.get('messungsId');
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 var probeId = this.get('probeId');
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 return "/" + kid + "/" + messId + "/" + probeId;
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 }
0b635b836903 Added model and store for Messungskommentare.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 });

http://lada.wald.intevation.org