forked from 0x2620/pandora
move requests/loading icon handler
This commit is contained in:
parent
567c473ed0
commit
716a5a57a9
1 changed files with 3 additions and 3 deletions
|
@ -367,12 +367,12 @@ appPanel
|
||||||
function initPandoraApp() {
|
function initPandoraApp() {
|
||||||
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
||||||
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
|
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({
|
Ox.Request.bindEvent({
|
||||||
error: pandora.ui.errorDialog,
|
error: pandora.ui.errorDialog,
|
||||||
request: function(data) {
|
request: function(data) {
|
||||||
pandora.$ui.loadingIcon.options({
|
pandora.$ui.loadingIcon[
|
||||||
|
data.requests ? 'start' : 'stop'
|
||||||
|
]().options({
|
||||||
tooltip: (data.requests || 'No')
|
tooltip: (data.requests || 'No')
|
||||||
+ ' request'
|
+ ' request'
|
||||||
+ (data.requests == 1 ? '' : 's')
|
+ (data.requests == 1 ? '' : 's')
|
||||||
|
|
Loading…
Reference in a new issue