Implementing a modal dialog with Espo.ui.Dialog class ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tothewine
    Active Community Member
    • Jan 2018
    • 400

    Implementing a modal dialog with Espo.ui.Dialog class ?

    I implemented a message box dialog based on the confirm dialog. How do I prevent clicks on the backdrop from closing the dialog?

    PHP Code:
    var diag = new Espo.ui.Dialog({closeButton:falseremoveOnClose:false,
                    
    backdroptrue,
                    
    header'<b>TITLE</b>',
                    
    className'dialog-confirm',
                    
    body'<span class="confirm-message">' "Bla bla bla <span style='color:red;'>BLAH</span>.",
                    
    buttons: [{
                            
    text'OK',
                            
    name'cancel',
                            
    onClick: function () {
                                
    diag.close();                            
                            }, 
    style'danger',
                            
    pullRighttrue
                        
    }
                    ]}); 
    diag.show() 
  • yuri
    Member
    • Mar 2014
    • 8697

    #2
    Pass the additional parameter:

    backdrop: 'static',

    But I'd recommend to use modal view.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • tothewine
      Active Community Member
      • Jan 2018
      • 400

      #3
      Originally posted by yurikuzn
      But I'd recommend to use modal view.
      Can you point me to some example?

      Comment

    Working...