From d175ad7278544e6c6960ade709a3312e78d4b6a0 Mon Sep 17 00:00:00 2001 From: Justin Beaty <51970393+justinbeaty@users.noreply.github.com> Date: Wed, 24 Aug 2022 00:22:18 -0700 Subject: [PATCH] Addendum to #2426 - Adminhtml loader (#2475) --- .../template/catalog/category/edit.phtml | 5 +- .../importexport/import/form/before.phtml | 14 ++--- .../newsletter/preview/iframeswitcher.phtml | 21 ++----- .../default/default/template/page.phtml | 4 +- .../default/default/template/popup.phtml | 5 +- js/mage/adminhtml/loader.js | 55 +++++++++++-------- js/mage/directpost.js | 10 +--- skin/adminhtml/default/default/boxes.css | 4 ++ 8 files changed, 56 insertions(+), 62 deletions(-) diff --git a/app/design/adminhtml/default/default/template/catalog/category/edit.phtml b/app/design/adminhtml/default/default/template/catalog/category/edit.phtml index 0d566ce73b1..67073cfdd10 100644 --- a/app/design/adminhtml/default/default/template/catalog/category/edit.phtml +++ b/app/design/adminhtml/default/default/template/catalog/category/edit.phtml @@ -183,10 +183,7 @@ function displayLoadingMask() { - var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page - Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2}); - toggleSelectsUnderBlock($('loading-mask'), false); - Element.show('loading-mask'); + showLoader(); } //]]> diff --git a/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml b/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml index 3629bef3c14..5595b0ac8b2 100644 --- a/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml +++ b/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml @@ -43,16 +43,14 @@ }); } - // show mask, temporary set new target and submit form - var loadingMask = $('loading-mask'); + // show mask + showLoader(); + + // temporary set new target and submit form var formElem = $(this.formId); var oldTarget = formElem.target; var oldAction = formElem.action; - Element.clonePosition(loadingMask, $$('#html-body .wrapper')[0], {offsetLeft:-2}) - toggleSelectsUnderBlock(loadingMask, false); - loadingMask.show(); - setLoaderPosition(); formElem.target = this.ifrElemName; if (newActionUrl) { @@ -74,10 +72,8 @@ */ varienForm.prototype.postToFrameComplete = function(response) { - var loadingMask = $('loading-mask'); $(this.ifrElemName).remove(); - toggleSelectsUnderBlock(loadingMask, true); - loadingMask.hide(); + hideLoader(); this.postToFrameProcessResponse(response); }; diff --git a/app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml b/app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml index 6894bcf5fe3..4c4af5db5d9 100644 --- a/app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml @@ -43,13 +43,15 @@ getChildHtml('preview_form'); ?>