Skip to content

Commit

Permalink
Added upgrade step to add JS Shortcut and JQTree to the resource regi…
Browse files Browse the repository at this point in the history
…stry for Plone 5.0
  • Loading branch information
b4oshany committed Aug 17, 2017
1 parent f1326f8 commit ad48e02
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.pyc
*.pyo
*.mo
*.orig
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ New features:

- *add item here*

- Add an upgrade step for Products.CMFPlone version 5020
- add jqtree-contextmenu to the resource registry
- add js-shortcuts to the resource registry
[b4oshany]

Bug fixes:

- *add item here*
Expand Down
4 changes: 2 additions & 2 deletions plone/app/upgrade/v50/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@
profile="Products.CMFPlone:plone">

<gs:upgradeStep
title="Miscellaneous"
title="Add jqTree contextual menu"
description=""
handler="..utils.null_upgrade_step"
handler=".final.to509"
/>

</gs:upgradeSteps>
Expand Down
5 changes: 5 additions & 0 deletions plone/app/upgrade/v50/final.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def to507(context):
loadMigrationProfile(context, 'profile-plone.app.upgrade.v50:to507')


def to509(context):
"""5.0.8 -> 5.0.9"""
loadMigrationProfile(context, 'profile-plone.app.upgrade.v50:to509')


def fix_double_smaxage(context):
"""Fix caching definition.
Expand Down
9 changes: 9 additions & 0 deletions plone/app/upgrade/v50/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,13 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="to509"
title="Upgrade profile for Plone 5.0.8 to Plone 5.0.9"
description=""
directory="profiles/to_509"
for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

</configure>
13 changes: 13 additions & 0 deletions plone/app/upgrade/v50/profiles/to_509/registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<registry>
<records prefix="plone.resources/jqtree-contextmenu"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/cs-jqtree-contextmenu/src/jqTreeContextMenu.js</value>
<value key="deps">jqtree</value>
</records>
<records prefix="plone.resources/js-shortcuts"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/js-shortcuts/js-shortcuts.js</value>
<value key="deps">jquery</value>
</records>
</registry>

0 comments on commit ad48e02

Please sign in to comment.