b0y-101 Mini Shell


Current Path : E:/wordpress/wp-content/plugins/woocommerce-multilingual/res/js/
File Upload :
Current File : E:/wordpress/wp-content/plugins/woocommerce-multilingual/res/js/lock_fields.min.js

jQuery((function($){var i,ids=["_virtual","_downloadable","product-type","_backorders","_manage_stock","_stock","_low_stock_amount","_stock_status","_sold_individually","comment_status","_tax_status","_tax_class","parent_id","crosssell_ids","upsell_ids","grouped_products","product_shipping_class"];for(1==unlock_fields.file_paths&&ids.push("_download_type"),ids=ids.concat(non_standard_fields.ids),$(".wcml_prod_hidden_notice").prependTo("#woocommerce-product-data"),i=0;i<ids.length;i++)$el=$("#"+ids[i]),$el.length||($el=$("*[name="+ids[i]+"]")),$el.prop("disabled",!0),$el.after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());var buttons=["add_variation","link_all_variations","attribute_taxonomy","save_attributes","add_new_attribute","product_attributes .remove_row","add_attribute","add_custom_attribute","select_all_attributes","select_no_attributes","wc-attribute-search","edit-visibility"];for(buttons=buttons.concat(non_standard_fields.classes),1==unlock_fields.file_paths&&(buttons.push("downloadable_files .upload_file_button"),buttons.push("downloadable_files .insert"),buttons.push("downloadable_files .delete"),$(".downloadable_files .upload_file_button,.downloadable_files .insert,.downloadable_files .delete").on("click",(function(){return!1}))),i=0;i<buttons.length;i++)$("."+buttons[i]).prop("disabled",!0),$("."+buttons[i]).after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());$("#visibility .edit-visibility span").on("click",(function(){return!1})),$(".remove_variation").each((function(){$(this).prop("disabled",!0),$(this).after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))}));var inpt_names=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to"];for(1==unlock_fields.file_paths&&(inpt_names.push("_download_limit"),inpt_names.push("_download_expiry"),inpt_names.push("_wc_file_names[]"),inpt_names.push("_wc_file_urls[]")),inpt_names=inpt_names.concat(non_standard_fields.input_names),1==unlock_fields.menu_order&&inpt_names.push("menu_order"),i=0;i<inpt_names.length;i++)$('input[name="'+inpt_names[i]+'"]').prop("readonly",!0),$(".dimensions_field span.wrap").css("float","left"),"_width"!=inpt_names[i]&&"_height"!=inpt_names[i]&&"_length"!=inpt_names[i]||($('input[name="'+inpt_names[i]+'"]').css("margin-right",0),$('input[name="'+inpt_names[i]+'"]').css("float","none"),$('input[name="'+inpt_names[i]+'"]').css("width","29%")),"_sale_price_dates_to"==inpt_names[i]?$('input[name="'+inpt_names[i]+'"]').after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").css("float","left").show()):$('input[name="'+inpt_names[i]+'"]').after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());$('#product_attributes td textarea,#product_attributes input[type="text"]').each((function(){$(this).prop("readonly",!0),$(this).after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())})),$('#product_attributes input[type="checkbox"],#_featured,#product_attributes select.attribute_values').each((function(){$(this).prop("disabled",!0),$(this).after($(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())})),$('form#post input[type="submit"]').click((function(){for(i=0;i<ids.length;i++)$("#"+ids[i]).prop("disabled",!1);$('.woocommerce_variation select,#variable_product_options .toolbar select,.woocommerce_variation input[type="checkbox"],#product_attributes input[type="checkbox"]').each((function(){$(this).prop("disabled",!1)}))}))}));var wcml_lock_variation_fields=function(file_path_sync){var check_attr=jQuery(".woocommerce_variation>h3 select").prop("disabled");if(void 0===check_attr||!1===check_attr){jQuery(".woocommerce_variation>h3 select, #variable_product_options .toolbar select, .show_if_variation_manage_stock select").each((function(){jQuery(this).prop("disabled",!0),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}));var i=0,inpt_names=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to","_stock","_low_stock_amount","_download_limit","_download_expiry"];for(i=0;i<inpt_names.length;i++)jQuery('input[name^="variable'+inpt_names[i]+'"]').each((function(){jQuery(this).prop("readonly",!0),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}));var var_checkboxes=["_enabled","_is_downloadable","_is_virtual","_manage_stock"];for(i=0;i<var_checkboxes.length;i++)jQuery('input[name^="variable'+var_checkboxes[i]+'"]').each((function(){jQuery(this).prop("disabled",!0),jQuery(this).prop("checked")&&jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}));var var_selectboxes=["_stock_status","_shipping_class","_tax_class"];for(i=0;i<var_selectboxes.length;i++)jQuery('select[name^="variable'+var_selectboxes[i]+'"]').each((function(){jQuery(this).prop("disabled",!0),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}));if(file_path_sync)for(var key in file_path_sync)1==file_path_sync[key]&&(jQuery('input[name^="_wc_variation_file_names['+key+']"]').each((function(){jQuery(this).prop("readonly",!0)})),jQuery('input[name^="_wc_variation_file_urls['+key+']"]').each((function(){jQuery(this).prop("readonly",!0),jQuery(this).closest("tr").find(".upload_file_button").prop("disabled",!0),jQuery(this).closest("tr").find(".delete").prop("disabled",!0),jQuery(this).closest("tr").find(".delete").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))})),jQuery('input[name^="_wc_variation_file_urls['+key+']"]').closest("table").find(".insert").prop("disabled",!0),jQuery('input[name^="_wc_variation_file_urls['+key+']"]').closest("table").find(".insert").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","left")))}};

Copyright © 2019 by b0y-101