mirror of
https://github.com/9001/copyparty.git
synced 2025-08-19 01:42:20 -06:00
add a11y jumpers
This commit is contained in:
parent
1111baacb2
commit
f024583011
|
@ -379,6 +379,19 @@ html, body {
|
||||||
pre, code, tt, #doc, #doc>code {
|
pre, code, tt, #doc, #doc>code {
|
||||||
font-family: 'scp', monospace, monospace;
|
font-family: 'scp', monospace, monospace;
|
||||||
}
|
}
|
||||||
|
.ayjump {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 80386;
|
||||||
|
top: .5em;
|
||||||
|
left: .5em;
|
||||||
|
padding: .5em .7em;
|
||||||
|
background: var(--bg);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.ayjump:focus {
|
||||||
|
opacity: 1;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
#path,
|
#path,
|
||||||
#path * {
|
#path * {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
|
|
@ -43,6 +43,9 @@ var Ls = {
|
||||||
"ab_mkdoc": "new markdown doc",
|
"ab_mkdoc": "new markdown doc",
|
||||||
"ab_msg": "send msg to srv log",
|
"ab_msg": "send msg to srv log",
|
||||||
|
|
||||||
|
"ay_path": "jump to folders",
|
||||||
|
"ay_files": "jump to files",
|
||||||
|
|
||||||
"wt_ren": "rename selected items$NHotkey: F2",
|
"wt_ren": "rename selected items$NHotkey: F2",
|
||||||
"wt_del": "delete selected items$NHotkey: ctrl-K",
|
"wt_del": "delete selected items$NHotkey: ctrl-K",
|
||||||
"wt_cut": "cut selected items <small>(then paste somewhere else)</small>$NHotkey: ctrl-X",
|
"wt_cut": "cut selected items <small>(then paste somewhere else)</small>$NHotkey: ctrl-X",
|
||||||
|
@ -363,6 +366,9 @@ var Ls = {
|
||||||
"ab_mkdoc": "nytt dokument",
|
"ab_mkdoc": "nytt dokument",
|
||||||
"ab_msg": "send melding",
|
"ab_msg": "send melding",
|
||||||
|
|
||||||
|
"ay_path": "hopp til mapper",
|
||||||
|
"ay_files": "hopp til filer",
|
||||||
|
|
||||||
"wt_ren": "gi nye navn til de valgte filene$NSnarvei: F2",
|
"wt_ren": "gi nye navn til de valgte filene$NSnarvei: F2",
|
||||||
"wt_del": "slett de valgte filene$NSnarvei: ctrl-K",
|
"wt_del": "slett de valgte filene$NSnarvei: ctrl-K",
|
||||||
"wt_cut": "klipp ut de valgte filene <small>(for å lime inn et annet sted)</small>$NSnarvei: ctrl-X",
|
"wt_cut": "klipp ut de valgte filene <small>(for å lime inn et annet sted)</small>$NSnarvei: ctrl-X",
|
||||||
|
@ -2352,6 +2358,22 @@ function eval_hash() {
|
||||||
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
for (var a = 0; a < 2; a++)
|
||||||
|
(function (a) {
|
||||||
|
var d = mknod('a');
|
||||||
|
d.setAttribute('href', '#');
|
||||||
|
d.setAttribute('class', 'ayjump');
|
||||||
|
d.innerHTML = a ? L.ay_path : L.ay_files;
|
||||||
|
document.body.insertBefore(d, ebi('ops'));
|
||||||
|
d.onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
|
if (a)
|
||||||
|
QS(treectl.hidden ? '#path a:nth-last-child(2)' : '#treeul a.hl').focus();
|
||||||
|
else
|
||||||
|
QS(thegrid.en ? '#ggrid a' : '#files tbody a').focus();
|
||||||
|
};
|
||||||
|
})(a);
|
||||||
|
|
||||||
var d = mknod('div');
|
var d = mknod('div');
|
||||||
d.setAttribute('id', 'acc_info');
|
d.setAttribute('id', 'acc_info');
|
||||||
document.body.insertBefore(d, ebi('ops'));
|
document.body.insertBefore(d, ebi('ops'));
|
||||||
|
|
|
@ -587,8 +587,8 @@ function up2k_init(subtle) {
|
||||||
|
|
||||||
function unmodal() {
|
function unmodal() {
|
||||||
ebi('u2notbtn').style.display = 'none';
|
ebi('u2notbtn').style.display = 'none';
|
||||||
ebi('u2btn').style.display = 'block';
|
|
||||||
ebi('u2conf').style.opacity = '1';
|
ebi('u2conf').style.opacity = '1';
|
||||||
|
ebi('u2btn').style.display = '';
|
||||||
ebi('u2notbtn').innerHTML = '';
|
ebi('u2notbtn').innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue