[Lada-commits] [PATCH 4 of 4] Set some loading masks

Wald Commits scm-commit at wald.intevation.org
Wed Apr 8 10:52:13 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1428483152 -7200
# Node ID 2e478b3a587af74b94b5db8581954592a0306047
# Parent  baef70abfe71c53f206a62ccd6956fb5fdbd6dad
Set some loading masks.

diff -r baef70abfe71 -r 2e478b3a587a app/controller/form/Messung.js
--- 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);
             }
         });
     },
diff -r baef70abfe71 -r 2e478b3a587a app/view/window/ProbeEdit.js
--- 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
         });


More information about the Lada-commits mailing list