1

Hiding Icons HUD - choosing which to hide

I use this to hide ALL icons etc on forms.  I have tried to show only the PRINT icon by removing 'none' in the relevant line but regardless of refreshing the page or toggling the HUD Y/N the print icon remains hidden.

What am I missing here?

if HUD then
    html("
    <style>
    .sideeditor-buttons-left .button{display: none;
    height: 0px;}
    .popupeditor2-buttons-left .button{display: none;}
    .stringeditor .stringeditor-button2{display: none;}
    .nx-backplane .popupeditor.pane .nx-button-text.blue{display: none;}
    .tab.tab-icon{display: none;}
    .hud-menu-right{display: none;}
    .HudLeftHeader_root .nav-item.head.FastClickContainer_root{display: none;}
    .nav-item.head.HudLeftHeader_backButton.FastClickContainer_root{display: block;}    
    .HudContainer_body{display: none;}
    .hud-menu-button.menu-icon.menu-icon-trash{display: none;}
    .hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
    .hud-menu-button.menu-icon.menu-icon-add{display: none;}
    .hud-menu-button.menu-icon.menu-icon-print{display:;}
    .hud-menu-group, .hud-menu-right{display:none;}
    .hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}

    </style>
")
end

I also have another script which has the same issue.

if HUD then
    html("
<style>
.hud-menu-button.menu-icon.menu-icon-trash{display: none;}
.hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
.hud-menu-button.menu-icon.menu-icon-add{display: none;}
 .hud-menu-button.menu-icon.menu-icon-add{print: none;}
.hud-menu-group, .hud-menu-right{display:none;}
.hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}
</style>
")
end

changing this  .hud-menu-button.menu-icon.menu-icon-add{print: none;} to
 .hud-menu-button.menu-icon.menu-icon-add{print: ;} or deleting it entirely has no effect.

 

TIA

15 replies

null
    • Sean
    • 9 mths ago
    • Reported - view

    Hi Alan,

    If you are using this script in a Formula field, you can add that line conditionally.

    html("
    <style>" +
    if not Show then
        ".i-setting-print{display:none;}"
    end +
    "
        .i-setting-trash{display:none;}
        .i-setting-copy{display:none;}
        .i-setting-add{display:none;}
    </style>
    ")
    

    "Show" is a "Yes / No" field. I'm not sure when Ninox changed the class names, but here's the full class name list... hud-menu-button.i-32-24.i-light-grey.i-setting-print.

     

    I don't know if your second script was a typo, but you have  .hud-menu-button.menu-icon.menu-icon-add{print: none;}. So you have the "add" line twice and in the second one you are using "print" as a property when it should be "display".

    • Alan_Cooke
    • 9 mths ago
    • Reported - view

    Thanks very much - will check it out 

    • Alan_Cooke
    • 9 mths ago
    • Reported - view

    This works perfectly thanks!!

    html("
    <style>" +
    if not HUD then
        ".i-setting-print{display:none;}"
    end +
    "
        .i-setting-trash{display:none;}
        .i-setting-copy{display:none;}
        .i-setting-add{display:none;}
    </style>
    ")
      • Puff
      • 1 mth ago
      • Reported - view

      Hi, if I don't show the formula field, it shouldn't be visible, the icons aren't hidden. Is there a solution for this?

      • Mel_Charles
      • 1 mth ago
      • Reported - view

       set the formula field to same colour as background of the form (so it's visible on the form but you are effectively hiding it) and i tend to vreate an admin tab and shove things like this onto that section

      • Puff
      • 1 mth ago
      • Reported - view

       Thanks! What do you mean with admin tab? I have several tabs but don't find a way that it hide the icons on all tabs.

      • Mel_Charles
      • 1 mth ago
      • Reported - view

       I tend to add a tab to the form (call it admin) then on this page I add all the odd elements tht i don't want to clutter up the main form(s).

    • Puff
    • 1 mth ago
    • Reported - view

    Thanks for all tipps, if i use the code, the buttons are hidden, but if I click on the symbols for attachments, comments and history the buttons are shown again. How con I hide it also on these tabs?

      • Sam.1
      • 1 mth ago
      • Reported - view

       Hi Puff,

      I have used the following in a formula placed in the form. It will work on the server as well as the Mac App offline

      html("
          <style>

          .tab.tab-icon{display: none;}

          </style>
      ")

      • Alan_Cooke
      • 1 mth ago
      • Reported - view

       I just tried this in a formula on a form and nothing was hidden at all.  I refreshed the browser as well to make sure I missed nothing.  What am I missing?

      html("
          <style>

          .tab.tab-icon{display: none;}

          </style>
      ")

      • Sam.1
      • 1 mth ago
      • Reported - view

      @Alan Cook  Alan, this leaves the printer available. I usually use it like this. 

      html("
      <style>" +
      "
          .i-setting-trash{display:none;}
          .i-setting-copy{display:none;}
          .i-setting-add{display:none;}
      .tab.tab-icon{display: none;}
      </style>
      ")

      • spinner_7580
      • 1 mth ago
      • Reported - view

       Out of curiosity, where does this html code go?  I use the Mac app to develop and then deploy on the web.  I see references to html code often but don't know where that kind of code resides etc.

       

      Thank you.

      • Sam.1
      • 1 mth ago
      • Reported - view

       In a formula on the form. 

      It can be hidden by choosing a color for the formula that matches the form color. And, hiding the field name.

      • Puff
      • 1 mth ago
      • Reported - view

       

      Thanks for all the advice and sorry for the late reply. But unfortunately this is not a solution for my requirement. I don't want to hide the Attachments, Comment and Change History icons, but the Delete, Duplicate etc. icons. This works on the tabs that I create, but NOT on the Attachments, Comment and Change History tabs. Is there a solution for this?
      And is it possible to define this for the whole database in one place instead of having to define it for each tab in each table individually?

    • spinner_7580
    • 1 mth ago
    • Reported - view

    HUD hiding users:

    I'm unable to figure out how to hide the icons on the left hand side of the Ninox window.

    Using your examples, I can hide the icons on the right as indicated below:

     

    In addition I would like to hide the these icons on the left:

     

     initial post in this topic does hide the icons in question but it also hides the

    "sidebar" icon which I would like to leave visible.

     

    Thanks for your advice!

Content aside

  • Status Answered
  • 1 Likes
  • 1 mth agoLast active
  • 15Replies
  • 305Views
  • 6 Following