Skip to content

Commit

Permalink
Add hook to JSONDetails to allow subclasses to supplement or override…
Browse files Browse the repository at this point in the history
… the results

git-svn-id: https://svn.plone.org/svn/collective/Products.TinyMCE/trunk@239756 db7f04ef-aaf3-0310-a811-c281ed44c4ad
  • Loading branch information
anthonygerrard authored and domenkozar committed Jun 4, 2011
1 parent 48b16c7 commit 093504e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGES.txt
Expand Up @@ -5,8 +5,8 @@ HISTORY
1.2.7 (unreleased)
------------------

- Nothing changed yet.

- Add hook to JSONDetails to allow subclasses to supplement or override the results
[anthonygerrard]

1.2.6 (2011-05-12)
------------------
Expand Down
8 changes: 7 additions & 1 deletion Products/TinyMCE/adapters/JSONDetails.py
Expand Up @@ -61,9 +61,15 @@ def getDetails(self):
results['anchors'] = content_anchors.listAnchorNames()
else:
results['anchors'] = []
results.update(self.additionalDetails())

return json.dumps(results)


def additionalDetails(self):
"""Hook to allow subclasses to supplement or override the default set of results
"""
return {}

def _getPloneUrl(self):
"""Return the URL corresponding to the root of the Plone site."""
portal_url = getToolByName(self.context, 'portal_url')
Expand Down

0 comments on commit 093504e

Please sign in to comment.