Copied to clipboard

Flag this post as spam?

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


  • Neil 63 posts 105 karma points
    Nov 17, 2014 @ 17:35
    Neil
    0

    How to show all app icons with some grayed out

    Hi All,

    I am new to trying to modify umbraco functionality, and am wondering if there is a way to get umbraco to show all the placeholder app icons (content, media, settings, etc.) even if a user doesn't have access to that section. The ones they don't have access to being greyed out or something.

    Thanks!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 17, 2014 @ 17:41
    Jan Skovgaard
    0

    Hi Neil

    By default sections that a user is not allowed to acces are not visible since they don't need to worry about stuff they can't access anyway.

    So are there any specific reason why you want your users to be able to see those sections? Would like to know your scenario :)

    /Jan

  • Neil 63 posts 105 karma points
    Nov 17, 2014 @ 18:40
    Neil
    0

    Hi Jan,

    Mostly it's to wow our clients a little bit. It shows the depth to what's happening in the cms even if you can't access it. Also, we've been playing with tweaking layout, and we've got those icons arranged vertically to the left of the tree window. It lays out more nicely with more icons. Also, our custom icons look cool, so we want the client to see them :-).

    Is there a way to override the default other than totally hijacking the literal that populates those icons and writing something custom (ugh)?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 17, 2014 @ 19:15
    Jan Skovgaard
    0

    Hi Neil

    Nope, there is no way to change the default of the backoffice other than doing a lot of customization as it sounds like you guys have already been doing :)

    /Jan

  • Neil 63 posts 105 karma points
    Nov 18, 2014 @ 21:44
    Neil
    1

    Well, Jan, I used jquery to fix it up. :-)

    Posting it here in case anyone else finds it useful.

    My addition to investorflowCMSGui.css:

    #tray li div 
    {
    background-image: url('../images/tray/traySpritesGrayed.png');
    background-repeat: no-repeat;
    text-decoration: none;
    padding: 0;
    margin: 0;
    color: #fff;
    font-size: 1px;
    width: 85px;
    height: 61px;
    display: block;
    padding-bottom: 10px;
    }
    

    My jquery in umbraco.aspx as the FIRST thing executed in the script section (even before the jQuery(document).ready() check):

        // show disabled menu icons
        var items = "";
        var trayArray = ["traycontent", "traymedia", "traysettings", "traydeveloper", "trayusers", "traymember", "traytranslation"];
        var trayArrayHtml = [
            "<div class=\"traycontent\" title=\"Content\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"traymedia\" title=\"Media\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"traysettings\" title=\"Settings\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"traydeveloper\" title=\"Developer\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"trayusers\" title=\"Users\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"traymember\" title=\"Members\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>",
            "<div class=\"traytranslation\" title=\"Translation\"><img class=\"trayHolder\" alt=\"\" src=\"images/nada.gif\"></div>"];
    
        var foundflag = false;
        for (var i = 0; i < trayArray.length; i++) {
            jQuery('#PlaceHolderAppIcons #tray li').each(function() {
                if ($(this).children('a').attr('class') == trayArray[i]) {
                    items += "<li>" + $(this).html() + "</li>";
                    foundflag = true;
                    return false;
                }
            });
            if (!foundflag) {
                items += "<li>" + trayArrayHtml[i] + "</li>";
            }
            else {
                foundflag = false;
            }
        }
        jQuery('#PlaceHolderAppIcons #tray').html(items);
    
Please Sign in or register to post replies

Write your reply to:

Draft