mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-15 17:20:06 +00:00
877a2a2802
This change forces new versions of all css and js files to be picked up when qBittorrent is updated.
73 lines
2.6 KiB
HTML
73 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="${LANG}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>QBT_TR(Set location)QBT_TR[CONTEXT=HttpServer]</title>
|
|
<link rel="stylesheet" href="css/style.css?v=${VERSION}" 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 src="scripts/misc.js?locale=${LANG}&v=${VERSION}"></script>
|
|
<script>
|
|
'use strict';
|
|
|
|
var setLocationKeyboardEvents = new Keyboard({
|
|
defaultEventType: 'keydown',
|
|
events: {
|
|
'enter': function(event) {
|
|
$('setLocationButton').click();
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
});
|
|
setLocationKeyboardEvents.activate();
|
|
|
|
window.addEvent('domready', function() {
|
|
var path = new URI().getData('path');
|
|
// set text field to current value
|
|
if (path)
|
|
$('setLocation').value = escapeHtml(decodeURIComponent(path));
|
|
|
|
$('setLocation').focus();
|
|
$('setLocationButton').addEvent('click', function(e) {
|
|
new Event(e).stop();
|
|
// check field
|
|
var location = $('setLocation').value.trim();
|
|
if (location === null || location === "") {
|
|
$('error_div').set('text', 'QBT_TR(Save path is empty)QBT_TR[CONTEXT=TorrentsController]');
|
|
return false;
|
|
}
|
|
|
|
var hashesList = new URI().getData('hashes');
|
|
new Request({
|
|
url: 'api/v2/torrents/setLocation',
|
|
method: 'post',
|
|
data: {
|
|
hashes: hashesList,
|
|
location: location
|
|
},
|
|
onSuccess: function() {
|
|
window.parent.closeWindows();
|
|
},
|
|
onFailure: function(xhr) {
|
|
$('error_div').set('text', xhr.response);
|
|
}
|
|
}).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: 370px;" />
|
|
<div style="float: none; width: 370px;" id="error_div"> </div>
|
|
<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>
|