When you say '.+' the content of the TR is emptied internally.
Then if you have a 'td' selector after it, it does not exist anymore
inside the TR.
Mixing JS with HTML is what we try to avoid with templates.
I would do something like that instead:
var officersDir = {
tr:{
'officer<-officers':{
'
td.name':function (arg) {
return toTitleCase(arg.item.firstname) + ' ' +
toTitleCase(arg.item.lastname);
},
'td.title':'officer.title',
'td.ownership':'% ownership -TBD',
'td.classCode':'officer.classCode',
'td.payroll':'officer.payroll',
'i.@style':function(a){
return this.includeFlag ? 'display:none':'';
}
},
sort:function (a, b) {
// sort in ascending first name order (ascii)
return a.firstname < b.firstname ? 1 : -1;
}
}};
Just by curiosity whay are you using Date.parse(firstname) to sort
them?
On Mar 29, 10:55 pm, Robert Chesley <
bob.ches...@nhsoftwerks.com>
wrote: