Index: lams_tool_images/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/learning.jsp,v diff -u -r1.10 -r1.11 --- lams_tool_images/web/pages/learning/learning.jsp 10 Dec 2008 14:53:03 -0000 1.10 +++ lams_tool_images/web/pages/learning/learning.jsp 12 Dec 2008 15:31:28 -0000 1.11 @@ -224,31 +224,26 @@ } if (${imageGallery.allowVote && (mode != 'teacher') && (not finishedLock)}) { - var votedImageUid = $('#commentsArea_votedImageUid').val(); + var isVoted = $('#commentsArea_isVoted').val(); var votingFormLabel; - if (votedImageUid == 0) { - + if (isVoted == "true") { + $('#votingForm_vote').attr('disabled', false); - $('#votingForm_vote').attr('checked', false); - votingFormLabel = ""; - - } else if (imageUid == votedImageUid) { - - $('#votingForm_vote').attr('disabled', false); $('#votingForm_vote').attr('checked', true); - votingFormLabel = ""; - + votingFormLabel = ""; + } else { - $('#votingForm_vote').attr('disabled', true); + $('#votingForm_vote').attr('disabled', false); $('#votingForm_vote').attr('checked', false); - votingFormLabel = ""; + votingFormLabel = ""; + } $('#votingForm_label').text(votingFormLabel); $('#votingForm_imageUid').attr('value', imageUid); } else if (${finishedLock}) { - var votedImageUid = $('#commentsArea_votedImageUid').val(); - if (imageUid == votedImageUid) { + var isVoted = $('#commentsArea_isVoted').val(); + if (isVoted == "true") { $('#votingForm_vote').attr('checked', true); } else { $('#votingForm_vote').attr('checked', false);