SOURCE CODE: Uize.Widgets.RatingStars.Html (view docs)

Uize.module ({
  name:'Uize.Widgets.RatingStars.Html',
  required:[
    'Uize.Util.Html.Encode'
  ],
  builder:function () {
    'use strict';

    return Uize.package ({
      process:function (i) {
        function _cssClass (_class) {return m.cssClass (_class)}
        function _encodeAttributeValue (_value) {return Uize.Util.Html.Encode.encode (_value)}
        function _resolveNonStringToPixel (_value) {return typeof _value == "string" ? _value : +_value + "px"}
        var
          m = this,
          i = arguments [0],
          _idPrefix = i.idPrefix,
          _fragment0 = '" class="',
          _fragment1 = _cssClass ('stars'),
          _fragment2 = _encodeAttributeValue (i['_starsText'])
        ;
        return (
          '<div id="' + _idPrefix + _fragment0 + i['mCssBindings_rootNodeClasses'] + '"><!--\n  --><div id="' + _idPrefix + '-starsOff' + _fragment0 + _fragment1 + ' ' + _cssClass ('starsOff') + '">' + _fragment2 + '</div><!--\n  --><div id="' + _idPrefix + '-starsOn' + _fragment0 + _fragment1 + ' ' + _cssClass ('starsOn') + '" style="' + 'right:' + _resolveNonStringToPixel (i['_starsOnRight']) + ';' + '">' + _fragment2 + '</div><!--\n--></div>'
        );

      }
    });
  }
});