mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
add some missing preventdefaults
This commit is contained in:
parent
38593a0394
commit
a6dc5e2ce3
|
@ -1880,18 +1880,21 @@ var fileman = (function () {
|
||||||
f[n].inew.focus();
|
f[n].inew.focus();
|
||||||
f[n].inew.setSelectionRange(0, f[n].inew.value.lastIndexOf('.'), "forward");
|
f[n].inew.setSelectionRange(0, f[n].inew.value.lastIndexOf('.'), "forward");
|
||||||
}
|
}
|
||||||
function rn_cancel() {
|
function rn_cancel(e) {
|
||||||
|
ev(e);
|
||||||
rui.parentNode.removeChild(rui);
|
rui.parentNode.removeChild(rui);
|
||||||
}
|
}
|
||||||
|
|
||||||
ebi('rn_cancel').onclick = rn_cancel;
|
ebi('rn_cancel').onclick = rn_cancel;
|
||||||
ebi('rn_apply').onclick = rn_apply;
|
ebi('rn_apply').onclick = rn_apply;
|
||||||
ebi('rn_adv').onclick = function () {
|
ebi('rn_adv').onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
adv = !adv;
|
adv = !adv;
|
||||||
bcfg_set('rn_adv', adv);
|
bcfg_set('rn_adv', adv);
|
||||||
sadv();
|
sadv();
|
||||||
};
|
};
|
||||||
ebi('rn_case').onclick = function () {
|
ebi('rn_case').onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
cs = !cs;
|
cs = !cs;
|
||||||
bcfg_set('rn_case', cs);
|
bcfg_set('rn_case', cs);
|
||||||
};
|
};
|
||||||
|
@ -1918,7 +1921,8 @@ var fileman = (function () {
|
||||||
ipre.appendChild(o);
|
ipre.appendChild(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inew.onclick = function () {
|
inew.onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
modal.prompt('provide a name for your new preset', ifmt.value, function (name) {
|
modal.prompt('provide a name for your new preset', ifmt.value, function (name) {
|
||||||
if (!name)
|
if (!name)
|
||||||
return toast.warn(3, 'aborted');
|
return toast.warn(3, 'aborted');
|
||||||
|
@ -1929,7 +1933,8 @@ var fileman = (function () {
|
||||||
ipre.value = name;
|
ipre.value = name;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
idel.onclick = function () {
|
idel.onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
delete presets[ipre.value];
|
delete presets[ipre.value];
|
||||||
jwrite('rn_pre', presets);
|
jwrite('rn_pre', presets);
|
||||||
spresets();
|
spresets();
|
||||||
|
@ -1987,7 +1992,8 @@ var fileman = (function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function rn_apply() {
|
function rn_apply(e) {
|
||||||
|
ev(e);
|
||||||
while (f.length && (!f[0].ok || f[0].ofn == f[0].inew.value))
|
while (f.length && (!f[0].ok || f[0].ofn == f[0].inew.value))
|
||||||
f.shift();
|
f.shift();
|
||||||
|
|
||||||
|
@ -2390,7 +2396,8 @@ var thegrid = (function () {
|
||||||
}
|
}
|
||||||
var uns = QS('#ggrid a[ref="unsearch"]');
|
var uns = QS('#ggrid a[ref="unsearch"]');
|
||||||
if (uns)
|
if (uns)
|
||||||
uns.onclick = function () {
|
uns.onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
ebi('unsearch').click();
|
ebi('unsearch').click();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -4151,6 +4158,7 @@ var unpost = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
ct.onclick = function (e) {
|
ct.onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
var tgt = e.target.closest('a[me]');
|
var tgt = e.target.closest('a[me]');
|
||||||
if (!tgt)
|
if (!tgt)
|
||||||
return;
|
return;
|
||||||
|
@ -4192,7 +4200,8 @@ var unpost = (function () {
|
||||||
tfilt = setTimeout(r.load, 250);
|
tfilt = setTimeout(r.load, 250);
|
||||||
};
|
};
|
||||||
|
|
||||||
ebi('unpost_nofilt').onclick = function () {
|
ebi('unpost_nofilt').onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
filt.value = '';
|
filt.value = '';
|
||||||
r.load();
|
r.load();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1880,17 +1880,18 @@ function up2k_init(subtle) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ebi('nthread').onkeydown = bumpthread2;
|
ebi('nthread').onkeydown = bumpthread2;
|
||||||
ebi('nthread').addEventListener('input', bumpthread, false);
|
ebi('nthread').oninput = bumpthread;
|
||||||
ebi('multitask').addEventListener('click', tgl_multitask, false);
|
ebi('multitask').onclick = tgl_multitask;
|
||||||
ebi('ask_up').addEventListener('click', tgl_ask_up, false);
|
ebi('ask_up').onclick = tgl_ask_up;
|
||||||
ebi('flag_en').addEventListener('click', tgl_flag_en, false);
|
ebi('flag_en').onclick = tgl_flag_en;
|
||||||
ebi('u2turbo').addEventListener('click', tgl_turbo, false);
|
ebi('u2turbo').onclick = tgl_turbo;
|
||||||
ebi('u2tdate').addEventListener('click', tgl_datechk, false);
|
ebi('u2tdate').onclick = tgl_datechk;
|
||||||
var o = ebi('fsearch');
|
var o = ebi('fsearch');
|
||||||
if (o)
|
if (o)
|
||||||
o.addEventListener('click', tgl_fsearch, false);
|
o.addEventListener('click', tgl_fsearch, false);
|
||||||
|
|
||||||
ebi('u2etas').onclick = function () {
|
ebi('u2etas').onclick = function (e) {
|
||||||
|
ev(e);
|
||||||
clmod(ebi('u2etas'), 'o', 't');
|
clmod(ebi('u2etas'), 'o', 't');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue