Changeset 4685
- Timestamp:
- Oct 31, 2008, 4:23:05 PM (16 years ago)
- Location:
- loomingcloudsplugin/0.11/loomingclouds
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
loomingcloudsplugin/0.11/loomingclouds/loomingclouds.py
r4683 r4685 7 7 from genshi.filters.transform import Transformer 8 8 9 from pkg_resources import resource_filename 10 9 11 from trac.core import * 10 12 from trac.mimeview import Context 11 13 from trac.web.api import ITemplateStreamFilter 14 from trac.web.chrome import add_script 12 15 from trac.web.chrome import add_stylesheet 16 from trac.web.chrome import ITemplateProvider 13 17 from trac.wiki.formatter import Formatter 14 18 from tractags.macros import TagCloudMacro … … 16 20 class LoomingClouds(Component): 17 21 18 implements(ITemplateStreamFilter )22 implements(ITemplateStreamFilter, ITemplateProvider) 19 23 20 ### method sfor ITemplateStreamFilter24 ### method for ITemplateStreamFilter 21 25 22 26 """Filter a Genshi event stream prior to rendering.""" … … 37 41 38 42 add_stylesheet(req, 'tags/css/tractags.css') 43 add_script(req, 'tags/js/tag_filler.js') 39 44 formatter = Formatter(self.env, Context.from_request(req)) 40 45 macro = TagCloudMacro(self.env) … … 44 49 45 50 return stream 51 52 ### methods for ITemplateProvider 53 54 def get_htdocs_dirs(self): 55 """Return a list of directories with static resources (such as style 56 sheets, images, etc.) 57 58 Each item in the list must be a `(prefix, abspath)` tuple. The 59 `prefix` part defines the path in the URL that requests to these 60 resources are prefixed with. 61 62 The `abspath` is the absolute path to the directory containing the 63 resources on the local file system. 64 65 """ 66 return [('tags', resource_filename(__name__, 'htdocs'))] 67 68 69 def get_templates_dirs(self): 70 """Return a list of directories containing the provided template 71 files. 72 """ 73 return [] 74
Note: See TracChangeset
for help on using the changeset viewer.