| 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/commands/ |
Upload File : |
/**
* @class elFinder command "opennew"
* Open folder in new window
*
* @author Naoki Sawada
**/
elFinder.prototype.commands.opennew = function() {
"use strict";
var fm = this.fm;
this.shortcuts = [{
pattern : (typeof(fm.options.getFileCallback) === 'function'? 'shift+' : '') + 'ctrl+enter'
}];
this.getstate = function(select) {
var sel = this.files(select),
cnt = sel.length;
return cnt === 1
? (sel[0].mime === 'directory' && sel[0].read? 0 : -1)
: -1;
};
this.exec = function(hashes) {
var dfrd = jQuery.Deferred(),
files = this.files(hashes),
cnt = files.length,
opts = this.options,
file, loc, url, win;
// open folder to new tab (window)
if (cnt === 1 && (file = files[0]) && file.mime === 'directory') {
loc = window.location;
if (opts.url) {
url = opts.url;
} else {
url = loc.pathname;
}
if (opts.useOriginQuery) {
if (!url.match(/\?/)) {
url += loc.search;
} else if (loc.search) {
url += '&' + loc.search.substr(1);
}
}
url += '#elf_' + file.hash;
win = window.open(url, '_blank');
setTimeout(function() {
win.focus();
}, 1000);
return dfrd.resolve();
} else {
return dfrd.reject();
}
};
};