mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-10 00:57:24 +03:00
66 lines
2.1 KiB
HTML
66 lines
2.1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="${LANG}">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8" />
|
||
|
<title>QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]</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>
|
||
|
'use strict';
|
||
|
|
||
|
window.addEvent('domready', function() {
|
||
|
var setLocationKeyboardEvents = new Keyboard({
|
||
|
defaultEventType: 'keydown',
|
||
|
events: {
|
||
|
'enter': function(event) {
|
||
|
$('editTrackerButton').click();
|
||
|
event.preventDefault();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
setLocationKeyboardEvents.activate();
|
||
|
|
||
|
var currentUrl = new URI().getData('url');
|
||
|
if (!currentUrl)
|
||
|
return false;
|
||
|
|
||
|
var decodedUrl = decodeURIComponent(currentUrl);
|
||
|
$('trackerUrl').value = decodedUrl;
|
||
|
$('trackerUrl').focus();
|
||
|
|
||
|
$('editTrackerButton').addEvent('click', function(e) {
|
||
|
new Event(e).stop();
|
||
|
var hash = new URI().getData('hash');
|
||
|
new Request({
|
||
|
url: 'api/v2/torrents/editTracker',
|
||
|
method: 'post',
|
||
|
data: {
|
||
|
hash: hash,
|
||
|
origUrl: decodedUrl,
|
||
|
newUrl: $('trackerUrl').value
|
||
|
},
|
||
|
onComplete: function() {
|
||
|
window.parent.closeWindows();
|
||
|
}
|
||
|
}).send();
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div style="text-align: center;">
|
||
|
<br/>
|
||
|
<h2 class="vcenter">QBT_TR(Tracker URL:)QBT_TR[CONTEXT=TrackerListWidget]</h2>
|
||
|
<div style="text-align: center; padding-top: 10px;">
|
||
|
<input id="trackerUrl" style="width: 90%;" />
|
||
|
</div>
|
||
|
<br/>
|
||
|
<input type="button" value="QBT_TR(Edit)QBT_TR[CONTEXT=HttpServer]" id="editTrackerButton" />
|
||
|
</div>
|
||
|
</body>
|
||
|
|
||
|
</html>
|