我有一個具有嵌套列表的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