Skip to content

Commit

Permalink
[fc] Repository: plone.app.upgrade
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2016-10-09T23:43:08+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/plone.app.upgrade@53ae082

Products.MimetypesRegistry has no longer a skins layer, remove it.

Files changed:
M CHANGES.rst
M plone/app/upgrade/v51/betas.py
M plone/app/upgrade/v51/configure.zcml
Repository: plone.app.upgrade
Branch: refs/heads/master
Date: 2016-10-18T16:31:41-04:00
Author: agitator (agitator) <[email protected]>
Commit: plone/plone.app.upgrade@299c160

Merge pull request #90 from plone/remove-skins-of-mtr

Products.MimetypesRegistry has no longer a skins layer, remove it.

Files changed:
M CHANGES.rst
M plone/app/upgrade/v51/betas.py
M plone/app/upgrade/v51/configure.zcml
  • Loading branch information
agitator committed Oct 18, 2016
1 parent fb405be commit 811b892
Showing 1 changed file with 123 additions and 113 deletions.
236 changes: 123 additions & 113 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,146 +1,156 @@
Repository: plone.schemaeditor
Repository: plone.app.upgrade


Branch: refs/heads/1.4.x
Date: 2016-10-06T15:58:18-06:00
Author: Sean Upton (seanupton) <[email protected]>
Commit: https://github.com/plone/plone.schemaeditor/commit/3a5f253d66733ec65795e728199cf4703becee02
Branch: refs/heads/master
Date: 2016-10-09T23:43:08+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/plone.app.upgrade/commit/53ae082569ea7f34fd3819c48282c3b64742978e

Re-add accidentally removed registration handling for Plone 4 overlays
in schema editor commited from backport in
8774cddaf1079eea3cda805c62f5cbdf7e0ff68e
Products.MimetypesRegistry has no longer a skins layer, remove it.

Files changed:
M CHANGES.rst
M plone/schemaeditor/browser/schema/schemaeditor.js
M plone/app/upgrade/v51/betas.py
M plone/app/upgrade/v51/configure.zcml

diff --git a/CHANGES.rst b/CHANGES.rst
index 2b934d3..7893236 100644
index 760d838..6ace74f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,7 +14,8 @@ New features:
@@ -10,6 +10,9 @@ Breaking changes:

New features:

+- Products.MimetypesRegistry has no longer a skins layer, remove it.
+ [jensens]
+
- Add sort_on field to search controlpanel.
[rodfersou]

Bug fixes:
diff --git a/plone/app/upgrade/v51/betas.py b/plone/app/upgrade/v51/betas.py
index 8ba9cf5..d17b02c 100644
--- a/plone/app/upgrade/v51/betas.py
+++ b/plone/app/upgrade/v51/betas.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+from plone.app.upgrade.utils import cleanUpSkinsTool
from plone.app.upgrade.utils import loadMigrationProfile
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
@@ -17,7 +18,7 @@ def to51beta1(context):

-- *add item here*
+- Re-add overlay registration for Plone 4 accidentally removed in 1.4.
+ [seanupton]
def addSortOnProperty(context):
"""Add sort_on field to search controlpanel.
-
+
The default value of this field is relevance.
"""
# get the old site properties
@@ -45,3 +46,9 @@ def addSortOnProperty(context):
settings.sort_on = 'relevance'
logger.log(logging.INFO,
"Added 'sort_on' property to site_properties.")
+
+
+def remove_leftover_skin_layers(context):
+ """Products.MimetypesRegistry no longer has a skin layer, remove it.
+ """
+ cleanUpSkinsTool(context)
diff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml
index 53b8399..6e2dcc9 100644
--- a/plone/app/upgrade/v51/configure.zcml
+++ b/plone/app/upgrade/v51/configure.zcml
@@ -57,6 +57,12 @@ Add new Mockup 2.4.0 relateditems resource url.
handler=".betas.addSortOnProperty"
/>

+ <gs:upgradeStep
+ title="Remove skins layer converted to browser resources"
+ description="Products.MimetypesRegistry Icons no longer with skins"
+ handler=".betas.remove_leftover_skin_layers"
+ />
+
</gs:upgradeSteps>

1.4 (2016-10-03)
diff --git a/plone/schemaeditor/browser/schema/schemaeditor.js b/plone/schemaeditor/browser/schema/schemaeditor.js
index b60b023..da75a5f 100644
--- a/plone/schemaeditor/browser/schema/schemaeditor.js
+++ b/plone/schemaeditor/browser/schema/schemaeditor.js
@@ -177,6 +177,36 @@
var id = $.plone_schemaeditor_normalize_string($(this).val());
$('#form-widgets-__name__').val(id);
};
+ // field settings form
+ $('a.fieldSettings').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ closeselector: 'input[name="form.buttons.cancel"]',
+ formselector: '#edit-field-form.kssattr-formname-edit',
+ noform: function(el) {
+ var o = $(el), emsg = o.find('dl.portalMessage.error');
+ if (emsg.length) {
+ o.children().replaceWith(emsg);
+ return false;
+ } else {
+ return 'reload';
+ }
+ }
+ });
+ // add new field to form
+ $('#add-field').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ formselector: 'form#add-field-form',
+ noform: 'reload'
+ });
+ // add new fieldset to form
+ $('#add-fieldset').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ formselector: 'form#add-fieldset-form',
+ noform: 'reload'
+ });
// set id from title
$('body').on('focusout', '#form-widgets-title, #form-widgets-label', set_id_from_title);
});
</configure>


