From 716a5a57a9546d4fb33cf9e7e554203a28f3672d Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 27 Jul 2013 21:38:54 +0200 Subject: [PATCH] move requests/loading icon handler --- static/js/pandora.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index 57d2bd69..52d39385 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -367,12 +367,12 @@ appPanel function initPandoraApp() { pandora.$ui.appPanel = pandora.ui.appPanel().display(); Ox.Request.requests() && pandora.$ui.loadingIcon.start(); - pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start); - pandora.$ui.body.ajaxStop(pandora.$ui.loadingIcon.stop); Ox.Request.bindEvent({ error: pandora.ui.errorDialog, request: function(data) { - pandora.$ui.loadingIcon.options({ + pandora.$ui.loadingIcon[ + data.requests ? 'start' : 'stop' + ]().options({ tooltip: (data.requests || 'No') + ' request' + (data.requests == 1 ? '' : 's')