torsten@472: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz torsten@472: * Software engineering by Intevation GmbH torsten@472: * torsten@472: * This file is Free Software under the GNU GPL (v>=3) torsten@472: * and comes with ABSOLUTELY NO WARRANTY! Check out torsten@472: * the documentation coming with IMIS-Labordaten-Application for details. torsten@472: */ torsten@472: rrenkert@421: Ext.Loader.setConfig({ rrenkert@421: enabled: true, rrenkert@421: paths: { rrenkert@421: 'Ext.ux.form.DateTimeField': 'resources/datetime/UX_DateTimeField.js', rrenkert@421: 'Ext.ux.DateTimeMenu': 'resources/datetime/UX_DateTimeMenu.js', rrenkert@421: 'Ext.ux.DateTimePicker': 'resources/datetime/UX_DateTimePicker.js', rrenkert@421: 'Ext.ux.form.TimePickerField': 'resources/datetime/UX_TimePickerField.js' rrenkert@421: } rrenkert@421: }); rrenkert@421: torsten@0: Ext.application({ torsten@118: torsten@118: // Name of the application. Do not change as this name is used in torsten@118: // references! torsten@0: name: 'Lada', torsten@118: torsten@117: // Setting up translations. This is done using a ext-plgin which can be torsten@117: // found on https://github.com/elmasse/Ext.i18n.Bundle raimund@491: requires: [ raimund@491: 'Ext.i18n.Bundle', raimund@491: 'Lada.lib.Helpers', raimund@491: 'Ext.layout.container.Column' raimund@491: ], torsten@73: bundle: { torsten@73: bundle: 'Lada', torsten@73: lang: 'de-DE', torsten@73: path: 'resources', torsten@73: noCache: true torsten@73: }, torsten@118: torsten@117: // Setting this variable to true triggers loading the Viewport.js torsten@117: // file which sets ob the viewport. torsten@25: autoCreateViewport: true, torsten@117: torsten@117: // Start the application. torsten@0: launch: function() { torsten@2: console.log('Launching the application'); torsten@2: }, torsten@117: torsten@3: // Define the controllers of the application. They will be initialized torsten@3: // first before the application "launch" function is called. torsten@3: controllers: [ torsten@121: 'Sql', torsten@122: 'Proben', torsten@144: 'Zusatzwerte', torsten@149: 'Kommentare', torsten@206: 'MKommentare', torsten@157: 'Orte', torsten@190: 'Messungen', torsten@202: 'Messwert', torsten@202: 'Status' torsten@3: ] torsten@0: }); torsten@122: torsten@122: Ext.data.writer.Json.override({ torsten@122: getRecordData: function(record, getEverything) { torsten@122: if(this.writeEverything || record.writeEverything){ torsten@122: console.log('getRecordData', this,arguments); torsten@122: return record.getAllData(); raimund@491: } raimund@491: else { torsten@122: return this.callOverridden(arguments); torsten@122: } torsten@122: } torsten@122: }); torsten@122: torsten@122: Ext.data.Model.addMembers({ torsten@122: getAllData: function() { torsten@122: var data1 = this.getData(); torsten@122: var data2 = this.getAssociatedData( ); torsten@122: var dataMerged = Ext.Object.merge(data1, data2); torsten@122: return dataMerged; torsten@130: }, torsten@130: getEidi: function() { torsten@130: return "/" + this.getId(); torsten@122: } torsten@122: });