AutoInlineUploader - detect when upload has completed

Jake B.

Well-known member
I'm wanting to use the AutoInlineUploader class for a project we are working on in the AdminCP, but I need to detect when the upload is completed so I can close the modal. Is there any way we can get this done without rewriting the AutoInlineUploader javascript?
 
You'll see in the code that an event is triggered in the code: "AutoInlineUploadComplete".

Therefore:

Code:
$form.on('AutoInlineUploadComplete', function()
{
    // Do something                                
});

That code would help you do something when that event is triggered.
 
You'll see in the code that an event is triggered in the code: "AutoInlineUploadComplete".

Therefore:

Code:
$form.on('AutoInlineUploadComplete', function()
{
    // Do something                              
});

That code would help you do something when that event is triggered.

I've tried this with no luck. I'm absolutely terrible with JavaScript. How would I go about getting the $form object from outside xenforo.js?

Edit: Nevermind, I've gotten it figured out. Works great, thanks!
 
Last edited:
It's just the form.

Code:
$form = $('form.AutoInlineUploader');

You might already have it in your code or there might be a better way but that's the basic gist.
 
Top Bottom