1function changeevent(){ 2 $.ajax({ 3 url: 'index.php?route=extension/productavaible/product_avaible_stock/stockaction', 4 type: 'post', 5 dataType: 'json', 6 success: function(json) { 7 $('.alert, .text-danger').remove(); 8 $('.form-group').removeClass('has-error'); 9 10 $.each(json['outofstockproducts'], function(key,value){ 11 $.each(json['changeevents'], function(k,cevent) { 12 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').prop("tagName") == "BUTTON") { 13 if(value['changestatus']==1){ 14 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 15 } 16 if(value['isotions']==1){ 17 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 18 } 19 } 20 21 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+' \')"]').prop("tagName") == "BUTTON") { 22 if(value['changestatus']==1){ 23 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+' \')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 24 } 25 if(value['isotions']==1){ 26 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+' \')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 27 } 28 } 29 30 if ($('[onclick^="'+cevent+'(\''+value['product_id']+' \')"]').prop("tagName") == "BUTTON") { 31 if(value['changestatus']==1){ 32 $('[onclick^="'+cevent+'(\''+value['product_id']+' \')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 33 } 34 if(value['isotions']==1){ 35 $('[onclick^="'+cevent+'(\''+value['product_id']+' \')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 36 } 37 } 38 39 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').prop("tagName") == 'A'){ 40 if(value['changestatus']==1){ 41 $('[onclick^="'+cevent+'(\''+value['product_id']+'\',\''+value['minimum']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 42 } 43 if(value['isotions']==1){ 44 $('[onclick^="'+cevent+'(\''+value['product_id']+'\',\''+value['minimum']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 45 } 46 } 47 48 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').prop("tagName") == 'INPUT') { 49 if(value['changestatus']==1){ 50 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 51 } 52 if(value['isotions']==1){ 53 $('[onclick^="'+cevent+'(\''+value['product_id']+'\', \''+value['minimum']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 54 } 55 } 56 57 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').prop("tagName") == 'A'){ 58 if(value['changestatus']==1){ 59 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 60 } 61 if(value['isotions']==1){ 62 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 63 } 64 } 65 66 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').prop("tagName") == 'INPUT') { 67 if(value['changestatus']==1){ 68 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 69 } 70 if(value['isotions']==1){ 71 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 72 } 73 } 74
75 if ($('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').prop("tagName") == "BUTTON") { 76 if(value['changestatus']==1){ 77 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').html('<i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">' + json['buttontext']+'</span>'); 78 } 79 if(value['isotions']==1){ 80 $('[onclick^="'+cevent+'(\''+value['product_id']+'\')"]').removeAttr('onclick').attr('rel',value['product_id']).addClass('enquerynow'); 81 } 82 } 83 84 }); 85 86 if(value['changestatus']==1){ 87 if($('input[name="product_id"]').val()==value['product_id']){ 88 $('#button-cart').html('<i class="fa fa-shopping-cart"></i> '+ json['buttontext']).css('pointer-events','auto'); 89 } 90 } 91 }); 92 }, 93 error: function(xhr, ajaxOptions, thrownError) { 94 alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); 95 } 96 }); 97} 98 99$(document).delegate('.enquerynow', 'click', function(e) { 100 $('.modal').remove(); 101 $('.modal-backdrop').remove(); 102 $('body').removeClass( "modal-open" ); 103 var product_id = $(this).attr('rel'); 104 var node = this; 105 $.ajax({ 106 url: 'index.php?route=extension/productavaible/product_avaible_stock&product_id='+product_id, 107 dataType: 'html', 108 success: function(html){ 109 $('.modal').remove(); 110 $('.modal-backdrop').remove(); 111 $('body').removeClass( "modal-open" ); 112 $('body').append(html); 113 }, 114 error: function(xhr, ajaxOptions, thrownError) { 115 alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); 116 } 117 }); 118});
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.