storypioneers / kirby-selector

file selector panel field for Kirby CMS
GNU General Public License v3.0
128 stars 23 forks source link

Works Kirby-Selector with Kirbybuilder #38

Open janstieler opened 8 years ago

janstieler commented 8 years ago

Hi, does anybody know if that plugin will work together with the KirbyBuilder? I read this here on the Kirbybuilder page which it makes me thoughtful:

All issues related to the structure field of Kirby Panel do also affect the builder field. Builder fields do not support nested fields that require a modal to handle the content, i.e. structure fields or other builder fields.

Kind

JonasDoebertin commented 8 years ago

Generally, from my experience the selector works fine in regular modal fields. I haven't tried it with the KirbyBuilder plugin, but I think it should be working, as well. Did you give it a try, yet?

icod commented 8 years ago

I tried it, and it worked fine. That is, selection and subsequent data storage work as expected. The Edit and Add buttons don't do anything though.

Targoran commented 8 years ago

It generally works fine. I'm using it for a client project and it's pretty handy.

There's one problem though: Kirby-Selector saves the selected images as a komma-separated list – but without spaces in-between each entry. And because the Kirby-Builder plugin just prints out this list in the field, you might end up getting a pretty long single-line string, which of course doesn't play nice with responsive design. Meaning: Your backend now scrolls horizontally.

Thiousi commented 8 years ago

@Targoran you could add in your custom panel css some rules to break the line. Ref: https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/

Targoran commented 8 years ago

@Thiousi Yes, that's exactly what I ended up doing for the project.

Here's what I ended up with in the custom panel css:

.structure-entry .structure-entry-content {
    word-break: break-word !important;
}