Attachment Picker WebJar
Explanation
The Attachment Picker WebJar holds the JavaScript of the attachmentGalleryPicker macro: one RequireJS module that turns markup into a working picker, and one that searches the wiki for attachments. Every XWiki instance already carries it, through the flavor.
Modules
| Module | What define() returns | Requires |
|---|---|---|
| xwiki-attachment-picker | Nothing. Loading it registers the jQuery plugin and the automatic initialisation. | jquery, xwiki-attachments-icon, xwiki-l10n!, xwiki-attachment-picker-solr-search |
| xwiki-attachment-picker-solr-search | The SolrSearch class. | jquery |
| xwiki-attachment-picker-translation-keys | The descriptor xwiki-l10n! reads to fetch the four messages. Internal: defined in the same file as the picker, with no RequireJS name of its own outside the WebJar. | Nothing |
Load the picker module to build a picker the macro cannot render, or the search module to reuse its search without a picker at all.
xwiki-attachments-icon comes from the XWiki web application rather than from this WebJar, xwiki-l10n!, the RequireJS loader plugin, from the Front-end Localization WebJar, and the search reaches the wiki's Solr index through a wiki page of the instance. The modules therefore run inside an XWiki page and nowhere else.
FAQ
Why does requiring xwiki-attachment-picker resolve to nothing?
The two public module names are declared to RequireJS by the Attachment Picker Application rather than by this WebJar, so an instance without that Application resolves neither of them.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.