Clean up all Djblets JavaScript warnings and errors from jshint.

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

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.

Description From Last Updated

Mind combining these lines?

daviddavid

Same here.

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/extensions/packaging.py
        djblets/extensions/tests.py
    
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
        djblets/static/djblets/js/extensions/views/extensionManagerView.js
        djblets/static/djblets/js/jquery.gravy.hacks.js
        djblets/static/djblets/js/jquery.gravy.funcQueue.js
        djblets/static/djblets/js/extensions/models/extensionManagerModel.js
        djblets/static/djblets/js/datagrid.js
        djblets/static/djblets/js/jquery.gravy.autosize.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/packaging.py
        djblets/extensions/tests.py
    
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
        djblets/static/djblets/js/extensions/views/extensionManagerView.js
        djblets/static/djblets/js/jquery.gravy.hacks.js
        djblets/static/djblets/js/jquery.gravy.funcQueue.js
        djblets/static/djblets/js/extensions/models/extensionManagerModel.js
        djblets/static/djblets/js/datagrid.js
        djblets/static/djblets/js/jquery.gravy.autosize.js
    
    
  2. 
      
david
  1. The changes to the .py files look fine but should be pulled out into a separate change.

    1. Oops, those snuck in. I'll remove them.

  2. Show all issues

    Mind combining these lines?

  3. Show all issues

    Same here.

  4. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
        djblets/static/djblets/js/extensions/views/extensionManagerView.js
        djblets/static/djblets/js/jquery.gravy.hacks.js
        djblets/static/djblets/js/jquery.gravy.funcQueue.js
        djblets/static/djblets/js/extensions/models/extensionManagerModel.js
        djblets/static/djblets/js/datagrid.js
        djblets/static/djblets/js/jquery.gravy.autosize.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
        djblets/static/djblets/js/extensions/views/extensionManagerView.js
        djblets/static/djblets/js/jquery.gravy.hacks.js
        djblets/static/djblets/js/jquery.gravy.funcQueue.js
        djblets/static/djblets/js/extensions/models/extensionManagerModel.js
        djblets/static/djblets/js/datagrid.js
        djblets/static/djblets/js/jquery.gravy.autosize.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (f38476f)