And, the main error is what you have in your code:
<tpl if="val == 0">
And that is exactly what should be instead:
<tpl if="val === 0">
** Note the three equal signs that you need to add between the two values that you are actually comparing. Therefore, if you usually write
x=y
Then in the template, which will be
x==y
So, a conditional statement like
x==y
Is becoming
x===y
EDIT:: , ,
. , XTemplate, tpl. XTemplate, , !
1::
tpl
'<li class="{[this.listClasses(xindex,xcount)]}">',
'<b> {nameOfMeeting}</b>',
'<br> Start Time : {start} || End Time : {end}',
'</li>',
{
listClasses : function(position, size){
var classes = [];
if (position%2===0) {classes.push("even")}
else {classes.push("odd")};
if (position === 1) {classes.push("first")}
else {classes.push("last")};
return classes.join(" ");
}
}
//. , , . tpl, . , , - , - , - .
CSS ( listClasses, li)
#meetingsList li.odd { background-color: #ebdde2; }
#meetingsList li.even { background-color: #fdeef4; }
#meetingsList li.odd { border-bottom: 1px solid #999; }
#meetingsList li.even { border-bottom-style: none; }
EDIT Trial 2:: CSS
CSS
.testview .x-dataview-item { border-bottom : 1px solid
.testview .x-item-selected { background-color:
background-image: linear-gradient(#50b7ff, #0080da 2%, #005692);
color: #fff;;
text-shadow: rgba(0, 0, 0, 0.5) 0 -0.08em 0;
border-color: #103656; }
CSS , ::
{
xtype : 'list'
. . . .
cls : 'testview'
}