Mercurial > lada > lada-client
comparison app/model/Status.js @ 170:738d657d8b6b
Added Status into Messungen listing.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 03 Jul 2013 16:08:22 +0200 |
parents | |
children | 945a727209d3 |
comparison
equal
deleted
inserted
replaced
169:52d105d4e93f | 170:738d657d8b6b |
---|---|
1 Ext.define('Lada.model.Status', { | |
2 extend: 'Ext.data.Model', | |
3 fields: [ | |
4 {name: "sId"}, | |
5 {name: "messungsId"}, | |
6 {name: "probeId"}, | |
7 {name: "erzeuger"}, | |
8 {name: "status"}, | |
9 {name: "sdatum", type: 'date', convert: ts2date, defaultValue: new Date()}, | |
10 {name: "stext"} | |
11 ], | |
12 idProperty: "sId", | |
13 proxy: { | |
14 type: 'rest', | |
15 appendId: true, //default | |
16 url: 'server/rest/status', | |
17 reader: { | |
18 type: 'json', | |
19 root: 'data' | |
20 } | |
21 }, | |
22 getEidi: function() { | |
23 var sid = this.get('sId'); | |
24 var messId = this.get('messungsId'); | |
25 var probeId = this.get('probeId'); | |
26 return "/" + sid + "/" + messId + "/" + probeId; | |
27 } | |
28 }); | |
29 | |
30 function ts2date(v, record){ | |
31 // Converts a timestamp into a date object. | |
32 return new Date(v); | |
33 } |