X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/wp-file-manager/lib/js/commands
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
wp-file-manager
/
lib
/
js
/
commands
/
ðŸ“
..
📄
archive.js
(2.47 KB)
📄
back.js
(512 B)
📄
chmod.js
(9.37 KB)
📄
colwidth.js
(480 B)
📄
copy.js
(986 B)
📄
cut.js
(1.12 KB)
📄
download.js
(16.61 KB)
📄
duplicate.js
(1.36 KB)
📄
edit.js
(34.48 KB)
📄
empty.js
(3.32 KB)
📄
extract.js
(5.18 KB)
📄
forward.js
(509 B)
📄
fullscreen.js
(1.05 KB)
📄
getfile.js
(4.07 KB)
📄
help.js
(14.21 KB)
📄
hidden.js
(276 B)
📄
hide.js
(4.26 KB)
📄
home.js
(528 B)
📄
info.js
(13.13 KB)
📄
mkdir.js
(2.51 KB)
📄
mkfile.js
(1.64 KB)
📄
netmount.js
(10.43 KB)
📄
open.js
(6.78 KB)
📄
opendir.js
(886 B)
📄
opennew.js
(1.21 KB)
📄
paste.js
(10.17 KB)
📄
places.js
(773 B)
📄
preference.js
(21.37 KB)
📄
quicklook.js
(23.87 KB)
📄
quicklook.plugins.js
(58.51 KB)
📄
reload.js
(1.86 KB)
📄
rename.js
(15.92 KB)
📄
resize.js
(52.17 KB)
📄
restore.js
(7.45 KB)
📄
rm.js
(14.42 KB)
📄
search.js
(4.01 KB)
📄
selectall.js
(606 B)
📄
selectinvert.js
(471 B)
📄
selectnone.js
(530 B)
📄
sort.js
(4.32 KB)
📄
undo.js
(3.62 KB)
📄
up.js
(710 B)
📄
upload.js
(12.4 KB)
📄
view.js
(2.8 KB)
Editing: sort.js
/** * @class elFinder command "sort" * Change sort files rule * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.sort = function() { "use strict"; var self = this, fm = self.fm, setVar = function() { self.variants = []; jQuery.each(fm.sortRules, function(name, value) { if (fm.sorters[name]) { var arr = (name === fm.sortType)? (fm.sortOrder === 'asc'? 'n' : 's') : ''; self.variants.push([name, (arr? '<span class="ui-icon ui-icon-arrowthick-1-'+arr+'"></span>' : '') + ' ' + fm.i18n('sort'+name)]); } }); self.variants.push('|'); self.variants.push([ 'stick', (fm.sortStickFolders? '<span class="ui-icon ui-icon-check"></span>' : '') + ' ' + fm.i18n('sortFoldersFirst') ]); if (fm.ui.tree && fm.options.sortAlsoTreeview !== null) { self.variants.push('|'); self.variants.push([ 'tree', (fm.sortAlsoTreeview? '<span class="ui-icon ui-icon-check"></span>' : '') + ' ' + fm.i18n('sortAlsoTreeview') ]); } updateContextmenu(); }, updateContextmenu = function() { var cm = fm.getUI('contextmenu'), icon, sub; if (cm.is(':visible')) { icon = cm.find('span.elfinder-button-icon-sort'); sub = icon.siblings('div.elfinder-contextmenu-sub'); sub.find('span.ui-icon').remove(); sub.children('div.elfinder-contextsubmenu-item').each(function() { var tgt = jQuery(this).children('span'), name = tgt.text().trim(), arr; if (name === (i18Name.stick || (i18Name.stick = fm.i18n('sortFoldersFirst')))) { if (fm.sortStickFolders) { tgt.prepend('<span class="ui-icon ui-icon-check"></span>'); } } else if (name === (i18Name.tree || (i18Name.tree = fm.i18n('sortAlsoTreeview')))) { if (fm.sortAlsoTreeview) { tgt.prepend('<span class="ui-icon ui-icon-check"></span>'); } } else if (name === (i18Name[fm.sortType] || (i18Name[fm.sortType] = fm.i18n('sort' + fm.sortType)))) { arr = fm.sortOrder === 'asc'? 'n' : 's'; tgt.prepend('<span class="ui-icon ui-icon-arrowthick-1-'+arr+'"></span>'); } }); } }, i18Name = {}; /** * Command options * * @type Object */ this.options = {ui : 'sortbutton'}; this.keepContextmenu = true; fm.bind('sortchange', setVar) .bind('sorterupdate', function() { setVar(); fm.getUI().children('.elfinder-button-sort-menu').children('.elfinder-button-menu-item').each(function() { var tgt = jQuery(this), rel = tgt.attr('rel'); tgt.toggle(!!(! rel || fm.sorters[rel])); }); }) .bind('cwdrender', function() { var cols = jQuery(fm.cwd).find('div.elfinder-cwd-wrapper-list table'); if (cols.length) { jQuery.each(fm.sortRules, function(name, value) { var td = cols.find('thead tr td.elfinder-cwd-view-th-'+name); if (td.length) { var current = ( name == fm.sortType), sort = { type : name, order : current ? fm.sortOrder == 'asc' ? 'desc' : 'asc' : fm.sortOrder },arr; if (current) { td.addClass('ui-state-active'); arr = fm.sortOrder == 'asc' ? 'n' : 's'; jQuery('<span class="ui-icon ui-icon-triangle-1-'+arr+'"></span>').appendTo(td); } jQuery(td).on('click', function(e){ if (! jQuery(this).data('dragging')) { e.stopPropagation(); if (! fm.getUI('cwd').data('longtap')) { fm.exec('sort', [], sort); } } }) .on('mouseenter mouseleave', function(e) { jQuery(this).toggleClass('ui-state-hover', e.type === 'mouseenter'); }); } }); } }); this.getstate = function() { return 0; }; this.exec = function(hashes, cOpt) { var fm = this.fm, sortopt = jQuery.isPlainObject(cOpt)? cOpt : (function() { cOpt += ''; var sOpts = {}; if (cOpt === 'stick') { sOpts.stick = !fm.sortStickFolders; } else if (cOpt === 'tree') { sOpts.tree = !fm.sortAlsoTreeview; } else if (fm.sorters[cOpt]) { if (fm.sortType === cOpt) { sOpts.order = fm.sortOrder === 'asc'? 'desc' : 'asc'; } else { sOpts.type = cOpt; } } return sOpts; })(), sort = Object.assign({ type : fm.sortType, order : fm.sortOrder, stick : fm.sortStickFolders, tree : fm.sortAlsoTreeview }, sortopt); return fm.lazy(function() { fm.setSort(sort.type, sort.order, sort.stick, sort.tree); this.resolve(); }); }; };
Upload File
Create Folder