Clean up all Djblets JavaScript warnings and errors from jshint.

Review Request #6055 — Created July 4, 2014 and submitted — Latest diff uploaded

Information

Djblets
release-0.8.x
1d14cf0...

Reviewers

This goes through and cleans up all the warnings and errors that jshint
reported. Only one of these (an extra comma) would lead to page
breakages, but the rest should help with some optimization and code
size.

There were two changes made that were bigger than just using === or
similar.

datagrid.js has had its initialization code moved to the bottom of
$.datagrid, in order to define functions up-front (as jshint wanted)
instead of defining functions after being called. In practice, this
wouldn't cause any issues, though.

scrollIntoView() now caches $(window), $(document), and $(this) in order
to reduce execution time. I had to condense var statements there anyway,
so I just moved those out.

Tested the datagrid and basic operations on other pages.

Unit tests pass.

    Loading...