Results 1 to 2 of 2

Thread: How to make controls fire on click?

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    45
    Answers
    1

    Default How to make controls fire on click?

    I hade id:'clicktowork', when click on that panel is not work
    Code:
      items:[
                    {
                        xtype:'panel',
                        collapsible: true,
                        margin:'2 2 2 2',
                        title: 'View',
                        id:'clicktowork',
                        html:'<div id="todo_left_panel"><ul><li linktype="all"><sub><img border="0" src="images/extjs/icon-show-all.gif"></sub><a href="#">All</a></li><li linktype="completed"><sub><img border="0" src="images/extjs/icon-show-active.gif"></sub><a href="#">Active Tasks</a></li><li linktype="inactive"><sub><img border="0" src="images/extjs/icon-show-complete.gif"></sub><a href="#">Inactive</a></li></ul></div>'
                    }
                ]
    and my controller code
    Code:
    '#clicktowork':{
                    click: this.todoSort
     }
    ..
    todoSort: function(){
            alert('');
    }

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    Panel doesn't fire a click event. You can see a list of all of the available events for a panel in the docs.

    To add a click event you'll have to wire it up yourself, listening for the click on the el and firing a corresponding event on the panel.

    If you need an example I suggest taking a look at the source for Ext.panel.Tool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •