- Global Upload/Download rates can be set by clicking on the status bar values

This commit is contained in:
Christophe Dumez
2010-02-15 20:57:55 +00:00
parent f6bfacda2c
commit 13493e1afe
8 changed files with 177 additions and 55 deletions

View File

@@ -24,13 +24,23 @@
var hash = new URI().getData('hash');
setUpLimit = function() {
var limit = $("uplimitUpdatevalue").get('html').toInt() * 1024;
new Request({url: '/command/setTorrentUpLimit',
method: 'post',
data: {'hash': hash, 'limit': limit},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
if(hash == "global") {
new Request({url: '/command/setGlobalUpLimit',
method: 'post',
data: {'limit': limit},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
}else {
new Request({url: '/command/setTorrentUpLimit',
method: 'post',
data: {'hash': hash, 'limit': limit},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
}
}
</script>
<input type="button" value="_(Apply)" onclick="setUpLimit()"/>