Mercurial > lada > lada-client
comparison app/model/Status.js @ 488:f7446ebfe5d0
Added and updated models.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 21:10:35 +0100 |
parents | debfcc7713e3 |
children |
comparison
equal
deleted
inserted
replaced
487:a05cbc6e63cb | 488:f7446ebfe5d0 |
---|---|
10 * Model class for Status | 10 * Model class for Status |
11 */ | 11 */ |
12 Ext.define('Lada.model.Status', { | 12 Ext.define('Lada.model.Status', { |
13 extend: 'Lada.model.Base', | 13 extend: 'Lada.model.Base', |
14 fields: [ | 14 fields: [ |
15 {name: "sid"}, | 15 {name: "id"}, |
16 {name: "messungsId"}, | 16 {name: "messungsId"}, |
17 {name: "probeId"}, | 17 {name: "probeId"}, |
18 {name: "erzeuger"}, | 18 {name: "erzeuger"}, |
19 {name: "status", defaultValue: 1}, | 19 {name: "status", defaultValue: 1}, |
20 {name: "sdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, | 20 {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
21 {name: "skommentar"} | 21 {name: "kommentar"} |
22 ], | 22 ], |
23 idProperty: "sid", | 23 idProperty: "id", |
24 proxy: { | 24 proxy: { |
25 type: 'rest', | 25 type: 'rest', |
26 appendId: true, //default | |
27 url: 'server/rest/status', | 26 url: 'server/rest/status', |
28 reader: { | 27 reader: { |
29 type: 'json', | 28 type: 'json', |
30 root: 'data' | 29 root: 'data' |
31 } | 30 } |
32 }, | |
33 getEidi: function() { | |
34 var sid = this.get('sid'); | |
35 var messId = this.get('messungsId'); | |
36 var probeId = this.get('probeId'); | |
37 return "/" + sid + "/" + messId + "/" + probeId; | |
38 } | 31 } |
39 }); | 32 }); |