1$(() => { 2 if(uniJsVars.notify.status) { 3 let notify = () => { 4 $('main').find('.add_to_cart.disabled').each(function() { 5 let pid = $(this).data('pid'); 6 7 if(typeof($(this).data('pid')) == 'undefined') pid = Number($(this).attr('class').replace(/\D+/g,'')); 8 9 const params = '{"form_name": "notify", "p_id": '+pid+'}'; 10 11 $(this).removeAttr('disabled').off().attr('onclick', 'uniRequestOpen('+params+')').css('cursor', 'pointer'); 12 }); 13 }; 14 15 notify(); 16 17 $(document).ajaxStop(() => { 18 setTimeout(() => { 19 notify(); 20 }, 300); 21 }); 22 } 23}); 24 25function uniRequestOpen(params) { 26 uniAddCss('catalog/view/theme/unishop2/stylesheet/request.css'); 27 uniAddJs('catalog/view/theme/unishop2/js/jquery.maskedinput.min.js'); 28 29 if(params && typeof(params) == 'object') { 30 $.ajax({ 31 url:'index.php?route=extension/module/uni_request', 32 type:'post', 33 data:params, 34 dataType:'html', 35 success: function(data) { 36 $('body').append(data); 37 $('#modal-request-form').addClass(uniJsVars.popup_effect_in).modal('show'); 38 } 39 }); 40 } 41} 42 43function uniRequestSend() { 44 const form = '#modal-request-form', 45 metric_id = $(form+' input[name="metric_id"]').val(), 46 metric_target = $(form+' input[name="metric_target"]').val(), 47 analytic_category = $(form+' input[name="analytic_category"]').val(), 48 analytic_action = $(form+' input[name="analytic_action"]').val(); 49 50 /* 51 const config = { 52 metric: {id: $(form+' input[name="metric_id"]').val(), target: $(form+' input[name="metric_target"]').val()}, 53 analytic: {category: $(form+' input[name="analytic_category"]').val(), action: $(form+' input[name="analytic_action"]').val()} 54 }; 55 */ 56 57 $.ajax({ 58 url: 'index.php?route=extension/module/uni_request/send', 59 type: 'post', 60 data: $(form+' input, '+form+' textarea').serialize()+'&location='+encodeURIComponent(window.location.href), 61 dataType: 'json', 62 beforeSend: function() { 63 $('.callback_button').button('loading'); 64 }, 65 complete: function() { 66 $('.callback_button').button('reset'); 67 }, 68 success: function(json) { 69 $(form+' .text-danger').remove(); 70 71 if (json['error']) { 72 for (i in json['error']) { 73 form_error(form, i); 74 } 75 76 uniFlyAlert('danger', json['error']); 77 } 78 79 if (json['success']) { 80 if(metric_id && metric_target) { 81 if (typeof(ym) === "function") { 82 ym(metric_id, 'reachGoal', metric_target); 83 } else { 84 new Function('yaCounter'+metric_id+'.reachGoal(\''+metric_target+'\')')(); 85 } 86 } 87 88 if(analytic_category && analytic_action) { 89 if (typeof(gtag) === 'function') { 90 gtag('event', analytic_action, {'event_category': callback.analytic_category}); 91 } else if (typeof(ga) === 'function') { 92 ga('send', 'event', analytic_category, analytic_action); 93 } 94 } 95 96 $('.modal-request').html($('<div class="callback_success">'+json['success']+'</div>').fadeIn()); 97 } 98 }, 99 error: function(xhr, ajaxOptions, thrownError) { 100 //alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); 101 alert(xhr.responseText); 102 } 103 }); 104}
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.