Index: lams_tool_forum/web/includes/javascript/message.js
===================================================================
diff -u -rc76031f4dc5c314a020333985c17fe280bc6e2b3 -r7a8220da72ba9cbc4da8e29db84a0de86a275d8d
--- lams_tool_forum/web/includes/javascript/message.js (.../message.js) (revision c76031f4dc5c314a020333985c17fe280bc6e2b3)
+++ lams_tool_forum/web/includes/javascript/message.js (.../message.js) (revision 7a8220da72ba9cbc4da8e29db84a0de86a275d8d)
@@ -45,3 +45,30 @@
$('.highlight').removeClass('highlight');
}
+ function setupJRating(rateMessagePath) {
+ $(".rating-stars-new").filter($(".rating-stars")).jRating({
+ phpPath : rateMessagePath,
+ rateMax : 5,
+ decimalLength : 1,
+ onSuccess : function(data, messageId){
+ $("#averageRating" + messageId).html(data.averageRating);
+ $("#numberOfVotes" + messageId).html(data.numberOfVotes);
+ $("#numOfRatings").html(data.numOfRatings);
+
+ //disable rating feature in case maxRate limit reached
+ if (data.noMoreRatings) {
+ $(".rating-stars").each(function() {
+ $(this).jRating('readOnly');
+ });
+ }
+ },
+ onError : function(){
+ jError('Error : please retry');
+ }
+ });
+ $(".rating-stars-new").filter($(".rating-stars-disabled")).jRating({
+ rateMax : 5,
+ isDisabled : true
+ });
+ $(".rating-stars-new").removeClass("rating-stars-new");
+ }
Index: lams_tool_forum/web/jsps/learning/edit.jsp
===================================================================
diff -u -r8011f528a86dcce591f6e8cca793b692735d13ae -r7a8220da72ba9cbc4da8e29db84a0de86a275d8d
--- lams_tool_forum/web/jsps/learning/edit.jsp (.../edit.jsp) (revision 8011f528a86dcce591f6e8cca793b692735d13ae)
+++ lams_tool_forum/web/jsps/learning/edit.jsp (.../edit.jsp) (revision 7a8220da72ba9cbc4da8e29db84a0de86a275d8d)
@@ -1,5 +1,10 @@
<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+