Hiding elements - HUD control
In case this might helps folks here are a couple of helps. Please feel free to add anything to this post that relates to the Title.
-------------------------------------------------------------------
The formula for this has the following in the On Click event.
if HUD = true then HUD := false else HUD := true end
A Yes/No (in my case HUD) is toggled to display via On Click.
Note: Every TAB in a form requires a formula (only one HUD yes/no) with the script. I use a convention of 'HUD-tabname'
---------------------------------------------------------------------
The formula is styled to be completely invisible placed somewhere on the form - it cannot be hidden (null, void etc). The Yes/No can be hidden. To toggle the HUD elements on/off simply click the invisible formula.
If someone could figure out a way to have this as a Global - WOW!
---------------------------------------------------------------------
---- First section hides everything including sidebar, attachments and comments but does not hide Ninext filter----
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;}
</style>
")
end
------This one hides everything including Ninext filter, Search, Gear, Filter, sidebar. Basically everything between the TABS row and the VIEWS Row. Attachments and Comments remain------
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-print{display:none ;}
.hud-menu-button.menu-icon.menu-icon-add{display: 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
10 replies
-
I was frantically looking for the bottom code in my notes but couldn't find it, glad I found it here!!
However, is it correct then that this1.) has to be scripted into a DEDICATED formula field on each tab? I tried using the script on the tabs itself, didn't work, tried putting it before one of my header styled formulas per tab, didn't work. I really have to use an own formula field just for this piece of code?
2.) Tried implementing a similar formula field in the table overview (main page).. also was not able to block the buttons, so I assume there is no way of blocking that bottom button at the table either? This is the most annoying one, this is the one that constantly creates empty database entries and it is a shame ninox hasn't come up with a way to block this one or at least allow for a confirmation prompt or similar.
-
Hi Sean, I can place this in the tab, and then this works when a record is popped up.
But unfortunately, I can't make the + disappear when no record is popped up, it automatically comes back.Also, although the plus is suppressed, clicking there still generates a new record.
I really wish ninox would give us a way of blocking this unnecessary and honestly quite counter-productive feature. -
Ruben said:
According to Ben Lucas, there is no known possibility to actually block this function at the moment but is planned for one of the next bigger updates.We have been asking for that for some time now... Urgent change
Frank Böhmer had the last comment in the thread and below is the English translation...
The paradigm of Ninox is to always save changes directly. To implement the requested change we would have to change the entire template to an explicit confirmation (OK button). It's a compromise. You can implement your own button that will set a certain state only if all validations pass.
Last year I found the function
return e.create(),void(0,s.j)("Table","CreateRecord")
and replaced it with
void e.selectNothing()
in the main.js file for the Mac app on my computer and clicking on that row no longer added a new record. I tested it again just now and it still works.
I sent a DM and email to Jacques TUR last year asking if he would be interested in incorporating this in his Ninext project. It will be interesting to see who comes up with a solution first.
Content aside
-
1
Likes
- 1 yr agoLast active
- 10Replies
- 648Views
-
4
Following