This fixes Task#19110 :Changing project deletes users
http://squish.ish.com.au/tasks/19110
The bug was caused by use of .html instead of .append in javascript
Reverted the changes in the javascript.
Users were lost in javascript beacuse no customers were associates with incoming tasks with
all new users.
Added a default customer to an incoming task from email with no users present in the db.
Now using array.size.zero? insted of array.length == 0
Cleaning up the code.
This makes it possible to create projects witout specifying the customer it should be attached to.
By default the projects without any specified customers are now attahced to the "Internal" customer.
https://github.com/ari/jobsworth/issues/447
http://squish.ish.com.au/tasks/20013
Using current_user.company.internal_customer instead of finding the
internal customer using Company.where(:name =>"Internal")
The test cases have been added in this commit
This resolved Task#18811: Cannot edit widgets in Firefox 21.0
http://squish.ish.com.au/tasks/18811
The edit and delete button were not visible becasue of .is(":hover")
in javascript which is no longer supported. Please do not merge untill next commit.
Made changes to widgets.js for  editing, deleting and loading
of newly added widgets without refreshing the page.
This commit includes the test cases for emails controller
The widget edit fields appeared like images because the elements
were not being focused when clicked. Added a new event to javascript to focus
the elements when clicked.
This fixes the the issue of task order not being saved.
The task sort preference was not being saved in the javascript.
Introduced it in this commit.
This fixes "Template attributes are not loaded when task is created"
https://github.com/ari/jobsworth/issues/481
Template tags were not copied to the new task and also the default option
was being selected because task from template was being treated as a new task.
It should have been treated as a task from existing templates instead which have these options set.
Merge pull request #493 from ari/viks-template-attributes-not-loaded

This fixes "Template attributes are not loaded when task is created"
Merge pull request #486 from ari/viks-can-not-edit-widgets-in-fireFox-21.0

Viks can not edit widgets in fire fox 21.0
Merge pull request #485 from ari/viks-task-order-not-saved

This fixes the the issue of task order not being saved.
Constant used in test cases removed in this commit.
Modified test cases. Removed all constants used for local variable assignment.
Merge pull request #487 from ari/viks-changing-projects-deletes-users-task#19110

Viks changing projects deletes users task#19110
Merge pull request #490 from ari/viks-cannot-create-projects-without-customer

Viks cannot create projects without customer