PATH:
home
/
sarkas88.com
/
public_html
/
wp-content
/
plugins
/
wp-file-manager
/
lib
/
js
/
commands
/** * @class elFinder command "duplicate" * Create file/folder copy with suffix "copy Number" * * @type elFinder.command * @author Dmitry (dio) Levashov */ elFinder.prototype.commands.duplicate = function() { "use strict"; var fm = this.fm; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, filter = function(files) { var fres = true; return jQuery.grep(files, function(f) { fres = fres && f.read && f.phash === fm.cwd().hash && ! fm.isRoot(f)? true : false; return fres; }); }; return cnt && fm.cwd().write && filter(sel).length == cnt ? 0 : -1; }; this.exec = function(hashes) { var fm = this.fm, files = this.files(hashes), cnt = files.length, dfrd = jQuery.Deferred() .fail(function(error) { error && fm.error(error); }), args = []; if (! cnt) { return dfrd.reject(); } jQuery.each(files, function(i, file) { if (!file.read || !fm.file(file.phash).write) { return !dfrd.reject(['errCopy', file.name, 'errPerm']); } }); if (dfrd.state() == 'rejected') { return dfrd; } return fm.request({ data : {cmd : 'duplicate', targets : this.hashes(hashes)}, notify : {type : 'copy', cnt : cnt}, navigate : { toast : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmdduplicate')])} } } }); }; };
[-] download.js
[open]
[-] quicklook.plugins.js
[open]
[-] restore.js
[open]
[-] open.js
[open]
[-] archive.js
[open]
[-] home.js
[open]
[-] duplicate.js
[open]
[-] resize.js
[open]
[-] copy.js
[open]
[-] rename.js
[open]
[-] quicklook.js
[open]
[-] places.js
[open]
[-] colwidth.js
[open]
[-] selectall.js
[open]
[-] selectnone.js
[open]
[-] sort.js
[open]
[-] reload.js
[open]
[-] help.js
[open]
[-] chmod.js
[open]
[-] selectinvert.js
[open]
[-] hidden.js
[open]
[-] empty.js
[open]
[-] mkdir.js
[open]
[-] opendir.js
[open]
[-] opennew.js
[open]
[-] upload.js
[open]
[-] view.js
[open]
[-] fullscreen.js
[open]
[-] getfile.js
[open]
[-] extract.js
[open]
[-] back.js
[open]
[-] mkfile.js
[open]
[-] cut.js
[open]
[-] preference.js
[open]
[-] up.js
[open]
[-] hide.js
[open]
[-] rm.js
[open]
[-] forward.js
[open]
[+]
..
[-] search.js
[open]
[-] netmount.js
[open]
[-] edit.js
[open]
[-] undo.js
[open]
[-] paste.js
[open]
[-] info.js
[open]