Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Post your ideas & suggestions for new nuBuilder features or other improvements
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Thu Feb 24, 2022 12:00 am
For smaller screens browse screens can be set to scroll to prevent overflow as below as an alternative. This can also be applied to edit screens. Just thought this might be useful to someone.
The below code will enable to achive
chrome-capture.gif
Code: Select all
if (nuFormType() == 'browse') {
$('.nuRECORD').css({'width':'100%','height':'85vh','overflow':'scroll', 'display':'flex'});
}
}
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4291 Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:
Unread post
by kev1n » Thu Feb 24, 2022 8:02 am
Hi,
I think overflow should be set to auto. Otherwise the additional scrollbar is always visible albeit disabled.
2022-02-24_075741.png
Code: Select all
$('.nuRECORD').css({'width':'100%','height':'85vh','overflow':'scroll', 'display':'flex'});
Other than that, it works well thanks for that!
Question: What is the purpose of setting the height to 85vh?
You do not have the required permissions to view the files attached to this post.
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Thu Feb 24, 2022 9:13 am
When height set to 100% i noticed that the scroll bar goes right to the bottom of some of the pages and which may not be visible to end user..but it can be set to individuals preference
kev1n
nuBuilder Team
Posts: 4291 Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:
Unread post
by kev1n » Thu Feb 24, 2022 9:43 am
There is still the question of whether a second scrollbar should be displayed at all or whether the width of body can be set so that it corresponds to that of the browse table.
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Thu Feb 24, 2022 11:24 am
I think it should be be left to auto so that its only visible when needed.
kev1n
nuBuilder Team
Posts: 4291 Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:
Unread post
by kev1n » Thu Feb 24, 2022 11:36 am
What is the advantage of showing an additional scrollbar? There is already a scrollbar when screen or browser window is too narrow.
scroll.png
You do not have the required permissions to view the files attached to this post.
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Thu Feb 24, 2022 9:03 pm
kev1n wrote: ↑ Thu Feb 24, 2022 11:36 am
What is the advantage of showing an additional scrollbar? There is already a scrollbar when the screen or browser window is too narrow.
scroll.png
Window scroll bar doesnot fix the browse table overflow
chrome-capture (1).gif
This code only takes care of that issue. Kindly try to see the difference. Thanks.
Code: Select all
$('.nuRECORD').css({'width':'100%','height':'85vh','overflow':'autol', 'display':'flex'});
You do not have the required permissions to view the files attached to this post.
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Mon Jun 27, 2022 11:12 pm
a bit improved version. this code will hide the window scroll bar for browse form only.
Place in form custom Browse edit JS. May be helpful to those using smaller screens.
Code: Select all
$(document).ready(function(){
if (nuFormType()=='browse'){
$('.nuRECORD').css({'width':'100%','height':'100%','overflow-x':'auto'});
document.body.style.overflow = 'hidden';
}else {
document.body.style.overflow = 'visible';
}
});
kev1n
nuBuilder Team
Posts: 4291 Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:
Unread post
by kev1n » Tue Jun 28, 2022 12:31 pm
In a desktop browser when the width of the window is made smaller, there are no scrollbars at all anymore after adding the code.
2022-06-28_122636.png
You do not have the required permissions to view the files attached to this post.
nc07
Posts: 118 Joined: Tue Jun 04, 2019 4:05 am
Has thanked: 5 times
Been thanked: 22 times
Unread post
by nc07 » Wed Jun 29, 2022 12:35 am
kev1n wrote: ↑ Tue Jun 28, 2022 12:31 pm
In a desktop browser when the width of the window is made smaller, there are no scrollbars at all anymore after adding the code.
2022-06-28_122636.png
chrome-capture-2022-5-29 (2).gif
Code: Select all
function nuOnLoad() {
$(document).ready(function(){
if (nuFormType()=='browse'){
$('#nuRECORD').css({'width':'100%','height':'100%','overflow-x':'auto'});
document.body.style.overflow = 'hidden';
}else {
document.body.style.overflow = 'visible';
}
});
}
The above code placed in the header works on all forms.
You do not have the required permissions to view the files attached to this post.