diff --git a/docs/source/howtos/howto_override_comments_viewlet.txt b/docs/source/howtos/howto_override_comments_viewlet.txt index 11c0248..b45aba4 100644 --- a/docs/source/howtos/howto_override_comments_viewlet.txt +++ b/docs/source/howtos/howto_override_comments_viewlet.txt @@ -135,36 +135,4 @@ comments.py file with our custom version of the comments viewlet:: return "%s/memberhome/%s" % (self.context.portal_url(), username) To override the comments viewlet template, we create a comment.pt file in the -same directory and copy the contents from:: - - ... - - -Override the comments viewlet Javascript ----------------------------------------- - -Overriding the comments viewlet javascript works just like overriding the -comments viewlet. We register the javascript file for our custom browser -layer and remove the existing javascript file in -profiles/default/jsregistry.xml:: - - - - - - - - - -browser/configure.zcml:: - - - +same directory and copy the contents from the original. diff --git a/news/157.bugfix b/news/157.bugfix new file mode 100644 index 0000000..0b13d04 --- /dev/null +++ b/news/157.bugfix @@ -0,0 +1,2 @@ +Fix reply to comment by adding old-school js-resources to legacy-bundle. Fix #157 +[pbauer] \ No newline at end of file diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 6a0efa2..7bb5aac 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -1,6 +1,7 @@ @@ -129,10 +130,10 @@ /> - diff --git a/plone/app/discussion/browser/controlpanel.pt b/plone/app/discussion/browser/controlpanel.pt index b62a447..d525fcb 100644 --- a/plone/app/discussion/browser/controlpanel.pt +++ b/plone/app/discussion/browser/controlpanel.pt @@ -70,7 +70,7 @@ diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 797c18a..073d4d2 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -18,7 +18,7 @@ b_start request/b_start | b_start; moderation_enabled view/moderation_enabled;">

diff --git a/plone/app/discussion/profiles/default/jsregistry.xml b/plone/app/discussion/profiles/default/jsregistry.xml deleted file mode 100644 index db55b25..0000000 --- a/plone/app/discussion/profiles/default/jsregistry.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/plone/app/discussion/profiles/default/metadata.xml b/plone/app/discussion/profiles/default/metadata.xml index f14a707..c779e86 100644 --- a/plone/app/discussion/profiles/default/metadata.xml +++ b/plone/app/discussion/profiles/default/metadata.xml @@ -1,6 +1,7 @@ - 1000 + 1001 + profile-plone.resource:default profile-plone.app.registry:default diff --git a/plone/app/discussion/profiles/default/registry.xml b/plone/app/discussion/profiles/default/registry.xml index 1e0d535..ba7fe98 100644 --- a/plone/app/discussion/profiles/default/registry.xml +++ b/plone/app/discussion/profiles/default/registry.xml @@ -4,4 +4,17 @@ False False + + + ++plone++plone.app.discussion.javascripts/comments.js + + + + plone-app-discussion + + + + diff --git a/plone/app/discussion/upgrades.py b/plone/app/discussion/upgrades.py index d9114f4..7a0e30c 100644 --- a/plone/app/discussion/upgrades.py +++ b/plone/app/discussion/upgrades.py @@ -61,3 +61,7 @@ def upgrade_comment_workflows(context): comment.reindexObjectSecurity() except (AttributeError, KeyError): logger.info('Could not reindex comment {0}'.format(brain.getURL())) + + +def add_js_to_plone_legacy(context): + context.runImportStepFromProfile(default_profile, 'plone.app.registry') diff --git a/plone/app/discussion/upgrades.zcml b/plone/app/discussion/upgrades.zcml index 9fa258c..02a7e54 100644 --- a/plone/app/discussion/upgrades.zcml +++ b/plone/app/discussion/upgrades.zcml @@ -51,4 +51,15 @@ /> + + + +