From 2f952a79159177b120e86f3dea4d8e285ad459ec Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 11 Oct 2014 16:41:42 +0000 Subject: [PATCH] delay an ajax call to see if this fixes the problem of the loading indicator not going away after showing the user a panel after login --- management/templates/login.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/management/templates/login.html b/management/templates/login.html index 8b3f438d..8a0e99ed 100644 --- a/management/templates/login.html +++ b/management/templates/login.html @@ -99,8 +99,10 @@ function do_login() { } } - // Open the next panel the user wants to go to. - show_panel(!switch_back_to_panel ? 'system_status' : switch_back_to_panel) + // Open the next panel the user wants to go to. Do this after the XHR response + // is over so that we don't start a new XHR request while this one is finishing, + // which confuses the loading indicator. + setTimeout(function() { show_panel(!switch_back_to_panel ? 'system_status' : switch_back_to_panel) }, 300); } }) }