Simplify rating.js, add code in view.raw to have json request #981