MarkUsProject/Markus — pull request #859 by ioev (2012-09-29 19:57:23+00:00)
Title: Issue 846

Issue: https://github.com/MarkUsProject/Markus/issues/846

When deleting a group, 2 ajax calls are sent, the user is shown 2 prompts and the 2nd one generates an exception at the server. Also the 'Add new' wasn't is the best context for users to assume it meant 'Add new group'.

Fix:
Restructed how javascript is loaded on lots of modules to remove any reduntant .js includes, which fixed the issue as each include executes the js contained in the file. Added a new "Add new group" string to both locales and changed the button text.

Also fixed a very minor line of code to make sure an array was returned for "each" which was failing a test, and changed the test name of a duplicate, which was generating a warning.

Tests:
Ran through each page to make sure no js errors were being generated. Tested behavior of deleting a group in Chrome/Firefox and only one prompt was displayed. Also ran unit tests, an unrelated markup error that was occuring before I started this issue was the only failed test.