-
elFinder.prototype.commands.accesses = function(){
this.alwaysEnabled = true;
this.updateOnSelect = false;
this.getstate = function(){
return 0;
};
this.exec = function(){
!dialog && build();
dialog.elfinderdialog('open');
return $.Deferred().resolve();
};
var self = this,
fm = this.fm,
dialog,
aopt = {
dataType: 'json',
cache: false,
success: function(data){},
error: function(){}
},
build = function(){
var form, btn = {};
btn[fm.i18n('btnSave')] = function(){
};
btn[fm.i18n('btnCancel')] = function(){
dialog.elfinderdialog('close');
};
dialog = fm.dialog(form, {
title: fm.i18n('cmdaccesses'),
buttons: btn,
allowMinimize: true,
destroyOnClose: false,
open: function(){
$.ajax('&ajax', aopt);
}
});
};
};
elFinder.prototype.i18.en.messages.cmdaccesses = a_ac_i18n;
elFinder.prototype._options.commands.push('accesses');
elFinder.prototype._options.uiOptions.toolbar.push(['accesses']); I want to get a dialog with the text fm.i18n ('errDataNotJSON') when an error occurred on the ajax request. (standard elfinder dialog) |
Beta Was this translation helpful? Give feedback.
Answered by
nao-pon
Jul 9, 2021
Replies: 1 comment
-
Hi @johnfort , The error dialog can be displayed with the following syntax. fm.error(fm.i18n('errDataNotJSON')); Or fm.error([fm.i18n('errDataNotJSON'), 'more', 'text']); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
johnfort
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @johnfort ,
The error dialog can be displayed with the following syntax.
Or