Index: lams_central/web/comments/topicview.jsp
===================================================================
diff -u -r46bcb6ea758a272250071d1a571d008c6745e593 -rd8be0fc2c13bfb38ac7239cf7185895a31845e2b
--- lams_central/web/comments/topicview.jsp (.../topicview.jsp) (revision 46bcb6ea758a272250071d1a571d008c6745e593)
+++ lams_central/web/comments/topicview.jsp (.../topicview.jsp) (revision d8be0fc2c13bfb38ac7239cf7185895a31845e2b)
@@ -75,7 +75,7 @@
});
}
- function updateLike(commentUid, url, buttonToGrey, urlOfGreyImage, buttonToHide, incValue) {
+ function updateLike(commentUid, url, incValue) {
$.ajax({ // create an AJAX call...
type: 'GET',
url: url
@@ -90,26 +90,25 @@
currentCount = +currentCount + incValue;
$('#msglikeCount'+commentUid).html(currentCount);
}
- buttonToHide.style.display = 'none';
- buttonToGrey.removeAttribute('onclick');
- buttonToGrey.src = urlOfGreyImage;
});
}
function likeEntry(commentUid) {
updateLike(commentUid,
'?sessionMapID=${sessionMapID}&commentUid='+commentUid,
- document.getElementById('msglikebutton'+commentUid),
- '',
- document.getElementById('msgdislikebutton'+commentUid), 1);
+ 1);
+ $( '#msglikebutton'+commentUid ).removeClass( 'fa-thumbs-up fa-faded' ).addClass( 'fa-thumbs-o-up' );
+ $( '#msglikebutton'+commentUid ).prop( 'onclick', null );
+ $( '#msgdislikebutton'+commentUid ).css( "display", "none" );
}
function dislikeEntry(commentUid) {
updateLike(commentUid,
'?sessionMapID=${sessionMapID}&commentUid='+commentUid,
- document.getElementById('msgdislikebutton'+commentUid),
- '',
- document.getElementById('msglikebutton'+commentUid), -1);
+ -1);
+ $( '#msgdislikebutton'+commentUid ).removeClass( 'fa-thumbs-down fa-faded' ).addClass( 'fa-thumbs-o-down' );
+ $( '#msgdislikebutton'+commentUid ).prop( 'onclick', null );
+ $( '#msglikebutton'+commentUid ).css( "display", "none" );
}