[OPEN-ILS-DEV] PATCH: copy_details.js

Bill Erickson erickson at esilibrary.com
Fri Apr 4 09:55:00 EDT 2008


On Wednesday 26 March 2008 9:40 Brandon W. Uhlman wrote:
> This patch fixes a problem where the opac_visible flag on a copy stat
> cat (asset.stat_cat) is not respected in the OPAC. The opac_visible
> flag was not being checked in the cpdShowStats() function when the
> table with the stat cat details was being constructed. I've submitted
> this to BugZilla as bug #616.
>
> This patch iterates through all the copy stat cats for a given copy,
> and sets a 'visibleStatCat' boolean flag and breaks if we find one
> that's OPAC visible.
>
> If the flag is unset, and we are not in the staff client (isXUL() is
> false), we return just as we do if the stat cat list is empty or null.
> If one of these conditions is true, we iterate a second time through
> the list of stat cat entries, and append them to the display table if
> they are flagged as OPAC visible or we're in the staff client.
>
> This patch may not be elegant, and judging by how long it took me to
> write this patch, my command of boolean logic is more tenuous than I
> imagined it. Someone else should eyeball this and test it before even
> *thinking* about committing it.

Tested and applied with one minor change (isXUL -> isXUL() in one spot).

Many thanks!

-bill


-- 
Bill Erickson
| VP, Software Development & Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: erickson at esilibrary.com
| web: http://esilibrary.com


More information about the Open-ils-dev mailing list