CMS-2637 Simplify javascript resolving for controller.