From 8c8ae16019e686a5cad886f99b9f89642fb0da32 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 8 Mar 2013 08:51:35 +0000 Subject: [PATCH] use Ox.LoadingScreen --- static/js/pandora/apiDialog.js | 17 +---------------- static/js/pandora/eventsDialog.js | 15 +-------------- static/js/pandora/helpDialog.js | 18 +----------------- static/js/pandora/idDialog.js | 21 +++------------------ static/js/pandora/metadataDialog.js | 18 ++---------------- static/js/pandora/statisticsDialog.js | 15 +-------------- 6 files changed, 9 insertions(+), 95 deletions(-) diff --git a/static/js/pandora/apiDialog.js b/static/js/pandora/apiDialog.js index d53122e2..b8aae075 100644 --- a/static/js/pandora/apiDialog.js +++ b/static/js/pandora/apiDialog.js @@ -6,21 +6,6 @@ pandora.ui.apiDialog = function() { var selected = pandora.user.ui.hash && pandora.user.ui.hash.anchor ? pandora.user.ui.hash.anchor : '', actions, - $loading = Ox.Element() - .append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), $panel, $list, $text, @@ -45,7 +30,7 @@ pandora.ui.apiDialog = function() { }) ], closeButton: true, - content: $loading, + content: Ox.LoadingScreen(), height: 384, keys: {escape: 'close'}, maximizeButton: true, diff --git a/static/js/pandora/eventsDialog.js b/static/js/pandora/eventsDialog.js index 2c27ef20..ad229610 100644 --- a/static/js/pandora/eventsDialog.js +++ b/static/js/pandora/eventsDialog.js @@ -31,20 +31,7 @@ pandora.ui.eventsDialog = function(options) { }) ], closeButton: true, - content: Ox.Element().append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), + content: Ox.LoadingScreen(), height: height, maximizeButton: true, minHeight: 256, diff --git a/static/js/pandora/helpDialog.js b/static/js/pandora/helpDialog.js index bd0e4f6f..c69c582b 100644 --- a/static/js/pandora/helpDialog.js +++ b/static/js/pandora/helpDialog.js @@ -5,22 +5,6 @@ pandora.ui.helpDialog = function() { var text = {}, - $loading = Ox.Element() - .append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), - $panel, $list, $text, $image, that = Ox.Dialog({ @@ -44,7 +28,7 @@ pandora.ui.helpDialog = function() { }) ], closeButton: true, - content: $loading, + content: Ox.LoadingScreen(), height: 384, keys: {escape: 'close'}, maximizeButton: true, diff --git a/static/js/pandora/idDialog.js b/static/js/pandora/idDialog.js index 71fb7bf8..4bfc5d7d 100644 --- a/static/js/pandora/idDialog.js +++ b/static/js/pandora/idDialog.js @@ -10,21 +10,6 @@ pandora.ui.idDialog = function(data) { dialogWidth = Math.round(window.innerWidth * 0.9), formWidth = getFormWidth(), - $loading = Ox.Element().append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), - $content, $input = [], $checkboxGroup, @@ -62,7 +47,7 @@ pandora.ui.idDialog = function(data) { }) ], closeButton: true, - content: $loading, + content: Ox.LoadingScreen(), height: dialogHeight, maximizeButton: true, minHeight: 256, @@ -121,7 +106,7 @@ pandora.ui.idDialog = function(data) { data[key] = key == 'director' ? data_.value.split(', ') : data_.value; - that.options({content: $loading}); + that.options({content: Ox.LoadingScreen()}); getIds(); } }) @@ -249,7 +234,7 @@ pandora.ui.idDialog = function(data) { } function updateId() { - that.options({content: $loading}).disableButtons(); + that.options({content: Ox.LoadingScreen()}).disableButtons(); pandora.api.edit({ id: data.id, imdbId: $checkboxGroup.options('value') diff --git a/static/js/pandora/metadataDialog.js b/static/js/pandora/metadataDialog.js index 8e3cf071..d3be10d2 100644 --- a/static/js/pandora/metadataDialog.js +++ b/static/js/pandora/metadataDialog.js @@ -15,20 +15,6 @@ pandora.ui.metadataDialog = function(data) { formWidth = getFormWidth(), imdb, - $loading = Ox.Element().append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), $confirmDialog, $selectAllButton, $selectNoneButton, @@ -107,7 +93,7 @@ pandora.ui.metadataDialog = function(data) { }) ], closeButton: true, - content: $loading, + content: Ox.LoadingScreen(), height: dialogHeight, maximizeButton: true, minHeight: 256, @@ -354,7 +340,7 @@ pandora.ui.metadataDialog = function(data) { Ox.isArray(type) ? [] : '' ); }); - that.options({content: $loading}).disableButtons(); + that.options({content: Ox.LoadingScreen()}).disableButtons(); pandora.api.edit(edit, function(result) { that.close(); pandora.updateItemContext(); diff --git a/static/js/pandora/statisticsDialog.js b/static/js/pandora/statisticsDialog.js index 10d8d961..80630474 100644 --- a/static/js/pandora/statisticsDialog.js +++ b/static/js/pandora/statisticsDialog.js @@ -63,20 +63,7 @@ pandora.ui.statisticsDialog = function() { }) ], closeButton: true, - content: Ox.Element().append( - $('') - .attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')}) - .css({ - position: 'absolute', - width: '32px', - height: '32px', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto' - }) - ), + content: Ox.LoadingScreen(), height: dialogHeight, maximizeButton: true, minHeight: 256,