Grid create file/folder r click menu

This commit is contained in:
Gabe Guarana 2026-01-22 13:29:52 -07:00
parent dc8c229bcd
commit 86b9b1fbf6

View file

@ -9514,11 +9514,25 @@ var rcm = (function () {
var selFile = jcp(nsFile); var selFile = jcp(nsFile);
function mktemp(is_dir) { function mktemp(is_dir) {
if(!thegrid.en) {
var row = mknod('tr', 'temp', var row = mknod('tr', 'temp',
'<td>-new-</td>' + '<td>-new-</td>' +
'<td colspan="' + (QSA("#files thead th").length - 1) + '"><input id="tempname" class="i" type="text" placeholder="' + (is_dir ? 'Folder' : "File") + ' Name"></td>' '<td colspan="' + (QSA("#files thead th").length - 1) + '"><input id="tempname" class="i" type="text" placeholder="' + (is_dir ? 'Folder' : "File") + ' Name"></td>'
); );
QS("#files tbody").appendChild(row); QS("#files tbody").appendChild(row);
}
else{
var row = mknod('a', 'temp',
'<span class="dir" style="align-self: end;"><input id="tempname" class="dir" type="text" placeholder="' + (is_dir ? 'Folder' : "File") + ' Name"></span>'
);
// TODO: using some inline theming here. not good?
if(is_dir) {
row.className = 'dir'; // add folder icon
}
row.style = "display: flex;"; // lets us align text entry box to the bottom
QS("#ggrid").appendChild(row);
}
function sendit(name) { function sendit(name) {
name = ('' + name).trim(); name = ('' + name).trim();