Mercurial > lada > lada-client
annotate app/model/Kommentar.js @ 486:0952c7767d98
Added new static data matching the new data model.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 21:06:19 +0100 |
parents | debfcc7713e3 |
children |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
326
diff
changeset
|
8 |
313
fcbd60412ba8
Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
298
diff
changeset
|
9 /** |
fcbd60412ba8
Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
298
diff
changeset
|
10 * Model class for Kommentare |
fcbd60412ba8
Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
298
diff
changeset
|
11 */ |
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 Ext.define('Lada.model.Kommentar', { |
326
702bf882f5a8
Inherit form model.base. Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
313
diff
changeset
|
13 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
|
14 fields: [ |
144
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
15 {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
|
16 {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
|
17 {name: "erzeuger"}, |
298
53a446d4f424
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
144
diff
changeset
|
18 {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
|
19 {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
|
20 ], |
144
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
21 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
|
22 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
|
23 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
|
24 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
|
25 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
|
26 reader: { |
100
8356595f4fdb
Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents:
62
diff
changeset
|
27 type: 'json', |
8356595f4fdb
Changed store. Elements are in thate data attribute. Build custom id
Torsten Irländer <torsten@irlaender.de>
parents:
62
diff
changeset
|
28 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
|
29 } |
144
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
30 }, |
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
31 getEidi: function() { |
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
32 var kid = this.get('kId'); |
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
33 var probeId = this.get('probeId'); |
7b1140bd8b3d
Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
107
diff
changeset
|
34 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
|
35 } |
73bc17de6ff2
Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
36 }); |