Index: lams_tool_forum/web/includes/javascript/message.js
===================================================================
diff -u -r2ff38cdf504d51a2590b113023d885069d32645e -rb732d53d7176e05258acb291c209dfeb1e6e6704
--- lams_tool_forum/web/includes/javascript/message.js (.../message.js) (revision 2ff38cdf504d51a2590b113023d885069d32645e)
+++ lams_tool_forum/web/includes/javascript/message.js (.../message.js) (revision b732d53d7176e05258acb291c209dfeb1e6e6704)
@@ -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 -r2ff38cdf504d51a2590b113023d885069d32645e -rb732d53d7176e05258acb291c209dfeb1e6e6704
--- lams_tool_forum/web/jsps/learning/edit.jsp (.../edit.jsp) (revision 2ff38cdf504d51a2590b113023d885069d32645e)
+++ lams_tool_forum/web/jsps/learning/edit.jsp (.../edit.jsp) (revision b732d53d7176e05258acb291c209dfeb1e6e6704)
@@ -1,5 +1,10 @@
<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+