META-INF.resources.butterfaces-dist-js.butterfaces-waitingpanel.jquery.min.js Maven / Gradle / Ivy
var ButterFaces;!function(e){var n=function(){function n(e){this.overlay=e}return n.prototype.processAjaxUpdate=function(){var e=this,n=0;return function(r){var t=r.status;console.log("ButterFaces.WaitingPanel.onEvent - processEvent: "+t),"begin"===t?n++:"success"===t&&n--,n>0?(console.log("ButterFaces.WaitingPanel.onEvent - show "+n),e.overlay.show()):(console.log("ButterFaces.WaitingPanel.onEvent - hide "+n),e.overlay.hide())}},n.prototype.processOnError=function(n){n&&(console.error("ButterFaces.WaitingPanel.onError - An error occured, closing waiting panel. errorType: "+n.status+", description: "+n.description),e.Overlay.hideAll())},n}();e.WaitingPanel=n}(ButterFaces||(ButterFaces={})),function(e){var n,r=!1;jQuery.fn.waitingPanel=function(e){var t=e.waitingPanelDelay,a=e.blockpage;return this.each(function(){if(!r){n=new ButterFaces.Overlay(t,a);var e=new ButterFaces.WaitingPanel(n);jsf.ajax.addOnEvent(e.processAjaxUpdate()),jsf.ajax.addOnError(e.processOnError),r=!0}n.delay=t,n.isTransparentBlockingOverlayActive=a})}}();
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1dHRlcmZhY2VzLXdhaXRpbmdwYW5lbC5qcXVlcnkudHMiXSwibmFtZXMiOlsiQnV0dGVyRmFjZXMiLCJXYWl0aW5nUGFuZWwiLCJvdmVybGF5IiwidGhpcyIsInByb3RvdHlwZSIsInByb2Nlc3NBamF4VXBkYXRlIiwiX3RoaXMiLCJhamF4UmVxdWVzdHNSdW5uaW5nIiwiX2EiLCJzdGF0dXMiLCJjb25zb2xlIiwibG9nIiwic2hvdyIsImhpZGUiLCJwcm9jZXNzT25FcnJvciIsImRhdGEiLCJlcnJvciIsImRlc2NyaXB0aW9uIiwiT3ZlcmxheSIsImhpZGVBbGwiLCIkIiwiZXZlbnRSZWdpc3RlcmVkIiwialF1ZXJ5IiwiZm4iLCJ3YWl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1cyk7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXR1cyA9PT0gXCJiZWdpblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGFqYXhSZXF1ZXN0c1J1bm5pbmcrKztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXR1cyA9PT0gXCJzdWNjZXNzXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgYWpheFJlcXVlc3RzUnVubmluZy0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoYWpheFJlcXVlc3RzUnVubmluZyA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJCdXR0ZXJGYWNlcy5XYWl0aW5nUGFuZWwub25FdmVudCAgLSBzaG93IFwiICsgYWpheFJlcXVlc3RzUnVubmluZyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheS5zaG93KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJCdXR0ZXJGYWNlcy5XYWl0aW5nUGFuZWwub25FdmVudCAgLSBoaWRlIFwiICsgYWpheFJlcXVlc3RzUnVubmluZyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheS5oaWRlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHB1YmxpYyBwcm9jZXNzT25FcnJvcihkYXRhOiBqc2YuYWpheC5SZXF1ZXN0RGF0YSkge1xuICAgICAgICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiQnV0dGVyRmFjZXMuV2FpdGluZ1BhbmVsLm9uRXJyb3IgIC0gQW4gZXJyb3Igb2NjdXJlZCwgY2xvc2luZyB3YWl0aW5nIHBhbmVsLiBlcnJvclR5cGU6IFwiICsgZGF0YS5zdGF0dXMgKyBcIiwgZGVzY3Jp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