JavaScript How to change button order in Ext.Msg? change button order android,change button order note 9,change

I have a MessageBox to show in my app, and it is specified that the 'YES' button has to be on the right. How could I change the YESNOCANCEL order ? (in a CANCELNOYES one maybe?)

Here's my actual code :

Ext.Msg.show({
             title: 'myTitle',
             msg: 'myMessage',
             buttonText : {
                 cancel : 'Cancel',
                 yes : 'Yes'
             },
             fn: function(btn) {
                 if(btn == 'yes') {
                     dodat(); 
                 }
             }
        });   
Answer:1

Ext.Msg is a singleton, so it has an odd lifecycle in comparison to a normal component. This means that the code below should probably be executed early in the Ext.onReady or App creation. This will change the button order for all alerts in your application also because Ext.Msg is a singleton:

var msgButtonBar = Ext.Msg.down("toolbar");
var okButton = msgButtonBar.items.items[0];
var yesButton = msgButtonBar.items.items[1];
var noButton = msgButtonBar.items.items[2];
var cancelButton = msgButtonBar.items.items[3];
msgButtonBar.removeAll(false);
msgButtonBar.add([cancelButton, noButton, yesButton, okButton]);

It basically just reorders the button in the Singleton.

Answer:2

I have a habbit of debugging JS and jQuery script in some developer tool. I realized Chrome Dev Tools showing x.fn.x.init as a value for $() and $(this). However I dont realize what are these value: ...

I have a habbit of debugging JS and jQuery script in some developer tool. I realized Chrome Dev Tools showing x.fn.x.init as a value for $() and $(this). However I dont realize what are these value: ...

  1. what does init value mean
  2. what is the unit value of the 3 in 432
  3. what is sem_init value

I am attempting to use KendoUI Validator with an ASP.NET WebForms project. I have a simple page, that has a number of inputs, and of course ASP.NET adds some hidden form elements as well. I have the ...

I am attempting to use KendoUI Validator with an ASP.NET WebForms project. I have a simple page, that has a number of inputs, and of course ASP.NET adds some hidden form elements as well. I have the ...

So, the question is: How to stretch tileSprite to fullscreen ? planetSprite = game.add.tileSprite(0, 0, game.width + 500, game.height + 900, planetObject.key + 'Planet'); // planetSprite.anchor.setTo(...

So, the question is: How to stretch tileSprite to fullscreen ? planetSprite = game.add.tileSprite(0, 0, game.width + 500, game.height + 900, planetObject.key + 'Planet'); // planetSprite.anchor.setTo(...

I am using codemirror autocomplete demo. It shows some javascript keywords such as application cache,defaultStatus and framenet and many more suggestions. I want it to display my keywords as ...

I am using codemirror autocomplete demo. It shows some javascript keywords such as application cache,defaultStatus and framenet and many more suggestions. I want it to display my keywords as ...

  1. codemirror autocomplete suggestions
  2. codemirror autocomplete