1 function assignNoteLike(tid) 2 { 3 if(logStatus=="out") 4 { 5 showNonMemberModal(); 6 return; 7 } 8 var existingHtml=$("#note_like_button_"+tid).html(); 9 10 $("#note_like_button_"+tid).html('<div style="width:60px;height:60px;background-color:#404040;border-radius:50%;text-align:center;margin-bottom:5px"><center><img src="img/loader.gif" style="width:40px;height:auto;margin-bottom:5px;cursor: pointer;padding-top:10px"></center></div>'); 11 12 $.ajax({ 13 type: "POST", 14 dataType: "json", 15 url: "webapi/assign_tasting_like.php", 16 data: {tid:tid} 17 }).done(function(result) { 18 if(result.memstatus=='0') 19 { 20 $("#note_like_button_"+tid).html(existingHtml); 21 showNonMemberModal(); 22 } 23 else 24 { 25 26 var s='<div style="width:60px;height:60px;background-color:#404040;border-radius:50%;text-align:center;margin-bottom:5px"><center><img src="img/'; 27 if(result.act=="add") 28 { 29 s=s+'liked.png'; 30 } 31 if(result.act=="remove") 32 { 33 s=s+'like.png'; 34 } 35 s=s+'" style="width:40px;height:auto;margin-bottom:5px;cursor: pointer;padding-top:10px"></center></div>'; 36 s=s+result.total_likes; 37 s=s+' like'; 38 if(result.total_likes!=1) 39 { 40 s=s+'s'; 41 } 42 $("#note_like_button_"+tid).html(s); 43 44 s=""; 45 if(result.likes.length>0) 46 { 47 s=s+'Liked by:<br>'; 48 49 for (var x = 0; x < result.likes.length; x++) { 50 var lobj = result.likes[x]; 51 if(lobj.taste_like_name !="" || lobj.taste_like_name !=null) 52 { 53 s=s+'<div style="display:inline-block">'+lobj.taste_like_name; 54 if(x!=(result.likes.length-1)) 55 { 56 s=s+', '; 57 } 58 59 s=s+'</div>'; 60 } 61 } 62 } 63 64 $("#note_likes_container_"+tid).html(s); 65 } 66 }); 67 }
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.