[Lada-commits] [PATCH 2 of 4] merged
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 23 18:04:16 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426773140 -3600
# Node ID 19d3b1f2613ef9450f240d89df47c99040ad7666
# Parent 39dd18124ebd454e0a000223eab339bb5a2cff2c
# Parent c34e6534657235c406d1048f5b997de3f52d93be
merged.
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/form/Messung.js
--- 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',
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/grid/MKommentar.js
--- 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();
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/grid/Messwert.js
--- 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',
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/grid/Probenzusatzwert.js
--- 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();
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/grid/Status.js
--- 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();
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/widget/base/ComboBox.js
--- 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
}, {
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/widget/base/DateTimePicker.js
--- 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');
}
},
diff -r 39dd18124ebd -r 19d3b1f2613e app/view/widget/base/TextField.js
--- 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
diff -r 39dd18124ebd -r 19d3b1f2613e resources/lib/translations_de.js
--- 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";
}
});
More information about the Lada-commits
mailing list