]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
monStoreErrors: new option clearMaskBeforeLoad
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Sep 2017 06:53:12 +0000 (08:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Sep 2017 06:53:12 +0000 (08:53 +0200)
To clear error mask before load starts.

Utils.js

index 7534ffb201d459e7658b4f1a5b5288aa38884e68..a0f0b69cd76fc777675a953f3c1e862a96cab7ca 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -167,13 +167,19 @@ Ext.define('Proxmox.Utils', { utilities: {
        }
     },
 
-    monStoreErrors: function(me, store) {
-       me.mon(store, 'beforeload', function(s, operation, eOpts) {
-           if (!me.loadCount) {
-               me.loadCount = 0; // make sure it is numeric
-               Proxmox.Utils.setErrorMask(me, true);
-           }
-       });
+    monStoreErrors: function(me, store, clearMaskBeforeLoad) {
+       if (clearMaskBeforeLoad) {
+           me.mon(store, 'beforeload', function(s, operation, eOpts) {
+               Proxmox.Utils.setErrorMask(me, false);
+           })
+       } else {
+           me.mon(store, 'beforeload', function(s, operation, eOpts) {
+               if (!me.loadCount) {
+                   me.loadCount = 0; // make sure it is numeric
+                   Proxmox.Utils.setErrorMask(me, true);
+               }
+           });
+       }
 
        // only works with 'proxmox' proxy
        me.mon(store.proxy, 'afterload', function(proxy, request, success) {