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.