changeset 713:2e478b3a587a

Set some loading masks.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Apr 2015 10:52:32 +0200
parents baef70abfe71
children a8da0a5bacf9
files app/controller/form/Messung.js app/view/window/ProbeEdit.js
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/form/Messung.js	Wed Apr 08 10:52:15 2015 +0200
+++ b/app/controller/form/Messung.js	Wed Apr 08 10:52:32 2015 +0200
@@ -25,6 +25,7 @@
 
     save: function(button) {
         var formPanel = button.up('form');
+        formPanel.setLoading(true);
         var data = formPanel.getForm().getFieldValues(true);
         for (var key in data) {
             formPanel.getForm().getRecord().set(key, data[key]);
@@ -57,6 +58,7 @@
                         win.initData();
                     }
                 }
+                formPanel.setLoading(false);
             },
             failure: function(record, response) {
                 button.setDisabled(true);
@@ -83,6 +85,7 @@
                     Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
                         Lada.getApplication().bundle.getMsg('err.msg.response.body'));
                 }
+                formPanel.setLoading(false);
             }
         });
     },
--- a/app/view/window/ProbeEdit.js	Wed Apr 08 10:52:15 2015 +0200
+++ b/app/view/window/ProbeEdit.js	Wed Apr 08 10:52:32 2015 +0200
@@ -117,10 +117,12 @@
     },
 
     initData: function() {
+        this.setLoading(true);
         this.clearMessages();
         me = this;
         Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), {
             failure: function(record, action) {
+                me.setLoading(false);
                 // TODO
                 console.log('An unhandled Failure occured. See following Response and Record');
                 console.log(action);
@@ -149,6 +151,7 @@
                     this.down('probeform').setReadOnly(false);
                     this.enableChildren();
                 }
+                me.setLoading(false);
             },
             scope: this
         });

http://lada.wald.intevation.org