1$(function() { 2 $('input.star').rating(); 3 $('.auto-submit-star').rating(); 4 $(".open-comment-form").click(function() { 5 $("#myModal").modal('show'); 6 }); 7 8 $('button.usefulness_btn').click(function() { 9 var id_product_comment = $(this).data('id-product-comment'); 10 var is_usefull = $(this).data('is-usefull'); 11 var parent = $(this).parent(); 12 13 $.ajax({ 14 url: productcomments_controller_url + '?rand=' + new Date().getTime(), 15 data: { 16 id_product_comment: id_product_comment, 17 action: 'comment_is_usefull', 18 value: is_usefull 19 }, 20 type: 'POST', 21 headers: { "cache-control": "no-cache" }, 22 success: function(result){ 23 parent.fadeOut('slow', function() { 24 parent.remove(); 25 }); 26 } 27 }); 28 }); 29 30 $('span.report_btn').click(function() { 31 if (confirm(confirm_report_message)) 32 { 33 var idProductComment = $(this).data('id-product-comment'); 34 var parent = $(this).parent(); 35 36 $.ajax({ 37 url: productcomments_controller_url + '?rand=' + new Date().getTime(), 38 data: { 39 id_product_comment: idProductComment, 40 action: 'report_abuse' 41 }, 42 type: 'POST', 43 headers: { "cache-control": "no-cache" }, 44 success: function(result){ 45 parent.fadeOut('slow', function() { 46 parent.remove(); 47 }); 48 } 49 }); 50 } 51 }); 52 53 $('#submitNewMessage').click(function(e) { 54 55 56 // Kill default behaviour 57 e.preventDefault(); 58 59 // Form element 60 61 url_options = '?'; 62 if (!productcomments_url_rewrite) 63 url_options = '&'; 64 65 $.ajax({ 66 url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(), 67 data: $('#id_new_comment_form').serialize(), 68 type: 'POST', 69 headers: { "cache-control": "no-cache" }, 70 dataType: "json", 71 success: function(data){ 72 if (data.result) 73 { 74 75 $("#myModal").modal('hide'); 76 $("#result_comment").modal('show'); 77 78 } 79 else 80 { 81 $('#new_comment_form_error ul').html(''); 82 $.each(data.errors, function(index, value) { 83 $('#new_comment_form_error ul').append('<li>'+value+'</li>'); 84 }); 85 $('#new_comment_form_error').slideDown('slow'); 86 } 87 } 88 }); 89 return false; 90 }); 91}); 92// productcomments 93$(document).on('click','#product_comments_block_extra ul.comments_advices a', function(e){ 94 $('*[class^="tab-pane"]').removeClass('active'); 95 $('*[class^="tab-pane"]').removeClass('in'); 96 $('div#idTab5').addClass('active'); 97 $('div#idTab5').addClass('in'); 98 99 $('ul.nav-tabs a[href^="#"]').removeClass('active'); 100 $('a[href="#idTab5"]').addClass('active'); 101}); 102(function(){ 103 $(window).on("load",function(){ 104 105 /* Page Scroll to id fn call */ 106 $("#product_comments_block_extra ul.comments_advices a.reviews ").mPageScroll2id({ 107 highlightSelector:"#product_comments_block_extra ul.comments_advices a.reviews ", 108 offset:100, 109 }); 110 }); 111})(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.