1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    9
    Vote Rating
    0
    Mproject is on a distinguished road

      0  

    Default Unanswered: Open a new View by clicking a link inside html (button)

    Unanswered: Open a new View by clicking a link inside html (button)


    How can I open a new View by pressing a link inside html? Something like this:

    Main.js

    Code:
    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
    Code:
    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
    Code:
    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'
                }
    
    
            ]
        }
    
    });

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,142
    Answers
    131
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    I'm wondering what is the purpose of using the html like that? I'd rather use a button or a list.

    I think doing that in the html would be more difficult and require going through many DOM elements.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar