The asset selector code in da-assets.js was getting pretty complex - one giant openAssets() function doing everything: fetching config, building URLs, managing the dialog, handling ProseMirror, smart crops, the works.
Also, fix a few bugs that were hiding in there:
- The approval check for DM assets was using
&& instead of ||, so assets that were approved but not activated (or vice versa) could slip through
- Delivery tier was using the wrong field (
repo:id) — it should be repo:assetId per the AEM Open API response
- Videos in author+DM mode now use
/play as they should
- PDFs and other non-image files now use
/original/as/ instead of being treated like images
The asset selector code in
da-assets.jswas getting pretty complex - one giantopenAssets()function doing everything: fetching config, building URLs, managing the dialog, handling ProseMirror, smart crops, the works.Also, fix a few bugs that were hiding in there:
&&instead of||, so assets that were approved but not activated (or vice versa) could slip throughrepo:id) — it should berepo:assetIdper the AEM Open API response/playas they should/original/as/instead of being treated like images