[Checkins] SVN: hurry.jqueryui/trunk/ * expose hurry.resource 0.10 entry point for themes too
Martijn Faassen
faassen at startifact.com
Thu Jul 29 10:32:01 EDT 2010
Log message for revision 115209:
* expose hurry.resource 0.10 entry point for themes too
* fix the tests.
Changed:
U hurry.jqueryui/trunk/CHANGES.txt
U hurry.jqueryui/trunk/setup.py
U hurry.jqueryui/trunk/src/hurry/jqueryui/jqueryui.txt
-=-
Modified: hurry.jqueryui/trunk/CHANGES.txt
===================================================================
--- hurry.jqueryui/trunk/CHANGES.txt 2010-07-29 14:26:23 UTC (rev 115208)
+++ hurry.jqueryui/trunk/CHANGES.txt 2010-07-29 14:32:00 UTC (rev 115209)
@@ -4,8 +4,9 @@
1.8.2.2 (unreleased)
====================
-- Nothing changed yet.
+* Also expose jqueryui_themes library as an entry point.
+* Fix the tests.
1.8.2.1 (2010-07-28)
====================
Modified: hurry.jqueryui/trunk/setup.py
===================================================================
--- hurry.jqueryui/trunk/setup.py 2010-07-29 14:26:23 UTC (rev 115208)
+++ hurry.jqueryui/trunk/setup.py 2010-07-29 14:32:00 UTC (rev 115209)
@@ -51,6 +51,8 @@
],
'hurry.resource.libraries': [
'jqueryui = hurry.jqueryui:jqueryui_lib',
+ 'jqueryui_themes = hurry.jqueryui:jqueryui_themes',
+
],
},
extras_require={
Modified: hurry.jqueryui/trunk/src/hurry/jqueryui/jqueryui.txt
===================================================================
--- hurry.jqueryui/trunk/src/hurry/jqueryui/jqueryui.txt 2010-07-29 14:26:23 UTC (rev 115208)
+++ hurry.jqueryui/trunk/src/hurry/jqueryui/jqueryui.txt 2010-07-29 14:32:00 UTC (rev 115209)
@@ -6,14 +6,11 @@
Let's set up a way to render URLs; typically the framework has already
done this::
- >>> def get_library_url(library):
- ... return 'http://localhost/static/%s' % (library.name)
- >>> from hurry.resource import Library
- >>> from hurry.resource.interfaces import ILibraryUrl
- >>> from zope import component
- >>> # register the ILibraryUrl adaptation for the tests.
- >>> component.provideAdapter(
- ... factory=get_library_url, adapts=(Library,), provides=ILibraryUrl)
+ >>> class Plugin(object):
+ ... def get_library_url(self, library):
+ ... return 'http://localhost/static/%s' % (library.name)
+ >>> from hurry.resource import register_plugin
+ >>> register_plugin(Plugin())
Render the inclusion::
@@ -22,12 +19,12 @@
>>> needed = NeededInclusions()
>>> needed.need(jqueryui)
>>> print needed.render()
- <script type="text/javascript" src="http://localhost/static/jquery/jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="http://localhost/static/jquery_lib/jquery-1.4.2.js"></script>
<script type="text/javascript" src="http://localhost/static/jqueryui/jquery-ui.js"></script>
>>> needed.mode('minified')
>>> print needed.render()
- <script type="text/javascript" src="http://localhost/static/jquery/jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="http://localhost/static/jquery_lib/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://localhost/static/jqueryui/jquery-ui.min.js"></script>
Let's also try a theme::
More information about the checkins
mailing list