afan pasalic wrote:
this one bugs me for a while. how to change order.
I have a list of tasks. by status, task could be 1 (todo) or 0 (done) -
status value stored in mysql. I can list tasks per status or all.
order number is stored in mysql too.
the easiest way to change order is to have form for each task where you
will enter manually number and then submit (one submit button for whole
form). but, if you change order number for any task you have to change
then all order numbers "below" the task manually
solution with "arrows" (or up/down buttons) where you click on arrow and
the task switch the place with its "neighbor" is easy and fancy. Though,
I get in trouble if, e.g. tasks 10, 11, 12, and 13 change status from 1
to 0 and I have to move task 14 to place 6. I have to click first 4
times (to switch places with tasks 13, 12, 11, and 10) - but nothing is
actually happening on screen (of course) before start switching places
with 9, 8, 7, and 6.
how do you avoid this "gap"?
what solution do you use at all?
thanks for any help.
-afan
flex 3 / dataset would handle all this for you extremely easily.
if you want to stick with html then I'd recommend splitting into two
tables (todo / done) and having a simple ajax updater to re-order the
tables.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php