10713 Posts in 2391 Topics by 1763 members
|Go to End|
27 December 2008 at 8:38am
An extension I created that allows arbitrary drag-and-drop sort of any subclass of DataObject of your choice.
Documentation is here: http://doc.silverstripe.com/doku.php?id=modules:sortabledataobject
5 January 2009 at 10:37am
Nice redevelopment, UncleCheese! Especially for documenting your work on the wiki (http://doc.silverstripe.com/doku.php?id=modules:sortabledataobject). Some PHPDoc documentation would be nice as well ;)
Quote from UncleCheese (from a previous thread):
I still think that HTML-tags shouldn't be in model-classes like SortableDataObject - for one, because the HTML-representation doesn't have anything to do with the data structure (you can usually configure the drag/drop-libs to work on different tags). You can expect users to act on a Iterator in their templates, and include the Requirements themselves (which means you don't need to get it in "through the backdoor" in SortableDataObjectSet->beginSortable(). Its a tradeoff between ease-of-use on one side, and architectural structure and flexibility on the other side.
5 January 2009 at 11:35am
Thanks for your feedback, Ingo. I'll get to the PHPDoc once I figure out how the heck to do it.
I agree, drawing markup in a DataModel is never pretty, and I always have to swallow hard when I do it, but I guess I think about it like a form field helper, for instance.
I'm open to suggestions, as I'd love to see my work implemented. Do you have any ideas that would help it follow best practices more closely yet still provide gains in production time to the developer?
18 February 2009 at 10:29pm
My question is looking to extend the SortableDataObject - I am looking to develop an ajax drag n drop cart functionality with the existing e-commerce Module
I have been playing with the script.aculo.us drag n drop code as seen at
http://demo.script.aculo.us/ & at http://design.theguigirl.com/cart.php (an entertaining cart and was looking to see if any extension of what you have developed could be brought into the drag n drop cart
OR if anyone has tried implmenting an ajax drag n drop with Silverstripe?
19 February 2009 at 3:24am Last edited: 19 February 2009 3:24am
Avoid scriptaculous at all costs and use jQuery. The prototype/scriptaculous framework is a behemoth and it's not all that easy to use. Silverstripe is in the process of migrating all their JS to jQuery, anyway. Save yourself a lot of trouble.
Also, SortableDataObject is obsolete since it has been merged into the DataObjectManager extension.
|Go to Top|