SomeCo wants to show a graphical ratings widget on its web page. When the user clicks a star, it should post the corresponding rating to Alfresco. In a subsequent example, you'll see how to leverage the widget on SomeCo's web site. For this example, you are going to add the ratings widget to the HTML response for the rating web script. That will let you test both the widget and the rating POST.
Note
The ratings widget is based on code from Laurent Haan's tutorial at http://www.progressive-coding.com/tutorial.php?id=6
. Most of it is unchanged with the exception of changing the ratings from being 0-indexed to 1-indexed. It's also been modified as per the instructions found at progressive-coding.com to leverage the Prototype JavaScript library. Laurent's code is included here with his permission.
Recall that in the earlier rating example, the HTML response simply showed the rating summary data for a given Whitepaper. The goal now is to enhance that response with...