mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-15 17:20:06 +00:00
27d8dbf13b
Normalize Web API method names. Allow to use alternative Web UI. Switch Web API version to standard form (i.e. "2.0"). Improve Web UI translation code. Retranslate changed files. Add Web API for RSS subsystem.
63 lines
2.4 KiB
HTML
63 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="${LANG}">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; 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 type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="scripts/mocha-yc.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="scripts/parametrics.js" charset="utf-8"></script>
|
|
</head>
|
|
<body>
|
|
<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 type="text/javascript">
|
|
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();
|
|
}
|
|
else {
|
|
new Request({
|
|
url: 'api/v2/torrents/set_upload_limit',
|
|
method: 'post',
|
|
data: {
|
|
'hashes': hashes.join('|'),
|
|
'limit': limit
|
|
},
|
|
onComplete: function() {
|
|
window.parent.closeWindows();
|
|
}
|
|
}).send();
|
|
}
|
|
}
|
|
</script>
|
|
<input type="button" value="QBT_TR(Apply)QBT_TR[CONTEXT=HttpServer]" onclick="setUpLimit()"/>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
MochaUI.addUpLimitSlider(hashes);
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|