There seems to be a little bug in your code. If I show the browser window in window mode and maximize it all resizes fine, but if I repeat this a several times part of the browse form get out of the window.
Perhaps it would be easier to set the column sizes depending on screen width, independent of window width?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
resizing browse form to fit webbrowser window
-
- nuBuilder Team
- Posts: 4380
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 464 times
- Contact:
Re: resizing browse form to fit webbrowser window
Here's a slightly modified nuResizeBrowseColumns():
BTW: Thanks for your generous donation Andrea! Really kind of you.
Code: Select all
function nuResizeBrowseColumns(force){
var w = nuArrayColumn(nuSERVERRESPONSE.browse_columns,'width').map(Number);
var t = 0;
var p = nuTotalWidth('nucell_0_0') - $('#nucell_0_0').width(); //-- padding
if((nuFORM.getCurrent().refreshed != 0 && force !== true) && nuMainForm()){return;}
if(nuMainForm()){
for(var i = 0 ; i < w.length ; i++){
t = t + w[i];
}
for(var i = 0 ; i < w.length ; i++){
w[i] = parseInt((document.documentElement.clientWidth - 30) * w[i] / t) - p;
}
}else{
var W = nuTotalWidth('nuBrowseFooter') + 22;
$('#nuDragDialog', window.parent.document).css('width', W + 14);
$('#nuWindow', window.parent.document).css('width', W);
$('body').css('width', W);
}
if(nuFORM.getCurrent().refreshed != 0 && force !== true){return;}
console.log('nuResizeBrowseColumns 2')
nuSetBrowserColumns(w);
}
Re: resizing browse form to fit webbrowser window
Now it's perfect!
Many thanks for your very good work!
Best wishes
Andrea

Many thanks for your very good work!
Best wishes
Andrea