admin-currency-selector.js
1 year ago
admin-currency-selector.min.js
1 year ago
bacs-accounts-currencies.js
5 years ago
bacs-accounts-currencies.min.js
5 years ago
cart_widget.js
2 months ago
cart_widget.min.js
2 months ago
currency-switcher-settings.js
1 year ago
currency-switcher-settings.min.js
1 year ago
dialogs.js
5 years ago
dialogs.min.js
5 years ago
exchange-rates.js
3 years ago
exchange-rates.min.js
3 years ago
files.js
5 years ago
files.min.js
5 years ago
languages_notice.js
5 years ago
languages_notice.min.js
5 years ago
lock_fields.js
2 years ago
lock_fields.min.js
2 years ago
multi-currency.js
5 years ago
multi-currency.min.js
5 years ago
pointer.js
1 year ago
pointer.min.js
1 year ago
prices.js
5 years ago
prices.min.js
5 years ago
products-screen-option.js
5 years ago
products-screen-option.min.js
5 years ago
scripts.js
1 year ago
scripts.min.js
1 year ago
taxonomy_translation.js
1 year ago
taxonomy_translation.min.js
1 year ago
tooltip_init.js
5 years ago
tooltip_init.min.js
5 years ago
trnsl_interface_dialog_warning.js
5 years ago
trnsl_interface_dialog_warning.min.js
5 years ago
troubleshooting.js
1 year ago
troubleshooting.min.js
1 year ago
wcml-attributes.js
5 years ago
wcml-attributes.min.js
5 years ago
wcml-messages.js
5 years ago
wcml-messages.min.js
5 years ago
wcml-multi-currency.js
2 months ago
wcml-multi-currency.min.js
2 months ago
wcml-setup.js
3 years ago
wcml-setup.min.js
3 years ago
wcml-translation-editor.js
4 weeks ago
wcml-translation-editor.min.js
4 weeks ago
widgets.js
5 years ago
widgets.min.js
5 years ago
wpml_tm.js
5 years ago
wpml_tm.min.js
5 years ago
multi-currency.min.js
1 lines
| 1 | jQuery(function($){WCML_Multi_Currency={_currency_languages_saving:0,init:function(){$(function(){WCML_Multi_Currency.setup_multi_currency_toggle();WCML_Multi_Currency.setup_currencies_sorting();if($("#wcml_mc_options").length){WCML_Multi_Currency.wcml_mc_form_submitted=false;WCML_Multi_Currency.read_form_fields_status();window.onbeforeunload=function(e){if(!WCML_Multi_Currency.wcml_mc_form_submitted&&WCML_Multi_Currency.form_fields_changed()){return $("#wcml_warn_message").val()}};$("#wcml_mc_options").on("submit",function(){WCML_Multi_Currency.wcml_mc_form_submitted=true})}})},setup_multi_currency_toggle:function(){$("#multi_currency_independent").change(function(){if($(this).prop("checked")){if($("#currency_mode").val()){$("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeIn()}else{$("#multi-currency-per-language-details").fadeIn()}}else{$("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeOut()}})},setup_currencies_sorting:function(){$("#wcml_currencies_order").sortable({update:function(){var currencies_order=[];$("#wcml_currencies_order").find("li").each(function(){currencies_order.push($(this).attr("cur"))});$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"wcml_currencies_order",wcml_nonce:$("#wcml_currencies_order_order_nonce").val(),order:currencies_order.join(";")},success:function(resp){if(resp.success){fadeInAjxResp(".wcml_currencies_order_ajx_resp",resp.data.message);$(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview($(this))})}}})}})},read_form_fields_status:function(){this.mc_form_status=this.get_serialized_options()},form_fields_changed:function(){return this.mc_form_status!=this.get_serialized_options()},get_serialized_options:function(){var reactUiElements=$("#wcml_mc_options .js-wcml-react-ui").find("input, select, textarea");reactUiElements.prop("disabled",true);var serializedData=$("#wcml_mc_options").serialize();reactUiElements.prop("disabled",false);return serializedData}};WCML_Multi_Currency.init()}); |