Index: lams_central/web/comments/topicview.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/comments/topicview.jsp,v
diff -u -r1.1 -r1.2
--- lams_central/web/comments/topicview.jsp 15 Dec 2015 10:20:53 -0000 1.1
+++ lams_central/web/comments/topicview.jsp 16 Dec 2015 05:53:52 -0000 1.2
@@ -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" );
}