Mercurial > lada > lada-client
changeset 739:efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 20 Apr 2015 14:11:39 +0200 |
parents | 2db5d54a5685 |
children | 2e8da590ea0c |
files | app/controller/grid/Messwert.js app/store/Messgroessen.js app/view/grid/Messwert.js |
diffstat | 3 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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(); },
--- 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();
--- 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',