This commit is contained in:
Mike Jolley 2017-09-20 16:03:30 +01:00
parent eb3396328b
commit 5131d096a8
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -65,7 +65,7 @@ jQuery( function( $ ) {
init_price_filter(); init_price_filter();
hasSelectiveRefresh = ( var hasSelectiveRefresh = (
'undefined' !== typeof wp && 'undefined' !== typeof wp &&
wp.customize && wp.customize &&
wp.customize.selectiveRefresh && wp.customize.selectiveRefresh &&

View File

@ -1 +1 @@
jQuery(function(e){if("undefined"==typeof woocommerce_price_slider_params)return!1;e("input#min_price, input#max_price").hide(),e(".price_slider, .price_label").show();var r=e(".price_slider_amount #min_price").data("min"),c=e(".price_slider_amount #max_price").data("max"),i=parseInt(r,10),_=parseInt(c,10);woocommerce_price_slider_params.min_price&&(i=parseInt(woocommerce_price_slider_params.min_price,10)),woocommerce_price_slider_params.max_price&&(_=parseInt(woocommerce_price_slider_params.max_price,10)),e(document.body).bind("price_slider_create price_slider_slide",function(r,c,i){e(".price_slider_amount span.from").html(accounting.formatMoney(c,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(".price_slider_amount span.to").html(accounting.formatMoney(i,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(document.body).trigger("price_slider_updated",[c,i])}),e(".price_slider").slider({range:!0,animate:!0,min:r,max:c,values:[i,_],create:function(){e(".price_slider_amount #min_price").val(i),e(".price_slider_amount #max_price").val(_),e(document.body).trigger("price_slider_create",[i,_])},slide:function(r,c){e("input#min_price").val(c.values[0]),e("input#max_price").val(c.values[1]),e(document.body).trigger("price_slider_slide",[c.values[0],c.values[1]])},change:function(r,c){e(document.body).trigger("price_slider_change",[c.values[0],c.values[1]])}})}); jQuery(function(e){function r(){e("input#min_price, input#max_price").hide(),e(".price_slider, .price_label").show();var r=e(".price_slider_amount #min_price").data("min"),i=e(".price_slider_amount #max_price").data("max"),c=e(".price_slider_amount #min_price").val(),o=e(".price_slider_amount #max_price").val();e(".price_slider:not(.ui-slider)").slider({range:!0,animate:!0,min:r,max:i,values:[c,o],create:function(){e(".price_slider_amount #min_price").val(c),e(".price_slider_amount #max_price").val(o),e(document.body).trigger("price_slider_create",[c,o])},slide:function(r,i){e("input#min_price").val(i.values[0]),e("input#max_price").val(i.values[1]),e(document.body).trigger("price_slider_slide",[i.values[0],i.values[1]])},change:function(r,i){e(document.body).trigger("price_slider_change",[i.values[0],i.values[1]])}})}if("undefined"==typeof woocommerce_price_slider_params)return!1;e(document.body).bind("price_slider_create price_slider_slide",function(r,i,c){e(".price_slider_amount span.from").html(accounting.formatMoney(i,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(".price_slider_amount span.to").html(accounting.formatMoney(c,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(document.body).trigger("price_slider_updated",[i,c])}),r(),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){r()})});