??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/renovaid.co.uk/wp-content/plugins/wp-file-manager/lib/js/commands/search.js
⬅ Kembali
/**
* @class elFinder command "search"
* Find files
*
* @author Dmitry (dio) Levashov
**/
elFinder.prototype.commands.search = function() {
"use strict";
this.title = 'Find files';
this.options = {ui : 'searchbutton'};
this.alwaysEnabled = true;
this.updateOnSelect = false;
/**
* Return command status.
* Search does not support old api.
*
* @return Number
**/
this.getstate = function() {
return 0;
};
/**
* Send search request to backend.
*
* @param String search string
* @return jQuery.Deferred
**/
this.exec = function(q, target, mime, type) {
var fm = this.fm,
reqDef = [],
sType = type || '',
onlyMimes = fm.options.onlyMimes,
phash, targetVolids = [],
setType = function(data) {
if (sType && sType !== 'SearchName' && sType !== 'SearchMime') {
data.type = sType;
}
return data;
},
rootCnt;
if (typeof q == 'string' && q) {
if (typeof target == 'object') {
mime = target.mime || '';
target = target.target || '';
}
target = target? target : '';
if (mime) {
mime = jQuery.trim(mime).replace(',', ' ').split(' ');
if (onlyMimes.length) {
mime = jQuery.map(mime, function(m){
m = jQuery.trim(m);
return m && (jQuery.inArray(m, onlyMimes) !== -1
|| jQuery.grep(onlyMimes, function(om) { return m.indexOf(om) === 0? true : false; }).length
)? m : null;
});
}
} else {
mime = [].concat(onlyMimes);
}
fm.trigger('searchstart', setType({query : q, target : target, mimes : mime}));
if (! onlyMimes.length || mime.length) {
if (target === '' && fm.api >= 2.1) {
rootCnt = Object.keys(fm.roots).length;
jQuery.each(fm.roots, function(id, hash) {
reqDef.push(fm.request({
data : setType({cmd : 'search', q : q, target : hash, mimes : mime}),
notify : {type : 'search', cnt : 1, hideCnt : (rootCnt > 1? false : true)},
cancel : true,
preventDone : true
}));
});
} else {
reqDef.push(fm.request({
data : setType({cmd : 'search', q : q, target : target, mimes : mime}),
notify : {type : 'search', cnt : 1, hideCnt : true},
cancel : true,
preventDone : true
}));
if (target !== '' && fm.api >= 2.1 && Object.keys(fm.leafRoots).length) {
jQuery.each(fm.leafRoots, function(hash, roots) {
phash = hash;
while(phash) {
if (target === phash) {
jQuery.each(roots, function() {
var f = fm.file(this);
f && f.volumeid && targetVolids.push(f.volumeid);
reqDef.push(fm.request({
data : setType({cmd : 'search', q : q, target : this, mimes : mime}),
notify : {type : 'search', cnt : 1, hideCnt : false},
cancel : true,
preventDone : true
}));
});
}
phash = (fm.file(phash) || {}).phash;
}
});
}
}
} else {
reqDef = [jQuery.Deferred().resolve({files: []})];
}
fm.searchStatus.mixed = (reqDef.length > 1)? targetVolids : false;
return jQuery.when.apply($, reqDef).done(function(data) {
var argLen = arguments.length,
i;
data.warning && fm.error(data.warning);
if (argLen > 1) {
data.files = (data.files || []);
for(i = 1; i < argLen; i++) {
arguments[i].warning && fm.error(arguments[i].warning);
if (arguments[i].files) {
data.files.push.apply(data.files, arguments[i].files);
}
}
}
// because "preventDone : true" so update files cache
data.files && data.files.length && fm.cache(data.files);
fm.lazy(function() {
fm.trigger('search', data);
}).then(function() {
// fire event with command name + 'done'
return fm.lazy(function() {
fm.trigger('searchdone');
});
}).then(function() {
// force update content
data.sync && fm.sync();
});
});
}
fm.getUI('toolbar').find('.'+fm.res('class', 'searchbtn')+' :text').trigger('focus');
return jQuery.Deferred().reject();
};
};
Nama
Tipe
Ukuran
Diubah
Aksi
📜 archive.js
js
2.5 KB
2026-05-30 19:15
📜 back.js
js
512 B
2026-05-30 19:15
📜 chmod.js
js
9.4 KB
2026-05-30 19:15
📜 colwidth.js
js
480 B
2026-05-30 19:15
📜 copy.js
js
986 B
2026-05-30 19:15
📜 cut.js
js
1.1 KB
2026-05-30 19:15
📜 download.js
js
16.6 KB
2026-05-30 19:15
📜 duplicate.js
js
1.4 KB
2026-05-30 19:15
📜 edit.js
js
34.5 KB
2026-05-30 19:15
📜 empty.js
js
3.3 KB
2026-05-30 19:15
📜 extract.js
js
5.2 KB
2026-05-30 19:15
📜 forward.js
js
509 B
2026-05-30 19:15
📜 fullscreen.js
js
1 KB
2026-05-30 19:15
📜 getfile.js
js
4.1 KB
2026-05-30 19:15
📜 help.js
js
14.2 KB
2026-05-30 19:15
📜 hidden.js
js
276 B
2026-05-30 19:15
📜 hide.js
js
4.3 KB
2026-05-30 19:15
📜 home.js
js
528 B
2026-05-30 19:15
📜 info.js
js
13.1 KB
2026-05-30 19:15
📜 mkdir.js
js
2.5 KB
2026-05-30 19:15
📜 mkfile.js
js
1.6 KB
2026-05-30 19:15
📜 netmount.js
js
10.4 KB
2026-05-30 19:15
📜 open.js
js
6.8 KB
2026-05-30 19:15
📜 opendir.js
js
886 B
2026-05-30 19:15
📜 opennew.js
js
1.2 KB
2026-05-30 19:15
📜 paste.js
js
10.2 KB
2026-05-30 19:15
📜 places.js
js
773 B
2026-05-30 19:15
📜 preference.js
js
21.4 KB
2026-05-30 19:15
📜 quicklook.js
js
23.9 KB
2026-05-30 19:15
📜 quicklook.plugins.js
js
58.5 KB
2026-05-30 19:15
📜 reload.js
js
1.9 KB
2026-05-30 19:15
📜 rename.js
js
15.9 KB
2026-05-30 19:15
📜 resize.js
js
52.2 KB
2026-05-30 19:15
📜 restore.js
js
7.4 KB
2026-05-30 19:15
📜 rm.js
js
14.4 KB
2026-05-30 19:15
📜 search.js
js
4 KB
2026-05-30 19:15
📜 selectall.js
js
606 B
2026-05-30 19:15
📜 selectinvert.js
js
471 B
2026-05-30 19:15
📜 selectnone.js
js
530 B
2026-05-30 19:15
📜 sort.js
js
4.3 KB
2026-05-30 19:15
📜 undo.js
js
3.6 KB
2026-05-30 19:15
📜 up.js
js
710 B
2026-05-30 19:15
📜 upload.js
js
12.4 KB
2026-05-30 19:15
📜 view.js
js
2.8 KB
2026-05-30 19:15