Page 1 of 1
Stored Files browse form row height
Posted: Fri Mar 16, 2018 1:46 pm
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.

Re: Stored Files browse form row height
Posted: Fri Mar 16, 2018 2:09 pm
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);
}
});
}
Re: Stored Files browse form row height
Posted: Fri Mar 16, 2018 6:47 pm
by admin
TonyD,
Is this what you mean?
https://wiki.nubuilder.cloud/ ... Row_Height
row_height.PNG
Steven
Re: Stored Files browse form row height
Posted: Fri Mar 16, 2018 8:52 pm
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.
Re: Stored Files browse form row height
Posted: Sat Mar 17, 2018 12:44 am
by admin
TonyD,
You can try changing the Subform Type from Grid to Edit.
https://wiki.nubuilder.cloud/ ... cts#Type_2
Steven
Re: Stored Files browse form row height
Posted: Sat Mar 17, 2018 2:07 pm
by tonyd
After finally realizing that my underlying edit form was in fact dictating the column dimensions of my subform (obvious, right?

), I finally got everything lined up just the way I wanted.
Thanks.
Re: Stored Files browse form row height
Posted: Sat Mar 17, 2018 5:47 pm
by admin
Cool.