Able to change status of action with AJAX
--
TWiki:Main.RobertGraff
It depends on exactly what you want. I have been working on the assumption that the behaviour you require is something like this:
- Use clicks on status of an action in the browser
- A drop-down appears offering all possible states; user selects on
- State is changed silently in the background, without requiring a page refresh
CC
That's a fine approach. I was actually thinking of something a little simpler. Instead of displaying a dropdown, simply advance to the next state. If at the end of the list, go to the front. Our states are: pending, open, completed, closed. So if it's pending, clicking status would make it "open". If it's "closed", clicking on the status would make it "pending".
--
TWiki:Main.RobertGraff
Ah, "advance to the next state" assumes some ordering over the state set. I don't think that ordering can be assumed to be available when the 'AJAX' (actually a REST handler) runs.
CC
It would be very useful if there was a class associated with each status state and have that class update as well. I think it would most useful for the class to be on the table row.
--
TWiki:Main.RobertGraff
You mean a CSS class, presumably. That's a bit more fiddly, but can be done.
--
TWiki:Main/CrawfordCurrie - 17 Jul 2007
Done
CC