Repository: plone.schemaeditor
Repository: plone.app.upgrade


Branch: refs/heads/1.4.x
Date: 2016-10-09T03:35:31+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/plone.schemaeditor/commit/ac3aa4051327d07718358c2267391fb22ba399de
Branch: refs/heads/master
Date: 2016-10-18T16:31:41-04:00
Author: agitator (agitator) <[email protected]>
Commit: https://github.com/plone/plone.app.upgrade/commit/299c160da43431b57ac535aec41cb7632fa7211f

Merge pull request #42 from upiq/1.4.x
Merge pull request #90 from plone/remove-skins-of-mtr

Fix accidental removal of overlay handlers (fixes regression in 1.4)
Products.MimetypesRegistry has no longer a skins layer, remove it.

Files changed:
M CHANGES.rst
M plone/schemaeditor/browser/schema/schemaeditor.js
M plone/app/upgrade/v51/betas.py
M plone/app/upgrade/v51/configure.zcml

diff --git a/CHANGES.rst b/CHANGES.rst
index 2b934d3..7893236 100644
index 760d838..6ace74f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,7 +14,8 @@ New features:
@@ -10,6 +10,9 @@ Breaking changes:

New features:

+- Products.MimetypesRegistry has no longer a skins layer, remove it.
+ [jensens]
+
- Add sort_on field to search controlpanel.
[rodfersou]

Bug fixes:
diff --git a/plone/app/upgrade/v51/betas.py b/plone/app/upgrade/v51/betas.py
index 8ba9cf5..d17b02c 100644
--- a/plone/app/upgrade/v51/betas.py
+++ b/plone/app/upgrade/v51/betas.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+from plone.app.upgrade.utils import cleanUpSkinsTool
from plone.app.upgrade.utils import loadMigrationProfile
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
@@ -17,7 +18,7 @@ def to51beta1(context):

-- *add item here*
+- Re-add overlay registration for Plone 4 accidentally removed in 1.4.
+ [seanupton]
def addSortOnProperty(context):
"""Add sort_on field to search controlpanel.
-
+
The default value of this field is relevance.
"""
# get the old site properties
@@ -45,3 +46,9 @@ def addSortOnProperty(context):
settings.sort_on = 'relevance'
logger.log(logging.INFO,
"Added 'sort_on' property to site_properties.")
+
+
+def remove_leftover_skin_layers(context):
+ """Products.MimetypesRegistry no longer has a skin layer, remove it.
+ """
+ cleanUpSkinsTool(context)
diff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml
index 53b8399..6e2dcc9 100644
--- a/plone/app/upgrade/v51/configure.zcml
+++ b/plone/app/upgrade/v51/configure.zcml
@@ -57,6 +57,12 @@ Add new Mockup 2.4.0 relateditems resource url.
handler=".betas.addSortOnProperty"
/>

+ <gs:upgradeStep
+ title="Remove skins layer converted to browser resources"
+ description="Products.MimetypesRegistry Icons no longer with skins"
+ handler=".betas.remove_leftover_skin_layers"
+ />
+
</gs:upgradeSteps>

1.4 (2016-10-03)
diff --git a/plone/schemaeditor/browser/schema/schemaeditor.js b/plone/schemaeditor/browser/schema/schemaeditor.js
index b60b023..da75a5f 100644
--- a/plone/schemaeditor/browser/schema/schemaeditor.js
+++ b/plone/schemaeditor/browser/schema/schemaeditor.js
@@ -177,6 +177,36 @@
var id = $.plone_schemaeditor_normalize_string($(this).val());
$('#form-widgets-__name__').val(id);
};
+ // field settings form
+ $('a.fieldSettings').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ closeselector: 'input[name="form.buttons.cancel"]',
+ formselector: '#edit-field-form.kssattr-formname-edit',
+ noform: function(el) {
+ var o = $(el), emsg = o.find('dl.portalMessage.error');
+ if (emsg.length) {
+ o.children().replaceWith(emsg);
+ return false;
+ } else {
+ return 'reload';
+ }
+ }
+ });
+ // add new field to form
+ $('#add-field').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ formselector: 'form#add-field-form',
+ noform: 'reload'
+ });
+ // add new fieldset to form
+ $('#add-fieldset').prepOverlay({
+ subtype: 'ajax',
+ filter: common_content_filter,
+ formselector: 'form#add-fieldset-form',
+ noform: 'reload'
+ });
// set id from title
$('body').on('focusout', '#form-widgets-title, #form-widgets-label', set_id_from_title);
});
</configure>


0 comments on commit 811b892

Please sign in to comment.