# HG changeset patch # User Dustin Demuth # Date 1431440765 -7200 # Node ID da14e0f3e5997acc2e47239bfb29e5862188dc96 # Parent 311c39a64064055b142d8e9caf3d9e56e265c53c# Parent dd6925ef602857c8a4141d8674ba220de0a008a0 merged diff -r dd6925ef6028 -r da14e0f3e599 app/controller/form/Messprogramm.js --- a/app/controller/form/Messprogramm.js Tue May 12 15:12:02 2015 +0200 +++ b/app/controller/form/Messprogramm.js Tue May 12 16:26:05 2015 +0200 @@ -26,7 +26,10 @@ 'messprogrammform': { dirtychange: this.dirtyForm }, - 'messprogrammform [xtype="numberfield"]': { + 'messprogrammform gueltigPeriod datetime': { + blur: this.checkPeriod + }, + 'messprogrammform probenintervall numberfield': { change: this.synchronizeSlider, blur: this.checkPeriod }, @@ -181,7 +184,7 @@ * The function validates if the start is smaller than end. */ checkPeriod: function(field) { - + alert(); // This field might be a field within a Period. // Search for Partner field (period: end/start) and validate // End Before Start validation diff -r dd6925ef6028 -r da14e0f3e599 app/model/Messprogramm.js --- a/app/model/Messprogramm.js Tue May 12 15:12:02 2015 +0200 +++ b/app/model/Messprogramm.js Tue May 12 16:26:05 2015 +0200 @@ -59,9 +59,23 @@ }, { name: 'intervallOffset' }, { - name: 'gueltigVon' + name: 'gueltigVon', + type: 'date', + convert: function(v) { + if (!v) { + return v; + } + return new Date(v); + }, }, { - name: 'gueltigBis' + name: 'gueltigBis', + type: 'date', + convert: function(v) { + if (!v) { + return v; + } + return new Date(v); + }, }, { name: 'probeNehmerId' }, { diff -r dd6925ef6028 -r da14e0f3e599 app/view/form/Messprogramm.js --- a/app/view/form/Messprogramm.js Tue May 12 15:12:02 2015 +0200 +++ b/app/view/form/Messprogramm.js Tue May 12 16:26:05 2015 +0200 @@ -256,6 +256,12 @@ name: 'gueltigBis', format: 'd.m.Y H:i', period: 'end' + }, { + xtype: 'numberfield', + fieldLabel: i18n.getMsg('offset'), + labelWidth: 90, + anchor: '100%', + name: 'intervallOffset', }] }, { xtype: 'fset', @@ -310,6 +316,7 @@ // for instance H, M, J, ... // Initialize the probenintervallslider var s = this.down('probenintervallslider'); + var i = this.getForm().findField('intervallOffset'); var v = this.getForm().findField('teilintervallVon'); var b = this.getForm().findField('teilintervallBis'); var intervallstore = Ext.data.StoreManager.get('Probenintervall'); @@ -367,6 +374,10 @@ v.setValue(svalLower); b.setValue(svalUpper); + //Set IntervallOffset + i.setMinValue(0); + i.setMaxValue(max-1); + console.log('Populate End'); }, diff -r dd6925ef6028 -r da14e0f3e599 resources/i18n/Lada_de-DE.properties --- a/resources/i18n/Lada_de-DE.properties Tue May 12 15:12:02 2015 +0200 +++ b/resources/i18n/Lada_de-DE.properties Tue May 12 16:26:05 2015 +0200 @@ -61,6 +61,7 @@ nuklid:Nuklid from:Von to:Bis +offset:Offset emptytext.probenintervall:Wählen Sie ein Probenintervall emptytext.datenbasis:Wahlen Sie eine Datenbasis