Open jessevondoom opened 12 years ago
I think this will be really easy… we get sorting, dragging, and dropping for free with jQuery UI.
Oh rad...then fuck it — I'll commit to the front-end player stuff if we can make the admin happen. RAD
I mean, re-ordering the <li>
s that contain the track names will be simple.
How is the track order saved? Hidden input(s)?
However's easiest, really. A single string in a hidden input of each sub-asset's ID in order and I can parse on submit. We'll store it as an array in metadata JSON and I'll pull all child assets to get details for each track...
That pre-coffee comment might be a little confusing. Basically however you can keep track of the order works for me. We should be able to parse it on the PHP side and storage/retrieval won't be an issue there. The trickiest part would be that we'll want to store the ID for the track asset more than the name itself, so we'll have to have some kind of hidden field inside the <li>
that stores track ID...
Easy peasy… whatever element that contains everything for the track (likely the <li>
) we'll just add an attribute data-diy-track-id="666"
.
jQuery automatically populates it's own data object with data attributes, so on submit, we can just fill it with $(element).data('diy-track-id')
Am I crazy to be looking at this instead of jQuery UI? http://farhadi.ir/projects/html5sortable/
Don't really care about code size. Just want the easiest drag/sort style list we can muster. TO THE RESEARCHMOBILE!
The playlist manager will serve a few purposes:
In the platform playlists are basically a single asset like any other, with sub-assets (files, like releases), and we'll store data like track order, asset IDs, etc in JSON as we do with releases. So the manager will put an interface on that.
We'll see if we can tackle this once we have the uploader done. Might be better to wait, given that we'd also need to output the playlists, etc. Consider this a stub that'll get expanded.