Changeset 8087
- Timestamp:
- 10 Apr 2012, 06:42:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py
r8065 r8087 28 28 waeup_kofa = Library('waeup_kofa', 'static') 29 29 30 def render_ico(url): 31 """An inclusion renderer for hurry.resource for files with .ico extension. 32 """ 33 return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url 34 35 # Monkey patch hurry.resource to support .ico inclusions. 36 inclusion_renderers['.ico'] = render_ico 37 EXTENSIONS.append('.ico') 38 30 39 #: A resource that includes a favicon. 31 #: In the `gerResource()` method of the theme 32 #: require the JavaScript code to be rendered into the page:: 40 #: 41 #: In the `getResource()` method of any theme include the 42 #: HTML code to be rendered into the page:: 33 43 #: 34 44 #: from waeup.kofa.browser.resources import favicon … … 37 47 #: # ... 38 48 #: def getResources(self): 39 #: favicon.need() 40 #: return [...] 41 42 def render_ico(url): 43 return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url 44 inclusion_renderers['.ico'] = render_ico 45 EXTENSIONS.append('.ico') 46 49 #: return [favicon, ...] 50 #: 47 51 favicon = ResourceInclusion(waeup_kofa, 'favicon.ico') 52 48 53 49 54 #: A resource that binds a jQueryUI datepicker widget to each
Note: See TracChangeset for help on using the changeset viewer.