Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    10
    Vote Rating
    0
    fliptight is on a distinguished road

      0  

    Default Existing HTML and MVC

    Existing HTML and MVC


    sorry this is a repost from the Q&A thread but I didn't realize hardly anyone looks at that section (mods please feel free to delete my other thread). so back to the topic...



    MVC works great for getting the controller to listen to Ext JS components from the view and all, but say you have existing HTML like so:

    HTML Code:
    <body>    
        <div id="container">        
            <a href="#" id="testLink">Some Test Link</a>    
        </div>
    </body>
    how do you get the controller to listen to a click event from a normal link in the view without doing something hacky (imo) such at this?

    View
    Code:
    ...
        initComponent: function () {
            this.addEvents('testLinkClicked');
    
    
            Ext.get('testLink').on('click', function() {
                this.fireEvent('testLinkClicked');
            }, this);
    
    
            this.callParent();
        }
    ...
    Controller
    Code:
        init: function () {
            this.control({
                'test': {
                    'testLinkClicked': function() {
                        console.log('clicked link');
                    }
                }
            });
        }

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    10
    Vote Rating
    0
    fliptight is on a distinguished road

      0  

    Default


    no one has attempted anything a simple as this? =/

Tags for this Thread