Ignore:
Timestamp:
05/19/11 13:38:13 (13 years ago)
Author:
airton
Message:

Ticket #1991 - Parametrizacao das buscas LDAP no ExpressoMail?

Location:
sandbox/2.2.0.2/expressoMail1_2/js
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/expressoMail1_2/js/QuickCatalogSearch.js

    r4037 r4457  
    510510                var search               = itemSearch ? Element('search_for').value : ''; 
    511511                var catalog              = Element('select_catalog').value; 
    512                 var max_result  = 400; 
    513512 
    514513                var handler_searchResults = function(data){ 
    515514                        Element('msg_search').style.visibility = 'hidden'; 
    516515                        if(data.error){ 
    517                                 alert(get_lang('More than %1 results. Please, try to refine your search.',max_result)); 
     516                                alert(get_lang('More than %1 results. Please, try to refine your search.',data.maxResult)); 
    518517                                return false; 
    519518                        }else if(data.users.length == 0 && data.groups.length == 0){ 
     
    537536                        } 
    538537 
    539                         var arr         = new Array(max_result); 
     538                        var arr         = new Array(data.maxResult); 
    540539 
    541540                        for(i = 0; data.groups && i < data.groups.length; i++) { 
     
    551550                                group.innerHTML = '<select multiple style="display:none;width:580px" size="14" id="list_values">'+ arr.join() +'</select>'; 
    552551 
    553                         arr = new Array(max_result); 
     552                        arr = new Array(data.maxResult); 
    554553                         
    555554                        for(i = 0; data.users && i < data.users.length; i++) { 
     
    582581 
    583582                Element('msg_search').style.visibility = 'visible'; 
    584                 cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"&search_for="+search+"&catalog="+catalog, handler_searchResults); 
     583                cExecute ("$this.ldap_functions.catalogsearch&organization="+organization+"&search_for="+search+"&catalog="+catalog, handler_searchResults); 
    585584        } 
    586585 
  • sandbox/2.2.0.2/expressoMail1_2/js/common_functions.js

    r4416 r4457  
    342342                var countDivFiles = 1; 
    343343 
    344         divFile = document.createElement('div');  
    345  
    346         var inputFile = document.createElement("input");  
     344        divFile = document.createElement('div'); 
     345        var inputFile = document.createElement("input"); 
    347346        inputFile.id        = "inputFile_"+id_border+"_"+countDivFiles;  
     347         
    348348        inputFile.name      = "file_"+countDivFiles;  
    349349        inputFile.type      = "file";  
    350         inputFile.size      = 50;  
    351         inputFile.maxlength = 255;  
    352         inputFile.onchange  = function () {  
    353                 validateFileExtension(this.value, this.id.replace('input','div'), this.getAttribute('id_border'));  
    354                 openTab.autosave_timer[id_border] = setTimeout("save_msg("+id_border+")", autosave_time);  
     350        inputFile.size      = 50; 
     351        inputFile.maxlength = 255; 
     352         
     353        inputFile.onchange  = function () { 
     354                validateFileExtension(this.value, this.id.replace('input','div'), this.getAttribute('id_border')); 
     355                 
     356                openTab.autosave_timer[id_border] = setTimeout("save_msg("+id_border+")", autosave_time); 
    355357        };  
    356          
    357         inputFile.onfocus = function () {        
    358                 if (openTab.autosave_timer[id_border])  
    359                         clearTimeout(openTab.autosave_timer[id_border]);  
    360         };  
    361          
    362         divFile.appendChild(inputFile);  
    363  
    364         var linkFile = document.createElement("a");  
    365         linkFile.id        = "linkFile_"+id_border+"_"+countDivFiles;  
    366         linkFile.href      = 'javascript:void(0)';  
    367         linkFile.onclick   = function () {removeFile("divFile_"+id_border+"_"+countDivFiles); return false;};  
    368         linkFile.innerHTML = get_lang("Remove"); 
    369          
     358                 
     359                 
     360        inputFile.onfocus = function () {        
     361                if (openTab.autosave_timer[id_border]) 
     362                        clearTimeout(openTab.autosave_timer[id_border]); 
     363        };       
     364                 
     365        divFile.appendChild(inputFile);          
     366        var linkFile = document.createElement("a");      
     367        linkFile.id        = "linkFile_"+id_border+"_"+countDivFiles; 
     368        linkFile.href      = 'javascript:void(0)'; 
     369        linkFile.onclick   = function () { 
     370                removeFile("divFile_"+id_border+"_"+countDivFiles); return false; 
     371        }; 
     372                 
     373        linkFile.innerHTML = get_lang("Remove");         
     374                 
    370375        divFile.appendChild(linkFile); 
    371376        divFile.id = "divFile_"+id_border+"_"+countDivFiles; 
     
    376381//      Remove Input File Dynamically. 
    377382function removeFile(id){ 
    378         var border_id = id.substr(8,1); 
    379383        var el = Element(id); 
    380384        el.parentNode.removeChild(el); 
     
    565569 
    566570                if ((!data.status) && (data.error == "many results")){ 
    567                         alert(get_lang('More than %1 results. Please, try to refine your search.',200)); 
     571                        alert(get_lang('More than %1 results. Please, try to refine your search.',data.maxResult)); 
    568572                        return false; 
    569573                } 
  • sandbox/2.2.0.2/expressoMail1_2/js/draw_api.js

    r4413 r4457  
    196196                                temp = confirm(get_lang("To use local messages you have to install google gears. Would you like to be redirected to gears installation page?")); 
    197197                                if (temp) { 
    198                                        if(is_win && is_gecko && preferences.gears_firefox_windows != "") 
    199                                             location.href = preferences.gears_firefox_windows; 
    200                                        else if(!is_win && is_gecko && preferences.gears_firefox_linux != "") 
    201                                            location.href = preferences.gears_firefox_linux; 
    202                                        else if(is_ie && preferences.gears_ie != "") 
    203                                            location.href = preferences.gears_ie; 
    204                                        else 
    205                                             location.href = "http://gears.google.com/?action=install&message="+get_lang("To use local messages, install Google Gears")+"&return="+document.location.href; 
     198                                       //if(is_win && is_gecko && preferences.gears_firefox_windows != "") 
     199                                        //    location.href = preferences.gears_firefox_windows; 
     200                                       //else if(!is_win && is_gecko && preferences.gears_firefox_linux != "") 
     201                                         //  location.href = preferences.gears_firefox_linux; 
     202                                       //else if(is_ie && preferences.gears_ie != "") 
     203                                           //location.href = preferences.gears_ie; 
     204                                       //else 
     205                                                        expresso_local_messages.installGears(); 
    206206                                } 
    207207                                else { 
     
    250250                tree_folders.draw(Element('content_folders')); 
    251251                if (!expresso_offline) { 
    252                         n_root.changeState(); 
    253                         tree_folders.getNodeById('INBOX')._select(); 
     252                        //n_root.changeState(); 
     253                        //tree_folders.getNodeById('INBOX')._select(); 
    254254                } 
    255255                else { 
     
    31893189        } 
    31903190 
    3191         /**  
    3192         * event to enable autosave_draft on file attachment  
    3193         */  
    3194         function save_onchange_attachment_handler () { 
    3195                 away = false;  
    3196                 var save_link = Element("save_message_options_"+border_id);  
    3197                 save_link.onclick = function onclick(event) {  
    3198                 openTab.toPreserve[border_id] = true;   
    3199                         save_msg(border_id);  
    3200                 };  
    3201                 save_link.className = 'message_options';  
    3202         };  
    32033191         
    32043192        var add_files = document.createElement("A"); 
    32053193        add_files.setAttribute("href", "javascript:void(0)"); 
    3206         add_files.onclick = function () { 
    3207                 var obj = addFile(ID);  
    3208                 if (preferences.auto_save_draft == 1 && obj) { 
    3209                         if ( obj.addEventListener )  
    3210                         obj.addEventListener('click', save_onchange_attachment_handler, false);  
    3211                 }  
    3212                 return false;  
    3213         };  
     3194         
     3195        add_files.onclick = function () {  
     3196                                        var obj = addFile(ID);  
     3197                                        if (preferences.auto_save_draft == 1 && obj) {  
     3198                                                if ( obj.addEventListener )  
     3199                                                        obj.addEventListener('click', save_onchange_attachment_handler, false);  
     3200                                        }  
     3201                                        return false;  
     3202                                };  
     3203         
    32143204        add_files.innerHTML =  get_lang("Attachments: add+"); 
    32153205        add_files.setAttribute("tabIndex","-1"); 
  • sandbox/2.2.0.2/expressoMail1_2/js/main.js

    r4413 r4457  
    18411841                //Replace all files to new files 
    18421842                var divFiles = Element("divFiles_"+border_id); 
     1843                 
    18431844                divFiles.innerHTML = ''; 
    18441845                 
  • sandbox/2.2.0.2/expressoMail1_2/js/sharemailbox.js

    r4108 r4457  
    295295         
    296296        var finderTimeout = ''; 
    297         cShareMailbox.prototype.optionFinderTimeout = function(obj) 
    298         { 
    299                 clearTimeout(finderTimeout);     
    300                 var oWait = document.getElementById("em_span_searching"); 
    301                 oWait.innerHTML = get_lang('Searching')+"..."; 
    302                 var finderTimeout = setTimeout("sharemailbox.optionFinder('"+obj.id+"')",500); 
     297        cShareMailbox.prototype.optionFinderTimeout = function(obj, event) 
     298        { 
     299                if( event.keyCode === 13 ) 
     300                {        
     301                        limit = 0; 
     302                        sharemailbox.optionFinder(obj.id); 
     303                }        
     304                return; 
    303305        } 
    304306         
Note: See TracChangeset for help on using the changeset viewer.