define("dojox/form/Rating", [
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/dom-attr",
"dojo/dom-class",
"dojo/mouse",
"dojo/on",
"dojo/string",
"dojo/query",
"dijit/form/_FormWidget"
], function(declare, lang, domAttr, domClass, mouse, on, string, query, FormWidget){
return declare("dojox.form.Rating", FormWidget, {
// summary:
// A widget for rating using stars.
/*=====
// required: Boolean
// TODO: Can be true or false, default is false.
required: false,
=====*/
templateString: null,
// numStars: Integer|Float
// The number of stars to show, default is 3.
numStars: 3,
// value: Integer|Float
// The current value of the Rating
value: 0,
buildRendering: function(/*Object*/ params){
// summary:
// Build the templateString. The number of stars is given by this.numStars,
// which is normally an attribute to the widget node.
var radioName = 'rating-' + Math.random().toString(36).substring(2);
// The radio input used to display and select stars
var starTpl = '';
// The hidden value node is attached as "focusNode" because tabIndex, id, etc. are getting mapped there.
var tpl = '