Ticket #5351: tryMe.patch

File tryMe.patch, 1.3 kB (added by dante, 12 months ago)

and the winner is ...

  • Dialog.js

     
    148148                        this.domNode.style.display="none"; 
    149149                        this.connect(this, "onExecute", "hide"); 
    150150                        this.connect(this, "onCancel", "hide"); 
     151                        this._modalconnects = [];        
    151152                }, 
    152153 
    153154                onLoad: function(){ 
     
    162163                        //              time (but we defer it until right beforehand, for 
    163164                        //              performance reasons) 
    164165 
    165                         this._modalconnects = []; 
    166  
    167166                        if(this.titleBar){ 
    168167                                this._moveable = new dojo.dnd.Moveable(this.domNode, { handle: this.titleBar }); 
    169168                        } 
     
    281280                show: function(){ 
    282281                        // summary: display the dialog 
    283282 
     283                        if(this.open){ return; } 
     284                         
    284285                        // first time we show the dialog, there's some initialization stuff to do                        
    285286                        if(!this._alreadyInitialized){ 
    286287                                this._setup(); 
     
    291292                                this._fadeOut.stop(); 
    292293                        } 
    293294 
     295                        this._modalconnects = []; 
     296                         
    294297                        this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout")); 
    295298                        this._modalconnects.push(dojo.connect(document.documentElement, "onkeypress", this, "_onKey")); 
    296299 
     
    346349                                this._underlay.layout(); 
    347350                                this._position(); 
    348351                        } 
     352                }, 
     353                 
     354                destroy: function(){ 
     355                        if(this.open){ 
     356                                this._fadeOut.duration = 1;  
     357                                this.hide(); 
     358                        } 
     359                        this.inherited(arguments);                       
    349360                } 
    350361        } 
    351362);