I'm not sure how easy it would be, but it's probably possible. `Orderable` inherits from `OrderableBase`, which in turn inherits from `ModelBase`. `ModelBase` is a django class, so the two mezzanine models you'd have to focus on are `OrderableBase` and `Orderable`. This would give you the `_order` field, however you'd also have to include the actual `OrderField()` from `mezzanine.core.fields`. `OrderField()` also makes use of `OrderWidget` from `mezzanine.core.forms`, so the hardest part would probably be making sure you grab everything you need from various mezzanine modules.
Drag and drop functionality is provided by some javascript, you can take a look at the template in `pages/templates/admin/pages/page/change_list.html` to see how it's done. Most of it is stored in `pages/static/mezzanine/js/admin/`. As far as I know, `jquery.mjs.nestedSortable.js` handles the look and feel / drag and drop functionality, `page_tree.js` handles making the ajax call when a page has been reordered. On Friday, 21 August 2015 02:53:48 UTC-7, Wesley wrote: > > Hi guys, > I find Mezzanine's Orderable is useful for drag and drop related items > within admin page. > > Is it easy to split this guy out as a single app? > > Currently, I have another project that is developed upon origin django > release instead of mezzanine, and I wanna reuse the orderable functionality > of Mezzanine > > Any easy way to do this? > > Thanks. > Wesley > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
