[Lada-commits] [PATCH] Enabled autocompletion for Messwerte in a Messung
Wald Commits
scm-commit at wald.intevation.org
Mon Apr 20 14:11:52 CEST 2015
# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1429531899 -7200
# Node ID efb1369a8caca8fd153f490a60b6f058d28c90ba
# Parent 2db5d54a5685dab5400b1e049862192702442cb2
Enabled autocompletion for Messwerte in a Messung.
diff -r 2db5d54a5685 -r efb1369a8cac app/controller/grid/Messwert.js
--- a/app/controller/grid/Messwert.js Mon Apr 20 12:24:54 2015 +0200
+++ b/app/controller/grid/Messwert.js Mon Apr 20 14:11:39 2015 +0200
@@ -27,6 +27,10 @@
gridSave: function(editor, context) {
context.record.save({
success: function(request, response) {
+ Ext.data.StoreManager.get('messgroessen').clearFilters();
+ Ext.data.StoreManager.get('messgroessen').reload();
+ // If you don't do the reset above, the grid will only contain
+ // one row in cases in when autocompletion was used!
context.grid.store.reload();
context.grid.up('window').initData();
},
diff -r 2db5d54a5685 -r efb1369a8cac app/store/Messgroessen.js
--- a/app/store/Messgroessen.js Mon Apr 20 12:24:54 2015 +0200
+++ b/app/store/Messgroessen.js Mon Apr 20 14:11:39 2015 +0200
@@ -14,6 +14,7 @@
model: 'Lada.model.Messgroesse',
sorters: [{
property: 'messgroesse',
+ direction: 'ASC',
transform: function(val) {
if (val) {
return val.toLowerCase();
diff -r 2db5d54a5685 -r efb1369a8cac app/view/grid/Messwert.js
--- a/app/view/grid/Messwert.js Mon Apr 20 12:24:54 2015 +0200
+++ b/app/view/grid/Messwert.js Mon Apr 20 14:11:39 2015 +0200
@@ -83,7 +83,13 @@
displayField: 'messgroesse',
valueField: 'id',
allowBlank: false,
- editable: false
+ editable: true,
+ forceSelection: true,
+ autoSelect: true,
+ queryMode: 'local',
+ minChars: 0,
+ typeAhead: false,
+ triggerAction: 'all'
}
}, {
header: 'Messwert',
More information about the Lada-commits
mailing list