[ansel] purpose of datatree_order field in SQL?

Ben Chavet ben at chavet.net
Mon Mar 22 08:25:05 PST 2004


I have a suggestion for the reorder UI, though I'm not sure how easy it 
would be
to implement...

Instead of text boxes, how about select boxes?  When the user selects the new
order index, use javascript to update the other boxes appropriately.  
This will
cut down on user error & avoid duplicate entries.

Something to think about, anyway.

--Ben

Quoting "Heath S. Hendrickson" <heath at outerspaceconsultants.com>:

>>
>> $neworder = Util::getFormData($id . '_order');
>> $image->data['order'] = $neworder;
>> $image->update();
>>
>> Will this be automatically reflected in the gallery display, or do I 
>> have to make modifications to the gallery display code to be "order" 
>> aware?
>>
> Answering some of my own questions... the code above works to set the
> datatree_order value for a given gallery image.  The issue now is that
> the DataTree module isn't datatree_order aware as of yet.  It would seem
> logical and best that the DataTree driver be made to use the
> datatree_order field in addition to the datatree_id field in the ORDER
> BY clauses (let the SQL server do the work, it's better/faster at it
> anyway)...  I'm just very leary of touching the driver as the changes
> aren't trivial (you have to modify all the functions so that they return
> the datatree_order field in the SELECT statement so that it can be used
> in the ORDER BY clause).  Barring that, I can just add some code to do
> it in the PHP pages... but it'll definitely be suboptimal and should be
> replaced at some point.
>
> Anyway, here's a snapshot of what the new reorder functionality looks
> like.  I used a standard Horde::Form for the rendering of the form,
> hence the odd 15%/85% split on the description/order ...  Also, the
> filename is a link to a pop-up with the thumbnail of the image... I
> thought that would be nice so that you could easily see what the image
> was when setting the order.
>
> Note that this does not make use of the _reorder() function... it wasn't
> necessary for this initial version.  I'm not sure what it would be
> useful for in this case anyway.
>
> Screenshot 1 - The "Reorder" option on the gallery view page
> http://www.outerspaceconsultants.com/Files/reorder_option.jpg
>
> Screenshot 2 - The "Reorder" page, showing pop-up with thumbnail image
> http://www.outerspaceconsultants.com/Files/reorder_screen.jpg
>
> h
> --
> ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: ansel-unsubscribe at lists.horde.org



More information about the ansel mailing list