qBittorrent/src/webui/www/private/uploadlimit.html

66 lines
2.5 KiB
HTML
Raw Normal View History

2017-11-02 12:14:27 +03:00
<!DOCTYPE html>
<html lang="${LANG}">
2018-04-05 06:59:31 +03:00
<head>
<meta charset="UTF-8" />
<title>QBT_TR(Torrent Upload Speed Limiting)QBT_TR[CONTEXT=TransferListWidget]</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/lib/mocha-yc.js"></script>
<script src="scripts/lib/parametrics.js"></script>
</head>
2018-04-05 06:59:31 +03:00
<body>
2018-04-05 06:59:31 +03:00
<div style="width: 100%; text-align: center; margin: 0 auto; overflow: hidden">
<div id="uplimitSlider" class="slider">
<div id="uplimitUpdate" class="update">QBT_TR(Upload limit:)QBT_TR[CONTEXT=PropertiesWidget] <input id="uplimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="upLimitUnit">QBT_TR(KiB/s)QBT_TR[CONTEXT=SpeedLimitDialog]</span></div>
<div class="sliderWrapper">
<div id="uplimitSliderknob" class="sliderknob"></div>
<div id="uplimitSliderarea" class="sliderarea"></div>
</div>
<div class="clear"></div>
</div>
<script>
var hashes = new URI().getData('hashes').split('|');
setUpLimit = function() {
var limit = $("uplimitUpdatevalue").value.toInt() * 1024;
if (hashes[0] == "global") {
new Request({
url: 'api/v2/transfer/setUploadLimit',
method: 'post',
data: {
'limit': limit
},
onComplete: function() {
window.parent.updateMainData();
window.parent.closeWindows();
}
}).send();
}
2018-04-05 06:59:31 +03:00
else {
new Request({
url: 'api/v2/torrents/setUploadLimit',
method: 'post',
data: {
'hashes': hashes.join('|'),
'limit': limit
},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
}
2018-04-05 06:59:31 +03:00
}
</script>
<input type="button" value="QBT_TR(Apply)QBT_TR[CONTEXT=HttpServer]" onclick="setUpLimit()" />
</div>
2018-04-05 06:59:31 +03:00
<script>
MochaUI.addUpLimitSlider(hashes);
</script>
</body>
2018-04-05 06:59:31 +03:00
</html>