Page 3 of 4
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 9:55 am
by kev1n
Did you try this?
https://forums.nubuilder.cloud/viewtopic. ... =10#p20859
Just replace
height with
width
Code: Select all
$('body').css('width', '200px'); // reduce the body height
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 1:15 pm
by kknm
Yes, the trick with width works, but it doesn’t work out with height. It is necessary to limit the number of lines in the iframe.
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 1:27 pm
by kknm
It is desirable that the number of lines in the iframe be dynamic, i.e. the number of lines should be from the query result.
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 1:36 pm
by kev1n
kknm wrote:It is desirable that the number of lines in the iframe be dynamic, i.e. the number of lines should be from the query result.
You mean that the blank rows should not be displayed ?
rows.jpg
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 5:50 pm
by kknm
kev1n wrote:kknm wrote:It is desirable that the number of lines in the iframe be dynamic, i.e. the number of lines should be from the query result.
You mean that the blank rows should not be displayed ?
rows.jpg
Yes
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 6:23 pm
by kev1n
You are lucky.. I created such a function not so long ago. It may not be perfect, but it served its purpose. You may have to modify it a bit to suit your needs.
Code: Select all
function removeEmptyRows() {
var lastRow;
var r = 0;
$('[data-nu-column="0"]').each(function(index) {
var cellId = $(this).attr('id');
var cellValue = $('#' + cellId).html();
var rowNum = String(cellId).split('_')[1];
if (cellValue === '') {
$("div[id^='nucell_" + rowNum + "']").remove();
r++;
}
});
var t = $('#nuBrowseFooter').css('top').replace('px', '');
$('#nuBrowseFooter').css('top', Number(t) - r * 23 + 20);
var h = $('#nubody').css('height').replace('px', '');
$('#nubody').css('height', Number(h) - r * 23 + 20);
}
removeEmptyRows();
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 7:12 pm
by kev1n
You can also do it with a one-liner
Code: Select all
$('div[id^="nucell_"]').filter(':not([data-nu-primary-key])').remove();
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 8:55 pm
by kknm
kev1n wrote:You can also do it with a one-liner
Code: Select all
$('div[id^="nucell_"]').filter(':not([data-nu-primary-key])').remove();
I checked both methods, both clear empty lines, but do not solve the problem of right scrolling.
I note that explicitly indicating the number of lines on the browse tab removes the right scroll, but footer appears, which is not critical.
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 8:59 pm
by kev1n
The footer can easily removed with the JS:
Re: Hide column if form = iframe
Posted: Thu May 07, 2020 9:02 pm
by kev1n
kknm wrote:
I checked both methods, both clear empty lines, but do not solve the problem of right scrolling.
When does the horizontal scrollbar appear? I mean can't you just increase the width of the run object?