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.

Comments

dazweeja’s picture

StatusFileSize
new890 bytes

Improved js file attached (needs renaming to .js).

antiorario’s picture

Status: Active » Closed (fixed)
StatusFileSize
new1.34 KB

Your 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).

dazweeja’s picture

Not sure why it wasn't working for you but I like your solution better anyway. Nice work.