Changeset 6374


Ignore:
Timestamp:
06/01/12 08:59:12 (12 years ago)
Author:
gustavo
Message:

Ticket #2768 - Melhorias na criação de mensagens

Location:
sandbox/2.4.1-3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.1-3/expressoMail1_2/index.php

    r6246 r6374  
    195195        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; 
    196196        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; 
     197        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['expressoMail_ldap_identifier_recipient'] = $current_config['expressoMail_ldap_identifier_recipient']; 
    197198        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_x_origin'] = $current_config['expressoMail_use_x_origin']; 
    198199        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; 
     
    216217        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] : "0"; 
    217218        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] : "0"; 
    218  
     219        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['ldap_identifier_recipient'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] : 1; 
    219220        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] : 1; 
    220221        //      ACL for block edit Personal Data. 
     
    276277    echo '<script> var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' 
    277278           var sieve_forward_domains = \''.$current_config['expressoMail_sieve_forward_domains'].'\'  
    278                    var ldap_identifier_recipient = \''.$current_config['expressoMail_ldap_identifier_recipient'].'\' </script>'; 
     279                  </script>'; 
    279280        // End Set Anti-Spam options. 
    280281 
  • sandbox/2.4.1-3/expressoMail1_2/js/QuickCatalogSearch.js

    r6358 r6374  
    598598 
    599599                final_contact = final_contact.replace(/\/n/, "");   
    600                 draw_email_box(final_contact, $(field_).filter("input")); 
     600                draw_email_box( 
     601                        (data_[parseInt(divs.split("_")[1])-1].uid ? data_[parseInt(divs.split("_")[1])-1].uid[0] : final_contact) 
     602                        , $(field_).filter("input") 
     603                ); 
    601604                button.onclick = function(){ 
    602605                        remove_contact_field(document.getElementById(divs).innerHTML, button, divs); 
  • sandbox/2.4.1-3/expressoMail1_2/js/doiMenuData.js

    r6334 r6374  
    305305} 
    306306 
    307  
    308  
    309  
    310  
    311  
    312  
     307function loadExtraLDAPBox(data, element){ 
     308        //menuItensLabel[index] = {type: "label", customName: menuItems[index].name};            
     309        $.contextMenu({ 
     310                selector: "#content_id_"+currentTab+" "+element+" .box-info", 
     311                trigger: 'hover', 
     312                delay:100, 
     313                autoHide:true, 
     314                items: { 
     315                        "Name" : {name: "<b>"+data[0].value+"</b>", disabled: true} , 
     316                        "Email" : {name: data[1].value, disabled: true}, 
     317                        "TelefoneLabel" : {name: "<b>Telefone</b>", disabled: true}, 
     318                        "TelefoneValue" : {name: data[2].value, disabled: true} 
     319                } 
     320        });      
     321} 
     322 
     323 
     324 
     325 
     326 
     327 
     328 
  • sandbox/2.4.1-3/expressoMail1_2/js/draw_api.js

    r6361 r6374  
    35023502//DESENHO DAS CAIXA DE EMAIL 
    35033503function draw_email_box(input_data, location){ 
    3504         if(input_data != ""){ 
     3504        if($.trim(input_data) != ""){ 
    35053505                var box_data = valid_emails(input_data); 
    35063506                DataLayer.render("../prototype/modules/mail/templates/emailBox.ejs", box_data, function(html){ 
    35073507                        var newBox = location.before(html).prev(); 
    35083508                        box_actions(newBox); 
     3509                        if(preferences.expressoMail_ldap_identifier_recipient && $(newBox).hasClass("invalid-email-box")){ 
     3510                                //$(newBox).find(".loading").css("background-image", "../prototype/modules/mail/img/ajax-loader.gif"); 
     3511                                show_detais(newBox, input_data); 
     3512                        }else{ 
     3513                                $(newBox).find(".box-loading").remove(); 
     3514                        } 
    35093515                }); 
    35103516        } 
     
    35343540                //PEGA TODO O CONTEUDO E SETA COMO SE FOSSE O EMAIL 
    35353541                case 1: 
    3536                         ContactBox.email = $.trim(email); 
    3537                         ContactBox.valid = reSimpleEmail.test($.trim(email.toLowerCase())); 
     3542                        validation.unshift(""); 
     3543                        ContactBox = complexValidation(validation); 
    35383544                        break; 
    35393545                //CORRIGI ERRO DE DIGITAÇÃO COMO ( huahua"<huhau@hauhau.com>) ou (hahahaha"huahua@email.com) ou ainda (hahahaha"huahua@ema  il.com) 
     
    36313637                                        if(input.val().split('"').length-1 == 0){ 
    36323638                                                e.preventDefault(); 
     3639                                                e.stopPropagation(); 
    36333640                                                draw_email_box(input.val(), input); 
    36343641                                                input.val(""); 
     
    37823789 
    37833790//MOSTRA OS DETALHES DAS CAIXA DE EMAIL NOS CAMPOS PARA - CC - CCO 
    3784 function show_detais(img){ 
    3785          
     3791function show_detais(box, value){ 
     3792        var ldap_id = preferences.expressoMail_ldap_identifier_recipient; 
     3793        DataLayer.read("/usersldap", {field : ldap_id,value: value}, function(data){ 
     3794                if(!data.error){ 
     3795                        if(data.collection.error) 
     3796                                box.find(".box-loading").remove(); 
     3797                        else{ 
     3798                                //box.find(".box-loading").css("background-image", "url(templates/default/images/information.png) no-repeat! !important"); 
     3799                                box.find(".box-loading").removeClass("box-loading").addClass("box-info"); 
     3800                                box.addClass("box-"+value).removeClass("invalid-email-box"); 
     3801                                loadExtraLDAPBox(data.collection.itens[0].data, ".box-"+value); 
     3802                                box.unbind("dblclick").bind("dblclick", function(e){ 
     3803                                        new $.Zebra_Dialog('<strong>Impossivel editar</strong> um contato do ldap\n' + 
     3804                                                '<strong>Porém</strong>é possivel remove-lo', { 
     3805                                                'buttons':  false, 
     3806                                                'modal': false, 
     3807                                                'position': ['right - 20', 'top + 20'], 
     3808                                                'auto_close': 3000 
     3809                                        }); 
     3810                                }).find(".box-input").val("\""+data.collection.itens[0].data[0].value+"\" <"+data.collection.itens[0].data[1].value+">"); 
     3811                                box.find(".email-box-value").html( (data.collection.itens[0].data[0].value.length > 18 ? data.collection.itens[0].data[0].value.substring(0, 15)+"...": data.collection.itens[0].data[0].value)) 
     3812                        } 
     3813                }else{ 
     3814                        box.find(".box-loading").remove(); 
     3815                } 
     3816        }); 
    37863817} 
    37873818 
     
    38763907                        autoFocus: true, 
    38773908                        open : function(){ 
    3878                                 if($(this).val() == "") 
    3879                                         $(this).autocomplete( "close" ) 
     3909                                if($.trim($(this).val()) == "") 
     3910                                        $(this).autocomplete( "close" ); 
    38803911                        } 
    38813912                }) 
  • sandbox/2.4.1-3/expressoMail1_2/templates/default/main.css

    r6358 r6374  
    13361336        border : 1px solid #474747; 
    13371337} 
     1338 
     1339.box-loading{ 
     1340        background : url("../../../prototype/modules/mail/img/loading.gif") no-repeat !important; 
     1341        background-size: 17px auto !important; 
     1342} 
     1343 
     1344.box-info{ 
     1345        background : url("images/information.png") no-repeat !important; 
     1346} 
  • sandbox/2.4.1-3/prototype/modules/mail/templates/emailBox.ejs

    r6334 r6374  
    1010        </span> 
    1111        <input class="box-input" value="<%= input_value %>"></input> 
     12        <span class="box-loading">&nbsp;&nbsp;&nbsp;</span> 
    1213</div> 
Note: See TracChangeset for help on using the changeset viewer.