From: Dietmar Maurer Date: Wed, 6 Sep 2017 06:53:12 +0000 (+0200) Subject: monStoreErrors: new option clearMaskBeforeLoad X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=5b4b3ffdb6414cbe4a2fe52a1fe131ccbc946d7c monStoreErrors: new option clearMaskBeforeLoad To clear error mask before load starts. --- 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) {