mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
up2k: make confirmation optional
This commit is contained in:
parent
6934c75bba
commit
c2d22aa3d1
|
@ -201,6 +201,7 @@ function up2k_init(have_crypto) {
|
||||||
|
|
||||||
var parallel_uploads = cfg_get('nthread');
|
var parallel_uploads = cfg_get('nthread');
|
||||||
var multitask = bcfg_get('multitask', true);
|
var multitask = bcfg_get('multitask', true);
|
||||||
|
var ask_up = bcfg_get('ask_up', true);
|
||||||
|
|
||||||
var col_hashing = '#00bbff';
|
var col_hashing = '#00bbff';
|
||||||
var col_hashed = '#004466';
|
var col_hashed = '#004466';
|
||||||
|
@ -297,7 +298,7 @@ function up2k_init(have_crypto) {
|
||||||
for (var a = 0; a < good_files.length; a++)
|
for (var a = 0; a < good_files.length; a++)
|
||||||
msg.push(good_files[a].name);
|
msg.push(good_files[a].name);
|
||||||
|
|
||||||
if (!confirm(msg.join('\n')))
|
if (ask_up && !confirm(msg.join('\n')))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (var a = 0; a < good_files.length; a++) {
|
for (var a = 0; a < good_files.length; a++) {
|
||||||
|
@ -839,6 +840,11 @@ function up2k_init(have_crypto) {
|
||||||
bcfg_set('multitask', multitask);
|
bcfg_set('multitask', multitask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function tgl_ask_up() {
|
||||||
|
ask_up = !ask_up;
|
||||||
|
bcfg_set('ask_up', ask_up);
|
||||||
|
}
|
||||||
|
|
||||||
function nop(ev) {
|
function nop(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
this.click();
|
this.click();
|
||||||
|
@ -855,6 +861,7 @@ function up2k_init(have_crypto) {
|
||||||
|
|
||||||
ebi('nthread').addEventListener('input', bumpthread, false);
|
ebi('nthread').addEventListener('input', bumpthread, false);
|
||||||
ebi('multitask').addEventListener('click', tgl_multitask, false);
|
ebi('multitask').addEventListener('click', tgl_multitask, false);
|
||||||
|
ebi('ask_up').addEventListener('click', tgl_ask_up, false);
|
||||||
|
|
||||||
var nodes = ebi('u2conf').getElementsByTagName('a');
|
var nodes = ebi('u2conf').getElementsByTagName('a');
|
||||||
for (var a = nodes.length - 1; a >= 0; a--)
|
for (var a = nodes.length - 1; a >= 0; a--)
|
||||||
|
|
|
@ -194,6 +194,12 @@
|
||||||
#u2conf input+a {
|
#u2conf input+a {
|
||||||
background: #d80;
|
background: #d80;
|
||||||
}
|
}
|
||||||
|
#u2conf input[type="checkbox"]+label {
|
||||||
|
color: #f5a;
|
||||||
|
}
|
||||||
|
#u2conf input[type="checkbox"]:checked+label {
|
||||||
|
color: #fc5;
|
||||||
|
}
|
||||||
#u2foot {
|
#u2foot {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
|
|
@ -43,10 +43,14 @@
|
||||||
<input class="txtbox" id="nthread" value="2" />
|
<input class="txtbox" id="nthread" value="2" />
|
||||||
<a href="#" id="nthread_add">+</a>
|
<a href="#" id="nthread_add">+</a>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">
|
<td rowspan="2" style="padding-left:1.5em">
|
||||||
<input type="checkbox" id="multitask" />
|
<input type="checkbox" id="multitask" />
|
||||||
<label for="multitask">hash while<br />uploading</label>
|
<label for="multitask">hash while<br />uploading</label>
|
||||||
</td>
|
</td>
|
||||||
|
<td rowspan="2">
|
||||||
|
<input type="checkbox" id="ask_up" />
|
||||||
|
<label for="ask_up">ask for<br />confirmation</label>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue