community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864047 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/base-http-extensions.js wizard.js
Date Wed, 31 Jul 2019 12:21:10 GMT
Author: humbedooh
Date: Wed Jul 31 12:21:10 2019
New Revision: 1864047

URL: http://svn.apache.org/viewvc?rev=1864047&view=rev
Log:
disable the built-in spinner

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/base-http-extensions.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/base-http-extensions.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/base-http-extensions.js?rev=1864047&r1=1864046&r2=1864047&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/base-http-extensions.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/base-http-extensions.js Wed Jul
31 12:21:10 2019
@@ -21,6 +21,7 @@ var async_escrow = {}
 var async_maxwait = 250; // ms to wait before displaying spinner
 var async_status = 'clear';
 var async_cache = {}
+var no_spinner = true;
 
 // Escrow spinner check
 async function escrow_check() {
@@ -33,26 +34,28 @@ async function escrow_check() {
         }
     }
     // Fetch or create the spinner
-    let spinner = document.getElementById('spinner');
-    if (!spinner) {
-        spinner = new HTML('div', { id: 'spinner', class: 'spinner'});
-        spinwheel = new HTML('div', {id: 'spinwheel', class: 'spinwheel'});
-        spinner.inject(spinwheel);
-        spinner.inject(new HTML('h2', {}, "Loading, please wait.."));
-        document.body.appendChild(spinner);
-    }
-    // Show or don't show spinner?
-    if (show_spinner) {
-        spinner.style.display = 'block';
-        if (async_status === 'clear') {
-            console.log("Waiting for JSON resource, deploying spinner");
-            async_status = 'waiting';
+    if (!no_spinner) {
+        let spinner = document.getElementById('spinner');
+        if (!spinner) {
+            spinner = new HTML('div', { id: 'spinner', class: 'spinner'});
+            spinwheel = new HTML('div', {id: 'spinwheel', class: 'spinwheel'});
+            spinner.inject(spinwheel);
+            spinner.inject(new HTML('h2', {}, "Loading, please wait.."));
+            document.body.appendChild(spinner);
         }
-    } else {
-        spinner.style.display = 'none';
-        if (async_status === 'waiting') {
-            console.log("All URLs out of escrow, dropping spinner");
-            async_status = 'clear';
+        // Show or don't show spinner?
+        if (show_spinner) {
+            spinner.style.display = 'block';
+            if (async_status === 'clear') {
+                console.log("Waiting for JSON resource, deploying spinner");
+                async_status = 'waiting';
+            }
+        } else {
+            spinner.style.display = 'none';
+            if (async_status === 'waiting') {
+                console.log("All URLs out of escrow, dropping spinner");
+                async_status = 'clear';
+            }
         }
     }
 }

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864047&r1=1864046&r2=1864047&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Jul 31 12:21:10 2019
@@ -27,6 +27,7 @@ var async_escrow = {}
 var async_maxwait = 250; // ms to wait before displaying spinner
 var async_status = 'clear';
 var async_cache = {}
+var no_spinner = true;
 
 // Escrow spinner check
 async function escrow_check() {
@@ -39,26 +40,28 @@ async function escrow_check() {
         }
     }
     // Fetch or create the spinner
-    let spinner = document.getElementById('spinner');
-    if (!spinner) {
-        spinner = new HTML('div', { id: 'spinner', class: 'spinner'});
-        spinwheel = new HTML('div', {id: 'spinwheel', class: 'spinwheel'});
-        spinner.inject(spinwheel);
-        spinner.inject(new HTML('h2', {}, "Loading, please wait.."));
-        document.body.appendChild(spinner);
-    }
-    // Show or don't show spinner?
-    if (show_spinner) {
-        spinner.style.display = 'block';
-        if (async_status === 'clear') {
-            console.log("Waiting for JSON resource, deploying spinner");
-            async_status = 'waiting';
+    if (!no_spinner) {
+        let spinner = document.getElementById('spinner');
+        if (!spinner) {
+            spinner = new HTML('div', { id: 'spinner', class: 'spinner'});
+            spinwheel = new HTML('div', {id: 'spinwheel', class: 'spinwheel'});
+            spinner.inject(spinwheel);
+            spinner.inject(new HTML('h2', {}, "Loading, please wait.."));
+            document.body.appendChild(spinner);
         }
-    } else {
-        spinner.style.display = 'none';
-        if (async_status === 'waiting') {
-            console.log("All URLs out of escrow, dropping spinner");
-            async_status = 'clear';
+        // Show or don't show spinner?
+        if (show_spinner) {
+            spinner.style.display = 'block';
+            if (async_status === 'clear') {
+                console.log("Waiting for JSON resource, deploying spinner");
+                async_status = 'waiting';
+            }
+        } else {
+            spinner.style.display = 'none';
+            if (async_status === 'waiting') {
+                console.log("All URLs out of escrow, dropping spinner");
+                async_status = 'clear';
+            }
         }
     }
 }



Mime
View raw message