AppSuite:Modifying forms by using extension points: Difference between revisions
From Open-Xchange
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
Each extensionpoint controls a single aspect - like the the input field for first name or the user picture - of the contact. | Each extensionpoint controls a single aspect - like the the input field for first name or the user picture - of the contact. | ||
To apply modifications the id of the point is needed. | To apply modifications the id of the point and the extension is needed. | ||
==available extensionpoints== | ==available extensionpoints== |
Revision as of 13:26, 10 April 2013
Summary: This articles covers how to apply different changes to forms via modifying its extensionpoints and extensions.
The edit contact form of the contacts app is constructed by a set of extensionpoints. Each extensionpoint controls a single aspect - like the the input field for first name or the user picture - of the contact.
To apply modifications the id of the point and the extension is needed.
available extensionpoints
// get all available extensionpoints require('io.ox/core/extensions').keys();
// you can filter down the list by using regular expression _(require('io.ox/core/extensions').keys()).filter(function (point) { if (/io.ox\/contacts\/edit/.test(point)) { return point; } });
// get all available keys of a known extensionpoint require('io.ox/core/extensions').point('io.ox/contacts/edit/personal').keys();
// get a single extension by using regular expression _(require('io.ox/core/extensions').point('io.ox/contacts/edit/personal').all()).filter( function (extension) { if (/title/.test(extension.id)) { return extension; } });