Affichage des articles dont le libellé est Same Video is playing in Nested List leaf ?. Afficher tous les articles
Affichage des articles dont le libellé est Same Video is playing in Nested List leaf ?. Afficher tous les articles

jeudi 30 octobre 2014

Same Video is playing in Nested List leaf ?

Hi All

The same video is showing up in all of the leafs in my nestedList .

When I do check it , I do see the correct video listed as the source.

But whatever video I start with that is the video that would play on all the leafs in the nested list.

Is their something I am missing?


Thanks

Jim



HTML Code:



Ext.define('TuT.view.NestedList',{ extend:'Ext.NestedList',
xtype:'nestedList',

requires:['Ext.Video'],

config:{
title:'NestedList',
iconCls:'star',
fullscreen: true,
scrollable:true,
styleHtmlContent:true,
styleHtmlCls:'homepage',
displayField: 'text',
store: 'TreeStore',

detailCard:{
xtype:'video',

},

}
});


HTML Code:



Ext.define('TuT.model.ListItem', {
extend: 'Ext.data.Model',
config:{
fields:['text','url']
}
})


HTML Code:



Ext.define('TuT.store.TreeStore', {
extend: 'Ext.data.TreeStore',
config: {
model: 'TuT.model.ListItem',
defaultRootProperty:'items',
root: {
items: [
{
text: 'Drinks',
items: [
{
text: 'Water',
items: [
{ text: 'Still', url: ['http://ift.tt/1zhwPM8' ], leaf: true },
{ text: 'Sparkling', url: ['http://ift.tt/1zhwNUy' ], leaf: true },
{ text: 'JB', leaf:true}

]
},
{ text: 'Soda', leaf: true }
]
},
{
text: 'Snacks',
items: [
{ text: 'Nuts', leaf: true },
{ text: 'Pretzels', leaf: true },
{ text: 'Wasabi Peas', url: ['http://ift.tt/1wGQMZg '], leaf: true}
]
}
]
}
}
});




HTML Code:



Ext.define('TuT.controller.NestedList', {
extend: 'Ext.app.Controller',

config: {
refs: {
nestedList: 'nestedList'
},
control: {
'nestedList':{

leafitemtap: function(nestedList, list, index, target, record) {
var detailCard = nestedList.getDetailCard();


detailCard.setUrl(record.get('url'));
},
}

});





Same Video is playing in Nested List leaf ?