Skip to content

Commit

Permalink
changed the system to instead of using span .wait to use just the img…
Browse files Browse the repository at this point in the history
… tag with a class called loading
  • Loading branch information
danielkerr committed Feb 5, 2013
1 parent 9845a91 commit aabc348
Show file tree
Hide file tree
Showing 19 changed files with 66 additions and 65 deletions.
4 changes: 2 additions & 2 deletions upload/admin/view/template/sale/affiliate_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=sale/affiliate/country&token=<?php echo $token; ?>&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'payment_country_id\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'payment_country_id\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/sale/contact.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ function send(url) {
dataType: 'json',
beforeSend: function() {
$('#button-send').attr('disabled', true);
$('#button-send').before('<span class="wait"><img src="view/image/loading.gif" alt="" />&nbsp;</span>');
$('#button-send').before('<img src="view/image/loading.gif" class="loading" style="padding-right: 5px;" />');
},
complete: function() {
$('#button-send').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.success, .warning, .error').remove();
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/sale/customer_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ function country(element, index, zone_id) {
url: 'index.php?route=sale/customer/country&token=<?php echo $token; ?>&country_id=' + element.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'address[' + index + '][country_id]\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'address[' + index + '][country_id]\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
8 changes: 4 additions & 4 deletions upload/admin/view/template/sale/order_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,10 @@ $('select[name=\'payment_country_id\']').bind('change', function() {
url: 'index.php?route=sale/order/country&token=<?php echo $token; ?>&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'payment_country_id\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'payment_country_id\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down Expand Up @@ -776,10 +776,10 @@ $('select[name=\'shipping_country_id\']').bind('change', function() {
url: 'index.php?route=sale/order/country&token=<?php echo $token; ?>&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'payment_country_id\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'payment_country_id\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/setting/setting.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,10 @@ $('select[name=\'config_country_id\']').bind('change', function() {
url: 'index.php?route=setting/setting/country&token=<?php echo $token; ?>&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/setting/store_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,10 @@ $('select[name=\'config_country_id\']').bind('change', function() {
url: 'index.php?route=setting/store/country&token=<?php echo $token; ?>&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="view/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=account/address/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
13 changes: 6 additions & 7 deletions upload/catalog/view/theme/default/template/account/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ $('select[name=\'customer_group_id\']').live('change', function() {
url: 'index.php?route=account/register/custom_field&customer_group_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'customer_group_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'customer_group_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.custom-field').remove();
Expand Down Expand Up @@ -282,7 +282,6 @@ $('select[name=\'customer_group_id\']').live('change', function() {
$('input[name=\'' + custom_field['position'] + '\']').parent().parent().after(html);
}
}
if ($.browser.msie && $.browser.version == 6) {
$('.date, .datetime, .time').bgIframe();
Expand All @@ -309,12 +308,12 @@ function upload(product_option_id) {
$('#file').on('change', function() {
$.ajax({
url: 'index.php?route=sale/order/upload&token=<?php echo $token; ?>',
url: 'index.php?route=sale/order/upload',
type: 'post',
dataType: 'json',
data: new FormData($(this).parent()[0]),
beforeSend: function() {
$('#button-option' + product_option_id).after('<img src="view/image/loading.gif" class="loading" style="padding-left: 5px;" />');
$('#button-option' + product_option_id).after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
$('#button-option' + product_option_id).attr('disabled', true);
$('#option' + product_option_id + ' + .error').remove();
},
Expand Down Expand Up @@ -351,10 +350,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=account/register/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/view/theme/default/template/affiliate/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=affiliate/edit/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=affiliate/register/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
8 changes: 4 additions & 4 deletions upload/catalog/view/theme/default/template/checkout/cart.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ $('#button-quote').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-quote').attr('disabled', true);
$('#button-quote').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-quote').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-quote').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.success, .warning, .attention, .error').remove();
Expand Down Expand Up @@ -310,10 +310,10 @@ $('select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/cart/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
36 changes: 18 additions & 18 deletions upload/catalog/view/theme/default/template/checkout/checkout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ $('#button-account').live('click', function() {
dataType: 'html',
beforeSend: function() {
$('#button-account').attr('disabled', true);
$('#button-account').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-account').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-account').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(html) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -129,11 +129,11 @@ $('#button-login').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-login').attr('disabled', true);
$('#button-login').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-login').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-login').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -161,11 +161,11 @@ $('#button-register').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-register').attr('disabled', true);
$('#button-register').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-register').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-register').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -345,11 +345,11 @@ $('#button-payment-address').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-payment-address').attr('disabled', true);
$('#button-payment-address').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-payment-address').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-payment-address').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -474,11 +474,11 @@ $('#button-shipping-address').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-shipping-address').attr('disabled', true);
$('#button-shipping-address').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-shipping-address').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-shipping-address').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -587,11 +587,11 @@ $('#button-guest').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-guest').attr('disabled', true);
$('#button-guest').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-guest').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-guest').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -747,11 +747,11 @@ $('#button-guest-shipping').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-guest-shipping').attr('disabled', true);
$('#button-guest-shipping').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-guest-shipping').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-guest-shipping').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -829,11 +829,11 @@ $('#button-shipping-method').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-shipping-method').attr('disabled', true);
$('#button-shipping-method').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-shipping-method').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-shipping-method').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down Expand Up @@ -882,11 +882,11 @@ $('#button-payment-method').live('click', function() {
dataType: 'json',
beforeSend: function() {
$('#button-payment-method').attr('disabled', true);
$('#button-payment-method').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#button-payment-method').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('#button-payment-method').attr('disabled', false);
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
$('.warning, .error').remove();
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/view/theme/default/template/checkout/guest.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ $('#payment-address select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#payment-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#payment-address select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ $('#shipping-address select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#shipping-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#shipping-address select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ $('#payment-address select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#payment-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#payment-address select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ $('#payment-address select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#payment-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#payment-address select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ $('#shipping-address select[name=\'country_id\']').bind('change', function() {
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#shipping-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
$('#shipping-address select[name=\'country_id\']').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
},
complete: function() {
$('.wait').remove();
$('.loading').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
Expand Down
Loading

0 comments on commit aabc348

Please sign in to comment.