문제

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.

도움이 되었습니까?

해결책

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;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top