Ignore:
Timestamp:
07/15/11 10:19:44 (13 years ago)
Author:
roberto.santosjunior
Message:

Ticket #1975 - Solucionada inconsistência do teclado ao navegar na busca por F9

File:
1 edited

Legend:

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

    r4457 r4761  
    217217                                title_text_color: 'white', 
    218218                                button_x_img: '../phpgwapi/images/winclose.gif', 
    219                                 border: true }); 
     219                                border: true, 
     220                                onclose: 'QuickCatalogSearch.restoreShortcuts("'+ div.id +'")' }); 
    220221                         
    221222                        this.arrayWin[div.id] = win; 
     
    228229                win.open(); 
    229230                document.getElementById('select_QuickCatalogSearch').focus(); 
     231 
     232                if(is_ie){ 
     233                    shortcut.remove('down'); 
     234                    shortcut.remove('up'); 
     235                    shortcut.remove('return'); 
     236                } 
    230237        } 
    231238         
     
    248255                this.arrayWin['window_QuickCatalogSearch_A'].close(); 
    249256                document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 
    250         } 
     257                shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false}); 
     258                shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false}); 
     259                shortcut.add("return",function(){ 
     260                    if ( Element('border_id_0').className==='menu-sel' ) 
     261                    { 
     262                            all_messages = Element('tbody_box').childNodes; 
     263                            for (var i=0; i < all_messages.length; i++) 
     264                            { 
     265                                    if ( exist_className(all_messages[i], 'selected_shortcut_msg') ) 
     266                                    { 
     267                                            Element("td_who_" + all_messages[i].id).onclick(); 
     268                                            return; 
     269                                    } 
     270                            } 
     271                    } 
     272                },{'disable_in_input':true}); 
     273        } 
     274 
     275        emQuickCatalogSearch.prototype.restoreShortcuts = function(id) { 
     276 
     277            var search_win = document.getElementById(id); 
     278            if (search_win.style.visibility == 'visible') 
     279            { 
     280                shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false}); 
     281                shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false}); 
     282                shortcut.add("return",function(){ 
     283                    if ( Element('border_id_0').className==='menu-sel' ) 
     284                    { 
     285                            all_messages = Element('tbody_box').childNodes; 
     286                            for (var i=0; i < all_messages.length; i++) 
     287                            { 
     288                                    if ( exist_className(all_messages[i], 'selected_shortcut_msg') ) 
     289                                    { 
     290                                            Element("td_who_" + all_messages[i].id).onclick(); 
     291                                            return; 
     292                                    } 
     293                            } 
     294                    } 
     295                },{'disable_in_input':true}); 
     296            } 
     297            search_win.style.visibility = 'hidden'; 
     298 
     299        } 
    251300 
    252301        emQuickCatalogSearch.prototype.close_window = function(id) { 
    253                 this.arrayWin[id].close(); 
     302                this.arrayWin[id].close(); 
    254303                var group_values = Element('list_values'); 
    255                 var user_values = Element('user_values');        
     304                var user_values = Element('user_values'); 
    256305        } 
    257306        emQuickCatalogSearch.prototype.showCatalogList = function (border_id){ 
     
    586635         
    587636/* Build the Object */ 
    588         var QuickCatalogSearch; 
     637        //QuickCatalogSearch; 
    589638        QuickCatalogSearch = new emQuickCatalogSearch(); 
Note: See TracChangeset for help on using the changeset viewer.