Welcome to the nuBuilder Forums!

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

Stored Files browse form row height

Questions related to using nuBuilder Forte.
Locked
tonyd
Posts: 68
Joined: Sun Mar 04, 2018 6:38 pm

Stored Files browse form row height

Unread post by tonyd »

I am trying to recreate the functionality seen in the "Files" button and table but I cannot figure out how to get my row height to change from a very thin 18px so users can see the 140px image. :cry:
TonyD
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Stored Files browse form row height

Unread post by toms »

This is the relevant code for the Browse Form:

Basically, an EMBED element is inserted into the cells that make the cells "grow".

Code: Select all

nuSetNoSearchColumns([2, 3]);

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

    var code = '#nucell_' + index + '_';
    window.nuImages[$(code + '0').text()] = $(code + '2').text();

});


if (nuFormType() == 'browse') {
    nuShowBrowseImages()
}

function nuShowBrowseImages() {

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

        var p = $(this).attr('id');
        var r = String(p).split('_')[1];
        var i = "nucell_" + r + "_2";
        var e = "nucell_" + r + "_3";
        var h = $('#' + i).html();

        if (h != '' && h !== undefined) {

            var ob = JSON.parse(h)
            var ty = ob.type;
            var ur = atob(ob.file);
            var x = document.createElement("EMBED");

            x.setAttribute("type", "embed" + i);
            x.setAttribute("type", ty);
            x.setAttribute("src", ur);
            x.setAttribute("width", "140px");
            x.setAttribute("height", "140px");

            $('#' + e).html('');
            document.getElementById(e).appendChild(x);
        }

    });
}
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Stored Files browse form row height

Unread post by admin »

TonyD,

Is this what you mean?

https://wiki.nubuilder.cloud/ ... Row_Height
row_height.PNG
Steven
You do not have the required permissions to view the files attached to this post.
tonyd
Posts: 68
Joined: Sun Mar 04, 2018 6:38 pm

Re: Stored Files browse form row height

Unread post by tonyd »

Yes, Steven. That fixed the initial browse view, but not when used as a subform. I think I will have to add some code to work this one out.
TonyD
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Stored Files browse form row height

Unread post by admin »

TonyD,

You can try changing the Subform Type from Grid to Edit.

https://wiki.nubuilder.cloud/ ... cts#Type_2


Steven
tonyd
Posts: 68
Joined: Sun Mar 04, 2018 6:38 pm

Re: Stored Files browse form row height

Unread post by tonyd »

After finally realizing that my underlying edit form was in fact dictating the column dimensions of my subform (obvious, right? :roll: ), I finally got everything lined up just the way I wanted.

Thanks.
TonyD
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Stored Files browse form row height

Unread post by admin »

Cool.
Locked