Skip to content

Commit

Permalink
Merge 6d21138 into 12372d4
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Sep 16, 2016
2 parents 12372d4 + 6d21138 commit 3f57fb3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ There's a frood who really knows where his towel is.
1.3b2 (unreleased)
^^^^^^^^^^^^^^^^^^

- Add plone.protect when save layout (fixes `#651`_).
[rodfersou]

- Use pat-modal instead of prepOverlay for Plone 5 (fixes `#641`_).
[rodfersou]

Expand Down Expand Up @@ -129,3 +132,4 @@ Previous entries can be found in the HISTORY.rst file.
.. _`#584`: https://github.com/collective/collective.cover/issues/584
.. _`#608`: https://github.com/collective/collective.cover/issues/608
.. _`#641`: https://github.com/collective/collective.cover/issues/641
.. _`#651`: https://github.com/collective/collective.cover/issues/651
2 changes: 1 addition & 1 deletion src/collective/cover/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>14</version>
<version>15</version>
<dependencies>
<dependency>profile-collective.js.galleria:default</dependency>
<dependency>profile-collective.js.jqueryui:default</dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/collective/cover/static/js/layout_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(document).ready(function() {
});
$this.find('span').text('Saving...');
$.ajax({
'url': '@@save_layout',
'url': '@@save_layout' + location.search,
'data': {
'cover_layout': JSON.stringify(json)
},
Expand Down
11 changes: 11 additions & 0 deletions src/collective/cover/tests/test_upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,14 @@ def test_register_calendar_script(self):
self._do_upgrade_step(step)

self.assertIn(script, js_tool.getResourceIds())


class Upgrade14to15TestCase(UpgradeTestCaseBase):

def setUp(self):
UpgradeTestCaseBase.setUp(self, u'14', u'15')

def test_registrations(self):
version = self.setup.getLastVersionForProfile(self.profile_id)[0]
self.assertGreaterEqual(int(version), int(self.to_version))
self.assertEqual(self._how_many_upgrades_to_do(), 1)
1 change: 1 addition & 0 deletions src/collective/cover/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<include package=".v12" />
<include package=".v13" />
<include package=".v14" />
<include package=".v15" />

</configure>
1 change: 1 addition & 0 deletions src/collective/cover/upgrades/v15/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
20 changes: 20 additions & 0 deletions src/collective/cover/upgrades/v15/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="collective.cover">

<genericsetup:upgradeSteps
source="14"
destination="15"
profile="collective.cover:default">

<genericsetup:upgradeStep
title="Cook JS resources"
description="There were changes in the JS files, so we need to cook the resources."
handler="..cook_javascript_resources"
/>

</genericsetup:upgradeSteps>

</configure>

0 comments on commit 3f57fb3

Please sign in to comment.