Updated spinner logic

This commit is contained in:
bergware
2020-03-14 01:16:06 +01:00
parent d04bac1534
commit 51a6f6b645
7 changed files with 7 additions and 7 deletions
@@ -99,7 +99,7 @@ var sortableHelper = function(e,i){
return i;
};
function loadlist() {
timers.docker = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
timers.docker = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.get('/plugins/dynamix.docker.manager/include/DockerContainers.php',function(d) {
clearTimeout(timers.docker);
var data = d.split(/\0/);
+1 -1
View File
@@ -44,7 +44,7 @@ function resize(bind) {
}
<?endif;?>
function loadlist(id) {
timers.plugins = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
timers.plugins = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{audit:id,check:<?=$check?>},function(d) {
var data = d.split(/\0/);
var list = $('#plugin_list');
+1 -1
View File
@@ -20,7 +20,7 @@ Markdown="false"
</style>
<script>
$(function(){
timers.browse = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
timers.browse = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.get('/webGui/include/Browse.php',{dir:"<?=addslashes(urlencode($dir))?>",path:"<?=$path?>",user:<?=strpos($dir,'/mnt/user')===0?1:0?>},function(data){
clearTimeout(timers.browse);
var table = $('table.indexer');
+1 -1
View File
@@ -43,7 +43,7 @@ function resize(bind) {
}
<?endif;?>
function archiveList(init) {
timers.archive = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
timers.archive = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.get('/webGui/include/NotificationsArchive.php',{filter:'<?=addslashes(htmlspecialchars($_GET['filter']))?>'},function(data) {
clearTimeout(timers.archive);
if (data) $('#archive_list').html(data);
+1 -1
View File
@@ -84,7 +84,7 @@ function showLog(log,init) {
var type = $(this).attr('class').replace('label','').replace(/-/g,'');
$(this).removeClass().addClass(type+' label');
});
timers.syslog = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
timers.syslog = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.post('/webGui/include/Syslog.php',{log:log},function(data){
clearTimeout(timers.syslog);
$('pre.up').html(data);
@@ -623,7 +623,7 @@ $('.back_to_top').click(function(event) {
});
$(function() {
$('div.spinner.fixed').html(unraid_logo);
setTimeout(function(){$('div.spinner').not('.fixed').each(function(){$(this).html(unraid_logo);});},150); // display animation if page loading takes longer than 150ms
setTimeout(function(){$('div.spinner').not('.fixed').each(function(){$(this).html(unraid_logo);});},500); // display animation if page loading takes longer than 0.5s
shortcut.add('F1',function(){HelpButton();});
<?if ($var['regTy']=='unregistered'):?>
$('#licensetype').addClass('orange-text');
+1 -1
View File
@@ -54,7 +54,7 @@ function addLog(logLine) {
}
function disablePage() {
setTimeout(function(){top.document.getElementsByClassName('spinner fixed')[0].style.display = 'block';},150); // show spinner when operation takes longer than 150ms
setTimeout(function(){top.document.getElementsByClassName('spinner fixed')[0].style.display = 'block';},500); // show spinner when operation takes longer than 0.5s
for (var i=0,element; element=top.document.querySelectorAll('input,button,select')[i]; i++) element.disabled = true;
for (var i=0,link; link=top.document.getElementsByTagName('a')[i]; i++) link.style.color = "gray"; //fake disable
}