| 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 "view"
* Change current directory view (icons/list)
*
* @author Dmitry (dio) Levashov
**/
elFinder.prototype.commands.view = function() {
"use strict";
var self = this,
fm = this.fm,
subMenuRaw;
this.value = fm.viewType;
this.alwaysEnabled = true;
this.updateOnSelect = false;
this.options = { ui : 'viewbutton'};
this.getstate = function() {
return 0;
};
this.extra = {
icon: 'menu',
node: jQuery('<span></span>')
.attr({title: fm.i18n('viewtype')})
.on('click touchstart', function(e){
if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
return;
}
var node = jQuery(this);
e.stopPropagation();
e.preventDefault();
fm.trigger('contextmenu', {
raw: getSubMenuRaw(),
x: node.offset().left,
y: node.offset().top
});
})
};
this.exec = function() {
var self = this,
value = this.value == 'list' ? 'icons' : 'list';
fm.storage('view', value);
return fm.lazy(function() {
fm.viewchange();
self.update(void(0), value);
this.resolve();
});
};
fm.bind('init', function() {
subMenuRaw = (function() {
var cwd = fm.getUI('cwd'),
raws = [],
sizeNames = fm.options.uiOptions.cwd.iconsView.sizeNames,
max = fm.options.uiOptions.cwd.iconsView.sizeMax,
i, size;
for (i = 0; i <= max; i++) {
raws.push(
{
label : fm.i18n(sizeNames[i] || ('Size-' + i + ' icons')),
icon : 'view',
callback : (function(s) {
return function() {
cwd.trigger('iconpref', {size: s});
fm.storage('iconsize', s);
if (self.value === 'list') {
self.exec();
}
};
})(i)
}
);
}
raws.push('|');
raws.push(
{
label : fm.i18n('viewlist'),
icon : 'view-list',
callback : function() {
if (self.value !== 'list') {
self.exec();
}
}
}
);
return raws;
})();
}).bind('contextmenucreate', function() {
self.extra = {
icon: 'menu',
node: jQuery('<span></span>')
.attr({title: fm.i18n('cmdview')})
.on('click touchstart', function(e){
if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
return;
}
var node = jQuery(this),
raw = subMenuRaw.concat(),
idx, i;
if (self.value === 'list') {
idx = subMenuRaw.length - 1;
} else {
idx = parseInt(fm.storage('iconsize') || 0);
}
for (i = 0; i < subMenuRaw.length; i++) {
if (subMenuRaw[i] !== '|') {
subMenuRaw[i].options = (i === idx? {'className': 'ui-state-active'} : void(0))
;
}
}
e.stopPropagation();
e.preventDefault();
fm.trigger('contextmenu', {
raw: subMenuRaw,
x: node.offset().left,
y: node.offset().top
});
})
};
});
};