enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

Implement REST endpoint for fetching the list of image styles #6619

Closed alansemenov closed 5 years ago

alansemenov commented 5 years ago

We need an admin REST endpoint which will be used to fetch the list of image styles (https://github.com/enonic/xp/issues/6617, https://github.com/enonic/xp/issues/6618).

alansemenov commented 5 years ago

Expected format:

{
    "css": ["assets/styles/styles.css"],
    "styles": [{
        "name": "editor-style-raw",
        "type": "style",
        "displayName": "Unprocessed raw image"
    }, {
        "name": "editor-align-justify",
        "type": "alignment",
        "displayName": "Justify",
        "requires": {
            "name": "editor-width-auto",
            "displayName": "Auto (100%)"
        }
    }, {
        "name": "editor-align-left",
        "type": "alignment",
        "displayName": "Align Left",
        "requires": {
            "name": "editor-width-auto",
            "displayName": "Auto (40%)"
        }
    }, {
        "name": "editor-align-center",
        "type": "alignment",
        "displayName": "Center",
        "requires": {
            "name": "editor-width-auto",
            "displayName": "Auto (60%)"
        }
    }, {
        "name": "editor-align-right",
        "type": "alignment",
        "displayName": "Align Right",
        "requires": {
            "name": "editor-width-auto",
            "displayName": "Auto (40%)"
        }
    }, {
        "name": "editor-width-auto",
        "type": "width",
        "displayName": "Auto"
    }, {
        "name": "editor-width-actual",
        "type": "width",
        "displayName": "Actual"
    }, {
        "name": "editor-width-custom",
        "type": "width",
        "displayName": "Custom"
    }, {
        "name": "editor-style-cinema",
        "type": "style",
        "displayName": "Cinema",
        "params": {
            "scale": "21:9"
        }
    }]
}
aro commented 5 years ago

Moved to Content Studio, to be implemented as a service.

https://github.com/enonic/app-contentstudio/issues/485