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
taxonomy_translation.js
121 lines
| 1 | jQuery(function ($) { |
| 2 | |
| 3 | $(document).on('submit', '#wcml_tt_sync_variations', function () { |
| 4 | |
| 5 | var this_form = $('#wcml_tt_sync_variations'); |
| 6 | var data = this_form.serialize(); |
| 7 | this_form.find('.wcml_tt_spinner').fadeIn(); |
| 8 | this_form.find('input[type=submit]').prop('disabled', true); |
| 9 | |
| 10 | $.ajax({ |
| 11 | type: "post", |
| 12 | url: ajaxurl, |
| 13 | dataType: 'json', |
| 14 | data: data, |
| 15 | success: function (response) { |
| 16 | this_form.find('.wcml_tt_sycn_preview').html(response.progress); |
| 17 | if (response.go) { |
| 18 | this_form.find('input[name=last_post_id]').val(response.last_post_id); |
| 19 | this_form.find('input[name=languages_processed]').val(response.languages_processed); |
| 20 | this_form.trigger('submit'); |
| 21 | } else { |
| 22 | this_form.find('input[name=last_post_id]').val(0); |
| 23 | this_form.find('.wcml_tt_spinner').fadeOut(); |
| 24 | this_form.find('input').prop('disabled', false); |
| 25 | jQuery('#wcml_tt_sync_assignment').fadeOut(); |
| 26 | jQuery('#wcml_tt_sync_desc').fadeOut(); |
| 27 | } |
| 28 | |
| 29 | } |
| 30 | }); |
| 31 | |
| 32 | return false; |
| 33 | |
| 34 | }); |
| 35 | |
| 36 | |
| 37 | $(document).on('submit', '#wcml_tt_sync_assignment', function () { |
| 38 | |
| 39 | var this_form = $('#wcml_tt_sync_assignment'); |
| 40 | var parameters = this_form.serialize(); |
| 41 | |
| 42 | this_form.find('.wcml_tt_spinner').fadeIn(); |
| 43 | this_form.find('input').prop('disabled', true); |
| 44 | |
| 45 | $('.wcml_tt_sync_row').remove(); |
| 46 | |
| 47 | $.ajax({ |
| 48 | type: "POST", |
| 49 | dataType: 'json', |
| 50 | url: ajaxurl, |
| 51 | data: 'action=wcml_tt_sync_taxonomies_in_content_preview&wcml_nonce=' + $('#wcml_sync_taxonomies_in_content_preview_nonce').val() + '&' + parameters, |
| 52 | success: function (ret) { |
| 53 | |
| 54 | this_form.find('.wcml_tt_spinner').fadeOut(); |
| 55 | this_form.find('input').prop('disabled', false); |
| 56 | |
| 57 | if (ret.errors) { |
| 58 | this_form.find('.errors').html(WCML.sanitize(ret.errors)); |
| 59 | } else { |
| 60 | jQuery('#wcml_tt_sync_preview').html(WCML.sanitize(ret.html)); |
| 61 | jQuery('#wcml_tt_sync_assignment').fadeOut(); |
| 62 | jQuery('#wcml_tt_sync_desc').fadeOut(); |
| 63 | } |
| 64 | |
| 65 | } |
| 66 | |
| 67 | }); |
| 68 | |
| 69 | return false; |
| 70 | |
| 71 | }); |
| 72 | |
| 73 | $(document).on('click', 'form.wcml_tt_do_sync a.submit', function () { |
| 74 | |
| 75 | var this_form = $('form.wcml_tt_do_sync'); |
| 76 | var parameters = this_form.serialize(); |
| 77 | |
| 78 | this_form.find('.wcml_tt_spinner').fadeIn(); |
| 79 | this_form.find('input').prop('disabled', true); |
| 80 | |
| 81 | jQuery.ajax({ |
| 82 | type: "POST", |
| 83 | dataType: 'json', |
| 84 | url: ajaxurl, |
| 85 | data: 'action=wcml_tt_sync_taxonomies_in_content&wcml_nonce=' + $('#wcml_sync_taxonomies_in_content_nonce').val() + '&' + parameters, |
| 86 | success: function (ret) { |
| 87 | |
| 88 | this_form.find('.wcml_tt_spinner').fadeOut(); |
| 89 | this_form.find('input').prop('disabled', false); |
| 90 | |
| 91 | if (ret.errors) { |
| 92 | this_form.find('.errors').html(ret.errors); |
| 93 | } else { |
| 94 | this_form.closest('.wcml_tt_sync_row').html(ret.html); |
| 95 | } |
| 96 | |
| 97 | } |
| 98 | |
| 99 | }); |
| 100 | |
| 101 | return false; |
| 102 | |
| 103 | |
| 104 | }); |
| 105 | |
| 106 | $(document).on('click', '#term-table-sync-header', function () { |
| 107 | $('#wcml_tt_sync_assignment').hide(); |
| 108 | $('#wcml_tt_sync_desc').hide(); |
| 109 | }); |
| 110 | |
| 111 | $(document).on('click', '#term-table-header', function () { |
| 112 | if( $('#wcml_tt_sync_assignment').data('sync') ) { |
| 113 | $('#wcml_tt_sync_assignment').show(); |
| 114 | $('#wcml_tt_sync_desc').show(); |
| 115 | } |
| 116 | }); |
| 117 | |
| 118 | |
| 119 | }); |
| 120 | |
| 121 |