Welcome to the nuBuilder Forums!

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

Filterd results not printing if search string is in last col

Locked
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Filterd results not printing if search string is in last col

Unread post by Fike »

When I do not perform a filtered search in the browse screen and I print the results everythingworks fine
brpr01.png
brpr02.png
However, when I perform a filtered search and the search string is found in the last column, the results are not printed
brpr03.png
brpr04.png
This happens because the 'search_columns' variable of the nuFORM JavaScript object needs an aditional column at the end.

I solved it by adding the following code between lines 1178 and 1179 of nucommon.js file

Code: Select all

if(i > 0){cols.push(i);}
Therefore lines 1178 to 1180 now become

Code: Select all

        if($('#nusearch_' + i).length == 0){                              //-- no such column number
		    if(i > 0){cols.push(i);}
            break;
If there is another solution please let me know.


KInd regrads,


Fike
You do not have the required permissions to view the files attached to this post.
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Filterd results not printing if search string is in last

Unread post by massiws »

Fike,
the bug is in nuBuildTable() function in nuapi.php: the last column was always excluded from searchable fields before print is running.
I commit a patch here.

Max
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Filterd results not printing if search string is in last

Unread post by Fike »

Thanks a lot Max!

It is working great now!


Regards,

Fike
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Filterd results not printing if search string is in last

Unread post by massiws »

.
Locked