comparison app.js @ 122:a7bfaeb1655d

Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 21 Jun 2013 16:56:17 +0200
parents c05fda928b82
children 747d488b9203
comparison
equal deleted inserted replaced
121:c05fda928b82 122:a7bfaeb1655d
25 25
26 // Define the controllers of the application. They will be initialized 26 // Define the controllers of the application. They will be initialized
27 // first before the application "launch" function is called. 27 // first before the application "launch" function is called.
28 controllers: [ 28 controllers: [
29 'Sql', 29 'Sql',
30 'Proben' 30 'Proben',
31 'Zusatzwerte'
31 //'Kommentare', 32 //'Kommentare',
32 //'Sql', 33 //'Sql',
33 //'Zusatzwerte',
34 //'Orte', 34 //'Orte',
35 //'Messungen' 35 //'Messungen'
36 ] 36 ]
37 }); 37 });
38
39 Ext.data.writer.Json.override({
40 getRecordData: function(record, getEverything) {
41 if(this.writeEverything || record.writeEverything){
42 console.log('getRecordData', this,arguments);
43 return record.getAllData();
44 } else {
45 return this.callOverridden(arguments);
46 }
47 }
48 });
49
50 Ext.data.Model.addMembers({
51 getAllData: function() {
52 var data1 = this.getData();
53 var data2 = this.getAssociatedData( );
54 var dataMerged = Ext.Object.merge(data1, data2);
55 return dataMerged;
56 }
57 });

http://lada.wald.intevation.org