Mercurial > lada > lada-client
comparison app/model/Zusatzwert.js @ 491:850ccfe5f3c4
Code style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 23:23:32 +0100 |
parents | f7446ebfe5d0 |
children | d07e5086a64b |
comparison
equal
deleted
inserted
replaced
490:446e99cfd425 | 491:850ccfe5f3c4 |
---|---|
9 /** | 9 /** |
10 * Model class for Zusatzwerte | 10 * Model class for Zusatzwerte |
11 */ | 11 */ |
12 Ext.define('Lada.model.Zusatzwert', { | 12 Ext.define('Lada.model.Zusatzwert', { |
13 extend: 'Lada.model.Base', | 13 extend: 'Lada.model.Base', |
14 fields: [ | 14 |
15 {name: "id"}, | 15 fields: [{ |
16 {name: "probeId"}, | 16 name: "id" |
17 {name: "pzsId"}, | 17 }, { |
18 {name: "nwgZuMesswert", type: 'float'}, | 18 name: "probeId" |
19 {name: "messwertPzs", type: 'float'}, | 19 }, { |
20 {name: "messfehler", type: 'float'}, | 20 name: "pzsId" |
21 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()} | 21 }, { |
22 ], | 22 name: "nwgZuMesswert", |
23 type: 'float' | |
24 }, { | |
25 name: "messwertPzs", | |
26 type: 'float' | |
27 }, { | |
28 name: "messfehler", | |
29 type: 'float' | |
30 }, { | |
31 name: "letzteAenderung", | |
32 type: 'date', | |
33 convert: Lada.lib.Helpers.ts2date, | |
34 defaultValue: new Date() | |
35 }], | |
36 | |
23 idProperty: "id", | 37 idProperty: "id", |
38 | |
24 proxy: { | 39 proxy: { |
25 type: 'rest', | 40 type: 'rest', |
26 url: 'server/rest/zusatzwert', | 41 url: 'server/rest/zusatzwert', |
27 reader: { | 42 reader: { |
28 type: 'json', | 43 type: 'json', |
33 // TODO: Check if this function is really needed (torsten) | 48 // TODO: Check if this function is really needed (torsten) |
34 // <2013-09-18 15:58> | 49 // <2013-09-18 15:58> |
35 writeEverything : true | 50 writeEverything : true |
36 } | 51 } |
37 }, | 52 }, |
53 | |
38 getMesseinheit: function(pzsId) { | 54 getMesseinheit: function(pzsId) { |
39 var zstore = Ext.getStore('StaProbenzusaetze'); | 55 var zstore = Ext.getStore('StaProbenzusaetze'); |
40 var mstore = Ext.getStore('StaMesseinheiten'); | 56 var mstore = Ext.getStore('StaMesseinheiten'); |
41 var mehId = zstore.getById(pzsId).get('mehId'); | 57 var mehId = zstore.getById(pzsId).get('mehId'); |
42 console.log('mehid: ' + mehId); | 58 console.log('mehid: ' + mehId); |