Announcement

Collapse
No announcement yet.

Toolbar items under menu

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toolbar items under menu

    Anybody succeeded in manipulating the toolbar beneath the menu? I would like to be able to hide them like the menu items, but the macros for hiding buttons do not apply for menu's and the macro's for manipulating the menu do not apply for the toolbar buttons of the menu application...
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

  • #2
    Try this one (onApplicationInit):
    echo "<style type='text/css'>#btn_1 { visibility: hidden} </style>";

    jsb

    Comment


    • #3
      I tried the above but cant get it to work.
      I have tried in all the Events but to no prevail
      What I have tested on is

      echo "<style type='text/css'>#item_1 { visibility: hidden} </style>";
      as well as
      echo "<style type='text/css'>#btn_1 { visibility: hidden} </style>";

      Comment


      • #4
        Albert,

        I use sc_apl_status() (in security module) to turn on/off the Menu Toolbar Buttons, by specifying the application that the button specifies.
        Works very well so that different classes of users can get different toolbar items.

        Larry:

        If you want to hide it dynamically, I think the CSS that you want would be:

        Code:
        echo "<style>#btn_2 { display: none !important; }</style>";
        You need to make sure that you specify the proper ID of the button. See attachment.

        Capture.PNG


        Dave
        Dave Prue
        Code Whisperer
        Lahar International Corp
        www.lahar.net

        Comment


        • #5
          Dave - Thank you. I did try this, however I notice you are using V8, this may be the issue.

          I tried using both btn and item cant seem to get it to work.

          echo "<style>#item_1 { display: none !important; }</style>";

          Menu_Issue.png

          Comment


          • #6
            Larry,

            Yes, it may be because of using V7. To determine the required code to hide the button, you need to look at the generated code with an inspector (i.e. F12 in Firefox).

            Do you have a publicly accessible version of the generated page?

            Dave
            Dave Prue
            Code Whisperer
            Lahar International Corp
            www.lahar.net

            Comment


            • #7
              Dave - I go it to work real well, using
              In the menu applicationInit, I put in sc_reset_menu_delete();

              Then based upon the user's table, which has various fields stating what the user can and cannot see, I removed the menu items necessary using

              sc_menu_delete('item_nnnn');

              Since I have sc_reset_menu_delete(), I always start afresh and the condition in the menuLoad controls what is visible and what is not.

              Comment


              • #8
                Larry,

                ok, sounds good!

                Dave
                Dave Prue
                Code Whisperer
                Lahar International Corp
                www.lahar.net

                Comment

                Working...
                X