craftsmancoding / assetmanager

Asset Manager for MODX Revolution
36 stars 15 forks source link

Re-ordering Image Issue #2

Closed nickff closed 10 years ago

nickff commented 10 years ago

I'm noticing that if you re-order your images, then do another edit or two (say to a title / alt), then save, the re-ordering is lost. it only saves the order if you save directly after re-ordering without performing other operations (and sometimes that is finnicky as well).

fireproofsocks commented 10 years ago

Good catch. The problem was that the html elements were updated on the page, but the JS array containing all the goods was not (that was being generated only on page load).

The solution was to trigger a callback when sorting stopped. See the app.js file, the update_asset_order() function: it re-orders the JS array whose data data is driving the whole thing.

See 4721e2d..76eaa4d