leonidas / transparency

Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
http://leonidas.github.com/transparency/
MIT License
969 stars 112 forks source link

Associate model object to list elements #18

Closed raimohanska closed 12 years ago

raimohanska commented 12 years ago

https://github.com/leonidas/transparency/issues/17

pyykkis commented 12 years ago

Hmm..it seems I was too fast with the merge. Works fine with IE9/Chrome/Firefox, but there's some failing cases on IE8 and IE7, seems to be related to model tests.

Could you take a look on those? Unit test can be run on browser by opening browser/SpecRunner.html file.

Note: There's been one failing test case on IE7 with following output (won't fix, as it's an edge case and didn't work on jQuery either):

Transparency
should handle nested lists with overlapping attributes

<DIVclass=container><Pclass=tweet>Jasmineisgreat!</P><DIVclass=responses><Pclass=tweet>IpreferJsUnit</P><Pclass=tweet>Jasmineisgreat!</P></DIV></DIV>
<DIVclass=container><Pclass=tweet>Jasmineisgreat!</P><DIVclass=responses><Pclass=tweet>Ittrulyis!</P><Pclass=tweet>IpreferJsUnit</P></DIV></DIV>
raimohanska commented 12 years ago

Oh noes. My bad then. Will check this out first thing in the morning or so.

raimohanska commented 12 years ago

Made another pull request with a fix. A bunch of other test cases seem to fail with IE8 (not 7!) due to the Array.prototype.slice thing on the first line. Maybe need some workaround for that too?

pyykkis commented 12 years ago

Thanks for pointing out. Fixing.

pyykkis commented 12 years ago

Fix for IE8 compatibility is now also in master.