Details
-
New Feature
-
Resolution: Fixed
-
Major
-
13.3-rc-1
-
None
-
Unit, Integration
-
Unknown
-
Pull Request accepted
-
Description
ATM is not possible to use the Icon Theme from JavaScript code unless:
- you mix the JavaScript code with Velocity
- or you read the icons from HTML (where they were placed by some server side script)
- or you get the icons from some service (e.g. search suggest)
Ideally, a pure JavaScript module should be able to request from the server side the icons it needs, in the same way it asks for the translation keys (XWIKI-18491). For this we should probably add a new REST resource that could look like this:
/xwiki/rest/wikis/{wikiName}/iconThemes/{iconTheme}/icons?icon=one&icon=two&... /xwiki/rest/wikis/{wikiName}/iconThemes/silk/icons?icon=one&icon=two&...
or
/xwiki/rest/wikis/{wikiName}/iconSets/{iconSet}/icons?icon=one&icon=two&... /xwiki/rest/wikis/{wikiName}/iconSets/fa/icons?icon=one&icon=two&...
and return a list of icon meta data (XWIKI-15389). I'm not sure how to ask for icons from the current icon set/theme though. Maybe by omitting the icon set/theme name.
Attachments
Issue Links
- blocks
-
XWIKI-18605 Live Data macro doesn't use the configured Icon Theme
- Closed
- is related to
-
XWIKI-18491 Add a localization REST resource to expose translation messages
- Closed
-
XWIKI-15389 Improve the icon API for REST API usage
- Closed