AppSuite:Modifying forms by using extension points: Difference between revisions

From Open-Xchange
Line 9: Line 9:


<pre class="language-javascript">  
<pre class="language-javascript">  
// you can filter down the list by using a regular expression  
// you can filter down the list by using regular expression  
_(require('io.ox/core/extensions').keys()).filter(function (point) {
_(require('io.ox/core/extensions').keys()).filter(function (point) {
     if (/io.ox\/contacts\/edit/.test(point)) {
     if (/io.ox\/contacts\/edit/.test(point)) {
Line 22: Line 22:
</pre>
</pre>


<pre class="language-javascript">
// 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;
    }
});
</pre>


[[Category:AppSuite]]
[[Category:AppSuite]]
[[Category:UI]]
[[Category:UI]]

Revision as of 08:30, 10 April 2013

Summary: This articles covers how to apply different changes to forms via modifying its extensionpoints and extensions.

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;
    } 
});