Mercurial > lada > lada-client
changeset 774:afc9076db490
Added Offset field
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 12 May 2015 16:11:05 +0200 |
parents | 380edfecac67 |
children | 311c39a64064 |
files | app/controller/form/Messprogramm.js app/model/Messprogramm.js app/view/form/Messprogramm.js resources/i18n/Lada_de-DE.properties |
diffstat | 4 files changed, 33 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js Tue May 12 15:07:23 2015 +0200 +++ b/app/controller/form/Messprogramm.js Tue May 12 16:11:05 2015 +0200 @@ -26,7 +26,11 @@ 'messprogrammform': { dirtychange: this.dirtyForm }, - 'messprogrammform [xtype="numberfield"]': { + 'messprogrammform numberfield[name=teilintervallBis]': { + change: this.synchronizeSlider, + blur: this.checkPeriod + }, + 'messprogrammform numberfield[name=teilintervallVon]': { change: this.synchronizeSlider, blur: this.checkPeriod },
--- a/app/model/Messprogramm.js Tue May 12 15:07:23 2015 +0200 +++ b/app/model/Messprogramm.js Tue May 12 16:11: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' }, {
--- a/app/view/form/Messprogramm.js Tue May 12 15:07:23 2015 +0200 +++ b/app/view/form/Messprogramm.js Tue May 12 16:11: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'); },
--- a/resources/i18n/Lada_de-DE.properties Tue May 12 15:07:23 2015 +0200 +++ b/resources/i18n/Lada_de-DE.properties Tue May 12 16:11: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