Page 1 of 1

Filterd results not printing if search string is in last col

Posted: Wed Apr 09, 2014 1:48 am
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

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

Posted: Wed Apr 09, 2014 6:52 pm
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

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

Posted: Wed Apr 09, 2014 9:16 pm
by Fike
Thanks a lot Max!

It is working great now!


Regards,

Fike

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

Posted: Fri Apr 11, 2014 3:57 pm
by massiws
.