Author: damoxc
Revision: 5747
Log:
indicate whether the UI is in debug mode via an additional script tag
in the index page
Diff:
Modified: trunk/deluge/ui/web/index.html
===================================================================
--- trunk/deluge/ui/web/index.html 2009-09-14 16:04:52 UTC (rev 5746)
+++ trunk/deluge/ui/web/index.html 2009-09-14 16:24:47 UTC (rev 5747)
@@ -7,14 +7,17 @@
<link rel="icon" href="/icons/deluge.png" type="image/png" />
<!-- Stylesheets -->
- %for stylesheet in stylesheets:
+ % for stylesheet in stylesheets:
<link rel="stylesheet" type="text/css" href="${stylesheet}" />
- %endfor
+ % endfor
<!-- Javascript -->
- %for script in scripts:
+ % for script in scripts:
<script type="text/javascript" src="${script}"></script>
- %endfor
+ % endfor
+ <script type="text/javascript">
+ Deluge.debug = ${str(debug).lower()};
+ </script>
</head>
<body>
<div style="background-image:
url('/themes/default/tree/loading.gif');"></div>
Modified: trunk/deluge/ui/web/server.py
===================================================================
--- trunk/deluge/ui/web/server.py 2009-09-14 16:04:52 UTC (rev 5746)
+++ trunk/deluge/ui/web/server.py 2009-09-14 16:24:47 UTC (rev 5747)
@@ -425,7 +425,7 @@
template = Template(filename=rpath("index.html"))
request.setHeader("content-type", "text/html; charset=utf-8")
- return template.render(scripts=scripts, stylesheets=self.stylesheets)
+ return template.render(scripts=scripts, stylesheets=self.stylesheets,
debug=debug)
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
-~----------~----~----~----~------~----~------~--~---