mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 13:56:47 +00:00
add the beginnings of add torrent by file
This commit is contained in:
parent
3b32edeed1
commit
b49a4c66d8
@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="$base/template/static/themes/classic/iframe.css" />
|
||||||
|
</head>
|
||||||
|
<body style="background: none;">
|
||||||
|
<form method="post" action="/json/upload" enctype="multipart/form-data">
|
||||||
|
<label>$_('File'):</label><input type="file" name="torrentFile" /> <br/>
|
||||||
|
<button>$_('Ok')</button><button>$_('Cancel')</button>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -42,6 +42,13 @@ Deluge.Widgets.AddWindow = new Class({
|
|||||||
url: '/template/render/html/add_torrent_options.html'
|
url: '/template/render/html/add_torrent_options.html'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this.fileWindow = new Deluge.Widgets.AddTorrent.File();
|
||||||
|
this.fileWindow.addEvent('torrentAdded', this.bound.onTorrentAdded);
|
||||||
|
this.fileButton = this.content.getElement('button.file');
|
||||||
|
this.fileButton.addEvent('click', function(e) {
|
||||||
|
this.fileWindow.show();
|
||||||
|
}.bindWithEvent(this));
|
||||||
|
|
||||||
this.urlWindow = new Deluge.Widgets.AddTorrent.Url();
|
this.urlWindow = new Deluge.Widgets.AddTorrent.Url();
|
||||||
this.urlWindow.addEvent('torrentAdded', this.bound.onTorrentAdded);
|
this.urlWindow.addEvent('torrentAdded', this.bound.onTorrentAdded);
|
||||||
this.urlButton = this.content.getElement('button.url');
|
this.urlButton = this.content.getElement('button.url');
|
||||||
@ -89,6 +96,26 @@ Deluge.Widgets.AddWindow = new Class({
|
|||||||
|
|
||||||
Deluge.Widgets.AddTorrent = {}
|
Deluge.Widgets.AddTorrent = {}
|
||||||
|
|
||||||
|
Deluge.Widgets.AddTorrent.File = new Class({
|
||||||
|
Extends: Widgets.Window,
|
||||||
|
|
||||||
|
options: {
|
||||||
|
width: 300,
|
||||||
|
height: 100,
|
||||||
|
title: _('From File')
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function() {
|
||||||
|
this.parent();
|
||||||
|
this.iframe = new Element('iframe', {
|
||||||
|
src: '/template/render/html/window_add_torrent_file.html',
|
||||||
|
height: 100,
|
||||||
|
width: 300
|
||||||
|
});
|
||||||
|
this.content.grab(this.iframe);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Deluge.Widgets.AddTorrent.Url = new Class({
|
Deluge.Widgets.AddTorrent.Url = new Class({
|
||||||
Extends: Widgets.Window,
|
Extends: Widgets.Window,
|
||||||
|
|
||||||
|
@ -0,0 +1,60 @@
|
|||||||
|
body {
|
||||||
|
font-family: trebuchet ms;
|
||||||
|
font-size: 0.7em;
|
||||||
|
color: White;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* forms */
|
||||||
|
form fieldset {
|
||||||
|
border: none;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
form legend {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
form label {
|
||||||
|
width: 150px;
|
||||||
|
line-height: 20px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
form input, form select {
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
|
border:1px solid #23344b;
|
||||||
|
background: #99acc3;
|
||||||
|
color: #000;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form textarea {
|
||||||
|
border:1px solid #23344b;
|
||||||
|
background: #99acc3;
|
||||||
|
width:480px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .disabled {
|
||||||
|
color: Gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .deluge_button, button {
|
||||||
|
background-color: #37506f;
|
||||||
|
border:1px solid #68a;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #99acc3;
|
||||||
|
color: #000;
|
||||||
|
vertical-align:middle;
|
||||||
|
-moz-border-radius:7px;
|
||||||
|
-webkit-border-radius:7px;
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .deluge_button:hover, button:hover {
|
||||||
|
background-color:#68a;
|
||||||
|
}
|
||||||
|
|
||||||
|
form br {
|
||||||
|
clear: left;
|
||||||
|
}
|
@ -17,6 +17,10 @@ body {
|
|||||||
color: White;
|
color: White;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
#toolbar {
|
#toolbar {
|
||||||
background: url(/static/images/simple_line.jpg) repeat-x 0px 69px;
|
background: url(/static/images/simple_line.jpg) repeat-x 0px 69px;
|
||||||
height: 75px;
|
height: 75px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user