star rating javascript controller