mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 00:52:30 -06:00
Cookies support on WebUI when downloading torrent from a URL. Modified download and upload windows to allow autocompletion of browsers.
Fixed the spinner in the WebUI upload page. Modified height of the WebUI download page. Fixed all the JavaScript functions for download and upload pages.
This commit is contained in:
@@ -20,19 +20,23 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
window.addEvent('domready', function() {
|
||||
$('urls').focus();
|
||||
$('downButton').addEvent('click', function(e) {
|
||||
new Event(e).stop();
|
||||
new Request({
|
||||
url: 'command/download',
|
||||
method: 'post',
|
||||
data: {
|
||||
urls: $('urls').value
|
||||
},
|
||||
onComplete: function() {
|
||||
window.parent.document.getElementById('downloadPage').parentNode.removeChild(window.parent.document.getElementById('downloadPage'));
|
||||
}
|
||||
|
||||
getSavePath = function() {
|
||||
var req = new Request({
|
||||
url: 'command/getSavePath',
|
||||
method: 'get',
|
||||
noCache: true,
|
||||
onFailure: function() {
|
||||
alert("Could not contact qBittorrent");
|
||||
},
|
||||
onSuccess: function(data) {
|
||||
if (data) {
|
||||
$('savepath').setProperty('value', data);
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(window).addEventListener("load", function() {
|
||||
getSavePath();
|
||||
});
|
||||
|
||||
@@ -57,7 +57,7 @@ initializeWindows = function() {
|
||||
paddingVertical: 0,
|
||||
paddingHorizontal: 0,
|
||||
width: 500,
|
||||
height: 300
|
||||
height: 360
|
||||
});
|
||||
updateMainData();
|
||||
});
|
||||
@@ -88,7 +88,7 @@ initializeWindows = function() {
|
||||
new Event(e).stop();
|
||||
new MochaUI.Window({
|
||||
id: 'uploadPage',
|
||||
title: "QBT_TR(Download local torrent)QBT_TR",
|
||||
title: "QBT_TR(Upload local torrent)QBT_TR",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'upload.html',
|
||||
scrollbars: true,
|
||||
@@ -96,8 +96,8 @@ initializeWindows = function() {
|
||||
maximizable: false,
|
||||
paddingVertical: 0,
|
||||
paddingHorizontal: 0,
|
||||
width: 600,
|
||||
height: 130
|
||||
width: 500,
|
||||
height: 200
|
||||
});
|
||||
updateMainData();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user