PageSourceSearch

https://simplex48.ru/bitrix/components/wlcomponents/order_modal/templates/.default/script.js?15584385392247

js simplex48.ru collected 2026-10-02 00:23:54 UTC 2,247 bytes, 80 lines download raw bytes

1$(document).ready(function() {
2
3	$('#orderModal #send_btn').on('click', function(){
4		$(this).attr('disabled','disabled');
5		checkOrderModalForm();
6		return false;
7	});
8	
9	$('#orderModal #orderModalForm').submit(function(){
10		checkOrderModalForm();
11		return false;
12	});
13
14	$('#orderModal .iter-control').click(function() {
15		var $this = $(this),
16			$input = $this.parent().find('.input-count'),
17			inputVal = Number($input.val()),
18			minVal = 1,
19			id = $input.attr('data-id'),
20			price = $('#orderModal #orderModalForm #price').val();
21		
22		if ($this.hasClass('minus')) {
23			if (inputVal > minVal) {
24				inputVal -= 1;
25				$input.val(inputVal);
26				$('#total_wrapper').text(inputVal*price);
27			}
28		}
29		else if ($this.hasClass('plus')) {
30			inputVal += 1;
31			$input.val(inputVal);
32			$('#total_wrapper').text(inputVal*price);
33		}
34	});
35
36});
37
38function openOrderModal(product_id, product_name, product_picture, product_price)
39{
40	$('#orderModal #product_id').val(product_id);
41	$('#orderModal #price').val(product_price);
42	$('#orderModal .input-count').val(1);
43	$('#orderModal #modal-title').html(product_name);
44	$('#orderModal #total_wrapper').html(product_price);
45	$('#orderModal .prod_img').css('background-image','url('+ product_picture + ')');;
46	
47	$('#orderModal').modal();
48	return false;
49};
50
51function checkOrderModalForm() 
52{
53	$.ajax({
54		type:'POST',
55		url:$('#orderModal #orderModalForm').attr('action'),
56		data:$('#orderModal form').serialize(),
57		beforeSend: function(){
58			$('#orderModal #send_btn').html('<img class="loader" src="/bitrix/components/wlcomponents/order_modal/templates/.default/img/loader.gif" />');
59		},
60		error: function(){
61			alert('Connection error.');
62			$('#orderModal #send_btn').removeAttr('disabled');
63		},
64		success: function(data){
65
66			var obj = jQuery.parseJSON(data);
67
68			if($(obj.success).length > 0) {
69				$('#orderModal #send_btn').hide(); 
70				$('#orderModal #to_orders_btn').show();
71				$('#orderModal .modal-body #form').slideUp(500, function(){
72					$('#orderModal .modal-body #thanks').slideDown(500);
73				});  
74			} else {
75				alert('Connection error.'); 
76				$('#orderModal #send_btn').removeAttr('disabled');
77			}
78		}
79	});
80};

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.