| Server IP : 5.144.175.180 / Your IP : 216.73.216.191 Web Server : Apache/2.4.63 (Unix) OpenSSL/1.1.1 System : Linux vpsgpz1.itsimplycom.it 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 User : edilchimica ( ) PHP Version : 7.4.33 Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/edilchimica/webapps/edilchimica/wp-content/plugins/wp-file-manager/lib/js/ui/ |
Upload File : |
/**
* @class elFinder toast
*
* This was created inspired by the toastr. Thanks to developers of toastr.
* CodeSeven/toastr: http://johnpapa.net <https://github.com/CodeSeven/toastr>
*
* @author Naoki Sawada
**/
jQuery.fn.elfindertoast = function(opts, fm) {
"use strict";
var defOpts = Object.assign({
mode: 'success', // or 'info', 'warning' and 'error'
msg: '',
showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
showDuration: 300,
showEasing: 'swing', //swing and linear are built into jQuery
onShown: undefined,
hideMethod: 'fadeOut',
hideDuration: 1500,
hideEasing: 'swing',
onHidden: undefined,
timeOut: 3000,
extNode: undefined,
button: undefined,
width: undefined
}, jQuery.isPlainObject(fm.options.uiOptions.toast.defaults)? fm.options.uiOptions.toast.defaults : {});
return this.each(function() {
opts = Object.assign({}, defOpts, opts || {});
var self = jQuery(this),
show = function(notm) {
self.stop();
fm.toFront(self);
self[opts.showMethod]({
duration: opts.showDuration,
easing: opts.showEasing,
complete: function() {
opts.onShown && opts.onShown();
if (!notm && opts.timeOut) {
rmTm = setTimeout(rm, opts.timeOut);
}
}
});
},
rm = function() {
self[opts.hideMethod]({
duration: opts.hideDuration,
easing: opts.hideEasing,
complete: function() {
opts.onHidden && opts.onHidden();
self.remove();
}
});
},
rmTm;
self.on('click', function(e) {
e.stopPropagation();
e.preventDefault();
rmTm && clearTimeout(rmTm);
opts.onHidden && opts.onHidden();
self.stop().remove();
}).on('mouseenter mouseleave', function(e) {
if (opts.timeOut) {
rmTm && clearTimeout(rmTm);
rmTm = null;
if (e.type === 'mouseenter') {
show(true);
} else {
rmTm = setTimeout(rm, opts.timeOut);
}
}
}).hide().addClass('toast-' + opts.mode).append(jQuery('<div class="elfinder-toast-msg"></div>').html(opts.msg.replace(/%([a-zA-Z0-9]+)%/g, function(m, m1) {
return fm.i18n(m1);
})));
if (opts.extNode) {
self.append(opts.extNode);
}
if (opts.button) {
self.append(
jQuery('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"></button>')
.append(jQuery('<span class="ui-button-text"></span>').text(fm.i18n(opts.button.text)))
.on('mouseenter mouseleave', function(e) {
jQuery(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
})
.on('click', opts.button.click || function(){})
);
}
if (opts.width) {
self.css('max-width', opts.width);
}
show();
});
};