Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/js/commands
File: mkdir.js
/**
[0] Fix | Delete
* @class elFinder command "mkdir"
[1] Fix | Delete
* Create new folder
[2] Fix | Delete
*
[3] Fix | Delete
* @author Dmitry (dio) Levashov
[4] Fix | Delete
**/
[5] Fix | Delete
elFinder.prototype.commands.mkdir = function() {
[6] Fix | Delete
"use strict";
[7] Fix | Delete
var fm = this.fm,
[8] Fix | Delete
self = this,
[9] Fix | Delete
curOrg;
[10] Fix | Delete
[11] Fix | Delete
this.value = '';
[12] Fix | Delete
this.disableOnSearch = true;
[13] Fix | Delete
this.updateOnSelect = false;
[14] Fix | Delete
this.syncTitleOnChange = true;
[15] Fix | Delete
this.mime = 'directory';
[16] Fix | Delete
this.prefix = 'untitled folder';
[17] Fix | Delete
this.exec = function(select, cOpts) {
[18] Fix | Delete
var onCwd;
[19] Fix | Delete
[20] Fix | Delete
if (select && select.length && cOpts && cOpts._currentType && cOpts._currentType === 'navbar') {
[21] Fix | Delete
this.origin = cOpts._currentType;
[22] Fix | Delete
this.data = {
[23] Fix | Delete
target: select[0]
[24] Fix | Delete
};
[25] Fix | Delete
} else {
[26] Fix | Delete
onCwd = fm.cwd().hash === select[0];
[27] Fix | Delete
this.origin = curOrg && !onCwd? curOrg : 'cwd';
[28] Fix | Delete
delete this.data;
[29] Fix | Delete
}
[30] Fix | Delete
if (! select && ! this.options.intoNewFolderToolbtn) {
[31] Fix | Delete
fm.getUI('cwd').trigger('unselectall');
[32] Fix | Delete
}
[33] Fix | Delete
//this.move = (!onCwd && curOrg !== 'navbar' && fm.selected().length)? true : false;
[34] Fix | Delete
this.move = this.value === fm.i18n('cmdmkdirin');
[35] Fix | Delete
return jQuery.proxy(fm.res('mixin', 'make'), self)();
[36] Fix | Delete
};
[37] Fix | Delete
[38] Fix | Delete
this.shortcuts = [{
[39] Fix | Delete
pattern : 'ctrl+shift+n'
[40] Fix | Delete
}];
[41] Fix | Delete
[42] Fix | Delete
this.init = function() {
[43] Fix | Delete
if (this.options.intoNewFolderToolbtn) {
[44] Fix | Delete
this.syncTitleOnChange = true;
[45] Fix | Delete
}
[46] Fix | Delete
};
[47] Fix | Delete
[48] Fix | Delete
fm.bind('select contextmenucreate closecontextmenu', function(e) {
[49] Fix | Delete
var sel = (e.data? (e.data.selected || e.data.targets) : null) || fm.selected();
[50] Fix | Delete
[51] Fix | Delete
self.className = 'mkdir';
[52] Fix | Delete
curOrg = e.data && sel.length? (e.data.origin || e.data.type || '') : '';
[53] Fix | Delete
if (!self.options.intoNewFolderToolbtn && curOrg === '') {
[54] Fix | Delete
curOrg = 'cwd';
[55] Fix | Delete
}
[56] Fix | Delete
if (sel.length && curOrg !== 'navbar' && curOrg !== 'cwd' && fm.cwd().hash !== sel[0]) {
[57] Fix | Delete
self.title = fm.i18n('cmdmkdirin');
[58] Fix | Delete
self.className += ' elfinder-button-icon-mkdirin';
[59] Fix | Delete
} else {
[60] Fix | Delete
self.title = fm.i18n('cmdmkdir');
[61] Fix | Delete
}
[62] Fix | Delete
if (e.type !== 'closecontextmenu') {
[63] Fix | Delete
self.update(void(0), self.title);
[64] Fix | Delete
} else {
[65] Fix | Delete
requestAnimationFrame(function() {
[66] Fix | Delete
self.update(void(0), self.title);
[67] Fix | Delete
});
[68] Fix | Delete
}
[69] Fix | Delete
});
[70] Fix | Delete
[71] Fix | Delete
this.getstate = function(select) {
[72] Fix | Delete
var cwd = fm.cwd(),
[73] Fix | Delete
sel = (curOrg === 'navbar' || (select && select[0] !== cwd.hash))? this.files(select || fm.selected()) : [],
[74] Fix | Delete
cnt = sel.length,
[75] Fix | Delete
filter = function(files) {
[76] Fix | Delete
var fres = true;
[77] Fix | Delete
return jQuery.grep(files, function(f) {
[78] Fix | Delete
fres = fres && f.read && ! f.locked? true : false;
[79] Fix | Delete
return fres;
[80] Fix | Delete
});
[81] Fix | Delete
};
[82] Fix | Delete
[83] Fix | Delete
if (curOrg === 'navbar') {
[84] Fix | Delete
return cnt && sel[0].write && sel[0].read? 0 : -1;
[85] Fix | Delete
} else {
[86] Fix | Delete
return cwd.write && (!cnt || filter(sel).length == cnt)? 0 : -1;
[87] Fix | Delete
}
[88] Fix | Delete
};
[89] Fix | Delete
[90] Fix | Delete
};
[91] Fix | Delete
[92] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function