Author: damoxc
Revision: 5372
Log:
provide 2 helper methods for adding and removing scripts from the
webserver
Diff:
Modified: trunk/deluge/ui/web/server.py
===================================================================
--- trunk/deluge/ui/web/server.py 2009-06-10 13:27:22 UTC (rev 5371)
+++ trunk/deluge/ui/web/server.py 2009-06-10 13:27:55 UTC (rev 5372)
@@ -338,6 +338,29 @@
@property
def stylesheets(self):
return self.__stylesheets
+
+ def add_script(self, script):
+ """
+ Adds a script to the server so it is included in the <head> element
+ of the index page.
+
+ :param script: The path to the script
+ :type script: string
+ """
+
+ self.__scripts.append(script)
+ self.__debug_scripts.append(script)
+
+ def remove_script(self, script):
+ """
+ Removes a script from the server.
+
+ :param script: The path to the script
+ :type script: string
+ """
+ self.__scripts.remove(script)
+ self.__debug_scripts.remove(script)
+
def getChild(self, path, request):
if path == "":
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---