[OPEN-ILS-DEV] Firefox 10, BibTemplate, and the catalogue - heads up
Dan Scott
dan at coffeecode.net
Fri Feb 3 12:54:29 EST 2012
Hi folks:
We discovered today that Firefox 10 (coming to desktops near you over
the past few days) reacts strongly to some things that it always used to
accept without complaint - which can end up in a degraded or completely
broken catalogue, depending on how you've customized it with
BibTemplate.
Long story short, we've been able to figure out that Firefox 10 is
reacting to particular CSS3 selector syntax combinations. One thing that
is known to make it angry is attribute values without quotes; for
example:
* query='datafield[tag=245]' /* breaks in Firefox 10 */
* query='datafield[tag="245"]' /* works in Firefox 10 */
We have also determined that CSS3 selector syntax that uses hierarchies
is also broken, at least in some cases. For example:
* query='datafield[tag="245"] subfield[code="a"]' /* breaks in Firefox 10 */
The recommended workaround is to wrap another dojo.query() function and
select the second element of the CSS2 selector syntax that way; for
example:
<td type='opac/slot-data' query='datafield[tag="245"]'>
<script type='opac/slot-format'><![CDATA[
dojo.query('subfield[code="a"]', item).forEach(function(item) {
/* code you would have previously dumped directly in the script tag */
});
]]></script>
This isn't perfect, by any means, but it should get you on the road to
getting Firefox 10 working better than it might be right now. If you
want to see what we're doing at Conifer, you can follow along with our
skins branch at
http://git.evergreen-ils.org/?p=contrib/Conifer.git;a=shortlog;h=refs/heads/feature/skins-bulk_2_1
(I'm trying not to put too much profanity in the commit messages).
Many thanks to Dan Wells for figuring out the CSS3 selector quoting;
this Firefox 10 incompatibility absolutely blindsided us all and it's
always nice to have a calm voice of reason sorting things out :)
Dan Scott
More information about the Open-ils-dev
mailing list