我有一个具有嵌套列表的Sencha Touch应用程序。Sencha Touch,嵌套列表中的停靠面板
nestedList自动创建自己的toolBar。
我想停靠工具栏下方的面板,但在列表项上方。我只需要在列表的顶层。我希望在第一片叶子被选中后让它消失。
听起来像是可行的吗?正如你在我的代码中看到的,我只能将项目面板停靠在当前工具栏上。
非常感谢。我真的很感谢你们可能有的任何建议。
- Al。
下面是我迄今为止...
// Menu Pages var menu = new Ext.NestedList({ fullscreen: true, title: 'Menu', displayField: 'text', store: menu_store,
// ** This is the dockedItem I would like to insert between the toolbar and list-items
dockedItems: [ {
xtype : 'panel',
dock : 'top',
html : '<span>This is the logo panel</span>',
cls : 'front-logo-panel',
flex : 1
}],
// Add Panel for Leaf nodes
getDetailCard: function(item, parent) {
var itemData = item.attributes.record.data,
parentData = parent.attributes.record.data,
detailCard = new Ext.Panel({
scroll: 'vertical',
cls: 'menu-item-panel',
styleHtmlContent : true,
tpl: menuTemplate,
// add button to Leaf Node
listeners: {
activate: function() {
Ext.getCmp('itemToolbar').setTitle('New Title Bar');
}
}
});
detailCard.update(itemData);
this.backButton.setText(parentData.text);
return detailCard;
},
// add template for all nodes
getItemTextTpl: function() {
var tplConstructor =
'<tpl if="newItem">' +
'<span class="list-new-item">New Item!</span>' +
'</tpl>'+
'{text}' +
'<tpl>'+
'<div class="metadata">' +
'{description:ellipsis(40)}' +
'</div>' +
'</tpl>';
return tplConstructor;
}
});
您是否曾经为此找到过解决方案?我有完全相同的要求。谢谢! – sottenad 2011-06-22 23:19:50