From c1bb6f89f2f0b0f69731c90cfc68af5aa80cf814 Mon Sep 17 00:00:00 2001 From: Rafael JPD Date: Wed, 10 Nov 2021 13:08:07 -0300 Subject: [PATCH 1/3] =?UTF-8?q?melhora=20fun=C3=A7=C3=A3o=20para=20esconde?= =?UTF-8?q?r=20e=20exibir=20git=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/static/js/main.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/app/core/static/js/main.js b/app/core/static/js/main.js index 39745a1..5e75dec 100644 --- a/app/core/static/js/main.js +++ b/app/core/static/js/main.js @@ -19,18 +19,6 @@ function createMessage(msg, alert_class){ return divAlert; } -function ingressPackageDownloadToggleSpinner(){ - var btnSearchPackage = document.getElementById('btnSearchPackage'); - var divSpinner = document.getElementById('searchPackageLoading'); - if (divSpinner.style.display == "none") { - divSpinner.style.display = 'block'; - btnSearchPackage.setAttribute('disabled', 'disabled'); - } else { - divSpinner.style.display = 'none'; - btnSearchPackage.removeAttribute('disabled'); - } -} - function ingressPackageDownloadCreateTable(data){ tableBody = document.getElementById('resultSearchPackagesTableBody') @@ -66,3 +54,13 @@ function ingressPackageDownloadCreateTable(data){ } } } + +function showLoader(loader, button){ + loader.style.display = 'block'; + button.setAttribute('disabled', 'disabled'); +} + +function hideLoader(loader, button){ + loader.style.display = 'none'; + button.removeAttribute('disabled'); +} From 6b56d390774267402e7ee4deb60080bc75a165fc Mon Sep 17 00:00:00 2001 From: Rafael JPD Date: Wed, 10 Nov 2021 13:08:56 -0300 Subject: [PATCH 2/3] =?UTF-8?q?melhora=20nomes=20de=20vari=C3=A1veis=20em?= =?UTF-8?q?=20js=20de=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/templates/ingress/package_download.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/templates/ingress/package_download.html b/app/core/templates/ingress/package_download.html index f205bf7..cc7bce8 100644 --- a/app/core/templates/ingress/package_download.html +++ b/app/core/templates/ingress/package_download.html @@ -22,11 +22,11 @@

{% trans 'Search package' %}

- + -