Changeset 2052
- Timestamp:
- 02/27/07 15:24:47 (1 year ago)
- Files:
-
- wikiwygplugin/0.11/setup.py (modified) (1 diff)
- wikiwygplugin/0.11/wikiwyg/templates (deleted)
- wikiwygplugin/0.11/wikiwyg/wikiwyg.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wikiwygplugin/0.11/setup.py
r2051 r2052 8 8 version = '1.0', 9 9 packages = ['wikiwyg'], 10 package_data = {'wikiwyg': [' templates/*.html', 'htdocs/*.js', 'htdocs/*.css', 'htdocs/*.gif', 'htdocs/*.htc']},10 package_data = {'wikiwyg': ['htdocs/*.js', 'htdocs/*.css', 'htdocs/*.gif', 'htdocs/*.htc']}, # 'templates/*.html' can go back in here if we need it 11 11 12 12 author = "soloturn, Erik Rose, and Frank Wierzbicki", wikiwygplugin/0.11/wikiwyg/wikiwyg.py
r2051 r2052 17 17 def get_htdocs_dirs(self): 18 18 """Provide the static JavaScript files, CSS, etc.""" 19 yield ('', resource_filename(__name__, 'htdocs'))19 yield '', resource_filename(__name__, 'htdocs') 20 20 21 21 … … 23 23 24 24 def pre_process_request(self, req, handler): 25 """Load Wikiwyg libs on every page. 25 """Load Wikiwyg libs pages that make use of them.""" 26 def uses_wikiwyg(req): 27 """Return whether the page referenced by req can make use of Wikiwyg.""" 28 return True # TODO: Replace this with actual intelligence: perhaps all wiki pages, etc. 26 29 27 (We might want to get more selective eventually.) 28 """ 29 for curScript in ['Wikiwyg', 'Toolbar', 'Wysiwyg', 'Wikitext', 'Preview', 'ClientServer']: 30 add_script(req, 'wikiwyg/%s.js' % curScript) 30 if uses_wikiwyg(req): 31 for curScript in ['Wikiwyg', 'Toolbar', 'Wysiwyg', 'Wikitext', 'Preview', 'Trac']: # 'ClientServer' (put this back in when you implement async save) 32 add_script(req, 'wikiwyg/%s.js' % curScript) 31 33 return handler 32 34 33 # for Genshi templates35 # the Genshi template version 34 36 def post_process_request(self, req, template, data, content_type): 35 37 return template, data, content_type
