Question

I am working on making my own command (view commands) for elFinder, and it works pretty good.

The only thing that I have a problem with is when I do my custom ajax call to the connector, the error doesn't popup. It is valid JSON error output.

I was thinking if it somehow was possible to fire the error dialog myself from the command file?

I'm trying to do this from inside the this.exec = function(data) { ... } function in my command.

Was it helpful?

Solution

Your error call should be like this within that function. this.fm.error() or fm.error() in this case is used to fire the error dialog.

this.exec = function(data) {
    var fm = this.fm,
    dfrd  = $.Deferred()
        .fail(function(error) {
            fm.error(error);
        })
    return dfrd;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top