diff options
Diffstat (limited to 'plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js')
-rw-r--r-- | plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js b/plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js index 2ed8f74d..4616462a 100644 --- a/plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js +++ b/plugins/jetpack/_inc/build/widgets/contact-info/contact-info-admin.min.js @@ -1,2 +1,3 @@ /* Do not modify this file directly. It is compiled from other files. */ -!function(n){n(document).on("change",".jp-contact-info-showmap",function(){var o=n(this),c=o.is(":checked");o.closest(".widget").find(".jp-contact-info-apikey").toggle(c)})}(window.jQuery);
\ No newline at end of file +/* global ajaxurl, contact_info_api_key_ajax_obj */ +!function(n){n(document).on("change",".jp-contact-info-showmap",function(){var t=n(this),e=t.is(":checked");t.closest(".widget").find(".jp-contact-info-admin-map").toggle(e)}),n(document).on("widget-synced",function(t,e){if(e.is('[id*="widget_contact_info"]')&&n(document.activeElement).is('input[id*="apikey"]')){t.preventDefault();var i=e.find('input[id*="apikey"]');n.post(ajaxurl,{_ajax_nonce:contact_info_api_key_ajax_obj.nonce,action:"customize-contact-info-api-key",apikey:i.val()},function(n){var t=i.closest(".jp-contact-info-admin-map").parent().find(".jp-contact-info-embed-map"),e=t.find('[class*="notice"]');"1"!==n.result?0===e.length?t.append('<span class="notice notice-warning" style="display: block;">'+n.result+"</span>"):e.text()!==n.result&&e.text(n.result):t.empty()})}})}(window.jQuery);
\ No newline at end of file |