Results 1 to 5 of 5

Thread: reset a toolbar button

  1. #1
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    505

    Default reset a toolbar button

    how do I reset a clicked toolbar button ?
    I expected toggle would do it.

    I don't see it in the API.
    Code:
                    tbar : [{
                        text : 'Screen refresh',
                        id : 'eAdminNotificationGrid.tbar.refresh',
                        scope : this,
                        handler : function (){
                                eAdminNotificationStore.load({params:{actionType:'NotificationStatus'}});                     
                        }
                    },{ text : 'Notification reset',
                        id : 'eAdminNotificationGrid.tbar.reset',
                        scope : this,                    
                        handler : function (){
                                Ext.getCmp("eAdminNotificationGrid.tbar.reset").toggle(false),
                                Ext.Ajax.request({
                                    url: this.phpFile,
                                    success: this.successMessageFn(eAdminNotificationStore),
                                    failure: this.faileMessageFn,
                                    params: {actionType:'NotificationReset'}
                                })
                        }                        
                    }]

  2. #2
    Sencha User karieanis's Avatar
    Join Date
    Jun 2008
    Location
    Melbourne, Australia
    Posts
    110

    Default

    You need to set enableToggle in your button config. In addition to that, you would need to add a toggleHandler function to determine what action occurs when the state changes.
    Jeremy Rayner
    Software Engineer

  3. #3
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    505

    Default

    Maybe I am missing something,
    when the user clicks the toolbar button it shows the button like this


    now I click anywhere else and it returns to the standard state.
    I looked over the API is this reset via a toggle event ?

    how do I remove the lines when the process has occured ?

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Posts
    93

    Default

    Quote Originally Posted by michaelc View Post
    how do I remove the lines when the process has occured ?
    These dotted lines are from the FF browser, not EXTJS.
    I don't know if there is a way to remove it. Saw this
    when I searched for an answer, though.

    http://stackoverflow.com/questions/7...-well-as-links

    Let everyone know if it works.

  5. #5
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    505

    Default

    Quote Originally Posted by incaic View Post
    These dotted lines are from the FF browser, not EXTJS.
    I don't know if there is a way to remove it. Saw this
    when I searched for an answer, though.

    http://stackoverflow.com/questions/7...-well-as-links

    Let everyone know if it works.
    Thanks not the answer I needed, once I had my brain think about it, it was simple.
    once the process is completed I just removed focus from the component

Posting Permissions

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