1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    kohhy is on a distinguished road

      0  

    Default Unanswered: Ext.window.MessageBox.alert is naver shown as modal.

    Unanswered: Ext.window.MessageBox.alert is naver shown as modal.


    Hi,

    I use Ext.window.MessageBox.alert() as alternative of JavaScript's native alert(), but one problem is exist.

    If there are some parallel work in WebApp and it shows own window, the window shows above alert window.
    Is there any way to show Ext.window.MessageBox.alert() always modal?

  2. #2
    Sencha User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    520
    Vote Rating
    9
    Answers
    13
    vadimv will become famous soon enough

      0  

    Default


    Use show not alert then, with the config of alert plus modal config set to true
    Code:
        alert: function(cfg, msg, fn, scope) {       
                   if (Ext.isString(cfg)) {            
                                cfg = {                
                                     title : cfg,               
                                     msg : msg,               
                                    buttons: this.OK,                
                                    fn: fn,               
                                    scope : scope,                
                                    minWidth: this.minWidth,                
                                    modal: true            
                               };       
                     }       
     return this.show(cfg);    },

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    kohhy is on a distinguished road

      0  

    Default


    It not works...

    Maybe what I want is difficult cause JavaScript is non-blocking language.
    I decide to use native (blocking) messagebox instead of ExtJS's one.

  4. #4
    Sencha User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    520
    Vote Rating
    9
    Answers
    13
    vadimv will become famous soon enough

      0  

    Default


    I answered to your question, even if alert is by default modal. BUT reading again what you are trying to achieve, I suggest you to play with z-index, and probably with the zindex manager.

Tags for this Thread