Merge branch 'master' of deluge-torrent.org:deluge

This commit is contained in:
Andrew Resch 2010-03-01 17:55:00 -08:00
commit 44d3e2fa2f
3 changed files with 9 additions and 8 deletions

View File

@ -3,23 +3,23 @@
<head> <head>
<title>Deluge: Web UI ${version}</title> <title>Deluge: Web UI ${version}</title>
<link rel="shortcut icon" href="/icons/deluge.png" type="image/png" /> <link rel="shortcut icon" href="${base}icons/deluge.png" type="image/png" />
<link rel="icon" href="/icons/deluge.png" type="image/png" /> <link rel="icon" href="${base}icons/deluge.png" type="image/png" />
<!-- Stylesheets --> <!-- Stylesheets -->
% for stylesheet in stylesheets: % for stylesheet in stylesheets:
<link rel="stylesheet" type="text/css" href="${stylesheet}" /> <link rel="stylesheet" type="text/css" href="${base}${stylesheet}" />
% endfor % endfor
<!-- Javascript --> <!-- Javascript -->
% for script in scripts: % for script in scripts:
<script type="text/javascript" src="${script}"></script> <script type="text/javascript" src="${base}${script}"></script>
% endfor % endfor
<script type="text/javascript"> <script type="text/javascript">
Deluge.debug = ${str(debug).lower()}; Deluge.debug = ${str(debug).lower()};
</script> </script>
</head> </head>
<body> <body>
<div style="background-image: url('/themes/default/tree/loading.gif');"></div> <div style="background-image: url('${base}themes/default/tree/loading.gif');"></div>
</body> </body>
</html> </html>

View File

@ -57,12 +57,13 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
this.form = this.add({ this.form = this.add({
xtype: 'form', xtype: 'form',
baseCls: 'x-plain', baseCls: 'x-plain',
labelWidth: 55, labelWidth: 35,
autoHeight: true, autoHeight: true,
fileUpload: true, fileUpload: true,
items: [{ items: [{
xtype: 'fileuploadfield', xtype: 'fileuploadfield',
id: 'torrentFile', id: 'torrentFile',
width: 280,
emptyText: _('Select a torrent'), emptyText: _('Select a torrent'),
fieldLabel: _('File'), fieldLabel: _('File'),
name: 'file', name: 'file',

View File

@ -450,7 +450,6 @@ class TopLevel(resource.Resource):
return resource.Resource.getChild(self, path, request) return resource.Resource.getChild(self, path, request)
def render(self, request): def render(self, request):
debug = False debug = False
if 'debug' in request.args: if 'debug' in request.args:
debug_arg = request.args.get('debug')[-1] debug_arg = request.args.get('debug')[-1]
@ -474,9 +473,10 @@ class TopLevel(resource.Resource):
else: else:
scripts = self.scripts[:] scripts = self.scripts[:]
base = request.args.get('base', [''])[-1]
template = Template(filename=rpath("index.html")) template = Template(filename=rpath("index.html"))
request.setHeader("content-type", "text/html; charset=utf-8") request.setHeader("content-type", "text/html; charset=utf-8")
return template.render(scripts=scripts, stylesheets=self.stylesheets, debug=debug) return template.render(scripts=scripts, stylesheets=self.stylesheets, debug=debug, base=base)
class ServerContextFactory: class ServerContextFactory: