Adds task ordering functionality for a round
Review Request #148 - Created April 20, 2010 and submitted
Information | |
---|---|
Andrei Grigorean | |
infoarena | |
Reviewers | |
hackers | |
- Adds a new tab for the round edit section. - Displays a Tasks macro having drag and drop enabled. - Posts new task order using JavaScript. - Takes care of changes when a task is deleted or a task list for a round updated.
Change looks awesome, some comments below though.
-
trunk/common/db/round.php (Diff revision 1) -
Isn't ++$order_id evil? C++ thought me to never be clever :)
-
trunk/common/db/round_task.php (Diff revision 1) -
I think it's weird to put this function in this file. Will it ever be called in any other case except for deleting a task? It seems to me that if a function is called round_task_* then it should have a round parameter. :) This method isn't really related to rounds so much.
-
trunk/common/db/round_task.php (Diff revision 1) -
It's pretty clear to me what this function does, but some comments will not hurt :P Something along the lines Preserve consecutive numbers for order_id.
-
trunk/www/controllers/round.php (Diff revision 1) -
If we receive inproper input from evil users will this crash? (it shouldn't)
-
trunk/www/controllers/round.php (Diff revision 1) -
Won't we always receive a range of tasks, but in random order? I don't really like having both round_get_tasks and round_task_get_tasks.
-
trunk/www/controllers/round.php (Diff revision 1) -
Update only when needed?
-
trunk/www/index.php (Diff revision 1) -
Does round deleting still work? Did you change delete-pages to delete-page on purpose? :)
-
trunk/www/views/round_task_order.php (Diff revision 1) -
Did you test this on IE, Firefox and Chrome? What's the childNodes[1] for? :)
-
trunk/www/views/round_task_order.php (Diff revision 1) -
Wasn't there a parameter to disable the different coloring for odd and even rows?
-
trunk/common/db/round_task.php (Diff revision 1) -
Renamed and moved to common/db/task.php
-
trunk/common/db/round_task.php (Diff revision 1) -
Added comments
-
trunk/www/controllers/round.php (Diff revision 1) -
Added some checking. They shouldn't be able to do anything stupid now.
-
trunk/www/controllers/round.php (Diff revision 1) -
Switched to using round_get_tasks.
-
trunk/www/controllers/round.php (Diff revision 1) -
Fixed.
-
trunk/www/index.php (Diff revision 1) -
Fixed.
-
trunk/www/views/round_task_order.php (Diff revision 1) -
Changed the script because it had a bug. Tested in Firefox, Chrome, Opera.
-
trunk/www/views/round_task_order.php (Diff revision 1) -
I'm going to take care of colour parity in the next change.
I don't think the ordering is preserved correctly when using the edit-parameters controller. It is probably ok to commit this anyway since it's in a separate branch.
-
trunk/www/controllers/round.php (Diff revision 2) -
This is from the next change I suppose.