plone/plone.app.widgets — pull request #45 by alecpm (2013-10-27 06:48:40+00:00)
Title: Contextual vocabulary

Some changes to help make these widgets more usable with custom types/fields.

1) Vocabulary lookup happens on the context, rather than always on the portal. Vocabulary sources may differ from location to location, and forcing the lookup on the portal makes the widgets unusable in those cases.

2) There is now an automated permission check which doesn't require a module level mapping of vocabularies to permission names. An optional field name can be passed to the vocabulary view, which will cause the write permission for the field to be used for the permission check on the context.

3) Ordering support. Select2 based multiselects now incorporate ordering support, when appropriate. For AT, this is a property of the widget (currently defaulted to off). For Dexterity/z3c.form ordering is automatically enabled for collection field types that support ordering (e.g. Tuple and List but not Set).