From 5b4b3ffdb6414cbe4a2fe52a1fe131ccbc946d7c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 6 Sep 2017 08:53:12 +0200 Subject: [PATCH] monStoreErrors: new option clearMaskBeforeLoad To clear error mask before load starts. --- Utils.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Utils.js b/Utils.js index 7534ffb..a0f0b69 100644 --- 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) {