mirror of
https://github.com/9001/copyparty.git
synced 2025-08-19 09:52:21 -06:00
more
This commit is contained in:
parent
9e850fc3ab
commit
5ccca3fbd5
|
@ -170,6 +170,7 @@ class VFS(object):
|
||||||
files = [x for x in files if x[0] in flt]
|
files = [x for x in files if x[0] in flt]
|
||||||
rd = [x for x in rd if x[0] in flt]
|
rd = [x for x in rd if x[0] in flt]
|
||||||
vd = {x: y for x, y in vd.items() if x in flt}
|
vd = {x: y for x, y in vd.items() if x in flt}
|
||||||
|
flt = None
|
||||||
|
|
||||||
# print(repr([vpath, apath, [x[0] for x in files]]))
|
# print(repr([vpath, apath, [x[0] for x in files]]))
|
||||||
fnames = [n[0] for n in files]
|
fnames = [n[0] for n in files]
|
||||||
|
|
|
@ -417,7 +417,8 @@ class HttpCli(object):
|
||||||
raise Pebkac(422, "need files list")
|
raise Pebkac(422, "need files list")
|
||||||
|
|
||||||
items = items.replace("\r", "").split("\n")
|
items = items.replace("\r", "").split("\n")
|
||||||
items = [x for x in items if items]
|
items = [unquotep(x) for x in items if items]
|
||||||
|
|
||||||
return self.tx_zip(k, v, vn, rem, items, self.args.ed)
|
return self.tx_zip(k, v, vn, rem, items, self.args.ed)
|
||||||
|
|
||||||
def handle_post_json(self):
|
def handle_post_json(self):
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ var treectl = (function () {
|
||||||
|
|
||||||
filecols.set_style();
|
filecols.set_style();
|
||||||
mukey.render();
|
mukey.render();
|
||||||
arcfmt.render();
|
msel.render();
|
||||||
reload_tree();
|
reload_tree();
|
||||||
reload_browser();
|
reload_browser();
|
||||||
}
|
}
|
||||||
|
@ -1631,7 +1631,7 @@ var msel = (function () {
|
||||||
var names = [];
|
var names = [];
|
||||||
var links = document.querySelectorAll('#files tbody tr.sel td:nth-child(2) a');
|
var links = document.querySelectorAll('#files tbody tr.sel td:nth-child(2) a');
|
||||||
for (var a = 0, aa = links.length; a < aa; a++)
|
for (var a = 0, aa = links.length; a < aa; a++)
|
||||||
names.push(links[a].getAttribute('href'));
|
names.push(links[a].getAttribute('href').split('/').slice(-1));
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
@ -1645,18 +1645,18 @@ var msel = (function () {
|
||||||
tr.classList.toggle('sel');
|
tr.classList.toggle('sel');
|
||||||
selui();
|
selui();
|
||||||
}
|
}
|
||||||
var trs = document.querySelectorAll('#files tbody tr');
|
function evsel(e, fun) {
|
||||||
ebi('selall').onclick = function (e) {
|
|
||||||
ev(e);
|
ev(e);
|
||||||
|
var trs = document.querySelectorAll('#files tbody tr');
|
||||||
for (var a = 0, aa = trs.length; a < aa; a++)
|
for (var a = 0, aa = trs.length; a < aa; a++)
|
||||||
trs[a].classList.add('sel');
|
trs[a].classList[fun]('sel');
|
||||||
selui();
|
selui();
|
||||||
|
}
|
||||||
|
ebi('selall').onclick = function (e) {
|
||||||
|
evsel(e, "add");
|
||||||
};
|
};
|
||||||
ebi('selinv').onclick = function (e) {
|
ebi('selinv').onclick = function (e) {
|
||||||
ev(e);
|
evsel(e, "toggle");
|
||||||
for (var a = 0, aa = trs.length; a < aa; a++)
|
|
||||||
trs[a].classList.toggle('sel');
|
|
||||||
selui();
|
|
||||||
};
|
};
|
||||||
ebi('selzip').onclick = function (e) {
|
ebi('selzip').onclick = function (e) {
|
||||||
ev(e);
|
ev(e);
|
||||||
|
@ -1682,10 +1682,16 @@ var msel = (function () {
|
||||||
console.log(txt);
|
console.log(txt);
|
||||||
frm.submit();
|
frm.submit();
|
||||||
};
|
};
|
||||||
var tds = document.querySelectorAll('#files tbody td+td+td');
|
function render() {
|
||||||
for (var a = 0, aa = tds.length; a < aa; a++) {
|
var tds = document.querySelectorAll('#files tbody td+td+td');
|
||||||
tds[a].onclick = seltgl;
|
for (var a = 0, aa = tds.length; a < aa; a++) {
|
||||||
|
tds[a].onclick = seltgl;
|
||||||
|
}
|
||||||
|
arcfmt.render();
|
||||||
}
|
}
|
||||||
|
return {
|
||||||
|
"render": render
|
||||||
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1741,4 +1747,4 @@ function reload_browser(not_mp) {
|
||||||
}
|
}
|
||||||
reload_browser(true);
|
reload_browser(true);
|
||||||
mukey.render();
|
mukey.render();
|
||||||
arcfmt.render();
|
msel.render();
|
||||||
|
|
Loading…
Reference in a new issue