comparison app.js @ 497:7c0653e8d9f7

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:38:17 +0100
parents d07e5086a64b
children 8b4ec61c5752
comparison
equal deleted inserted replaced
496:d07e5086a64b 497:7c0653e8d9f7
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz 1 /**
2 * Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH 3 * Software engineering by Intevation GmbH
3 * 4 *
4 * This file is Free Software under the GNU GPL (v>=3) 5 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 6 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 7 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 8 */
8
9 Ext.Loader.setConfig({ 9 Ext.Loader.setConfig({
10 enabled: true, 10 enabled: true,
11 paths: { 11 paths: {
12 'Ext.ux.form.DateTimeField': 'resources/datetime/UX_DateTimeField.js', 12 'Ext.ux.form.DateTimeField': 'resources/datetime/UX_DateTimeField.js',
13 'Ext.ux.DateTimeMenu': 'resources/datetime/UX_DateTimeMenu.js', 13 'Ext.ux.DateTimeMenu': 'resources/datetime/UX_DateTimeMenu.js',
111 'Status' 111 'Status'
112 ] 112 ]
113 }); 113 });
114 114
115 Ext.data.writer.Json.override({ 115 Ext.data.writer.Json.override({
116 getRecordData: function(record, getEverything) { 116 getRecordData: function(record) {
117 if(this.writeEverything || record.writeEverything){ 117 if (this.writeEverything || record.writeEverything) {
118 console.log('getRecordData', this,arguments); 118 console.log('getRecordData', arguments);
119 return record.getAllData(); 119 return record.getAllData();
120 } 120 }
121 else { 121 return this.callOverridden(arguments);
122 return this.callOverridden(arguments);
123 }
124 } 122 }
125 }); 123 });
126 124
127 Ext.data.Model.addMembers({ 125 Ext.data.Model.addMembers({
128 getAllData: function() { 126 getAllData: function() {
129 var data1 = this.getData(); 127 var data1 = this.getData();
130 var data2 = this.getAssociatedData( ); 128 var data2 = this.getAssociatedData();
131 var dataMerged = Ext.Object.merge(data1, data2); 129 var dataMerged = Ext.Object.merge(data1, data2);
132 return dataMerged; 130 return dataMerged;
133 }, 131 },
134 getEidi: function() { 132 getEidi: function() {
135 return "/" + this.getId(); 133 return '/' + this.getId();
136 } 134 }
137 }); 135 });

http://lada.wald.intevation.org