File "settings.min.js"

Full Path: /home/warrior1/public_html/plugins/woocommerce/assets/js/admin/settings.min.js
File size: 4.1 KB
MIME-type: text/plain
Charset: utf-8

!function(n,c,s){n(function(){n("select#woocommerce_allowed_countries").on("change",function(){"specific"===n(this).val()?(n(this).closest("tr").next("tr").hide(),n(this).closest("tr").next().next("tr").show()):("all_except"===n(this).val()?n(this).closest("tr").next("tr").show():n(this).closest("tr").next("tr").hide(),n(this).closest("tr").next().next("tr").hide())}).trigger("change"),n("select#woocommerce_ship_to_countries").on("change",function(){"specific"===n(this).val()?n(this).closest("tr").next("tr").show():n(this).closest("tr").next("tr").hide()}).trigger("change"),n("input#woocommerce_manage_stock").on("change",function(){n(this).is(":checked")?n(this).closest("tbody").find(".manage_stock_field").closest("tr").show():n(this).closest("tbody").find(".manage_stock_field").closest("tr").hide()}).trigger("change"),n(".colorpick").iris({change:function(t,e){n(this).parent().find(".colorpickpreview").css({backgroundColor:e.color.toString()})},hide:!0,border:!0}).on("click focus",function(t){t.stopPropagation(),n(".iris-picker").hide(),n(this).closest("td").find(".iris-picker").show(),n(this).data("originalValue",n(this).val())}).on("change",function(){n(this).is(".iris-error")&&(n(this).data("originalValue").match(/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)?n(this).val(n(this).data("originalValue")):n(this).val("")).trigger("change")}),n("body").on("click",function(){n(".iris-picker").hide()}),n(function(){var e=!1;let o=n(".wp-list-table .check-column");n("input, textarea, select, checkbox").on("change",function(t){o.length&&o.has(t.target)||e||(window.onbeforeunload=function(){return c.i18n_nav_warning},e=!0)}),n(".submit :input, input#search-submit").on("click",function(){window.onbeforeunload=""})}),n("table.wc_gateways tbody, table.wc_shipping tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(t,e){return e.children().each(function(){n(this).width(n(this).width())}),e.css("left","0"),e},start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style"),e.item.trigger("updateMoveButtons")}}),n(".woocommerce").on("click",".select_all",function(){return n(this).closest("td").find("select option").prop("selected",!0),n(this).closest("td").find("select").trigger("change"),!1}),n(".woocommerce").on("click",".select_none",function(){return n(this).closest("td").find("select option").prop("selected",!1),n(this).closest("td").find("select").trigger("change"),!1}),n(".wc-item-reorder-nav").find(".wc-move-up, .wc-move-down").on("click",function(){var t=n(this),e=t.closest("tr"),o=(t.trigger("focus"),t.is(".wc-move-up")),i=t.is(".wc-move-down");o?(o=e.prev("tr"))&&o.length&&(o.before(e),s.a11y.speak(c.i18n_moved_up)):i&&(o=e.next("tr"))&&o.length&&(o.after(e),s.a11y.speak(c.i18n_moved_down)),t.trigger("focus"),t.closest("table").trigger("updateMoveButtons")}),n(".wc-item-reorder-nav").closest("table").on("updateMoveButtons",function(){var t=n(this),e=n(this).find("tbody tr:last"),o=n(this).find("tbody tr:first");t.find(".wc-item-reorder-nav .wc-move-disabled").removeClass("wc-move-disabled").attr({tabindex:"0","aria-hidden":"false"}),o.find(".wc-item-reorder-nav .wc-move-up").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"}),e.find(".wc-item-reorder-nav .wc-move-down").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"})}),n(".wc-item-reorder-nav").closest("table").trigger("updateMoveButtons"),n(".submit button").on("click",function(){if("specific"===n("select#woocommerce_allowed_countries").val()&&!n('[name="woocommerce_specific_allowed_countries[]"]').val())return!!window.confirm(woocommerce_settings_params.i18n_no_specific_countries_selected)}),n("#settings-other-payment-methods").on("click",function(t){"undefined"==typeof window.wcTracks.recordEvent&&"undefined"==typeof window.wc.tracks.recordEvent||(window.wc.tracks.recordEvent||window.wcTracks.recordEvent)("settings_payments_recommendations_other_options",{available_payment_methods:n.map(n("td.wc_payment_gateways_wrapper tbody tr[data-gateway_id] "),function(t){return n(t).attr("data-gateway_id")})})})})}(jQuery,woocommerce_settings_params,wp);