[Lada-commits] [PATCH 1 of 2] Make tables editable for 'Orte'
Wald Commits
scm-commit at wald.intevation.org
Mon Dec 15 10:52:00 CET 2014
# HG changeset patch
# User Roland Geider <roland.geider at intevation.de>
# Date 1418636980 -3600
# Node ID 1643d74a40bbce38fdc70aaaff04479696575c59
# Parent 4ac3eee22f96d4aa5e6387394b6bbfe43753e07c
Make tables editable for 'Orte'
See LSB 3.5
diff -r 4ac3eee22f96 -r 1643d74a40bb app/controller/Orte.js
--- a/app/controller/Orte.js Sat Dec 13 14:12:52 2014 +0100
+++ b/app/controller/Orte.js Mon Dec 15 10:49:40 2014 +0100
@@ -32,9 +32,9 @@
addListeners: function() {
this.control({
- 'ortelist': {
- itemdblclick: this.editItem
- },
+ //'ortelist': {
+ // itemdblclick: this.editItem
+ //},
'ortelist toolbar button[action=add]': {
click: this.addItem
},
diff -r 4ac3eee22f96 -r 1643d74a40bb app/view/orte/List.js
--- a/app/view/orte/List.js Sat Dec 13 14:12:52 2014 +0100
+++ b/app/view/orte/List.js Mon Dec 15 10:49:40 2014 +0100
@@ -25,6 +25,13 @@
probeId: null,
initComponent: function() {
+ var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+ clicksToMoveEditor: 1,
+ autoCancel: false
+ });
+
+ this.plugins = [rowEditing];
+
this.store = Ext.data.StoreManager.get('Orte');
if (!this.store) {
this.store = Ext.create('Lada.store.Orte');
@@ -45,7 +52,10 @@
}];
this.columns = [{
header: 'Typ',
- dataIndex: 'ortsTyp'
+ dataIndex: 'ortsTyp',
+ editor: {
+ allowBlank: false
+ }
}, {
header: 'Staat',
dataIndex: 'ortId',
@@ -76,7 +86,10 @@
var gemid = record.get('gemId');
var record2 = gemeinden.getById(gemid);
return record2.get('bezeichnung');
- }
+ },
+ //editor: {
+ // allowBlank: false
+ //}
}, {
header: 'Messpunkt',
dataIndex: 'ortId',
@@ -84,7 +97,10 @@
var store = Ext.getStore('staOrte');
var record = store.getById(value);
return record.get('bezeichnung');
- }
+ },
+ //editor: {
+ // allowBlank: false
+ //}
}];
this.callParent(arguments);
}
More information about the Lada-commits
mailing list