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 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.9.0 4.9.1 5.0.1 5.0.2 5.1.1 5.1.2 5.1.3 5.2.0 5.2.1 5.3.2 5.3.3.1 5.3.4 5.3.5 5.3.6 5.3.7
woocommerce-multilingual / res / js / lock_fields.js
woocommerce-multilingual / res / js Last commit date
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 1 month ago cart_widget.min.js 1 month 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 1 year ago lock_fields.min.js 1 year 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 1 month ago wcml-multi-currency.min.js 1 month ago wcml-setup.js 3 years ago wcml-setup.min.js 3 years ago wcml-translation-editor.js 1 week ago wcml-translation-editor.min.js 1 week 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
lock_fields.js
238 lines
1 jQuery(function($){
2 var i;
3 var ids = [
4 '_virtual',
5 '_downloadable',
6 'product-type',
7 '_backorders',
8 '_manage_stock',
9 '_stock',
10 '_low_stock_amount',
11 '_stock_status',
12 '_sold_individually',
13 'comment_status',
14 '_tax_status',
15 '_tax_class',
16 'parent_id',
17 'crosssell_ids',
18 'upsell_ids',
19 'grouped_products',
20 'product_shipping_class'
21 ];
22
23 if( unlock_fields.file_paths == 1 ){
24 ids.push('_download_type');
25 }
26 ids = ids.concat( non_standard_fields.ids );
27
28 $('.wcml_prod_hidden_notice').prependTo('#woocommerce-product-data');
29
30 for (i = 0; i < ids.length; i++) {
31 $el = $('#'+ids[i]);
32 if (!$el.length) {
33 $el = $('*[name='+ids[i]+']');
34 }
35 $el.prop('disabled', true);
36 $el.after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
37 }
38
39 var buttons = [
40 'add_variation',
41 'link_all_variations',
42 'attribute_taxonomy',
43 'save_attributes',
44 'add_new_attribute',
45 'product_attributes .remove_row',
46 'add_attribute',
47 'add_custom_attribute',
48 'select_all_attributes',
49 'select_no_attributes',
50 'wc-attribute-search',
51 'edit-visibility'
52 ];
53 buttons = buttons.concat( non_standard_fields.classes );
54
55 if( unlock_fields.file_paths == 1 ){
56 buttons.push('downloadable_files .upload_file_button');
57 buttons.push('downloadable_files .insert');
58 buttons.push('downloadable_files .delete');
59
60 $('.downloadable_files .upload_file_button,.downloadable_files .insert,.downloadable_files .delete')
61 .on('click', function(){ return false; });
62 }
63
64 for (i = 0; i < buttons.length; i++) {
65 $('.'+buttons[i]).prop('disabled',true);
66 $('.'+buttons[i]).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
67 }
68
69 $('#visibility .edit-visibility span').on('click', function() { return false; });
70
71 $('.remove_variation').each(function(){
72 $(this).prop('disabled', true);
73 $(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show().css('float','right'));
74 });
75
76 var inpt_names = [
77 '_width',
78 '_height',
79 '_sku',
80 '_global_unique_id',
81 '_length',
82 '_weight',
83 'product_length',
84 '_regular_price',
85 '_sale_price',
86 '_sale_price_dates_from',
87 '_sale_price_dates_to'
88 ];
89
90 if( unlock_fields.file_paths == 1 ){
91 inpt_names.push('_download_limit');
92 inpt_names.push('_download_expiry');
93 inpt_names.push('_wc_file_names[]');
94 inpt_names.push('_wc_file_urls[]');
95 }
96 inpt_names = inpt_names.concat( non_standard_fields.input_names );
97
98 if( unlock_fields.menu_order == 1 ){
99 inpt_names.push('menu_order');
100 }
101
102 for (i = 0; i < inpt_names.length; i++) {
103 $('input[name="'+inpt_names[i]+'"]').prop('readonly', true);
104
105 $('.dimensions_field span.wrap').css('float','left');
106 if( inpt_names[i] == '_width' || inpt_names[i] == '_height' || inpt_names[i] == '_length' ){
107 $('input[name="'+inpt_names[i]+'"]').css('margin-right',0);
108 $('input[name="'+inpt_names[i]+'"]').css('float','none');
109 $('input[name="'+inpt_names[i]+'"]').css('width','29%');
110
111 }
112
113 if( inpt_names[i] == '_sale_price_dates_to' ){
114 $('input[name="'+inpt_names[i]+'"]').after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').css('float','left').show());
115 }else{
116 $('input[name="'+inpt_names[i]+'"]').after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
117 }
118
119
120 }
121
122 $('#product_attributes td textarea,#product_attributes input[type="text"]').each(function(){
123 $(this).prop('readonly', true);
124 $(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
125 });
126
127
128 $(
129 '#product_attributes input[type="checkbox"],' +
130 '#_featured,' +
131 '#product_attributes select.attribute_values'
132 ).each(function () {
133 $(this).prop('disabled', true);
134 $(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
135 });
136
137 $('form#post input[type="submit"]').click(function(){
138 for (i = 0; i < ids.length; i++) {
139 $('#'+ids[i]).prop('disabled', false);
140 }
141 $('.woocommerce_variation select,#variable_product_options .toolbar select,.woocommerce_variation input[type="checkbox"],#product_attributes input[type="checkbox"]').each(function(){
142 $(this).prop('disabled', false);
143 });
144 });
145
146 });
147
148 var wcml_lock_variation_fields = function( file_path_sync ){
149
150 var check_attr = jQuery('.woocommerce_variation>h3 select').prop('disabled');
151
152 if (typeof check_attr !== typeof undefined && check_attr !== false) {
153 return;
154 }
155
156 jQuery('.woocommerce_variation>h3 select, #variable_product_options .toolbar select, .show_if_variation_manage_stock select').each(function(){
157
158 jQuery(this).prop('disabled', true);
159 jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr('name')+'" value="'+jQuery(this).val()+'" />');
160 jQuery(this).after(jQuery('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
161 });
162
163 var i = 0;
164 var inpt_names = [
165 '_width',
166 '_height',
167 '_sku',
168 '_global_unique_id',
169 '_length',
170 '_weight',
171 'product_length',
172 '_regular_price',
173 '_sale_price',
174 '_sale_price_dates_from',
175 '_sale_price_dates_to',
176 '_stock',
177 '_low_stock_amount',
178 '_download_limit',
179 '_download_expiry'
180 ];
181
182 for (i = 0; i < inpt_names.length; i++) {
183
184 //variation fields
185 jQuery('input[name^="variable'+inpt_names[i]+'"]').each(function(){
186 jQuery(this).prop('readonly', true);
187 jQuery(this).after(jQuery('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
188 });
189 }
190
191 //variation fields
192 var var_checkboxes = ['_enabled','_is_downloadable','_is_virtual','_manage_stock'];
193 for (i = 0; i < var_checkboxes.length; i++) {
194 jQuery('input[name^="variable'+var_checkboxes[i]+'"]').each(function(){
195 jQuery(this).prop('disabled', true);
196 if( jQuery(this).prop('checked') ){
197 jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr('name')+'" value="'+jQuery(this).val()+'" />');
198 }
199 jQuery(this).after(jQuery('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
200 });
201 }
202
203 var var_selectboxes = ['_stock_status','_shipping_class','_tax_class'];
204 for (i = 0; i < var_selectboxes.length; i++) {
205 jQuery('select[name^="variable'+var_selectboxes[i]+'"]').each(function(){
206 jQuery(this).prop('disabled', true);
207 jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr('name')+'" value="'+jQuery(this).val()+'" />');
208 jQuery(this).after(jQuery('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
209 });
210 }
211
212 if( file_path_sync ){
213
214 for (var key in file_path_sync) {
215
216 if( file_path_sync[ key ] == 1){
217
218 jQuery('input[name^="_wc_variation_file_names['+key+']"]').each(function(){
219 jQuery(this).prop('readonly', true);
220 });
221
222 jQuery('input[name^="_wc_variation_file_urls['+key+']"]').each(function(){
223 jQuery(this).prop('readonly', true);
224 jQuery(this).closest('tr').find('.upload_file_button').prop('disabled', true);
225 jQuery(this).closest('tr').find('.delete').prop('disabled', true);
226 jQuery(this).closest('tr').find('.delete').after(jQuery('.wcml_lock_img').clone().removeClass('wcml_lock_img').show().css('float','right'));
227 });
228
229 jQuery('input[name^="_wc_variation_file_urls['+key+']"]').closest('table').find('.insert').prop('disabled', true);
230 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') );
231
232 }
233
234 }
235
236 }
237
238 }