Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Remove height row on a browse form

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Remove height row on a browse form

Unread post by yvesf »

Hello,

Is it possible to remove the height row on a specific browse form ?
I have a wysiwyg field in the edit form . I would like to see the full content of each record of the wysiwyg field in the browse form.
Many thanks,


Yves
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Remove height row on a browse form

Unread post by kev1n »

I think you'll need JavaScript to resize the rows.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Remove height row on a browse form

Unread post by yvesf »

Any idea about how to do that ?
Thanks

Yves
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Remove height row on a browse form

Unread post by kev1n »

The browseSetHeight() adjust the height and positioning of the rows/cells based on the height of the WYSIWYG content.

Code: Select all

function browseSetHeight(colWYSIWYG) {

    function rowBottom(row) {

        const prevCell = '#nucell_' + String(Number(row) - 1 + '_' + colWYSIWYG);
        prevHeight = $(prevCell).cssNumber('top') + $(prevCell).cssNumber('height');
        return prevHeight;

    }

    $("[data-nu-column]").each(function (index) {

        const $this = $(this);
        const row = $this.attr('data-nu-row');
        const wysiwygCell = $('#nucell_' + row + '_2');
        const contentHeight = wysiwygCell[0].scrollHeight;

        $this.height(contentHeight);

        if (row > 0) {
            prevHeight = rowBottom(row);
            $this.css('top', prevHeight);
        }

    })

    $('#nuBrowseFooter').css('top', 50 + rowBottom(nuCurrentProperties().row_height + 1));
}
E.g., set the row height, if the WYSIWYG content is in column 3 (columns start with index 0):

Code: Select all

browseSetHeight(2)
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Remove height row on a browse form

Unread post by kev1n »

Hi Yves,

I'm wondering if that helped.
jerante
Posts: 3
Joined: Sat Jun 01, 2024 8:17 am

Re: Remove height row on a browse form

Unread post by jerante »

Hi,

Sorry for asking this question but how do I use this browseSetHeight function? I added the function in the Setup and then in browse & Edit but still doesn't see that the row in the browse form with more data resizes the height. I called the function in the custom code both in (Browse & Edit and Browse) of the form.

Thanks
Post Reply