PageSourceSearch

https://horticom.ee/e-pood/wp-content/plugins/master-controller/pu…/js/master-controller-public.js?ver=1.0.0

js horticom.ee collected 2026-10-02 23:35:27 UTC 23,755 bytes, 795 lines download raw bytes

1(function( $ ) {
2	'use strict';
3
4	/**
5	 * All of the code for your public-facing JavaScript source
6	 * should reside in this file.
7	 *
8	 * Note: It has been assumed you will write jQuery code here, so the
9	 * $ function reference has been prepared for usage within the scope
10	 * of this function.
11	 *
12	 * This enables you to define handlers, for when the DOM is ready:
13	 *
14	 * $(function() {
15	 *
16	 * });
17	 *
18	 * When the window is loaded:
19	 *
20	 * $( window ).load(function() {
21	 *
22	 * });
23	 *
24	 * ...and/or other possibilities.
25	 *
26	 * Ideally, it is not considered best practise to attach more than a
27	 * single DOM-ready or window-load handler for a particular page.
28	 * Although scripts in the WordPress core, Plugins and Themes may be
29	 * practising this, we should strive to set a better example in our own work.
30	 */
31
32	 $(document).ready(function(){
33		 var init = function(){
34		 	// $('.disabled_submit').submit(false);
35		 	// $('.prevent_submit_on_enter').submit(false);
36		 	$('.prevent_submit_on_enter').on('keyup keypress', function(e) {
37			  var keyCode = e.keyCode || e.which;
38			  if (keyCode === 13) {
39			  	console.log("enter shall not pass");
40			    e.preventDefault();
41			    return false;
42			  }
43			});
44
45			 $('form.prevent_submit_on_enter .submit').on('click', function (e) {
46
47			      var ajaxLoading = '<div class="loading_screen submit_loading_screen"><img src="'+productArchive.templateUrl+'/assets/images/ajax-loader.gif"/></div>';
48		 			$(this).parents().prepend(ajaxLoading);
49
50			  });
51
52		 	$(document).on("click", "li.product .amount button.decrease_custom",function(event){
53				var product = $(this).parents('li.product');
54				var input = $(product).find('.amount input');
55				var amount = $(input).val();
56				var step = $(input).attr('step');
57				var min_amount = $(input).attr('min');
58				var stock = $(input).data('stock');
59				var cat_type = $(input).data('cat_type');
60
61				var a = parseInt(amount, 10);
62				var b = parseInt(step, 10);
63				var c = parseInt(min_amount, 10);
64				amount = a-b;
65				if(c>amount){
66					return;
67				}
68
69				if(!isNaN(stock)){
70						if(amount<=stock){
71					 		console.log("out of stock max limit >");
72					 		$(this).parents('div.amount').find(".stock_notice_row").html('');
73						}
74				}
75				var price = parseFloat($(product).data('price'));
76				var total =  Math.round(price*amount * 1000) / 1000;
77				$(input).val(amount);
78				$(product).find('.total').html(total+" €");
79				updateWeeklyTotal($(product).parents('ul.products'));
80				updateTotal();
81			});
82
83			$(document).on("click", ".order_sections li.product .amount button.increase_custom",function(event){
84				event.preventDefault();
85
86				var product = $(this).parents('li.product');
87				var input = $(product).find('.amount input');
88				var step = $(input).attr('step');
89				var amount = $(input).val();
90				var stock = $(input).data('stock');
91				var cat_type = $(input).data('cat_type');
92				var needs_regroup = $(input).data('needs_regroup');
93				var extra_filter = $(input).data('extra_filter');
94
95				stock = parseFloat(stock, 10);
96				stock = parseInt(stock, 10);
97
98
99				var a = parseInt(amount, 10);
100				var b = parseInt(step, 10);
101				amount = a+b;
102
103console.log("li.product .amount button.increase_custom");
104console.log(stock);
105console.log(amount);
106				if(!isNaN(stock)){
107					if(cat_type == 1){
108						if(amount>stock && extra_filter == "yes"){
109					 		console.log("out of stock max limit >");
110					 		 amount = parseInt(stock, 10);
111					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on laos alles '+stock+', muutsime toote kogust maksimaalsele kogusele.');
112						}
113						if(amount>stock && needs_regroup == "yes" && extra_filter == "no"){
114					 		console.log("out of stock max limit laotoode");
115					 			$(this).parents('div.amount').find(".stock_notice_row").html("Toodet on laos alles kokku "+stock+"tk. Laojäägist suurema koguse ostmisel, muutub võimalik tarneaega.");
116					 			ajaxRequest();
117						}
118					} else {
119						if(amount>stock ){
120					 		console.log("out of stock max limit >");
121					 		 amount = parseInt(stock, 10);
122					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on laos alles '+stock+', muutsime toote kogust maksimaalsele 
122kogusele.');
123						}
124						if(stock == 0){
125					 		console.log("out of stock max limit ==0");
126					 		 amount = parseInt(stock, 10);
127					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on ei ole enam laos. Palun eemalda toode.');
128						 }
129					}
130
131				}
132
133				var price = parseFloat($(product).data('price'));
134				var total =  Math.round(price*amount * 1000) / 1000;
135				console.log(total);
136				$(input).val(amount);
137				$(product).find('.total').html(total+" €");
138
139				updateWeeklyTotal($(product).parents('ul.products'));
140				updateTotal();
141
142
143			});
144
145			$('.order_sections li.product .amount input').on('input',function(e){
146
147					var product = $(this).parents('li.product');
148					var total = 0;
149					var input = $(product).find('.amount input');
150					var amount = $(input).val();
151					var step = $(input).attr('step');
152					var stock = $(input).data('stock');
153					var min_amount = $(input).attr('min');
154					var cat_type = $(input).data('cat_type');
155					var needs_regroup = $(input).data('needs_regroup');
156					var extra_filter = $(input).data('extra_filter');
157
158					var a = parseInt(amount, 10);
159					var b = parseInt(step, 10);
160					var c = parseInt(min_amount, 10);
161
162					if(a<c){
163						//error here
164						return;
165					}
166					amount = a;
167
168	console.log("asdasdasd")
169
170
171				stock = parseFloat(stock, 10);
172				stock = parseInt(stock, 10);
173
174				if(!isNaN(stock)){
175					if(cat_type == 1){
176						if(amount>stock && extra_filter == "yes"){
177					 		console.log("out of stock max limit >");
178					 		 amount = parseInt(stock, 10);
179					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on laos alles '+stock+', muutsime toote kogust maksimaalsele kogusele.');
180						}
181						if(amount>stock && needs_regroup == "yes" && extra_filter == "no"){
182					 		console.log("out of stock max limit laotoode");
183					 			$(this).parents('div.amount').find(".stock_notice_row").html("Toodet on laos alles kokku "+stock+"tk. Laojäägist suurema koguse ostmisel, muutub võimalik tarneaega.");
184					 			ajaxRequest();
185						}
186					} else {
187						if(amount>stock ){
188					 		console.log("out of stock max limit >");
189					 		 amount = parseInt(stock, 10);
190					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on laos alles '+stock+', muutsime toote kogust maksimaalsele kogusele.');
191						}
192						if(stock == 0){
193					 		console.log("out of stock max limit ==0");
194					 		 amount = parseInt(stock, 10);
195					 		$(this).parents('div.amount').find(".stock_notice_row").html('Toodet on ei ole enam laos. Palun eemalda toode.');
196						 }
197					}
198
199				}
200
201				var price = parseFloat($(product).data('price'));
202				var total =  Math.round(price*amount * 1000) / 1000;
203				console.log(total);
204				$(input).val(amount);
205				$(product).find('.total').html(total+" €");
206
207				updateWeeklyTotal($(product).parents('ul.products'));
208				updateTotal();
209
210			});
211
212			$('[data-toggle="popover"]').click(function(event){
213				event.preventDefault();
214				$(this).popover("enable");
215
216			});
217
218			$('[data-toggle="popover"]').popover({
219				html : true
220			});
221
222			$('[data-toggle="stock_control"]').click(function(event){
223				event.preventDefault();
224			});
225
226
227
228			$('.transport_method .selection a').click(function(){
229				$(this).parents('label').trigger('click');
230				updateTotal();
231			});
232
233			$('.transport_method .add_address a').click(function(event){
234				event.preventDefault();
235				var addressBox = $(this).parents('.transport_method').find('.custom_address');
236				if($(addressBox).is(':visible')){
237					$(addressBox).slideUp();
238					return;
239				}
240				$(addressBox).slideDown();
241			});
242
243			$('.emptyAllCart').click(function(){
244					emptyCart();
245					refreshCart();
246			});
247
248
249			$('li.product a.delete').click(function(event){
250				event.preventDefault();
251				var products = $(this).parents('ul.products');
252				var element = $(this).parents('li');
253				var count = $(element).siblings().size();
254				var id = $(element).data('id');
255				var week = $(element).data('week');
256				var year = $(element).data('year');
257
258				$(element).fadeOut('300', function(){
259					$(element).remove();
260					/*updateWeeklyTotal(products);
261					removeFromCart(id,week,year);
262					refreshCart();
263					updateTotal();*/
264					removeFromCart(id,week,year);
265					ajaxRequest();
266					refreshCart();
267					checkIfCertIsNeeded();
268
269				});
270				if(count==1){
271					var section = $(element).parents('.order_period');
272					$(section).fadeOut('300', function(){
273						$(section).remove();
274					})
275					return;
276				}
277			});
278
279			$('.checkout_section .toggle_week a').click(function(event){
280				event.preventDefault();
281				toggleWeek(this);
282			});
283
284
285			$(document).on("change", ".order_sections .product .amount input", function() {
286
287					var product = $(this).parents(".product");
288					var amount = $(this).parents(".amount").find("input").val();
289					var stock = $(this).parents(".amount").find("input").data('stock');
290					var cat_type = $(this).parents(".amount").find("input").data('cat_type');
291					var needs_regroup = $(this).parents(".amount").find("input").data('needs_regroup');
292
293	            stock = parseFloat(stock, 10);
294	            stock = parseInt(stock, 10);
295
296console.log(stock);
297console.log(cat_type);
298console.log(needs_regroup);
299					updateWeeklyShipping(product, parseInt(amount));
300
301					            if(!isNaN(stock)){
302					               if(cat_type == 1){
303					               	if(amount>stock){
304console.log(" ajaxrequest  called");
305
306 // ajaxRequest();
307// refreshCart();
308
309						                 	$.ajax({
310													url: checkout.ajaxurl,
311													type: 'post',
312													dataType: 'json',
313													data: {
314														action: 'horticom_ajax_update',
315														data: $('form[name=order]').serialize()
316													},
317													success: function( result ) {
318														console.log(result);
319														$('.order_sections').html(result.order_section);
320													}
321												});
322												refreshCart();
323												updateWeeklyShipping(product, parseInt(amount));
324											}
325					               }
326					            }
327
328			});
329			/*
330			$(document).on("change", ".product .amount input", function() {
331				var product = $(this).parents(".product");
332				var amount = $(this).val();
333				updateWeeklyShipping(product, parseInt(amount));
334			});
335*/
336
337			var wto;
338			$(document).on("click", ".order_sections .product .amount button", function(e){
339
340				clearTimeout(wto);
341				var vm = this;
342				wto = setTimeout(function() {
343
344					var product = $(vm).parents(".product");
345					var amount = $(vm).parents(".amount").find("input").val();
346
347					var stock = $(vm).parents(".amount").find("input").data('stock');
348					var cat_type = $(vm).parents(".amount").find("input").data('cat_type');
349					var needs_regroup = $(vm).parents(".amount").find("input").data('needs_regroup');
350
351					            stock = parseFloat(stock, 10);
352					            stock = parseInt(stock, 10);
353
354console.log(stock);
355console.log(cat_type);
356console.log(needs_regroup);
357updateWeeklyShipping(product, parseInt(amount));
358
359					            if(!isNaN(stock)){
360					               if(cat_type == 1){
361					               	if(amount>stock){
362console.log(" ajaxrequest  called");
363
364 // ajaxRequest();
365// refreshCart();
366
367						                 	$.ajax({
368													url: checkout.ajaxurl,
369													type: 'post',
370													dataType: 'json',
371													data: {
372														action: 'horticom_ajax_update',
373														data: $('form[name=order]').serialize()
374													},
375													success: function( result ) {
376														console.log(result);
377														$('.order_sections').html(result.order_section);
378													}
379												});
380												refreshCart();
381
382											}
383					               }
384					            }
385
386
387
388
389
390				}, 1000);
391
392
393
394			});
395
396			var updateProductsTotal = function(){
397				 var total = 0;
398				 var not_sale_total = 0;
399				 $('.order_period .products_total span.price').each(function(key,value){
400				 	total+= parseFloat($(value).html());
401				 	not_sale_total+= parseFloat($(value).data("not_sale_total"));
402				 	//var total =
403				 });
404				 total = Math.round(total * 1000) / 1000;
405				 var w_tax_total = total+total*0.2;
406				 $('table.total .order_items_total span.price').html(w_tax_total);
407
408				 not_sale_total = Math.round(not_sale_total * 1000) / 1000;
409				 if(total != not_sale_total){
410				 		var dif = not_sale_total-total;
411				 		dif = dif.toFixed(3);
412				 		if (!isNaN(dif)) {
413				 			$('table.total .sale_wrap').show();
414				 			$('table.total .sale_wrap span.price').html(dif);
415				 		}
416				 }
417
418				 return total;
419			 }
420
421			 var updateShippingTotal = function(){
422				 var total = 0;
423				 $('.transport_method').each(function(key,value){
424				 	var shipping = $(value).find('.selection input[type=radio]:checked').val();
425				 	if(shipping == '3' || shipping == '2'){
426				 		var pane = shipping == '2' ? $(value).find('.tab-pane.warehouse') : $(value).find('.tab-pane.kuller');
427			 			var price = $(pane).find('span.trasnport_total').data('trasnport_price');
428				 		total+= parseFloat(price);
429				 	}
430				 });
431				 total = Math.round(total * 1000) / 1000;
432				 $('table.total .order_transport_total span.price').html(total);
433				 //$()
434				 return total;
435			 }
436
437
438
439			 var updateTotal = function(){
440			 	var productsTotal = updateProductsTotal();
441				var shippingTotal = updateShippingTotal();
442				var total = productsTotal + shippingTotal;
443				total = Math.round(total * 1000) / 1000;
444				var VAT = Math.round(total* 0.2 * 1000) / 1000;
445				$('table.total .order_tax_total span.price').html(VAT);
446				$('table.total .order_total span.price').html(total);
447			 }
448
449	 		var updateWeeklyShipping = function(product, amount){
450				var prod = {
451					id: $(product).data("id"),
452					amount: amount,
453					year: $(product).data("year"),
454					week: $(product).data("week")
455				}
456
457
458				$.ajax({
459					url: checkout.ajaxurl,
460	 				type: 'post',
461	 				dataType: 'json',
462	 				data: {
463	 					action: 'horticom_get_week_transport',
464	 					data:prod
465	 				},
466	 				success: function(total) {
467console.log(total);
468	 					total = Math.round(total * 1000) / 1000;
469	 					var transport = $(product).parents(".order_period").find(".transport_method");
470	 					$(transport).find("label.shipping input[type=hidden]").val(total);
471	 					$(transport).find("label.shipping .price").html(total+"€");
472	 					$(transport).find("label.shipping .price").data("trasnport_price", total);
473	 					$(transport).find(".kuller span.trasnport_total").html(total+"€");
474	 					$(transport).find(".kuller span.trasnport_total").data("trasnport_price", total);
475	 					updateTotal();
476	 				}
477				});
478			}
479
480			 var closeWeeks = function(){
481			 	//$('.checkout_section').each()
482			 	$.each($('.checkout_section.order_period'),function(index,value){
483			 		var isClosed = $(value).find('input.is_closed').val();
484			 		var element = $(value).find('a.close_week');
485			 		if(isClosed == 'true'){
486			 			console.log("closing week");
487			 			closeWeek(element, true);
488			 		}
489
490			 	});
491			 }
492
493			 closeWeeks();
494			 updateTotal();
495		 }
496		 init();
497
498
499
500
501		 $(document).on("click", ".popover .order_weeks button",function(event){
502			 var input = $(this).parents('.input-group').find('input[type=number]');
503			 var value = $(input).val();
504			//var min_amount = $(product).find('input[name=min_amount]').val();
505			var amount = $(input).val();
506			var step = $(input).attr('step');
507			var min_amount = $(input).attr('min');
508
509
510			var a = parseInt(amount, 10);
511			var b = parseInt(step, 10);
512			var c = parseInt(min_amount, 10);
513
514			 if($(this).hasClass("increase_custom")){
515				 a = a+b;
516
517				 $(input).val(a);
518				 return;
519			 }
520			 a -= b;
521			 if(a<c){
522				return;
523			 }
524			 $(input).val(a);
525		 });
526
527		 $(document).on("click", ".popover .add_week a", function(event){
528			 event.preventDefault();
529			 var weeks = $(this).parents('.order_weeks_container').find('.order_weeks');
530			 var lastElement = $(weeks).find('.week').last().clone();
531
532			 var count = $(weeks).find('.week').size();
533			 $(lastElement).find('input[type=number]').attr('name', 'change[weeks]['+count+'][amount]');
534			 $(lastElement).find('select').attr('name', 'change[weeks]['+count+'][week]');
535			 $(lastElement).appendTo($(weeks));
536
537		 });
538
539		 $(document).on("click", ".popover a.remove_week", function(event){
540			 event.preventDefault();
541			 var week = $(this).parents('.week');
542			 $(week).fadeOut('200', function(){
543				 $(week).remove();
544			 });
545		 });
546
547		 $(document).on("click", ".popover a.save", function(event){
548			 event.preventDefault();
549			 ajaxRequest();
550
551		 });
552
553		 $(document).on("click", ".popover .close, .popover a.cancel" , function(event){
554			 event.preventDefault();
555			 $(this).parents(".popover").popover('hide');
556		 });
557
558		 //Popover close bug fix
559		$('body').on('hidden.bs.popover', function (e) {
560		    $(e.target).data("bs.popover").inState = { click: false, hover: false, focus: false }
561		});
562
563		  $('body').on('hidden.bs.popover', function () {
564		       $(this).popover('disable');
565		  });
566
567
568		$('[data-toggle="popover"]').click(function(event){
569			event.preventDefault();
570			var orders = $(this).parents('.order_sections');
571			var thisPopover = $(this).siblings('.popover');
572			var activePopovers = $(orders).find('div.popover').not(thisPopover);
573			$.each(activePopovers, function(key, value){
574				$(value).popover('hide');
575			});
576		});
577
578
579		 var refreshCart = function(){
580		 	$.ajax({
581 				url: checkout.ajaxurl,
582 				type: 'post',
583 				dataType: 'json',
584 				data: {
585 					action: 'horticom_refresh_cart'
586 				},
587 				success: function(total) {
588 					$('a.mini_cart span.price').html(total);
589 				}
590 			});
591		 }
592
593		 var checkIfCertIsNeeded = function(){
594
595		 	var del_cert_section = true;
596		  	 $('form[name=order]').find('li.product:not(.products_header)').each(function(index){
597				 var cert_status = $(this).data('needs_a_cert');
598				 if(cert_status == 1){ del_cert_section = false; }
599			 });
600
601			 if(del_cert_section){
602			 		$('.cer_field_section').remove();
603			 }
604
605		}
606
607
608
609		 var updateWeeklyTotal = function(products){
610			 var total = 0;
611			 var not_sale_total = 0;
612			 $(products).find('li.product:not(.products_header)').each(function(index){
613				 var amount = parseInt($(this).find('.amount input').val());
614				 var price = parseFloat($(this).data('price'));
615				 var before_sale_price = parseFloat($(this).data('before_sale_price'));
616				 total += amount*price;
617				 not_sale_total += amount*before_sale_price;
618			 });
619			 total = Math.round(total * 1000) / 1000;
620			 not_sale_total = Math.round(not_sale_total * 1000) / 1000;
621			 $(products).siblings('.products_total').find('span').html("<span data-not_sale_total='"+not_sale_total+"' class='price'>"+total+"<span> €");
622		 };
623
624
625		var toggleWeek = function(element){
626			var section = $(element).parents('.checkout_section');
627
628			if($(element).hasClass('expand_week')){
629
630				$(section).find('.transport_method').slideDown(400);
631				$(section).find('ul.products').slideDown(400);
632				$(section).find('.transport_total.cloned').remove();
633				$(section).find('input.is_closed').val(false);
634				$(element).siblings('.close_week').show();
635				$(element).hide();
636				return;
637			}
638
639			closeWeek(element, false);
640		}
641
642		 var closeWeek = function(element, instantly){
643			var section = $(element).parents('.checkout_section');
644			var transportPrice = $(section).find('.tab-pane.active .transport_total span.trasnport_total').html();
645			var transportTotal = $(section).find('.transport_total').first().clone();
646			var selection = $(section).find('.transport_method .selection input[type=radio]:checked').val();
647
648			if(parseInt(selection) == 1)
649				$(transportTotal).find('.trasnport_total').html("0 €");
650			else
651				$(transportTotal).find('.trasnport_total').html(transportPrice);
652
653			$(transportTotal).addClass('cloned');
654			$(transportTotal).insertAfter($(section).find('.products_total'));
655
656			if(instantly){
657				$(section).find('.transport_method').hide();
658				$(section).find('ul.products').hide();
659			}
660			else{
661				$(section).find('.transport_method').slideUp(400);
662				$(section).find('ul.products').slideUp(400);
663			}
664
665			$(section).find('input.is_closed').val(true);
666			$(element).siblings('.expand_week').show();
667			$(element).hide();
668		}
669
670
671		var emptyCart = function(){
672			 $.ajax({
673 				url: checkout.ajaxurl,
674 				type: 'post',
675 				dataType: 'json',
676 				data: {
677 					action: 'horticom_cart_empty',
678 				},
679 				success: function() {
680 					console.log("emptyCart Done");
681 					//console.log("success");
682 					//init();
683 				}
684 			});
685		 }
686
687		 var removeFromCart = function(itemId, week, year){
688
689			 $.ajax({
690 				url: checkout.ajaxurl,
691 				type: 'post',
692 				dataType: 'json',
693 				data: {
694 					action: 'horticom_cart_remove',
695 					data: {id: itemId, week: week, year:year}
696 				},
697 				success: function() {
698 					console.log("refresh");
699
700 					//console.log("success");
701 					//init();
702 				}
703 			});
704		 }
705
706		 var ajaxRequest = function(){
707
708		 	var ajaxLoading = 	'<div class="loading_screen"><img src="'+productArchive.templateUrl+'/assets/images/ajax-loader.gif"/></div>';
709		 	$('.popover.in').prepend(ajaxLoading);
710
711			$.ajax({
712				url: checkout.ajaxurl,
713				type: 'post',
714				dataType: 'json',
715				data: {
716					action: 'horticom_ajax_update',
717					data: $('form[name=order]').serialize()
718				},
719				success: function( result ) {
720					$('.order_sections').html(result.order_section);
721					console.log(result);
722					init();
723				}
724			});
725		}
726
727
728		$(".user_info .checkbox #changed_billing").change(function(){
729			var fields = $(this).parents("form").find(".bill_group").find("input:not([type=checkbox])");
730			if(this.checked){
731				fields.prop("disabled",false)
732				return;
733			}
734			fields.prop("disabled",true);
735
736		});
737
738		$(".user_info .checkbox #changed_shipping").change(function(){
739			var fields = $(this).parents("form").find(".ship_group").find("input:not([type=checkbox])");
740			var textarea_fields = $(this).parents("form").find(".ship_group").find("#transport_comment");
741			if(this.checked){
742				fields.prop("disabled",false);
743				textarea_fields.prop("disabled",false);
744				return;
745			}
746			fields.prop("disabled",true);
747			textarea_fields.prop("disabled",true);
748
749
750		});
751
752		$("#transport_same_as_billing").change(function(){
753			var adr1 = $(this).parents("form").find(".bill_group").find("#address1").val();
754			var adr2 = $(this).parents("form").find(".bill_group").find("#address2").val();
755			var adr3 = $(this).parents("form").find(".bill_group").find("#address3").val();
756			var adr4 = $(this).parents("form").find(".bill_group").find("#phone").val();
757
758			$("#changed_shipping").trigger( "click");
759			$(this).parents("form").find(".ship_group").find("#ship_address1").val(adr1);
760			$(this).parents("form").find(".ship_group").find("#ship_address2").val(adr2);
761			$(this).parents("form").find(".ship_group").find("#ship_address3").val(adr3);
762			$(this).parents("form").find(".ship_group").find("#ship_phone").val(adr4);
763
764			var fields = $(this).parents("form").find(".ship_group").find("input:not([type=checkbox])");
765			var textarea_fields = $(this).parents("form").find(".ship_group").find("#transport_comment");
766
767			fields.prop("disabled",false);
768			textarea_fields.prop("disabled",false);
769
770
771		});
772
773
774
775
776		/*var alignText = function(){
777
778			var text = $('.thankyou .bottom_image .text');
779			var h = $(text).height();
780			var contHeight = $(text).parents('.bottom_image').height();
781			$(text).css({top:parseInt(contHeight/2 - h/2+(contHeight/20))});
782		}
783		//alignText();
784
785		$(window).resize(function(){
786			alignText();
787		});*/
788		$(".amount input").trigger('input');
789
790	 });
791
792
793
794
795})( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.