Some IE problems for Pure 2

0 views
Skip to first unread message

gazoot

unread,
Aug 13, 2009, 3:41:15 PM8/13/09
to PURE - JavaScript Templates Engine
Hello, got a couple more IE issues for Pure 2. Sorry. :) I'm a bit
tired after much debugging so this'll be brief. Hope you can make some
sense of it... Here are the directives and the template I'm using:

--------
var checkboxDirectives = {
'p' : {
'todo <- items' : {
'a@class' : function(arg) {
return 'aCheckbox' + (arg.item.done ? 'On' : 'Off');
},

'input[name=checkbox]@value' : 'todo.id',

'.item-desc' : 'todo.name',

'.item-desc@class' : function(arg) {
return arg.item.done ? 'item-desc item-done' : 'item-desc';
},

'.item-lastdate' : function(arg) {
if(arg.item.since <= 0) return '';
return '(' + arg.item.since + ' ' + (arg.item.since > 1 ? 'days' :
'day') + ' ago)';
}
}
}
};

<div class="checkboxes">
<p>
<a href="#" class=""></a>
<input type="hidden" name="checkbox" value="" /> <span
class="item-desc"></span> <span class="item-lastdate"></span>
</p>
</div>

--------

The loop 'todo <- items' is the first problem. In firefox, I could
render the template with an array of objects and just use 'todo <-'.
This doesn't work in IE. Different errors on 'todo <-' and 'todo <-
context' as well. I need to wrap the data in an {items: data} object
and use the 'todo <- items' syntax. Then it works for both IE and FF.

Secondly, the '.item-desc@class' seems to cause some problems with IE
as well. It completely ignores the adding of the class "item-done"
when arg.item.done is true. Does it have to do with that it's already
using the class name for referencing the element? I couldn't find a
workaround for this one.

Thanks for any help.

Mic Cvilic

unread,
Aug 13, 2009, 6:10:04 PM8/13/09
to Pure-Unobtrusive...@googlegroups.com
Hi gazoot,

I spent an [aw]full day checking our app to be fully compatible with IE7
and 8.
PURE being a big part of it, took its time share.
But it's bed time for me now... enough for today of this #$<@>%* IE.

I've committed some fixes today on github.
Please check with the last version from:
http://github.com/pure/pure/zipball/version2

More commits will come probably in the coming days.
Thanks for reporting any other issue you may encounter,

Mic

Mark

unread,
Aug 18, 2009, 1:43:30 PM8/18/09
to PURE - JavaScript Templates Engine
Mic,

Thanks for the update! I was having similar problems on IE 6, 7 and 8
and whatever you checked in did the trick.

I am going forward on using Pure 2 to develop an app that will end up
in production and this came just in the nick of time.

So far my experience with Pure 2 has been positive except for these IE
issue which right now seem resolved.

Thanks again!


On Aug 13, 3:10 pm, Mic Cvilic <tch...@gmail.com> wrote:
> Hi gazoot,
>
> I spent an [aw]full day checking our app to be fully compatible with IE7
> and 8.
> PURE being a big part of it, took its time share.
> But it's bed time for me now... enough for today of this #$<@>%*IE.
>
> I've committed some fixes today on github.
> Please check with the last version from:http://github.com/pure/pure/zipball/version2
>
> More commits will come probably in the coming days.
> Thanks for reporting any other issue you may encounter,
>
> Mic
>
> gazoot wrote:
> > Hello, got a couple moreIEissuesfor Pure 2. Sorry. :) I'm a bit
> > This doesn't work inIE. Different errors on 'todo <-' and 'todo <-
> > context' as well. I need to wrap the data in an {items: data} object
> > and use the 'todo <- items' syntax. Then it works for bothIEand FF.

Mic Cvilic

unread,
Aug 18, 2009, 5:48:57 PM8/18/09
to Pure-Unobtrusive...@googlegroups.com
Hi Mark,
Thank you for testing. I appreciate it.
Once you have your app online, fell free to post an ad here ;)
Cheers,
Reply all
Reply to author
Forward
0 new messages