qBittorrent/src/webui/www/public/downloadlimit.html
2015-02-10 14:25:08 +03:00

62 lines
2.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>QBT_TR(Torrent Download Speed Limiting)QBT_TR</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="dllimitSlider" class="slider">
<div id="dllimitUpdate" class="update">QBT_TR(Download limit:)QBT_TR <input id="dllimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="dlLimitUnit">QBT_TR(KiB/s)QBT_TR</span></div>
<div class="sliderWrapper">
<div id="dllimitSliderknob" class="sliderknob"></div>
<div id="dllimitSliderarea" class="sliderarea"></div>
</div>
<div class="clear"></div>
</div>
<script type="text/javascript">
var hashes = new URI().getData('hashes').split('|');
setDlLimit = function() {
var limit = $("dllimitUpdatevalue").value.toInt() * 1024;
if (hashes[0] == "global") {
new Request({
url: 'command/setGlobalDlLimit',
method: 'post',
data: {
'limit': limit
},
onComplete: function() {
window.parent.updateMainData();
window.parent.closeWindows();
}
}).send();
}
else {
new Request({
url: 'command/setTorrentsDlLimit',
method: 'post',
data: {
'hashes': hashes.join('|'),
'limit': limit
},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
}
}
</script>
<input type="button" value="QBT_TR(Apply)QBT_TR" onclick="setDlLimit()"/>
</div>
<script type="text/javascript">
MochaUI.addDlLimitSlider(hashes);
</script>
</body>
</html>