Mercurial > lada > lada-client
changeset 674:19d3b1f2613e
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 19 Mar 2015 14:52:20 +0100 |
parents | 39dd18124ebd (current diff) c34e65346572 (diff) |
children | fe527f380b10 |
files | |
diffstat | 9 files changed, 94 insertions(+), 69 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/form/Messung.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/form/Messung.js Thu Mar 19 14:52:20 2015 +0100 @@ -89,6 +89,9 @@ }, { xtype: 'numberfield', allowDecimals: false, + allowExponential: false, + enforceMaxLength: true, + maxLength: 10, minValue: 0, name: 'messdauer', margin: '0, 10, 5, 0',
--- a/app/view/grid/MKommentar.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/grid/MKommentar.js Thu Mar 19 14:52:20 2015 +0100 @@ -56,25 +56,28 @@ store: Ext.data.StoreManager.get('messstellen'), displayField: 'messStelle', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false, } }, { header: 'Datum', dataIndex: 'datum', xtype: 'datecolumn', - format: 'd.m.Y H:i', + format: 'd.m.Y', editor: { xtype: 'datefield', allowBlank: false, - format: 'd.m.Y H:i', - maxValue: Ext.Date.format(new Date(), 'd.m.Y H:i') + format: 'd.m.Y', + maxValue: Ext.Date.format(new Date(), 'd.m.Y') } }, { header: 'Text', dataIndex: 'text', flex: 1, editor: { - allowBlank: false + allowBlank: false, + maxLength: 1000, + enforceMaxLength: true } }]; this.initData();
--- a/app/view/grid/Messwert.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/grid/Messwert.js Thu Mar 19 14:52:20 2015 +0100 @@ -67,7 +67,8 @@ store: Ext.data.StoreManager.get('messgroessen'), displayField: 'messgroesse', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Messwert', @@ -76,7 +77,10 @@ width: 80, editor: { xtype: 'numberfield', - allowBlank: false + allowBlank: false, + maxLength: 10, + allowExponential: false, + enforceMaxLength: true, } }, { header: 'Messeinheit', @@ -94,7 +98,8 @@ store: Ext.data.StoreManager.get('messeinheiten'), displayField: 'einheit', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: '<NWG', @@ -113,7 +118,10 @@ width: 80, editor: { xtype: 'numberfield', - allowBlank: false + allowBlank: false, + maxLength: 10, + allowExponential: false, + enforceMaxLength: true, } }, { header: 'Grenzwertüberschreitung',
--- a/app/view/grid/Probenzusatzwert.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/grid/Probenzusatzwert.js Thu Mar 19 14:52:20 2015 +0100 @@ -67,7 +67,8 @@ store: Ext.data.StoreManager.get('probenzusaetze'), displayField: 'beschreibung', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Messwert', @@ -76,7 +77,34 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false + } + }, { + header: '< NWG', + flex: 1, + renderer: function(value, meta, record) { + var nwg = record.get('nwgZuMesswert'); + var mw = record.get('messwertPzs'); + if ( mw < nwg) { + return '<'; + } + return ''; + } + }, { + header: 'Nachweisgrenze', + dataIndex: 'nwgZuMesswert', + xtype: 'numbercolumn', + format: '0', + flex: 1, + editor: { + xtype: 'numberfield', + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false } }, { header: 'Maßeinheit', @@ -93,16 +121,6 @@ return record.get('einheit'); } }, { - header: 'Nachweisgrenze', - dataIndex: 'nwgZuMesswert', - xtype: 'numbercolumn', - format: '0', - flex: 1, - editor: { - xtype: 'numberfield', - allowBlank: false - } - }, { header: 'rel. Unsich.[%]', dataIndex: 'messfehler', xtype: 'numbercolumn', @@ -110,18 +128,11 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false - } - }, { - header: '< NWG', - flex: 1, - renderer: function(value, meta, record) { - var nwg = record.get('nwgZuMesswert'); - var mw = record.get('messwertPzs'); - if ( mw < nwg) { - return 'MW < NWG'; - } - return ''; + allowBlank: false, + maxLength: 3, + enforceMaxLength: true, + allowExponential: false, + allowDecimal: false } }]; this.initData();
--- a/app/view/grid/Status.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/grid/Status.js Thu Mar 19 14:52:20 2015 +0100 @@ -73,7 +73,8 @@ store: Ext.data.StoreManager.get('messstellen'), displayField: 'messStelle', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Status', @@ -89,17 +90,18 @@ store: statusStore, displayField: 'display', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Datum', dataIndex: 'sdatum', xtype: 'datecolumn', - format: 'd.m.Y H:i', + format: 'd.m.Y', editor: { xtype: 'datefield', allowBlank: false, - format: 'd.m.Y H:i', + format: 'd.m.Y', maxValue: Ext.Date.format(new Date(), 'd.m.Y') } }, { @@ -107,7 +109,9 @@ dataIndex: 'skommentar', flex: 1, editor: { - allowBlank: true + allowBlank: true, + maxLength: 1000, + enforceMaxLength: true } }]; this.initData();
--- a/app/view/widget/base/ComboBox.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/widget/base/ComboBox.js Thu Mar 19 14:52:20 2015 +0100 @@ -35,6 +35,7 @@ typeAhead: this.typeAhead, minChars: this.minChars, multiSelect: this.multiSelect, + editable: this.editable || false, msgTarget: 'none', tpl: this.tpl }, {
--- a/app/view/widget/base/DateTimePicker.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/widget/base/DateTimePicker.js Thu Mar 19 14:52:20 2015 +0100 @@ -94,23 +94,23 @@ beforeRender: function () { var me = this; - me.hourField = new Ext.form.field.Spinner({ + me.hourField = new Ext.form.field.Number({ ownerCt: me, ownerLayout: me.getComponentLayout(), value: 0, + valueToRaw: function (value) { + return (value < 10 ? '0' : '') + value; // add leading Zero + }, maxValue: 23, + maxLength: 2, + enforceMaxLength: true, onSpinUp: function() { var value = parseInt(this.getValue()); if (value === 23) { return; } var newValue = value + 1; - if (newValue < 10) { - this.setValue('0' + newValue); - } - else { - this.setValue(newValue); - } + this.setValue(newValue); }, onSpinDown: function() { var value = parseInt(this.getValue()); @@ -118,36 +118,32 @@ return; } var newValue = value - 1; - if (newValue < 10) { - this.setValue('0' + newValue); - } - else { - this.setValue(newValue); - } + this.setValue(newValue); }, listeners: { change: me.changeTimeValue, scope: me - } + }, + checkChangeEvents: ['change'] }); - me.minuteField = new Ext.form.field.Spinner({ + me.minuteField = new Ext.form.field.Number({ ownerCt: me, ownerLayout: me.getComponentLayout(), value: 0, maxValue: 59, + valueToRaw: function (value) { + return (value < 10 ? '0' : '') + value; // add leading Zero + }, + maxLength: 2, + enforceMaxLength: true, onSpinUp: function() { var value = parseInt(this.getValue()); if (value === 59) { return; } var newValue = value + 1; - if (newValue < 10) { - this.setValue('0' + newValue); - } - else { - this.setValue(newValue); - } + this.setValue(newValue); }, onSpinDown: function() { var value = parseInt(this.getValue()); @@ -155,17 +151,13 @@ return; } var newValue = value - 1; - if (newValue < 10) { - this.setValue('0' + newValue); - } - else { - this.setValue(newValue); - } + this.setValue(newValue); }, listeners: { change: me.changeTimeValue, scope: me - } + }, + checkChangeEvents: ['change'] }); me.timeLabel = new Ext.form.Label({ @@ -221,8 +213,8 @@ if (value > field.maxValue) { field.setValue(field.maxValue); } - else if (value < 10 && (nValue.indexOf('0') !== 0 || nValue.length < 2)) { - field.setValue('0' + nValue); + if (value == null || value == "" || isNaN(value)) { + field.setValue('0'); } },
--- a/app/view/widget/base/TextField.js Thu Mar 19 14:31:07 2015 +0100 +++ b/app/view/widget/base/TextField.js Thu Mar 19 14:52:20 2015 +0100 @@ -21,7 +21,8 @@ flex: 1, name: this.name, msgTarget: 'none', - maxLength: this.maxLength, + maxLength: this.maxLength || 1000, + enforceMaxLength: this.enforceMaxLength || true, fieldLabel: this.fieldLabel, labelWidth: this.labelWidth, listeners: this.listeners
--- a/resources/lib/translations_de.js Thu Mar 19 14:31:07 2015 +0100 +++ b/resources/lib/translations_de.js Thu Mar 19 14:52:20 2015 +0100 @@ -16,6 +16,8 @@ if (Ext.grid.RowEditor) { Ext.grid.RowEditor.prototype.saveBtnText = "Speichern"; Ext.grid.RowEditor.prototype.cancelBtnText = "Abbrechen"; + Ext.grid.RowEditor.prototype.errorsText = "Fehler"; + Ext.grid.RowEditor.prototype.dirtyText = "Sie müssen Ihre Änderungen Speichern oder durch Abbrechen verwerfen"; } });