Skip to content

Commit

Permalink
fix for applyPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Jul 31, 2012
1 parent 86af29e commit db9be36
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
20 changes: 14 additions & 6 deletions collective/js/jqueryui/profiles.zcml
Expand Up @@ -3,12 +3,12 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="collective.js.jqueryui">

<genericsetup:registerProfile
name="default"
title="jQuery UI"
directory="profiles/default"
<genericsetup:registerProfile
name="default"
title="jQuery UI"
directory="profiles/default"
description="jQuery UI for Plone"
provides="Products.GenericSetup.interfaces.EXTENSION"
provides="Products.GenericSetup.interfaces.EXTENSION"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
/>

Expand Down Expand Up @@ -144,5 +144,13 @@
description="backport work done for plone.app.jqueryui"
profile="collective.js.jqueryui:default"
handler=".upgrades.upgrade_2000_2100"
/>
/>
<genericsetup:upgradeStep
source="2100"
destination="2200"
title="Recook css"
description=""
profile="collective.js.jqueryui:default"
handler=".upgrades.upgrade_2100_2200"
/>
</configure>
2 changes: 1 addition & 1 deletion collective/js/jqueryui/profiles/default/metadata.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>2100</version>
<version>2200</version>
<dependencies>
<dependency>profile-plone.app.registry:default</dependency>
</dependencies>
Expand Down
1 change: 1 addition & 0 deletions collective/js/jqueryui/resources.py
Expand Up @@ -107,6 +107,7 @@ def get_resources_content(self, resources):
content = unicode(
content.decode('utf-8'))
if self._css:
upath = upath.rstrip('/')
prefix = '/'.join([upath, resourceid])
if prefix.endswith('/'):
prefix = prefix[:-1]
Expand Down
8 changes: 7 additions & 1 deletion collective/js/jqueryui/upgrades.py
Expand Up @@ -216,4 +216,10 @@ def upgrade_2000_2100(context):
run_dependencies=False,
purge_old=False)
cssregistry.cookResources()


def upgrade_2100_2200(context):
jsregistry = getToolByName(context, 'portal_javascripts')
cssregistry = getToolByName(context, 'portal_css')
setup = getToolByName(context, 'portal_setup')
cssregistry.cookResources()

2 changes: 1 addition & 1 deletion docs/HISTORY.txt
Expand Up @@ -4,7 +4,7 @@ Changelog
1.8.16.9 (unreleased)
---------------------

- Nothing changed yet.
- another fix for applyPrefix [kiorky]


1.8.16.8 (2012-07-27)
Expand Down

0 comments on commit db9be36

Please sign in to comment.