[Lada-commits] [PATCH 3 of 4] Override getValue for Netzbetreiber Combobox to allways return the correct
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 13 18:42:00 CEST 2016
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1460556625 -7200
# Node ID 15d7b7a9e177530979d1e57a549a391e605d7e12
# Parent 1c86a259c2acffe180c9dd76e5c47cb98eff7b63
Override getValue for Netzbetreiber Combobox to allways return the correct
value.
diff -r 1c86a259c2ac -r 15d7b7a9e177 app/view/widget/Netzbetreiber.js
--- a/app/view/widget/Netzbetreiber.js Wed Apr 13 13:57:36 2016 +0200
+++ b/app/view/widget/Netzbetreiber.js Wed Apr 13 16:10:25 2016 +0200
@@ -34,5 +34,28 @@
this.store.clearFilter();
}
this.callParent(arguments);
+ },
+
+ getValue: function() {
+ var value = this.down('combobox').getValue();
+ if (value instanceof Array) {
+ return value;
+ }
+ value = value.trim().split(' ');
+ var retValues = [];
+ for (var i = 0; i < value.length; i++) {
+ var item = value[i];
+ var found = this.store.queryBy(function(rec) {
+ if (rec.get('id') == item ||
+ rec.get('netzbetreiber') == item) {
+ return true;
+ }
+ });
+ if (found.getCount() >= 0) {
+ retValues.push(found.getAt(0).get('id'));
+ continue;
+ }
+ }
+ return retValues;
}
});
diff -r 1c86a259c2ac -r 15d7b7a9e177 app/view/widget/Status.js
--- a/app/view/widget/Status.js Wed Apr 13 13:57:36 2016 +0200
+++ b/app/view/widget/Status.js Wed Apr 13 16:10:25 2016 +0200
@@ -10,16 +10,19 @@
fields: ['id', 'status'],
data: [{
'id': 1,
- 'status': 'nicht vergeben'
+ 'status': 'plausibel'
}, {
'id': 2,
- 'status': 'plausibel'
+ 'status': 'nicht repräsentativ'
}, {
'id': 3,
- 'status': 'nicht repräsentativ'
+ 'status': 'nicht plausibel'
}, {
- 'id': 4,
- 'status': 'nicht plausibel'
+ 'id': 7,
+ 'status': 'nicht lieferbar'
+ }, {
+ 'id': 8,
+ 'status': 'zurücksetzen'
}]
});
diff -r 1c86a259c2ac -r 15d7b7a9e177 app/view/widget/base/ComboBox.js
--- a/app/view/widget/base/ComboBox.js Wed Apr 13 13:57:36 2016 +0200
+++ b/app/view/widget/base/ComboBox.js Wed Apr 13 16:10:25 2016 +0200
@@ -20,6 +20,10 @@
margin: '0, 0, 5, 0',
initComponent: function() {
+ console.log(this.editable);
+ if (this.editable === undefined) {
+ this.editable = true;
+ }
this.items = [{
xtype: 'combobox',
flex: 1,
@@ -39,7 +43,7 @@
minChars: this.minChars,
maxChars: this.maxChars,
multiSelect: this.multiSelect,
- editable: this.editable || true,
+ editable: this.editable,
readOnly: this.readOnly,
forceSelection: this.forceSelection || false,
msgTarget: 'none',
diff -r 1c86a259c2ac -r 15d7b7a9e177 resources/css/lada.css
--- a/resources/css/lada.css Wed Apr 13 13:57:36 2016 +0200
+++ b/resources/css/lada.css Wed Apr 13 16:10:25 2016 +0200
@@ -33,11 +33,21 @@
background-image: url(../img/view-time-schedule-baselined.png);
}
+.x-action-col-cell img.noeditstatus
+{
+ background-image: url(../img/view-time-schedule-baselined-status.png);
+}
+
.x-action-col-cell img.edit
{
background-image: url(../img/view-time-schedule-edit.png);
}
+.x-action-col-cell img.editstatus
+{
+ background-image: url(../img/view-time-schedule-edit-status.png);
+}
+
.x-grid-checkheader {
height: 16px;
background-image: url('images/unchecked.gif');
diff -r 1c86a259c2ac -r 15d7b7a9e177 resources/i18n/Lada_de-DE.properties
--- a/resources/i18n/Lada_de-DE.properties Wed Apr 13 13:57:36 2016 +0200
+++ b/resources/i18n/Lada_de-DE.properties Wed Apr 13 16:10:25 2016 +0200
@@ -2,7 +2,7 @@
# Error Codes
##
! General errors
-200:Unbekannter Fehler
+200:OK
601:Probe existiert bereits
602:Objekt ist keine Probe
603:Fehler in der Verbindung zur DB
@@ -48,6 +48,7 @@
stammdaten:Stammdaten
probe:Probe
+messung:Messung
name:Name
mstId:Messstelle
datenbasisId:Datenbasis
More information about the Lada-commits
mailing list