Fix jshint reserved word error and update minified wizard JavaScript.
This commit is contained in:
parent
7dcaff3e39
commit
2d039c71e9
|
@ -36,10 +36,10 @@ jQuery( function( $ ) {
|
|||
$.each( tax_rates, function( index, rate ) {
|
||||
$( '<tr>', {
|
||||
html: [
|
||||
$( '<td>', { class: 'readonly', text: rate.country || '' } ),
|
||||
$( '<td>', { class: 'readonly', text: rate.state || '*' } ),
|
||||
$( '<td>', { class: 'readonly', text: rate.rate || '' } ),
|
||||
$( '<td>', { class: 'readonly', text: rate.name || '' } )
|
||||
$( '<td>', { 'class': 'readonly', text: rate.country || '' } ),
|
||||
$( '<td>', { 'class': 'readonly', text: rate.state || '*' } ),
|
||||
$( '<td>', { 'class': 'readonly', text: rate.rate || '' } ),
|
||||
$( '<td>', { 'class': 'readonly', text: rate.name || '' } )
|
||||
]
|
||||
} ).appendTo( $rate_table );
|
||||
} );
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val(),d=c.split(":")[0],e=b[d],f=["thousand_sep","decimal_sep","num_decimals","currency_pos"];e?a.each(e,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,f)&&a(':input[name="'+b+'"]').closest("tr").hide()}):(a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show())}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a(".button-next").on("click",function(){return a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),!0}),a(".wc-wizard-shipping-settings").on("click","li.wc-wizard-shipping-enabled",function(){var b=a(this).find(".wc-wizard-shipping-enable input");b.prop("checked")||(a("li.wc-wizard-shipping-enabled").removeClass("checked"),b.prop("checked",!0),b.closest("li").addClass("checked"))}),a(".wc-wizard-payment-gateways").on("change",".wc-wizard-gateway-enable input",function(){a(this).is(":checked")?a(this).closest("li").addClass("checked"):a(this).closest("li").removeClass("checked")}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway",function(){var b=a(this).find(".wc-wizard-gateway-enable input");b.prop("checked",!b.prop("checked")).change()}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway table, li.wc-wizard-gateway a",function(a){a.stopPropagation()})});
|
||||
jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val().split(":"),d=c[0],e=c[1]||!1,f=b[d],g=["thousand_sep","decimal_sep","num_decimals","currency_pos"];if(f){if(a.each(f,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,g)&&a(':input[name="'+b+'"]').closest("tr").hide()}),!a.isArray(f.tax_rates)){var h=[];if(e&&f.tax_rates[e]?h=h.concat(f.tax_rates[e]):f.tax_rates[""]&&(h=h.concat(f.tax_rates[""])),h=h.concat(f.tax_rates["*"]||[]),h.length){var i=a("table.tax-rates tbody").empty();a.each(h,function(b,c){a("<tr>",{html:[a("<td>",{class:"readonly",text:c.country||""}),a("<td>",{class:"readonly",text:c.state||"*"}),a("<td>",{class:"readonly",text:c.rate||""}),a("<td>",{class:"readonly",text:c.name||""})]}).appendTo(i)}),a(".tax-rates").show()}else a(".tax-rates").hide()}}else a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show(),a(".tax-rates").hide()}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a(".button-next").on("click",function(){return a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),!0}),a(".wc-wizard-shipping-settings").on("click","li.wc-wizard-shipping-enabled",function(){var b=a(this).find(".wc-wizard-shipping-enable input");b.prop("checked")||(a("li.wc-wizard-shipping-enabled").removeClass("checked"),b.prop("checked",!0),b.closest("li").addClass("checked"))}),a(".wc-wizard-payment-gateways").on("change",".wc-wizard-gateway-enable input",function(){a(this).is(":checked")?a(this).closest("li").addClass("checked"):a(this).closest("li").removeClass("checked")}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway",function(){var b=a(this).find(".wc-wizard-gateway-enable input");b.prop("checked",!b.prop("checked")).change()}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway table, li.wc-wizard-gateway a",function(a){a.stopPropagation()})});
|
Loading…
Reference in New Issue