mirror of
https://github.com/9001/copyparty.git
synced 2026-02-26 21:43:08 -07:00
Update browser.js
Signed-off-by: ed <s@ocv.me>
This commit is contained in:
parent
153239a99e
commit
d0652264f7
|
|
@ -5570,7 +5570,6 @@ var thegrid = (function () {
|
|||
var ths = QSA('#ggrid>a');
|
||||
|
||||
for (var a = 0, aa = ths.length; a < aa; a++) {
|
||||
if(ths[a].id == 'temp') continue;
|
||||
var tr = ebi(ths[a].getAttribute('ref')).closest('tr'),
|
||||
cl = tr.className || '';
|
||||
|
||||
|
|
@ -9515,26 +9514,21 @@ var rcm = (function () {
|
|||
var selFile = jcp(nsFile);
|
||||
|
||||
function mktemp(is_dir) {
|
||||
if(!thegrid.en) {
|
||||
var row = mknod('tr', 'temp',
|
||||
'<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>'
|
||||
);
|
||||
qsr('#rcm_tmp');
|
||||
if (!thegrid.en) {
|
||||
var row = mknod('tr', 'rcm_tmp',
|
||||
'<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>');
|
||||
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
|
||||
else {
|
||||
var row = mknod('a', 'rcm_tmp',
|
||||
'<span class="dir" style="align-self:end"><input id="tempname" class="dir" type="text" placeholder="' + (is_dir ? 'Folder' : 'File') + ' Name"></span>');
|
||||
if (is_dir)
|
||||
row.className = 'dir';
|
||||
row.style.display = 'flex';
|
||||
QS("#ggrid").appendChild(row);
|
||||
}
|
||||
|
||||
|
||||
function sendit(name) {
|
||||
name = ('' + name).trim();
|
||||
if (!name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue