Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxied invocation of overridable functions through call to apply this context #42

Merged
merged 2 commits into from
Oct 23, 2014

Conversation

abrom
Copy link
Contributor

@abrom abrom commented Oct 23, 2014

Allows overridden custom upload/error functions to access the inlineattach object for calling back on the onErrorUploading/onUploadedFile functions.

i.e.

$('.inlineattach').inlineattach({
  customUploadHandler: function(file) {
        var that = this;
        MyCustomUploader(function(error, data) {
            if (error) {
                that.onErrorUploading();
            } else {
                that.onUploadedFile(data);
            }   
        });
  }});

Rovak added a commit that referenced this pull request Oct 23, 2014
Proxied invocation of overridable functions through call to apply `this` context
@Rovak Rovak merged commit 49262cf into Rovak:master Oct 23, 2014
@Rovak
Copy link
Owner

Rovak commented Oct 23, 2014

Thanks @abrom for this improvement! I will add these changes to the upcoming version 2 aswell.

@abrom
Copy link
Contributor Author

abrom commented Oct 23, 2014

No problems @Rovak ! Great plugin you've written 👍

@Rovak Rovak mentioned this pull request Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants