Giter Site home page Giter Site logo

Comments (4)

aheinze avatar aheinze commented on May 22, 2024

the defaults are set in the collection item view. I have to think about a generic improvement solution

from layoutcomponents.

pauloamgomes avatar pauloamgomes commented on May 22, 2024

Seems solved in Cockpit field layout as per other thread discussion there

from layoutcomponents.

mortensassi avatar mortensassi commented on May 22, 2024

Is this fixed? A look at the Response shows that the styles of an image does not get output:

components.js

{
    "custom_image": {
        "label": "Custom Image",
        "dialog": "normal",
        "children": false,
        "fields": [
            {
                "name": "image",
                "label": "Image",
                "type": "asset",
                "default": "",
                "info": "",
                "group": "",
                "localize": false,
                "width": "1-1",
                "lst": true,
                "acl": [],
                "options": {
                    "styles": [
                        "Default",
                        "Placeholder"
                    ]
                }
            }
        ],
        "group": "media"
    }
}

Response

{
          "component": "custom_image",
          "settings": {
            "id": "",
            "class": "",
            "style": "",
            "image": {
              "path": "\/2019\/01\/24\/5c49eeada1071slide5.jpg",
              "title": "slide5.jpg",
              "mime": "image\/jpeg",
              "description": "",
              "tags": [],
              "size": 262747,
              "image": true,
              "video": false,
              "audio": false,
              "archive": false,
              "document": false,
              "code": false,
              "created": 1548349101,
              "modified": 1548351106,
              "_by": "5c49dd3c3361356bf0000243",
              "width": 1600,
              "height": 1069,
              "colors": [
                "#cbcbcb",
                "#272727",
                "#585858",
                "#7a7a7a",
                "#646464"
              ],
              "folder": "",
              "_id": "5c49eeae34366200290003b1"
            }
          }
        }

from layoutcomponents.

pauloamgomes avatar pauloamgomes commented on May 22, 2024

Hey @mortensassi , the original issue was not related with image styles (styles are provided by custom addon), but with passing defaults to custom components fields, e.g.: default value of a textfield, dropdown, etc..

can you kindly open an issue on the image styles addon?

from layoutcomponents.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.