Changeset 6910 for trunk


Ignore:
Timestamp:
07/30/12 16:17:19 (12 years ago)
Author:
cristiano
Message:

Ticket #2987 - Inconsistência excluindo com tela modal aberta - teclas de atalho

Location:
trunk/expressoMail1_2/js
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/QuickCatalogSearch.js

    r6567 r6910  
    800800                                                                        $( "#amount-text" ).focus(); 
    801801                                                                        event.stopPropagation(); 
    802                                                                 } 
     802                                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     803                                                                }, 
     804                        open: function(event, ui)  
     805                        { 
     806                            if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     807                        } 
    803808                        }); 
    804809                }); 
     
    814819                $(this).bind('keydown'); 
    815820                $(function() { 
    816         $( "#dialog:ui-dialog" ).dialog( "destroy" );                     
     821        $( "#dialog:ui-dialog" ).dialog("close").dialog( "destroy" );                     
    817822        $( "#dialog-modal" ).dialog({ 
    818823                        resizable: false, 
     
    832837                                        content.find(field_).focus();     
    833838                                }  
     839                if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
    834840                        }, 
    835841                        open: function () { 
     
    837843                                $("#selectable li:first").focus(); 
    838844                                document.getElementById("amount-text").focus();  
     845                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
    839846                        }, 
    840847                        focus: function (event, ui) { 
  • trunk/expressoMail1_2/js/QuickSearchUser.js

    r6528 r6910  
    3131                                                        } 
    3232                        ], 
    33                         beforeClose     : function() 
    34                         {  
    35                                 $(this).dialog("destroy"); 
    36                         } 
     33            open: function(event, ui)  
     34            { 
     35                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     36            }, 
     37            close: function(event, ui)  
     38            { 
     39                if(typeof(shortcut) != 'undefined') shortcut.disabled = false; 
     40                $(this).dialog("destroy"); 
     41            } 
    3742                });      
    3843                 
  • trunk/expressoMail1_2/js/TreeS.js

    r5744 r6910  
    3232                                                                click: function() 
    3333                                                                { 
    34                                                                         $(this).dialog("destroy"); 
     34                                                                        $(this).dialog("close").dialog("destroy"); 
    3535                                                                        div.removeChild( div.firstChild ); 
    3636                                                                }, 
     
    4040                        beforeClose     : function() 
    4141                        {  
     42                if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
    4243                                $(this).dialog("destroy"); 
    4344                                div.removeChild( div.firstChild ); 
     
    6566                                        } 
    6667                                } 
     68                 if(typeof(shortcut) != 'undefined') shortcut.disabled = true; 
    6769                        } 
    6870                }); 
  • trunk/expressoMail1_2/js/ccQuickAdd.js

    r6908 r6910  
    8989                                        } 
    9090                                } 
    91                         ] 
     91                        ], 
     92            open: function(event, ui)  
     93            { 
     94                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     95            }, 
     96            close: function(event, ui)  
     97            { 
     98                if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     99            } 
    92100                }); 
    93101                quickContact.next().css("background-color", "#E0EEEE").find("button").addClass("button").addClass("small"); 
  • trunk/expressoMail1_2/js/common_functions.js

    r6860 r6910  
    687687                        select_all_search_messages(false, 'content_id_'+currentTab); 
    688688                        event.stopPropagation(); 
     689            if(typeof(shortcut) != 'undefined') shortcut.disabled = false; 
    689690                }, 
     691        open: function(event, ui)  
     692        { 
     693            if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     694        }, 
    690695                autoOpen:false, 
    691696                dialogClass: 'dialog-configure-label' 
     
    740745                        select_all_search_messages(false, 'content_id_'+currentTab); 
    741746                        event.stopPropagation(); 
     747            if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
    742748                }, 
     749        open: function(event, ui)  
     750        { 
     751            if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     752        }, 
    743753                autoOpen:false 
    744754        });      
  • trunk/expressoMail1_2/js/draw_api.js

    r6882 r6910  
    44884488                        modal: true, 
    44894489                        closeOnEscape:true, 
    4490                         close:function(event, ui) {event.stopPropagation();}, 
     4490                        close:function(event, ui)  
     4491            { 
     4492                event.stopPropagation(); 
     4493                 if(typeof(shortcut) != 'undefined') shortcut.disabled = false; 
     4494            }, 
     4495            open: function(event, ui)  
     4496            { 
     4497                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     4498            }, 
    44914499                        autoOpen:false 
    44924500                }); 
  • trunk/expressoMail1_2/js/filter.js

    r5526 r6910  
    474474                                                                style: "margin-top: -2.1em"  
    475475                                                        }, 
    476                                                 ] 
     476                                                ], 
     477                open: function(event, ui)  
     478                { 
     479                    if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     480                }, 
     481                close: function(event, ui)  
     482                { 
     483                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     484                } 
    477485                        }); 
    478486                };  
  • trunk/expressoMail1_2/js/main.js

    r6882 r6910  
    36823682                                                                click   : function() 
    36833683                                                                { 
    3684                                                                         importEmails.dialog("destroy"); 
     3684                                                                        importEmails.dialog("close").dialog("destroy"); 
    36853685                                                                } 
    36863686                                                         }, 
     
    37323732                                                                } 
    37333733                                                         } 
    3734                                                 ] 
     3734                                                ], 
     3735                open: function(event, ui)  
     3736                { 
     3737                    if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     3738                }, 
     3739                close: function(event, ui)  
     3740                { 
     3741                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     3742                } 
    37353743                }); 
    37363744 
     
    39413949                        modal: true, 
    39423950                        resizable : false, 
    3943                         close: function(event) { 
    3944                                 event.stopPropagation(); 
    3945                         }, 
     3951            open: function(event, ui)  
     3952            { 
     3953                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     3954            }, 
     3955            close: function(event, ui)  
     3956            { 
     3957                event.stopPropagation(); 
     3958                if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     3959            }, 
    39463960                        closeOnEscape: true 
    39473961                }); 
     
    40614075                                                                                $( this ).dialog( "close" ); 
    40624076                                                                        } 
    4063                                                                 } 
     4077                                                                }, 
     4078                                close:function(event, ui)  
     4079                                { 
     4080                                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     4081                                }, 
     4082                                open: function(event, ui)  
     4083                                { 
     4084                                    if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     4085                                } 
    40644086                                                        }); 
    40654087                                                        $(".ui-dialog-buttonpane").find(".ui-button:last").children().html("Atualizar"); 
  • trunk/expressoMail1_2/js/search.js

    r6641 r6910  
    107107                                        //$(this).dialog("destroy"); 
    108108                                        $('fieldset', div).remove(); 
    109                                 } 
     109                                }, 
     110                close:function(event, ui)  
     111                { 
     112                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     113                }, 
     114                open: function(event, ui)  
     115                { 
     116                    if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     117                } 
    110118                        }); 
    111119                         
     
    15991607        if( this.divElement != null ) 
    16001608                { 
    1601                         $(this.divElement.parentNode).dialog("destroy"); 
     1609                        $(this.divElement.parentNode).dialog("close").dialog("destroy"); 
    16021610                        this.modal.dialog("close"); 
    16031611                        this.divElement.parentNode.removeChild(this.divElement); 
  • trunk/expressoMail1_2/js/sharemailbox.js

    r6877 r6910  
    207207                                beforeClose     : function() 
    208208                                {  
    209                                         $(this).dialog("destroy"); 
    210209                                        div.removeChild(div.firstChild); 
    211                                 } 
     210                                }, 
     211                close:function(event, ui)  
     212                { 
     213                    if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     214                    $(this).dialog("destroy"); 
     215                }, 
     216                open: function(event, ui)  
     217                { 
     218                    if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     219                } 
    212220                }); 
    213221 
  • trunk/expressoMail1_2/js/shortcut.js

    r6707 r6910  
    77shortcut = { 
    88        'all_shortcuts':{},//All the shortcuts are stored in this array 
     9    'disabled': false, 
    910        'add': function(shortcut_combination,callback,opt) { 
    1011                //Provide a set of default options 
     
    3738                                else if(e.srcElement) element=e.srcElement; 
    3839                                if(element.nodeType==3) element=element.parentNode; 
    39  
     40                 
    4041                                if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; 
    4142                        } 
    42          
     43           
     44            if(shortcut.disabled === true) 
     45                return; 
     46 
     47 
    4348                        //Find Which key is pressed 
    4449                        if (e.keyCode) code = e.keyCode; 
  • trunk/expressoMail1_2/js/wfolders.js

    r5874 r6910  
    4848                                                                                        click   : function() 
    4949                                                                                        { 
    50                                                                                                 winSaveFile.dialog("destroy"); 
     50                                                                                                winSaveFile.dialog("close"),dialog("destroy"); 
    5151                                                                                        } 
    5252                                                                                 }, 
     
    8181                                                                                                } 
    8282 
    83                                                                                                 winSaveFile.dialog("destroy"); 
     83                                                                                                winSaveFile.dialog("close").dialog("destroy"); 
    8484                                                                                        } 
    8585                                                                                 } 
    86                                                                         ]                
     86                                                                        ], 
     87                                    close:function(event, ui)  
     88                                    { 
     89                                        if(typeof(shortcut) != 'undefined') shortcut.disabled = false;  
     90                                    }, 
     91                                    open: function(event, ui)  
     92                                    { 
     93                                        if(typeof(shortcut) != 'undefined') shortcut.disabled = true;  
     94                                    }            
    8795                                        });      
    8896                         
Note: See TracChangeset for help on using the changeset viewer.