Copied to clipboard

Flag this post as spam?

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


  • mfeola 117 posts 221 karma points
    Jun 30, 2015 @ 21:51
    mfeola
    0

    Adding colors to the document type icon picker

    Is there an easy way to add colors to the icon picker in the info section when creating a new document type? We have color coordinated some file types and I would like to match them in the admin side but the colors available don't match. For example there is no purple.

    Any simple way to add this in?

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Jul 01, 2015 @ 06:14
    Kevin Jump
    101

    Hi,

    as far as i can tell there is no supported way of changing or adding colours. and anything below could could cause problems with upgrades etc.

    the colours in the drop down are defined in \Umbraco\Views\common\dialogs\iconpicker.html

    where you should see

        <select ng-model="color" class="input-block-level">
            <option value="">Black</option>
            <option value="color-green">Green</option>  
            <option value="color-yellow">Yellow</option>    
            <option value="color-orange">Orange</option>
            <option value="color-blue">Blue</option>    
            <option value="color-red">Red</option>
        </select>
    

    adding to this list will change the drop down, but the colours are styled inside \Umbraco\Assets\css\umbraco.css which is the master stylesheet for umbraco.

    if you change these files (especially the stylesheet) you are going to potentially have loads of trouble tracking changes should you upgrade the site.

    I think you could (although i've not tried it) add the styles to the end of \Umbraco_Client\tree\treeicons.css but only because it's smaller

    again you would have to watch out for any upgrade changes to these files.

  • mfeola 117 posts 221 karma points
    Jul 01, 2015 @ 16:52
    mfeola
    0

    Thank you for all your information and warnings. I will keep them in mind in deciding whether to move forward with this idea. Maybe I can fashion this int some kind of plugin instead? Will have to mull over options.

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Jul 01, 2015 @ 18:52
    Kevin Jump
    0

    yes, if you're looking at doing it via a plugin, have a look at the Umbraco Environment Indicator, it does similar things in that it changes the colour of the logo, based on what site you are on.

    you could similarly hook into the page and inject the styles you need.

  • Sam Pearson 36 posts 89 karma points
    Oct 23, 2017 @ 08:31
    Sam Pearson
    0

    Is this still possible to do in Umbraco 7.7?

    I've successfully added the additional colour styles to the back office via a custom App_plugin folder (using package.manifest - tested via the dev console), however updating the iconpicker.html view (location stated in the OP) does not seem to render the extra options in the select box now (it did back in 7.4).

    I've also noticed that the structure of the Select box has changed slightly too, it's now defined like this;

            <select ng-model="color" class="input-block-level">
                <option value=""><localize key="colors_black">Black</localize></option>
                <option value="color-green"><localize key="colors_green">Green</localize></option>
                <option value="color-yellow"><localize key="colors_yellow">Yellow</localize></option>
                <option value="color-orange"><localize key="colors_orange">Orange</localize></option>
                <option value="color-blue"><localize key="colors_blue">Blue</localize></option>
                <option value="color-red"><localize key="colors_red">Red</localize></option>
            </select>
    

    Any help would be appreciated, thanks!

  • Sam Pearson 36 posts 89 karma points
    Nov 09, 2017 @ 10:59
    Sam Pearson
    0

    Update: Ok so you can still add your own custom icon colours, but now you need to edit the view in the following location:

    ~\Umbraco\Views\common\overlays\iconpicker\iconpicker.html

    The old select input that I was editing before that no longer seems to be used for docytype colours is at:

    ~\Umbraco\Views\common\dialogs\iconpicker.html

Please Sign in or register to post replies

Write your reply to:

Draft