Difference between revisions of "AppSuite:Files App Actions"

(Created page with "<div class="title">Adding actions to the files detail area</div> To add an action to the files app detail area the extensionpoint io.ox/files/links/inline is used. Use the Li...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="title">Adding actions to the files detail area</div>
+
The content on this page has moved to https://documentation.open-xchange.com/latest/ui/customize/action.html
  
To add an action to the files app detail area the extensionpoint io.ox/files/links/inline is used.
+
Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.
Use the Link pattern in io.ox/core/extPatterns/links.js to extend this point.
 
Try via console:
 
 
 
<pre class="language-javascript">
 
require(['io.ox/core/extensions', 'io.ox/core/extPatterns/links'], function (ext, links) {
 
 
 
  new links.Action('io.ox/files/actions/testlink', {
 
    requires: function (e) {
 
      e.collection.has('some') && capabilities.has('webmail');
 
    },
 
    multiple: function (baton) {
 
      console.log(baton);
 
    }
 
  });
 
 
 
  ext.point('io.ox/files/links/inline').extend(new links.Link({
 
    id: 'testlink',
 
    index: 400,
 
    label: 'labelname',
 
    ref: 'io.ox/files/actions/testlink'
 
  }));
 
});
 
</pre>
 
 
 
== Action ==
 
The first argument is the unique id of the action.
 
 
 
requires - checks for the needed components and the collection status. (''some'' is used for multiple elements, ''one'' for an single one)
 
 
 
* If the action is used only on a single element use action.
 
* If the action should be applied to multiple elements use multiple.
 
* In both cases the baton is available to the action.
 
 
 
== Link==
 
* id - must be unique
 
* index - the position/order of the link
 
* label - the label for the link
 
* ref - the reference to the action id
 
 
 
[[Category:AppSuite]]
 
[[Category:UI]]
 

Latest revision as of 09:18, 22 May 2017

The content on this page has moved to https://documentation.open-xchange.com/latest/ui/customize/action.html

Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.