Working in Sencha2... How can I open a new View by pressing a link inside html? Something like this:
Main.js
Ext.define('SkSe.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar',
'Ext.dataview.List'
],
config: {
tabBarPosition: 'bottom',
items: [
{
xtype: 'home'
},
{
xtype: 'placesContainer'
},
{
xtype: 'favoriti'
},
{
xtype: 'live'
}
]
}});
Home.js
Ext.define('SkSe.view.Home', {
extend: 'Ext.Panel',
xtype: 'home',
config: {
title: 'home',
iconCls: 'home',
layout: 'fit',
styleHtmlContent: true,
styleHtmlCls: 'homeView',
html:[
'<div class="cubePanel">Go to akcije.js</div>',
'<div class="cubePanel">Go to live.js</div>',
'<div class="scanPanel"></div>',
'<div class="cubePanel">Go to favoriti.js</div>',
'<div class="cubePanel">Go to map.js</div>'
].join("")
}});
Akcije.js
Ext.define('SkSe.view.Akcije', {
id: 'akcije',
extend: 'Ext.Panel',
xtype: 'akcije',
config:{
title:'Akcije',
iconCls:'maps',
layout:'fit',
items:[
{
xtype:'list',
store:'Places',
itemTpl:
'<img src="resources/icons/{icon}"></img>' +
'<h1>{name:ellipsis(25)}</h1>' +
'<p>Besplatan desert.</p>' +
'<p># {stamps}</p>',
itemCls:'place-entry'
}
]
}});
Bassicaly, I want to have a custom home screen, and when tapped on some icon (where Go to **.js* is shown currently), to open a corresponding View.