collective/collective.polls — pull request #69 by mauritsvanrees (2013-03-26 15:17:19+00:00)
Title: Fix portlet refresh

Previously no html would be returned when the portlet was defined on a default page. This is fixed by passing the url of the context in a new data-url attribute of the form. I renamed the existing data attribute to data-manager for clarity.

The refresh would fail with a ComponentLookupError when used inside a panel of collective.panels. Now we try a getUtility with the name of the portlet manager. If this fails we keep the data-manager attribute empty and the javascript will then not try to refresh the portlet, but simply redirect by setting the window.location.

Possibly it would previously fail with ContentWellPortlets too, but I did not check.