moving some javascript to plone.app.widgets