Changeset 4034


Ignore:
Timestamp:
04/14/11 17:52:00 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1598 - Implementada a barra de rolagem horizontal na busca por F9.

Location:
branches/2.2.0.1
Files:
2 edited

Legend:

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

    r3932 r4034  
    1212                id = '1'; 
    1313                _this = this; 
     14                var el_A = document.createElement("DIV"); 
     15                el_A.style.visibility = "hidden"; 
     16                el_A.style.position = "absolute"; 
     17                el_A.style.left = "0px"; 
     18                el_A.style.top = "0px"; 
     19                el_A.style.width = "0px"; 
     20                el_A.style.height = "0px"; 
     21                el_A.id = 'window_QuickCatalogSearch_A'; 
     22                document.body.appendChild(el_A); 
     23                el_A.innerHTML = ""; 
     24 
    1425                var el = document.createElement("DIV"); 
    1526                el.style.visibility = "hidden"; 
    1627                el.style.position = "absolute"; 
    1728                el.style.left = "0px"; 
    18                 el.style.top = "0px"; 
    19                 el.style.width = "0px"; 
    20                 el.style.height = "0px"; 
     29                el.style.top = "40px"; 
     30                el.style.width = "695px"; 
     31                el.style.height = "186px"; 
     32                el.style.overflow = "auto"; 
    2133                el.id = 'window_QuickCatalogSearch'; 
    22                 document.body.appendChild(el); 
     34                el_A.appendChild(el); 
    2335                el.innerHTML = ""; 
    2436                 
     
    4658                };               
    4759                 
    48                 if (document.getElementById('select_QuickCatalogSearch') == null){ 
    49  
    5060                        var title_innerHTML = get_lang('Select a name') + ':'; 
    5161                        if (data.quickSearch_only_in_userSector) 
     
    5565                        title.id = 'window_QuickCatalogSearch_title'; 
    5666                        title.innerHTML = "&nbsp;&nbsp;<b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br>&nbsp;&nbsp;"; 
    57                         el.appendChild(title); 
     67                        el_A.appendChild(title); 
     68                        var butt = document.createElement('BUTTON'); 
     69                        var buttext = document.createTextNode('OK'); 
     70                        butt.id = "QuickCatalogSearch_button_ok"; 
     71                        butt.appendChild(buttext); 
     72                        butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 
     73                        el_A.appendChild(butt); 
     74 
     75                        var space = document.createElement('SPAN'); 
     76                        space.innerHTML = "&nbsp;&nbsp;"; 
     77                        el_A.appendChild(space); 
     78 
     79                        var butt = document.createElement('BUTTON'); 
     80                        butt.id = "QuickCatalogSearch_button_close"; 
     81                        var buttext = document.createTextNode(get_lang('Close')); 
     82                        butt.appendChild(buttext); 
     83                        butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 
     84                        el_A.appendChild(butt); 
     85 
     86                if (document.getElementById('select_QuickCatalogSearch') == null){ 
    5887                         
    5988                        var cmb = document.createElement("SELECT"); 
    6089                        cmb.id = "select_QuickCatalogSearch"; 
    61                         cmb.style.width = "685px"; 
    62                         cmb.size = "12"; 
     90                        cmb.style.width = "2400px"; 
     91                        //cmb.size = "12"; 
     92                        cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 
    6393                        cmb.onkeypress = function (e) 
    6494                        { 
     
    87117                        }; 
    88118                        el.appendChild(cmb); 
    89  
    90                         var space = document.createElement('SPAN'); 
    91                         space.innerHTML = "<BR>&nbsp;&nbsp;"; 
    92                         el.appendChild(space); 
    93  
    94                         var butt = document.createElement('BUTTON'); 
    95                         var buttext = document.createTextNode('OK'); 
    96                         butt.id = "QuickCatalogSearch_button_ok"; 
    97                         butt.appendChild(buttext); 
    98                         butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 
    99                         el.appendChild(butt); 
    100  
    101                         var space = document.createElement('SPAN'); 
    102                         space.innerHTML = "&nbsp;&nbsp;"; 
    103                         el.appendChild(space); 
    104  
    105                         var butt = document.createElement('BUTTON'); 
    106                         butt.id = "QuickCatalogSearch_button_close"; 
    107                         var buttext = document.createTextNode(get_lang('Close')); 
    108                         butt.appendChild(buttext); 
    109                         butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 
    110                         el.appendChild(butt); 
    111                          
    112                         var space = document.createElement('SPAN'); 
    113                         space.innerHTML = "&nbsp;&nbsp;"; 
    114                         el.appendChild(space); 
    115  
    116                         var butt = document.createElement('BUTTON'); 
    117                         butt.id = "QuickCatalogSearch_button_add_contact"; 
    118                         var buttext = document.createTextNode(get_lang("Add Contact")); 
    119                         butt.appendChild(buttext); 
    120                         butt.onclick = func_add_contact; 
    121                         el.appendChild(butt);                    
     119                         
    122120                } 
    123121                else{ 
     
    130128                         
    131129                        var cmb = document.getElementById('select_QuickCatalogSearch'); 
     130                        cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 
    132131                        cmb.onkeypress = function (e) 
    133132                        { 
     
    178177                } 
    179178                cmb.options[0].selected = true; 
    180                 _this.showWindow(el); 
     179                cmb.size = data.length+1; 
     180                _this.showWindow(el_A); 
    181181        } 
    182182         
     
    214214                        win = this.arrayWin[div.id]; 
    215215                } 
    216                 //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = ""; 
     216                document.getElementById("window_QuickCatalogSearch").style.visibility = "visible"; 
    217217                win.open(); 
    218218                document.getElementById('select_QuickCatalogSearch').focus(); 
     
    228228                document.getElementById(field + "_" + ID).focus(); 
    229229                 
    230                 //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none"; 
    231                 this.arrayWin['window_QuickCatalogSearch'].close(); 
    232         } 
    233          
     230                this.arrayWin['window_QuickCatalogSearch_A'].close(); 
     231                document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 
     232        } 
     233 
    234234        emQuickCatalogSearch.prototype.close_QuickSearch_window = function (field, ID){ 
    235235                //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none"; 
    236236                document.getElementById(field + "_" + ID).focus(); 
    237                 this.arrayWin['window_QuickCatalogSearch'].close(); 
     237                this.arrayWin['window_QuickCatalogSearch_A'].close(); 
     238                document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 
    238239        } 
    239240 
     
    467468                var not_selected = true; 
    468469                 
    469                 fieldOpener.value = trim(fieldOpener.value); 
    470                  
    471470                for (i = 0 ; i < select.length ; i++) { 
    472471                        if (select.options[i].selected && select.options[i].value != '-1') { 
  • branches/2.2.0.1/phpgwapi/js/dJSWin/dJSWin.js

    r144 r4034  
    172172                this.buttons.xDIV.style.left = parseInt(params['width']) - 13 + 'px'; 
    173173                this.buttons.xDIV.style.zIndex = '1'; 
    174                 this.buttons.xDIV.onclick = function() {_this.close(); _this.state = 2;}; 
     174                this.buttons.xDIV.onclick = function() {_this.close(); _this.state = 2;if(document.getElementById("window_QuickCatalogSearch")) document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden";}; 
    175175                 
    176176                this.content.style.visibility = 'hidden'; 
     
    338338                /* Turn the attribute visible false */ 
    339339                this.visible = false; 
    340         } 
     340                //Remove attribute onclick 
     341                var divBan = document.getElementById('divAppbox'); 
     342                divBan.removeAttribute('onclick'); 
     343                if (is_ie){ 
     344                        divBan.onclick = function(){}; 
     345                } 
     346        } 
     347         
    341348 
    342349        dJSWin.prototype.open = function() 
Note: See TracChangeset for help on using the changeset viewer.