Module: deluge
Branch: master
Commit: a69ed83e25075594cf9bce207a4ebca9ddd24a8e

Author: Damien Churchill <[email protected]>
Date:   Thu Feb 25 19:43:01 2010 +0000

begin adding support for a base config parameter

---

 deluge/ui/web/index.html |   10 +++++-----
 deluge/ui/web/server.py  |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/deluge/ui/web/index.html b/deluge/ui/web/index.html
index d0fed9d..4166393 100644
--- a/deluge/ui/web/index.html
+++ b/deluge/ui/web/index.html
@@ -3,23 +3,23 @@
     <head>
         <title>Deluge: Web UI ${version}</title>
         
-        <link rel="shortcut icon" href="/icons/deluge.png" type="image/png" />
-        <link rel="icon" href="/icons/deluge.png" type="image/png" />
+        <link rel="shortcut icon" href="${base}icons/deluge.png" 
type="image/png" />
+        <link rel="icon" href="${base}icons/deluge.png" type="image/png" />
         
         <!-- Stylesheets -->
         % for stylesheet in stylesheets:
-        <link rel="stylesheet" type="text/css" href="${stylesheet}" />
+        <link rel="stylesheet" type="text/css" href="${base}${stylesheet}" />
         % endfor
 
         <!-- Javascript -->
         % for script in scripts:
-        <script type="text/javascript" src="${script}"></script>
+        <script type="text/javascript" src="${base}${script}"></script>
         % endfor
         <script type="text/javascript">
             Deluge.debug = ${str(debug).lower()};
         </script>
     </head>
     <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>
 </html>
diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py
index a6c1152..a71268b 100644
--- a/deluge/ui/web/server.py
+++ b/deluge/ui/web/server.py
@@ -450,7 +450,6 @@ class TopLevel(resource.Resource):
             return resource.Resource.getChild(self, path, request)
 
     def render(self, request):
-
         debug = False
         if 'debug' in request.args:
             debug_arg = request.args.get('debug')[-1]
@@ -474,9 +473,10 @@ class TopLevel(resource.Resource):
         else:
             scripts = self.scripts[:]
 
+        base = request.args.get('base', [''])[-1]
         template = Template(filename=rpath("index.html"))
         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:
 

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to