Page 1 of 1

Options Menu Fix

Posted: Thu May 10, 2018 5:14 pm
by toms
Hi,

If the width of the last browse column is 0, the options menu is not visible in the browse form.
last_col_0_width.png
Options menu not visible, because it's always attached to the last browse column:
options_menu_invisible.png
Fix nuForm.js, function nuAddEditTabs()

Now:

Code: Select all

    for(var i = 0 ; i < w.browse_columns.length ; i++){
		l 		= nuBrowseTitle(w.browse_columns, i, l);
    }
After: determine the index of the last column, whose width is not 0. Assign it to the variable p.

Code: Select all

	for(var i = 0 ; i < w.browse_columns.length ; i++){
		l 		= nuBrowseTitle(w.browse_columns, i, l);
		if (w.browse_columns[i].width != '0') {
			p = i;
		} 
     }
Now:

Code: Select all

		nuOptions('nuBrowseTitle' + (w.browse_columns.length - 1), w.form_id, 'browse', w.global_access);
After: Attach the options menu to the last browse column whose width is not zero.

Code: Select all

		nuOptions('nuBrowseTitle' + p, w.form_id, 'browse', w.global_access);	

After applying the fix:
options_menu_visible.png

Re: Options Menu Fix

Posted: Fri May 11, 2018 11:40 am
by admin
toms,

Thanks for that, it's now on Github.

Steven