File Manager Callback

Permalink 1 user found helpful
Hi,

I'm working on an add on and I call the filemanager like so:

<?php echo $al->image('ccm-b-image', 'fID', t('Add Image'), $bf, $args);?>


However, once the image is chosen, I need to pass the fID to javascript to handle. How do I do that?

In 5.6 I simply assigned ccm_chooseAsset to a function. I need to know the equivalent in 5.7.

Thanks.

Jeff

PS: Where is the non-minified file-manager.js in GitHub?

JeffPaetkau
 
JeffPaetkau replied on at Permalink Reply
JeffPaetkau
Hi,

It looks like:

<script>ConcreteFileManager.launchDialog(function (file) {console.log(file.fID);});</script>


does the trick. However, how do I restrict it to images? It seems that "$al->image" doesn't restrict itself to images either. I'm pretty sure that's a bug.

Jeff

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.