Changeset 4635


Ignore:
Timestamp:
06/28/11 14:24:35 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #2034 - Tratada as interações da janela de pesquisa por F9, em IE e FF

Location:
branches/2.2.0.1/expressoMail1_2/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/expressoMail1_2/js/QuickCatalogSearch.js

    r4609 r4635  
    219219                                border: true, 
    220220                                onclose: 'QuickCatalogSearch.restoreShortcuts("'+ div.id +'")' }); 
    221                          
     221 
    222222                        this.arrayWin[div.id] = win; 
    223223                        win.draw(); 
     
    230230                document.getElementById('select_QuickCatalogSearch').focus(); 
    231231 
    232                 if(is_ie){ 
     232                if(is_ie && (preferences.use_shortcuts == '1')){ 
    233233                    shortcut.remove('down'); 
    234234                    shortcut.remove('up'); 
     
    255255                this.arrayWin['window_QuickCatalogSearch_A'].close(); 
    256256                document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 
    257                 if(is_ie) 
     257                if(typeof shortcut.all_shortcuts['down'] == 'undefined'){ 
     258                    if(is_ie  && (preferences.use_shortcuts == '1')) 
     259                    { 
     260                        shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false}); 
     261                        shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false}); 
     262                        shortcut.add("return",function(){ 
     263                            if ( Element('border_id_0').className==='menu-sel' ) 
     264                            { 
     265                                    all_messages = Element('tbody_box').childNodes; 
     266                                    for (var i=0; i < all_messages.length; i++) 
     267                                    { 
     268                                            if ( exist_className(all_messages[i], 'selected_shortcut_msg') ) 
     269                                            { 
     270                                                    Element("td_who_" + all_messages[i].id).onclick(); 
     271                                                    return; 
     272                                            } 
     273                                    } 
     274                            } 
     275                        },{'disable_in_input':true}); 
     276                    } 
     277                } 
     278        } 
     279 
     280        emQuickCatalogSearch.prototype.restoreShortcuts = function(id) { 
     281 
     282            var search_win = document.getElementById(id); 
     283            if(typeof shortcut.all_shortcuts['down'] == 'undefined'){ 
     284                if (search_win.style.visibility == 'visible') 
    258285                { 
    259286                    shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false}); 
     
    274301                    },{'disable_in_input':true}); 
    275302                } 
    276         } 
    277  
    278         emQuickCatalogSearch.prototype.restoreShortcuts = function(id) { 
    279  
    280             var search_win = document.getElementById(id); 
    281             if (search_win.style.visibility == 'visible') 
    282             { 
    283                 shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false}); 
    284                 shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false}); 
    285                 shortcut.add("return",function(){ 
    286                     if ( Element('border_id_0').className==='menu-sel' ) 
    287                     { 
    288                             all_messages = Element('tbody_box').childNodes; 
    289                             for (var i=0; i < all_messages.length; i++) 
    290                             { 
    291                                     if ( exist_className(all_messages[i], 'selected_shortcut_msg') ) 
    292                                     { 
    293                                             Element("td_who_" + all_messages[i].id).onclick(); 
    294                                             return; 
    295                                     } 
    296                             } 
    297                     } 
    298                 },{'disable_in_input':true}); 
    299303            } 
    300304            search_win.style.visibility = 'hidden'; 
  • branches/2.2.0.1/expressoMail1_2/js/abas.js

    r4409 r4635  
    2525        } 
    2626         
    27         if ( typeof win == 'object' && win.close && win.close.constructor == Function ) 
    28                 win.close( ); 
    29  
     27        if ( typeof win == 'object' && win.close && win.close.constructor == Function ){ 
     28            var search_win = document.getElementById( 'window_QuickCatalogSearch' ); 
     29            if(search_win){ 
     30                search_win.style.visibility = 'hidden'; 
     31            } 
     32            win.close( ); 
     33        } 
     34                 
    3035        if (! Element('border_id_'+ID)) 
    3136                return false; // Not possible to alternate 
  • branches/2.2.0.1/expressoMail1_2/js/shortcut.js

    r4608 r4635  
    242242shortcut.add("Esc",function(){ 
    243243        var window_closed = false; 
    244         for(var window in arrayJSWin) 
    245         { 
    246                 if (arrayJSWin[window].visible) 
    247                 { 
     244        var search_win = document.getElementById( 'window_QuickCatalogSearch' ); 
     245         
     246        for(var window in arrayJSWin) 
     247        { 
     248                if (arrayJSWin[window].visible) 
     249                { 
     250                    window_closed = true; 
     251                    if(search_win.style.visibility == 'hidden'){ 
    248252                        arrayJSWin[window].close(); 
    249                         var search_win = document.getElementById( 'window_QuickCatalogSearch' ); 
    250                         search_win.style.visibility = 'hidden'; 
    251                         window_closed = true; 
    252                 } 
    253         } 
    254      
     253                    } 
     254                } 
     255        } 
     256        if((search_win) && (search_win.style.visibility == 'visible')){ 
     257            search_win.style.visibility = 'hidden'; 
     258            win.close(); 
     259       }         
     260 
    255261        if (!window_closed) 
    256262                delete_border(get_msg_id(), 'false'); 
Note: See TracChangeset for help on using the changeset viewer.