Mercurial > lada > lada-client
changeset 955:b401846e7817
using callback differently for statuswerte
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 09 Nov 2015 12:53:36 +0100 |
parents | 1856b6b3b8d4 |
children | 45c67a784b31 |
files | app/view/form/Messung.js app/view/grid/Messung.js |
diffstat | 2 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/form/Messung.js Wed Nov 04 19:44:44 2015 +0100 +++ b/app/view/form/Messung.js Mon Nov 09 12:53:36 2015 +0100 @@ -176,8 +176,9 @@ if (!swStore) { var swStore = Ext.create('Lada.store.StatusWerte'); } - swStore.on('load', - function(records, operation, success) { + swStore.load({ + scope: this, + callback: function(records, operation, success) { var i18n = Lada.getApplication().bundle; var msg = i18n.getMsg('load.statuswert.error'); var textfield = this.down('[name=status]'); @@ -186,8 +187,7 @@ } textfield.setRawValue(msg); }, - this); - swStore.load(); + }); }, setMessages: function(errors, warnings) {
--- a/app/view/grid/Messung.js Wed Nov 04 19:44:44 2015 +0100 +++ b/app/view/grid/Messung.js Mon Nov 09 12:53:36 2015 +0100 @@ -223,11 +223,7 @@ scope: this, callback: function(records, operation, success) { if (success) { - try { - val = sta.getById(value).get('wert'); - } - catch (e) { - } + val = sta.getById(value).get('wert'); } Ext.fly(opts.divId).update(val); }