现在,我在导航视图中添加了额外的按钮。当我触摸itemtap以查看更多详细信息并在详细信息视图中触摸后退按钮时,未显示额外按钮。
请有人帮帮我。谢谢。
对不起。我英文不好
这是我的代码:
MyView的:
Ext.define('Catalog.view.Home', {
extend: 'Ext.navigation.View',
xtype: 'homepanel',
config: {
navigationBar: {
items: [
{
xtype: 'button',
text: 'categories',
id: 'category',
translate: true,
translationKey: 'navigationbar.category',
align: 'left'
}
]
},
defaultBackButtonText: 'All Apps',
title: 'All',
iconCls: 'list',
cls: 'home',
styleHtmlContent: true,
tabBarPosition: 'bottom',
items:[
{
title: "All Apps",
xtype: 'list',
itemTpl: new Ext.XTemplate(
'<img src="http://127.0.0.1:3000/system/appinfos/appicons/000/000/{id}/original/{appicon_file_name}" width="50" heigh="50" style="float:left;clear:both;"></img>',
'<div style="margin-left: 60px;word-wrap: break-word;width:80%;">',
'<span style="font-size:16px;">{name}</span><br>',
'<tpl for="categories">',
'<span style="font-size:13px;color:#7C7C7C;" id="catname">{name}</span>',
'</div>',
'</tpl>'
),
store: {
autoLoad: true,
fields: ['id','name','created_at','appicon_file_name','categories','url_ios','url_android','gallery_apps','description'],
sorters: [{
property:'created_at',
direction:'DESC'
}],
proxy: {
type: 'jsonp',
url: 'http://127.0.0.1:3000/appinfos.json',
reader:{
type: 'json',
rootProperty:'responseData.entries'
}
}
}
}
]
},
initialize: function() {
this.callParent();
var helpBtn = this.getNavigationBar().query('#category');
helpBtn[0].textElement.dom.innerHTML = "Categories";
}
});
myController的:
Ext.define('Catalog.controller.Main', {
extend: 'Ext.app.Controller',
config: {
refs: {
homepanel: 'homepanel',
but: 'homepanel #category'
},
control: {
'homepanel list':{
itemtap: 'showApp',
back: 'backButtonHandler'
}
}
},
backButtonHandler: function(button) {
this.getBut().setHidden(false);
},
//called when the Application is launched, remove if not needed
showApp: function(list,index,element,record) {
this.getBut().setHidden(true);
}
});
更新
现在,我的问题解决了!
由于