Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Browse Table Filter Options Topic is solved

Questions related to using nuBuilder Forte.
kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 531 times
Contact:

Re: Browse Table Filter Options

Unread post by kev1n »

Duski wrote: Thu Feb 17, 2022 4:29 pm Ad loggin in with parameters: on Chrome, Vivaldi - no success, on Firefox, Edge - success
No issues here with Chrome, Vivaldi, FF, Edge, Chrome (Android), Samsung Internet (Android)...
Duski
Posts: 95
Joined: Thu Mar 04, 2021 2:03 pm

Re: Browse Table Filter Options

Unread post by Duski »

I found the problem ! Filtering works well on admin user. On public user, filters don't work. That means, that the problem is not in form itself, but in user settings. It looks like this:
Snímka obrazovky 2022-02-18 064952.png
Form type is browse.
What's wrong ?
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 531 times
Contact:

Re: Browse Table Filter Options

Unread post by kev1n »

Edit only is wrong if it is a Browse form
Duski
Posts: 95
Joined: Thu Mar 04, 2021 2:03 pm

Re: Browse Table Filter Options

Unread post by Duski »

Thank you, Kev. Now it definitely works !
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Browse Table Filter Options

Unread post by selector »

We need to tweak this function a bit so that "nuBrowseTitle{i}_select" has the same width as the header.

Code: Select all

function nuSetBrowserColumns(c){

	var r	= $('[data-nu-column="0"]').length;
	var p	= nuTotalWidth('nucell_0_0') - $('#nucell_0_0').width();	//-- padding
	var l	= 7;

	for(var i = 0 ; i < c.length ; i++){

		$('[data-nu-column="' + i + '"]').css({'left' : l, 'width' : c[i]});
		$('#nuBrowseTitle' + i).css({'left' : l, 'width' : c[i]});
		$('#nuBrowseTitle' + i + '_select').css({'left' : l, 'width' : c[i]});
		l	= l + c[i] + (c[i] == 0 ? 0 : p);

	}

	$('#nuBrowseFooter').css('width', l-7);

	nuFORM.breadcrumbs[nuFORM.breadcrumbs.length-1].column_widths	= c;
}
I can't get the filters to work on my smartphone in any way. I double-checked the code. And it's hard to make a mistake there.

Code: Select all

if (nuFormType() == 'browse') {
	var arrSad = JSON.parse(getSad());
	nuAddBrowseTitleSelect(1, arrSad);
	$('#nuBrowseTitle1_select').parent().unbind("touchstart");
	
	var arrJob = JSON.parse(getJob());
	nuAddBrowseTitleSelect(2, arrJob);
	$('#nuBrowseTitle2_select').parent().unbind("touchstart");
}
kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 531 times
Contact:

Re: Browse Table Filter Options

Unread post by kev1n »

Try changing the code to :

Code: Select all

$(function() {

	var arrSad = JSON.parse(getSad());
	nuAddBrowseTitleSelect(1, arrSad);
	$('#nuBrowseTitle1_select').parent().unbind("touchstart");
	
	var arrJob = JSON.parse(getJob());
	nuAddBrowseTitleSelect(2, arrJob);
	$('#nuBrowseTitle2_select').parent().unbind("touchstart");
	
}	
Then you won't probably need the make the change in nuSetBrowserColumns() and it the dropdowns should also work on a mobile phone.
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Browse Table Filter Options

Unread post by selector »

kev1n wrote: Wed May 25, 2022 8:55 am Try changing the code to :
Kevin, thank you for responding. But I didn't quite understand this code. Where should I insert it?
UPD: Ok Yes, I just replaced the previous version with this code and everything worked on the smartphone. I think I'm beginning to understand. It's about the sequence of loading the document. "nuBrowseTitle{i}_select" now have proper width.
Post Reply