[OPEN-ILS-DEV] BibTemplate and Opera Compatibility
Dan Wells
dbw2 at calvin.edu
Tue Feb 15 15:52:19 EST 2011
Thanks for the feedback. Attached is a patch against trunk with a couple of changes based on these suggestions.
First, the quote removal code is integrated a little more cleanly and also now wrapped in a dojo.isOpera condition. Second, the bib.documentElement is now directly inside the item_list query. This preserves the XMLDocument in the 'bib' variable for later use in the code (callbacks?), and I don't think we lose any possible functionality, as the item_list already assumes we are querying for nodes (rather than using some other XMLDocument property). This does, however, shift some onus of responsibility for maintaining Opera compatibility to any code which wants to query the 'bib' further down the line (not really a bad thing, just making note).
Thoughts?
Dan
>
> There was a need to add quotes around literals in queries for one
> browser or another (Dan Scott attacked this, IIRC), so how about
> replacing the if(1)s with if(dojo.isOpera), at least for the second
> hunk in the patch? For the documentElement part, there is value in
> having access to the document object from within slot code (maybe not
> a huge amount, but IMO it's not worth removing if we can avoid it), so
> perhaps we need a separate variable to hold that and use it in
> internal queries. Thoughts?
>
> --miker
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt_opera_fix_v2.diff
Type: application/octet-stream
Size: 1201 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20110215/c7a71827/attachment.obj
More information about the Open-ils-dev
mailing list