1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    116
    Vote Rating
    0
    buntyindia is on a distinguished road

      0  

    Default custom button for Messagebox Show

    custom button for Messagebox Show


    Hi ,


    Can we have custom button for Messagebox Show
    I need to button with name

    OK and Logoff. If Yes, How?

    Thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    You can't create more buttons than the 4 default buttons, but you can rename them:
    Code:
    Ext.Msg.buttonText.cancel = 'Logoff';

  3. #3
    Sencha User
    Join Date
    Feb 2008
    Posts
    116
    Vote Rating
    0
    buntyindia is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    You can't create more buttons than the 4 default buttons, but you can rename them:
    Code:
    Ext.Msg.buttonText.cancel = 'Logoff';
    where I have to right this line? I need to rename both YES, NO button to OK and LogOff

    my code is:



    Code:
    Ext.MessageBox.show({
                                   title:'Session Time Out Warning!',
                                   msg: 'Session about to expire',
                                   buttons: Ext.MessageBox.YESNO,
                                   fn: function(btn, text){
                                                if (btn == 'yes'){
                                                    Ext.Ajax.request({
                                                       url: 'some.htm'
                                                    });
                                                
                                                }
                                                if (btn == 'no'){
                                                   
                                                }
                                            },
                                   icon: Ext.MessageBox.WARNING,
                                   closable : false
                               });

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Before showing the dialog (and don't forget to restore the button text after you're done with this dialog).

    Why are you using the Yes and No buttons if there already is an OK button? I would use the OK and Cancel buttons and rename Cancel to Logoff (as my example did).

  5. #5
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,071
    Vote Rating
    40
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    you could create an extension (apparently :-)) that allows you to extent(d) extent... hehe
    Senior Technical Training & Mentoring

    Teahouse Training Company
    Asia Pacific Region (Official Certified Sencha Trainer)

    Check out SenchaWorld.com - The best bits from the Sencha community (videos, blogs, etc)

    Code Validation : JSLint | JSONLint | JSONPLint

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Ext.MessageBox is a singleton with a lot of private variables, so it's almost impossible to extend.

  7. #7
    Sencha User
    Join Date
    Feb 2008
    Posts
    116
    Vote Rating
    0
    buntyindia is on a distinguished road

      0  

    Default


    Thanks to you

    I used

    Code:
     buttons: {ok:'Ok', cancel:'LogOff'}
    it works gr8 doing the same purpose

  8. #8
    Sencha User
    Join Date
    May 2011
    Location
    Argentina
    Posts
    54
    Vote Rating
    0
    ferengidedalo is on a distinguished road

      0  

    Default


    this NOT work on V4.... any other method?

  9. #9
    Ext JS Premium Member andreasn's Avatar
    Join Date
    Jan 2008
    Location
    Zuzwil, Switzerland
    Posts
    12
    Vote Rating
    0
    andreasn is on a distinguished road

      0  

    Default


    Quote Originally Posted by ferengidedalo View Post
    this NOT work on V4.... any other method?
    Try this:

    Code:
            Ext.Msg.show({
                title: 'Benutzer löschen',
                msg: 'Möchten Sie den Benutzer wirklich löschen? Sie können ihn auch deaktivieren.',
                buttonText: {
                    yes: 'Deaktivieren', no: 'Löschen', cancel: 'Abbrechen'
                },
                buttons: Ext.Msg.YESNOCANCEL
            });
    It changes the buttonText only for this message.

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