Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Nov 07, 2016 @ 12:31
    Lee Kelleher
    1

    Grid Settings: CheckboxList PreValueEditor?

    Has anyone made, or know how to make a CheckboxList PreValueEditor?

    I'd like to use one for the Grid settings, (I've checked the docs, but there isn't one).

    Another thread mentions the need for one, but nothing seems to have come of it.

    If anyone has already built a checkboxlist prevalue editor (as opposed to the property-editor), and is willing to share it... that would be hugely appreciated.

    Thank you,
    - Lee

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 07, 2016 @ 15:15
    Rune Grønkjær
    102

    I have made one that works like a charm. Heres the code.

    Javascript: http://pastebin.com/uCPSXwnB

    Html: http://pastebin.com/sMCeycvg

    Settings: http://pastebin.com/vptcQb10

    EDIT: Stylesheet: http://pastebin.com/FNT9PxXB

    EDIT 2: I changed the settings file. Took the wrong one. They look so much alike.

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 07, 2016 @ 15:21
    Rune Grønkjær
    1

    It looks like this in action enter image description here

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 07, 2016 @ 15:25
    Rune Grønkjær
    0

    Heres another settings for it, where it adds one or more classes depending on the checked values: http://pastebin.com/TNuhBcP7

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Nov 07, 2016 @ 15:38
    Lee Kelleher
    1

    Thanks Rune, that is very very much appreciated! #h5yr

    Cheers,
    - Lee

  • Martin 278 posts 661 karma points
    Nov 18, 2016 @ 08:53
    Martin
    0

    Hi Rune,

    This looks great. As one of those designer types, where do I drop those files within Umbraco?

    Thanks

    Martin

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 18, 2016 @ 09:04
    Rune Grønkjær
    2

    The files (html, javascript and stylesheet) should be placed in a folder in your App_Plugins folder. It's much like creating a new editor like here: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Grid-Layout/build-your-own-editor

    Make sure you add a package.manifest file, as the guide says.

    After that you add the settings part of my example to the Grid layout data type you are using on the page.

    More specific you can both use it on the "Settings" and/or "Styles" part of the Grid layout.

    Read more about that in general here: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Grid-Layout/Settings-and-styles

  • Nigel Wilson 939 posts 2061 karma points
    Nov 24, 2018 @ 18:54
    Nigel Wilson
    1

    Hi Rune

    It's 2 years after you published this, but I have just found it today and it has solved a curly issue I have been mulling over for a rebuild of my partners site.

    I was wanting a way to be able to set multiple css classes on a row, so this option is a perfect idea / solution to setting classes.

    Thanks heaps for sharing

    Nigel

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 26, 2018 @ 07:14
    Rune Grønkjær
    0

    Cheers :)

  • Martin 278 posts 661 karma points
    Nov 18, 2016 @ 13:39
    Martin
    1

    Hi Rune, Brilliant. Got it working. Thanks.

    Martin.

  • Rune Grønkjær 1303 posts 2895 karma points
    Nov 18, 2016 @ 14:04
    Rune Grønkjær
    0

    That's fantastic. It's a pretty nifty little editor if I should say so myself.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies