관리-도구
편집 파일: settings.min.js
!function(c,s,n){c(function(){c("select#kkart_allowed_countries").change(function(){"specific"===c(this).val()?(c(this).closest("tr").next("tr").hide(),c(this).closest("tr").next().next("tr").show()):("all_except"===c(this).val()?c(this).closest("tr").next("tr").show():c(this).closest("tr").next("tr").hide(),c(this).closest("tr").next().next("tr").hide())}).change(),c("select#kkart_ship_to_countries").change(function(){"specific"===c(this).val()?c(this).closest("tr").next("tr").show():c(this).closest("tr").next("tr").hide()}).change(),c("input#kkart_manage_stock").change(function(){c(this).is(":checked")?c(this).closest("tbody").find(".manage_stock_field").closest("tr").show():c(this).closest("tbody").find(".manage_stock_field").closest("tr").hide()}).change(),c(".colorpick").iris({change:function(e,t){c(this).parent().find(".colorpickpreview").css({backgroundColor:t.color.toString()})},hide:!0,border:!0}).on("click focus",function(e){e.stopPropagation(),c(".iris-picker").hide(),c(this).closest("td").find(".iris-picker").show(),c(this).data("original-value",c(this).val())}).on("change",function(){c(this).is(".iris-error")&&(c(this).data("original-value").match(/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)?c(this).val(c(this).data("original-value")):c(this).val("")).change()}),c("body").on("click",function(){c(".iris-picker").hide()}),c(function(){var e=!1;c("input, textarea, select, checkbox").change(function(){e||(window.onbeforeunload=function(){return s.i18n_nav_warning},e=!0)}),c(".submit :input").click(function(){window.onbeforeunload=""})}),c("table.kkart_gateways tbody, table.kkart_shipping tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(e,t){return t.children().each(function(){c(this).width(c(this).width())}),t.css("left","0"),t},start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style"),t.item.trigger("updateMoveButtons")}}),c(".kkart").on("click",".select_all",function(){return c(this).closest("td").find("select option").attr("selected","selected"),c(this).closest("td").find("select").trigger("change"),!1}),c(".kkart").on("click",".select_none",function(){return c(this).closest("td").find("select option").removeAttr("selected"),c(this).closest("td").find("select").trigger("change"),!1}),c(".kkart-item-reorder-nav").find(".kkart-move-up, .kkart-move-down").on("click",function(){var e=c(this),t=e.closest("tr");e.focus();var i=e.is(".kkart-move-up"),o=e.is(".kkart-move-down");i?(i=t.prev("tr"))&&i.length&&(i.before(t),n.a11y.speak(s.i18n_moved_up)):!o||(o=t.next("tr"))&&o.length&&(o.after(t),n.a11y.speak(s.i18n_moved_down)),e.focus(),e.closest("table").trigger("updateMoveButtons")}),c(".kkart-item-reorder-nav").closest("table").on("updateMoveButtons",function(){var e=c(this),t=c(this).find("tbody tr:last"),i=c(this).find("tbody tr:first");e.find(".kkart-item-reorder-nav .kkart-move-disabled").removeClass("kkart-move-disabled").attr({tabindex:"0","aria-hidden":"false"}),i.find(".kkart-item-reorder-nav .kkart-move-up").addClass("kkart-move-disabled").attr({tabindex:"-1","aria-hidden":"true"}),t.find(".kkart-item-reorder-nav .kkart-move-down").addClass("kkart-move-disabled").attr({tabindex:"-1","aria-hidden":"true"})}),c(".kkart-item-reorder-nav").closest("table").trigger("updateMoveButtons"),c(".submit button").on("click",function(){if("specific"===c("select#kkart_allowed_countries").val()&&!c('[name="kkart_specific_allowed_countries[]"]').val())return!!window.confirm(kkart_settings_params.i18n_no_specific_countries_selected)})})}(jQuery,kkart_settings_params,wp);