MarkUsProject/Markus — pull request #1812 by bmuscede (2014-10-04 18:56:53+00:00)
Title: Issue 1726

**Fix:**
So I've *finally* improved the upload button javascript (after much research into the inner workings of javascript). Essentially, the script can now handle multiple file upload boxes that each control a list of upload buttons.

The fix is a bit of a hack but the script works by "being self-aware". That is, it gets its own script id by instantly finding the last script to be initialized when it is initialized (which is, itself). Therefore, it is able to take parameters that are passed to it.

In addition, after doing more research into jQuery, the style of my code was also cleaned up and improved.

Also, the following views now have the upload buttons disabled when no files are selected:
* app/views/rubrics/index.html.erb (Assignment Rubric View)
* app/views/annotation_categories/index.html.erb (Assignment Annotation View)

**Testing:**
All views were tested to ensure they worked and performed as they did, all views that were tested for the last pull request were *re-tested*, and rspec was run with no failures.