2017-11-02 12:14:27 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="${LANG}">
|
2017-08-06 05:04:39 -04:00
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
2017-08-06 17:08:14 +08:00
|
|
|
<title>QBT_TR(Set location)QBT_TR[CONTEXT=HttpServer]</title>
|
2017-08-06 05:04:39 -04:00
|
|
|
<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">
|
|
|
|
var setLocationKeyboardEvents = new Keyboard({
|
|
|
|
defaultEventType: 'keydown',
|
|
|
|
events: {
|
|
|
|
'enter': function (event) {
|
|
|
|
$('setLocationButton').click();
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
setLocationKeyboardEvents.activate();
|
|
|
|
|
|
|
|
window.addEvent('domready', function() {
|
|
|
|
$('setLocation').focus();
|
|
|
|
$('setLocationButton').addEvent('click', function(e) {
|
|
|
|
new Event(e).stop();
|
|
|
|
// check field
|
|
|
|
var location = $('setLocation').value.trim();
|
|
|
|
if (location === null || location === "")
|
|
|
|
return false;
|
|
|
|
|
|
|
|
var hashesList = new URI().getData('hashes');
|
|
|
|
new Request({
|
2017-10-14 16:27:21 +03:00
|
|
|
url: 'api/v2/torrents/setLocation',
|
2017-08-06 05:04:39 -04:00
|
|
|
method: 'post',
|
|
|
|
data: {
|
|
|
|
hashes: hashesList,
|
|
|
|
location: location
|
|
|
|
},
|
|
|
|
onComplete: function () {
|
|
|
|
window.parent.closeWindows();
|
|
|
|
}
|
|
|
|
}).send();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div style="padding: 10px 10px 0px 10px;">
|
|
|
|
<p style="font-weight: bold;">QBT_TR(Location)QBT_TR[CONTEXT=TransferListWidget]:</p>
|
|
|
|
<input type="text" id="setLocation" value="" maxlength="100" style="width: 220px;"/>
|
|
|
|
<div style="text-align: center; padding-top: 10px;">
|
|
|
|
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="setLocationButton"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|