Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18604

Expose the Icon Theme through the REST API

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 13.4-rc-1
    • 13.3-rc-1
    • Icon Themes
    • 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

          Activity

            People

              mleduc Manuel Leduc
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: