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.