[OPEN-ILS-DEV] BibTemplate and Opera Compatibility

Mike Rylander mrylander at gmail.com
Wed Feb 16 16:02:18 EST 2011


On Wed, Feb 16, 2011 at 2:16 PM, Jeff Davis <jdavis at sitka.bclibraries.ca> wrote:
> We actually got an unprompted email from an Opera developer yesterday
> about this issue.  Here's what he had to say, for your consideration:

That's interesting, Jeff.  Thanks!  I'll be glad when
${framework-we-use} will handle these sorts of issues, but I'm sure
there will always be plenty.

We've been discussing the need to move to dojo 1.5 recently, and
depending on tuit shape and the release schedule for dojo 1.6, we may
just want to go directly to that.

--miker

>
> ***
>
> After searching for a solution we figured out that it was due to the
> used version of DOJO, which has a bug.
>
> http://trac.dojotoolkit.org/ticket/10320
>
> When Dojo 1.6 is released, you can fix that issue by upgrading the library.
>
> http://trac.dojotoolkit.org/milestone/1.6
>
> DOJO toolkit's detection of case-sensitivity (for XML documents) goes
> incorrect in this case there by no nodes from an XML document (via XHR)
> is returned and the cells therefore remain empty.
>
> ***
>
> Hope that helps.
> --
> Jeff Davis
> Sitka Implementation Team
>
>
> Dan Wells wrote:
>> Hello all,
>>
>> I spent some time recently trying to get some typical rdetail
>> BibTemplate code to work in Opera, and made a few discoveries worth
>> sharing.  The attached patch (against the rel_2_0 file, but with no
>> path) is not at all complete code, and in particular the 'if (1)'
>> lines are just placeholders for possibly some other condition should
>> we decide to pursue this.
>>
>> From what I can tell, Opera gets tripped up by two independent
>> aspects of BT.  First, it cannot properly respond to attributes in a
>> dojo.query() call on JS XMLDocument objects (at least the ones EG
>> delivers via unAPI).  That is, it will correctly do :
>>
>> dojo.query("datafield", bib);
>>
>> but fails on:
>>
>> dojo.query("datafield[tag=245]", bib);
>>
>> To get around this, we need to instead query the documentElement of
>> the XMLDocument, not the XMLDocument itself.  Second, Opera does not
>> work if the attribute is quoted within the query.  That is, it can
>> correctly do :
>>
>> dojo.query("datafield[tag=245]", bib);
>>
>> but fails on:
>>
>> dojo.query("datafield[tag='245']", bib);
>>
>> or:
>>
>> dojo.query('datafield[tag="245"]', bib);
>>
>> The workaround here is to simply strip quotes from the query string
>> before running it.
>>
>> In limited testing, these changes did not have negative side effects
>> for rdetail display in other current browsers.  I also have not
>> deciphered whether Opera is simply be more strict than the other
>> browsers, or whether these are genuine Opera bugs.
>>
>> Please report back if you are able to test this patch.  Also, do you
>> think these changes cross the line between 'compatibility fix' and
>> 'compatibility hack', and if so, are they worth considering for a
>> minor browser?
>>
>> Thanks, Dan
>>
>



-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list