mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved file search.
This commit is contained in:
parent
a3d712d207
commit
562000f120
7 changed files with 1277 additions and 1256 deletions
|
@ -8158,25 +8158,21 @@
|
|||
|
||||
function p13findfile() {
|
||||
if (xxdialogMode) return;
|
||||
var x = addHtmlValue("Filter", '<input id=d2findFilter style="width:230px" onkeyup=p13findfileValidate() placeholder="*.txt"></input>');
|
||||
var x = addHtmlValue("Filter", '<input id=d2findFilter style="width:230px" onkeyup=p13findfileValidate() onkeydown=p13findfileDown(event) placeholder="*.txt"></input>');
|
||||
x += '<div id=d2findResults style="width:100%;height:184px;background-color:white;border:1px solid black;padding:3px;overflow:scroll;margin-top:8px"></div>';
|
||||
x += '<div style=margin-top:8px><input id=filefind_dlgCancelButton type=button value=' + "Cancel" + ' style=float:right;width:80px;margin-left:5px onclick=p13findfileCancel()>';
|
||||
x += '<input id=filefind_dlgOkButton type=submit value=' + "OK" + ' style=float:right;width:80px onclick=p13findfileEx()><br /><br /></div>';
|
||||
setDialogMode(2, "File Files", 0, null, x);
|
||||
Q('d2findResults').focus();
|
||||
x += '<div style=margin-top:8px><input id=filefind_dlgCancelButton type=button value=' + "Close" + ' style=float:right;width:80px;margin-left:5px onclick=p13findfileCancel()>';
|
||||
x += '<input id=filefind_dlgOkButton type=submit value=' + "Search" + ' style=float:right;width:80px onclick=p13findfileEx()><br /><br /></div>';
|
||||
setDialogMode(2, "Find Files", 0, null, x);
|
||||
p13findfileValidate();
|
||||
Q('d2findFilter').focus();
|
||||
}
|
||||
|
||||
function p13findfileValidate() {
|
||||
QE('filefind_dlgOkButton', Q('d2findFilter').value.length > 0);
|
||||
}
|
||||
|
||||
function p13findfileCancel() {
|
||||
if (xxdialogTag != null) { files.sendText({ action: 'cancelfindfile', reqid: xxdialogTag }); }
|
||||
dialogclose(0)
|
||||
}
|
||||
function p13findfileDown(e) { if (e.code == "Enter") { p13findfileEx(); } }
|
||||
function p13findfileValidate() { QE('filefind_dlgOkButton', Q('d2findFilter').value.length > 0); }
|
||||
function p13findfileCancel() { if (xxdialogTag != null) { files.sendText({ action: 'cancelfindfile', reqid: xxdialogTag }); } dialogclose(0) }
|
||||
|
||||
function p13findfileEx(b, t) {
|
||||
if (Q('d2findFilter').value.length == 0) return;
|
||||
var winagent = ((currentNode.agent.id > 0) && (currentNode.agent.id < 5));
|
||||
var slash = winagent ? '\\' : '/';
|
||||
var path = p13filetreelocation.join(slash) + slash;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue