silverstripe-dropzone
silverstripe-dropzone copied to clipboard
Add config options to specify where javascripts and front-end config is loaded.
Added configuration settings:
FileAttachmentField:
module_scripts_dir: 'javascript/'
dropzone_script_file: 'javascript/dropzone.js'
dropzone_config_file: 'javascript/default_config.json'
to specify where javascript and front-end config is loaded from more succinctly. If they start with a '/' then they will load relative to web root so you can place them outside the module.
Thanks for the awesome upload field!
Thanks, guys.
@shoaibali The Config API offers Before and After settings that allow you to specify with some precision when the file should load and what it should override. You can see in the dropzone config.yml file:
---
Name: dropzone
After: 'framework/*','cms/*'
---
It specifies to load after framework and cms. Because the snippet is also named, in your config, you can just specify After: ['#dropzone'].
@wakes In general, I have no objections to the changes. Because the module is most useful on the frontend, I think the ability to override the scripts is warranted.
Since I didn't see this until now (email issue wasn't sending me Github notifications), would you mind rebasing your changes? We'll aim to put this in a 1.2 release.
Thank you @unclecheese for the explanation :)
I forgot about the before/after functions in yaml file.
Would you be able to rebase this against the master so we can merge it in?
Hi unclecheese,
Yup, I'll do it this afternoon and submit pull request.
Cheers,
Steve Wake Developer
DigitalHod Limited
E: [email protected] P: 021 026 30019
On 15/1/2016, at 10:01, unclecheese [email protected] wrote:
Would you be able to rebase this against the master so we can merge it in?
— Reply to this email directly or view it on GitHub https://github.com/unclecheese/silverstripe-dropzone/pull/24#issuecomment-171778514.
@wakes Bumping this from the past. Still able to rebase this to get it in?