[ticket/10949] Convert new JS files to new coding standards

I changed the code that hasn't been changed yet to the new JS coding standards. This is PR #860 plus my changes for the new code and mergeable with the newest develop.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10949