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 torsten@73: requires: ['Ext.i18n.Bundle'], 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@157: 'Orte', torsten@157: 'Messungen' 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(); torsten@122: } 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: });