Thanks for this module. It works well so far.
One thing I thought could be improved was that I didn't like that the text of the (disabled) upload link was still displayed and the user had to click the link of one the sources to start selecting/uplaoding a file. So I've added some JS so that the div of the first source is automatically displayed. It was a bit difficult to get the JS to load after filefield_sources.js (I tried the _process function, changing the module weight, etc) but this method works. I'm not sure about the jQuery style in my JS file either. I just followed the style of filefield_sources.js but it's not how I usually code. Anyway, I've attached my updated module (just two extra functions and a JS file) in case it's useful.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1177230.patch | 1.34 KB | antiorario |
| #1 | filefield_sources_noupload.txt | 890 bytes | dazweeja |
| filefield_sources_noupload.zip | 9.81 KB | dazweeja |
Comments
Comment #1
dazweeja commentedImproved js file attached (needs renaming to .js).
Comment #2
antiorario commentedYour module wasn't working for me (the javascript wasn't being called), so instead of using hook_elements() I called the pre_render function from filefield_sources_noupload_process().
I attach the patch against HEAD. I'm also committing this to HEAD (along with the cleaned-up javascript).
Comment #3
dazweeja commentedNot sure why it wasn't working for you but I like your solution better anyway. Nice work.