bye bye ajax loader gif.

This commit is contained in:
James Koster 2014-11-13 18:28:15 +00:00
parent 258d7f4482
commit 30a5c4bfdb
18 changed files with 62 additions and 34 deletions

View File

@ -212,4 +212,27 @@
-webkit-font-smoothing: antialiased;
margin-left: 7px;
content: $glyph;
}
@mixin loader() {
&:before {
height: 1em;
width: 1em;
display: block;
position: absolute;
top: 50%;
left: 50%;
margin-left: -.5em;
margin-top: -.5em;
display: block;
-webkit-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
font-family: "WooCommerce";
content: "\e01c";
line-height: 1;
text-align: center;
font-size: 1.618em;
color: rgba(#000,0.75);
}
}

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@
@import "bourbon";
@import "mixins";
@import "variables";
@import "animation";
/* =Custom Font
@ -18,6 +19,10 @@
font-style: normal;
}
.blockUI.blockOverlay {
@include loader();
}
/* Addons */
.wc_addons_wrap {
.products {

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ div.pp_woocommerce {
}
.pp_loaderIcon {
background: url(../images/ajax-loader.gif) center no-repeat;
@include loader();
}
div.ppt {

File diff suppressed because one or more lines are too long

View File

@ -78,6 +78,14 @@ p.demo_store {
/* =Main Styles (namespace to avoid conflict with common global class names)
-------------------------------------------------------------- */
.woocommerce {
.blockUI.blockOverlay {
@include loader();
}
.loader {
@include loader();
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
@ -622,9 +630,9 @@ p.demo_store {
position: absolute;
top: .618em;
right: 1em;
-webkit-animation:spin 2s linear infinite;
-moz-animation:spin 2s linear infinite;
animation:spin 2s linear infinite;
-webkit-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -8,7 +8,7 @@ jQuery( function ( $ ) {
$( '#woocommerce-order-items' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -893,7 +893,7 @@ jQuery( function ( $ ) {
$( '.order_download_permissions' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -940,7 +940,7 @@ jQuery( function ( $ ) {
$( el ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -990,7 +990,7 @@ jQuery( function ( $ ) {
$( this ).closest( '.edit_address' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -1044,7 +1044,7 @@ jQuery( function ( $ ) {
$( this ).closest( '.edit_address' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -1118,7 +1118,7 @@ jQuery( function ( $ ) {
$( '#woocommerce-order-notes' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -1146,7 +1146,7 @@ jQuery( function ( $ ) {
$( note ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ jQuery( function ( $ ) {
$('.woocommerce_variations').block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes_variations.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -84,7 +84,7 @@ jQuery( function ( $ ) {
$( '#variable_product_options' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes_variations.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -144,7 +144,7 @@ jQuery( function ( $ ) {
$( el ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes_variations.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});
@ -212,7 +212,7 @@ jQuery( function ( $ ) {
$( '.woocommerce_variations .woocommerce_variation' ).block({
message: null,
overlayCSS: {
background: '#fff url(' + woocommerce_admin_meta_boxes_variations.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center',
background: '#fff',
opacity: 0.6
}
});

File diff suppressed because one or more lines are too long

View File

@ -389,7 +389,7 @@ jQuery( function( $ ){
// Add a new attribute (via ajax)
$('.product_attributes').on('click', 'button.add_new_attribute', function() {
$('.product_attributes').block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
$('.product_attributes').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } });
var attribute = $(this).attr('data-attribute');
var $wrapper = $(this).closest('.woocommerce_attribute_data');
@ -430,7 +430,7 @@ jQuery( function( $ ){
// Save attributes and update variations
$('.save_attributes').on('click', function(){
$('.product_attributes').block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
$('.product_attributes').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } });
var data = {
post_id: woocommerce_admin_meta_boxes.post_id,
@ -446,7 +446,7 @@ jQuery( function( $ ){
this_page = this_page.replace( 'post-new.php?', 'post.php?post=' + woocommerce_admin_meta_boxes.post_id + '&action=edit&' );
// Load variations panel
$('#variable_product_options').block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_admin_meta_boxes.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
$('#variable_product_options').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } });
$('#variable_product_options').load( this_page + ' #variable_product_options_inner', function() {
$('#variable_product_options').unblock();
} );

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ jQuery( function( $ ) {
.find( 'input[name=payment_method]:checked' ).click();
$( '#add_payment_method' ).submit( function() {
$( '#add_payment_method' ).block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_params.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });
$( '#add_payment_method' ).block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } });
});
$( 'body' ).trigger( 'init_add_payment_method' );

View File

@ -1 +1 @@
jQuery(function(a){return"undefined"==typeof woocommerce_params?!1:(a("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show()}).find("input[name=payment_method]:checked").click(),a("#add_payment_method").submit(function(){a("#add_payment_method").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",backgroundSize:"16px 16px",opacity:.6}})}),void a("body").trigger("init_add_payment_method"))});
jQuery(function(a){return"undefined"==typeof woocommerce_params?!1:(a("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show()}).find("input[name=payment_method]:checked").click(),a("#add_payment_method").submit(function(){a("#add_payment_method").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}),void a("body").trigger("init_add_payment_method"))});

View File

@ -189,10 +189,8 @@ class WC_Frontend_Scripts {
switch ( $handle ) {
case 'woocommerce' :
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
return array(
'ajax_url' => WC()->ajax_url(),
'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', $assets_path . 'images/ajax-loader@2x.gif' ),
);
break;
case 'wc-single-product' :
@ -202,10 +200,8 @@ class WC_Frontend_Scripts {
);
break;
case 'wc-checkout' :
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
return array(
'ajax_url' => WC()->ajax_url(),
'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', $assets_path . 'images/ajax-loader@2x.gif' ),
'update_order_review_nonce' => wp_create_nonce( "update-order-review" ),
'apply_coupon_nonce' => wp_create_nonce( "apply-coupon" ),
'option_guest_checkout' => get_option( 'woocommerce_enable_guest_checkout' ),
@ -221,10 +217,8 @@ class WC_Frontend_Scripts {
);
break;
case 'wc-cart' :
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
return array(
'ajax_url' => WC()->ajax_url(),
'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', $assets_path . 'images/ajax-loader@2x.gif' ),
'update_shipping_method_nonce' => wp_create_nonce( "update-shipping-method" ),
);
break;
@ -235,10 +229,8 @@ class WC_Frontend_Scripts {
);
break;
case 'wc-add-to-cart' :
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
return array(
'ajax_url' => WC()->ajax_url(),
'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', $assets_path . 'images/ajax-loader@2x.gif' ),
'i18n_view_cart' => esc_attr__( 'View Cart', 'woocommerce' ),
'cart_url' => get_permalink( wc_get_page_id( 'cart' ) ),
'is_cart' => is_cart(),