Changeset 5417 for trunk/expressoMail1_2


Ignore:
Timestamp:
01/25/12 08:46:20 (12 years ago)
Author:
gustavo
Message:

Ticket #2462 - Melhorias na tela de composição de mensagens do ExpressoMail?

Location:
trunk/expressoMail1_2
Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/index.php

    r5409 r5417  
    4545                                        <script type='text/javascript' src='../prototype/plugins/alphanumeric/jquery.alphanumeric.js'></script> 
    4646                                        <script type='text/javascript' src='../prototype/plugins/timepicker/localization/jquery-ui-timepicker-pt-BR.js'></script> 
     47                                        <script type='text/javascript' src='../prototype/plugins/jquery-elastic/jquery.elastic.source.js'></script> 
    4748                                        <script type='text/javascript' src='../prototype/modules/calendar/js/calendar.date.js'></script> 
    4849                                        <script type='text/javascript' src='../prototype/modules/calendar/js/helpers.js'></script> 
  • trunk/expressoMail1_2/js/common_functions.js

    r5264 r5417  
    547547} 
    548548 
    549 function emQuickSearch(emailList, field, ID, Type){ 
     549function emQuickSearch(emailList, field, ID, Type, force){ 
    550550        var quickSearchKeyBegin; 
    551551        var quickSearchKeyEnd; 
     
    593593                return true; 
    594594        } 
    595  
     595        if(force){ 
     596                cExecute ("$this.ldap_functions.quicksearchcontact&search_for="+''+"&field="+field+"&ID="+ID, handler_emQuickSearch); 
     597                return; 
     598        } 
    596599        if ((field != 'null') && (ID != 'null')) 
    597600        { 
  • trunk/expressoMail1_2/js/draw_api.js

    r5410 r5417  
    23032303        { 
    23042304                var options = document.createElement("TD"); 
    2305                 options.width = "1%"; 
     2305                //options.width = "1%"; 
    23062306                options.setAttribute("noWrap","true"); 
    23072307                var option_edit   = ' | <span class="message_options" onclick="new_message(\'edit\',\''+ID+'\');">'+get_lang('Edit')+'</span>'; 
     
    32113211        tr0.className = "tr_message_header"; 
    32123212        var td0 = document.createElement("TD"); 
    3213         td0.colSpan = '3'; 
     3213        td0.colSpan = '2'; 
    32143214 
    32153215        var table_menu_new_message = document.createElement("TABLE"); 
     
    32203220        var tr_menu_new_message = document.createElement("TR"); 
    32213221        var td_menu_new_message = document.createElement("TD"); 
    3222         td_menu_new_message.setAttribute("noWrap","true"); 
    3223  
     3222        //td_menu_new_message.setAttribute("noWrap","true"); 
     3223        td_menu_new_message.className = "new-message-menu"; 
    32243224        if ((preferences.save_in_folder == '-1') || (preferences.save_in_folder == '')){ 
    3225                 var option_send = '<span id="send_button_'+ID+'" class="message_options" onclick=send_message("'+ID+'","null","null");>'+get_lang("Send")+'</span> | '; 
     3225                var option_send = '<button title="Enviar Email" id="send_button_'+ID+'" class="header-button button small" onclick=send_message("'+ID+'","null","null");>'+get_lang("Send")+'</button>'; 
    32263226                //var option_send   = '<input type="button" id="send_button_'+ID+'" class="em_button_like_span" tabindex="1" value="'+get_lang("Send and not file")+'" onclick=send_message("'+ID+'","null","null");>' + ' | '; 
    32273227                if(!expresso_offline) 
    3228                         var option_send_and_file= '<span class="message_options" onclick=wfolders.makeWindow("'+ID+'","send_and_file");>'+get_lang("Send and file")+'</span> | '; 
     3228                        var option_send_and_file= '<button id="send_and_custom_save_'+ID+'" class="header-button button small" onclick=wfolders.makeWindow("'+ID+'","send_and_file");>'+get_lang("Send and file")+'</button>'; 
    32293229                else 
    32303230                        var option_send_and_file=''; 
    32313231        } 
    32323232        else{ 
    3233                 var option_send = '<span id="send_button_'+ID+'" class="message_options" onclick="send_message(\''+ID+'\',\''+preferences.save_in_folder+'\',\'null\');">'+get_lang("Send")+'</span> | '; 
     3233                var option_send = '<button title="'+get_lang("Send Mail")+'" id="send_button_'+ID+'" class="header-button button small" onclick="send_message(\''+ID+'\',\''+preferences.save_in_folder+'\',\'null\');">'+get_lang("Send")+'</button>'; 
    32343234                //var option_send   = '<input type="button" id="send_button_'+ID+'" class="em_button_like_span" tabindex="1" value="'+get_lang("Send")+'" onclick="send_message(\''+ID+'\',\''+preferences.save_in_folder+'\',\'null\');">' + ' | '; 
    32353235                var option_send_and_file=''; 
     
    32373237        } 
    32383238//      var option_save_as              = '<span class="message_options" onclick=wfolders.makeWindow("'+ID+'","save");>'+get_lang("Save as")+'</span> | '; 
     3239         
    32393240        if (!expresso_offline) { 
    3240                 var option_save = '<span id="save_message_options_'+ID+'" class="message_options" onclick="save_msg('+ID+');">'+get_lang("Save")+'</span> | '; 
    3241                 var option_search = '<span class="message_options" onclick=openListUsers("'+ID+'");>'+get_lang("Search")+'</span>'; 
     3241                var option_save = '<button title="'+get_lang("Save Mail")+'" id="save_message_options_'+ID+'" class="header-button button small" onclick="save_msg('+ID+');">'+get_lang("Save")+'</button>'; 
     3242                //var option_search = '<button class="header-button" onclick=openListUsers("'+ID+'");>'+get_lang("Search")+'</button>'; 
    32423243        } 
    32433244        else { 
    32443245                var option_save = '<input type="hidden" id="save_message_options_'+ID+'">'; 
    3245                 var option_search = ''; 
    3246         } 
    3247         td_menu_new_message.innerHTML = option_send + option_send_and_file + option_save + option_search; 
    3248  
     3246                //var option_search = ''; 
     3247        } 
     3248        if (parseInt(preferences.use_important_flag)) 
     3249                var option_important = '<button title="'+get_lang("Important message")+'" name="important_message_'+ID+'" id="important_message_options_'+ID+'" class="send_option header-button button small">&nbsp;</button>'; 
     3250                 
     3251        var option_confLeitura = '<button title="'+get_lang("Return receipt")+'" name="return_receipt_'+ID+'" id="conf_leitura_message_options_'+ID+'" class="send_option header-button button small">&nbsp;</button>'; 
     3252         
     3253        td_menu_new_message.innerHTML = option_send +  option_save + option_send_and_file + (option_important ? option_important: "") +option_confLeitura; //+ option_search; 
     3254         
     3255        td_menu_another_adress = document.createElement("TD"); 
     3256        td_menu_another_adress.id = "another_adress_"+ID; 
     3257        td_menu_another_adress.style.position = "absolute"; 
     3258        td_menu_another_adress.style.right = "10px"; 
     3259         
    32493260        tr_menu_new_message.appendChild(td_menu_new_message); 
    3250  
     3261        tr_menu_new_message.appendChild(td_menu_another_adress); 
     3262         
    32513263         
    32523264        tbody_menu_new_message.appendChild(tr_menu_new_message); 
     
    32613273        var td1_1 = document.createElement("TD"); 
    32623274        td1_1.innerHTML = get_lang("From")+":"; 
    3263         td1_1.setAttribute("noWrap","true"); 
    3264         td1_1.style.width = "1%"; 
    3265  
     3275        //td1_1.setAttribute("noWrap","noWrap"); 
     3276        //td1_1.style.width = "1%"; 
     3277         
    32663278        var td_from = document.createElement("TD"); 
    3267         td_from.setAttribute("noWrap","true"); 
     3279        //td_from.setAttribute("noWrap","noWrap"); 
    32683280        td_from.style.width = "100%"; 
    3269  
     3281        //td_from.colSpan = "2"; 
    32703282        var sel_from = document.createElement('SELECT'); 
    32713283        sel_from.id = "from_"+ID; 
    32723284        sel_from.name = "input_from"; 
    32733285        sel_from.style.width = "100%"; 
    3274         sel_from.setAttribute("wrap","soft"); 
     3286        //sel_from.setAttribute("wrap","soft"); 
    32753287        td_from.appendChild(sel_from); 
    32763288        tr1_1.appendChild(td1_1); 
     
    32823294        var td1_2 = document.createElement("TD"); 
    32833295        tr1_2.style.display = 'none'; 
    3284         td1_2.innerHTML = get_lang("Reply to")+":"; 
    3285         td1_2.setAttribute("noWrap","true"); 
    3286         td1_2.style.width = "1%"; 
     3296    td1_2.innerHTML = get_lang("Reply to")+":"; 
     3297        //td1_2.setAttribute("noWrap","true"); 
     3298        //td1_2.style.width = "1%"; 
    32873299 
    32883300        var td_replyto = document.createElement("TD"); 
    3289         td_replyto.setAttribute("noWrap","true"); 
     3301    //td_replyto.setAttribute("noWrap","true"); 
    32903302        td_replyto.style.width = "100%"; 
    3291  
    3292         var input_replyto = document.createElement('INPUT'); 
     3303        //td_replyto.colSpan = "2"; 
     3304        var input_replyto = document.createElement('INPUT'); 
    32933305        input_replyto.id = "replyto_"+ID; 
    3294         input_replyto.name = "input_replyto"; 
     3306        input_replyto.name = "input_replyto"; 
    32953307        input_replyto.setAttribute("tabIndex","1"); 
    3296         input_replyto.style.width = "100%"; 
    3297         input_replyto.setAttribute("wrap","soft"); 
    3298         input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 
     3308    input_replyto.style.width = "100%"; 
     3309        //input_replyto.setAttribute("wrap","soft"); 
     3310    input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 
    32993311        input_replyto.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
    33003312 
    3301         if (!is_ie) 
     3313        if (!is_ie) 
    33023314        { 
    3303                 input_replyto.rows = 2; 
    3304                 input_replyto.onkeydown = function (e) 
    3305         { 
     3315        input_replyto.rows = 2; 
     3316            input_replyto.onkeydown = function (e) 
     3317                { 
    33063318            if ((e.keyCode) == 120) //F9 
    3307             { 
     3319                        { 
    33083320                emQuickSearch(input_replyto.value, 'replyto', ID); 
    3309             } 
    3310             else 
    3311             { 
    3312                 if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden')) 
    3313                 { 
    3314                     e.preventDefault(); 
     3321                        } 
     3322                        else 
     3323                        { 
     3324                                if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden')) 
     3325                                { 
     3326                                        e.preventDefault(); 
    33153327                    search_contacts(e.keyCode,this.id); 
    33163328                } 
    3317             } 
     3329                        } 
    33183330        } 
    33193331        input_replyto.onkeyup = function (e) 
    3320  
    33213332        { 
    3322             if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40)) 
    3323             { 
    3324                 search_contacts(e.keyCode,this.id); 
     3333                        if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40)) 
     3334                        { 
     3335                                search_contacts(e.keyCode,this.id); 
    33253336            } 
    33263337        } 
    3327         } 
    3328         else 
    3329         { 
    3330                 input_replyto.rows = 3; 
    3331                 input_replyto.onkeyup = function (e) 
    3332         { 
    3333             if ((window.event.keyCode) == 120) //F9 
    3334             { 
    3335                 emQuickSearch(input_replyto.value, 'replyto', ID); 
    3336             } 
    3337             else 
    3338             { 
     3338        } 
     3339        else 
     3340    { 
     3341                input_replyto.rows = 3; 
     3342        input_replyto.onkeyup = function (e) 
     3343                { 
     3344                        if ((window.event.keyCode) == 120) //F9 
     3345                        { 
     3346                                        emQuickSearch(input_replyto.value, 'replyto', ID); 
     3347                        } 
     3348                        else 
     3349                        { 
    33393350                search_contacts(window.event.keyCode,this.id); 
    33403351            } 
    3341         } 
    3342         } 
     3352                } 
     3353        } 
    33433354        td_replyto.appendChild(input_replyto); 
    3344  
    3345         var img_search = document.createElement("IMG"); 
    3346         img_search.src = "./templates/"+template+"/images/search.gif"; 
    3347         img_search.onclick = function () { 
    3348             emQuickSearch(document.getElementById('replyto_'+ID).value, 'replyto', ID) 
    3349         } 
    3350         img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
    3351         var span_search = document.createElement("SPAN"); 
    3352         span_search.innerHTML = get_lang('Search'); 
    3353  
    3354         var td1_2_img_search = document.createElement("TD"); 
    3355         td1_2_img_search.setAttribute("noWrap","true"); 
    3356         var td1_2_span_search = document.createElement("TD"); 
    3357         td1_2_span_search.setAttribute("noWrap","true"); 
    3358  
    3359         td1_2_img_search.appendChild(img_search); 
    3360         td1_2_span_search.appendChild(span_search); 
    3361  
    3362         tr1_2.appendChild(td1_2); 
     3355        tr1_2.appendChild(td1_2); 
    33633356        tr1_2.appendChild(td_replyto); 
    3364         tr1_2.appendChild(td1_2_img_search); 
    3365         tbody_message.appendChild(tr1_2); 
     3357        tbody_message.appendChild(tr1_2); 
    33663358//////////////////////////////////////////////////////////////////////////////////////////////////////// 
    33673359        var tr1 = document.createElement("TR"); 
    33683360        var td1 = document.createElement("TD"); 
    3369         td1.innerHTML = get_lang("To")+":"; 
    3370         td1.setAttribute("noWrap","true"); 
    3371         td1.style.width = "1%"; 
     3361        td1.innerHTML = '<button title="'+get_lang("To")+':" id="to_button_'+ID+'" name="to" class="button small adress_button">'+get_lang("To")+':</button>'; 
     3362        //td1.setAttribute("noWrap","true"); 
     3363        td1.style.width = "70px"; 
    33723364 
    33733365        var td_to = document.createElement("TD"); 
    3374         td_to.setAttribute("noWrap","true"); 
     3366        //td_to.setAttribute("noWrap","true"); 
    33753367        td_to.style.width = "100%"; 
    33763368 
     
    33803372        input_to.setAttribute("tabIndex","1"); 
    33813373        input_to.style.width = "100%"; 
    3382         input_to.setAttribute("wrap","soft"); 
     3374        input_to.style.padding = "1px"; 
     3375        input_to.className = "mail_fields"; 
     3376        //input_to.style.wrap="off"; 
     3377        //input_to.setAttribute("wrap","off"); 
    33833378        input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 
    33843379        input_to.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
    33853380        if (!is_ie) 
    33863381        { 
    3387                 input_to.rows = 2; 
     3382                input_to.rows = 1; 
    33883383                input_to.onkeydown = function (e) 
    33893384                { 
     
    34113406        else 
    34123407        { 
    3413                 input_to.rows = 3; 
     3408                input_to.rows = 1; 
    34143409                input_to.onkeyup = function (e) 
    34153410                { 
     
    34323427        forwarded_local_message.value = "0"; 
    34333428        td_to.appendChild(forwarded_local_message); 
    3434  
    3435         if (!expresso_offline) { 
    3436                 var img_search = document.createElement("IMG"); 
    3437                 img_search.src = "./templates/"+template+"/images/search.gif"; 
    3438                 img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
    3439                 img_search.onclick = function () { 
    3440                     emQuickSearch(document.getElementById('to_'+ID).value, 'to', ID); 
    3441                 }; 
    3442         } 
    3443         else { 
    3444                 var img_search = document.createElement("SPAN"); 
    3445         } 
    3446  
    3447         var span_search = document.createElement("SPAN"); 
    3448         span_search.innerHTML = get_lang('Search'); 
    3449  
    3450         var td1_img_search = document.createElement("TD"); 
    3451         td1_img_search.setAttribute("noWrap","true"); 
    3452         var td1_span_search = document.createElement("TD"); 
    3453         td1_span_search.setAttribute("noWrap","true"); 
    3454  
    3455         td1_img_search.appendChild(img_search); 
    3456         td1_span_search.appendChild(span_search); 
    3457  
     3429         
     3430        //var td_to2 = document.createElement("TD"); 
     3431        //td_to2.id = "another_adress_"+ID; 
     3432        //td_to2.style.width = "200px"; 
     3433        //td_to2.setAttribute("noWrap","true"); 
     3434         
    34583435        tr1.appendChild(td1); 
    34593436        tr1.appendChild(td_to); 
    3460         tr1.appendChild(td1_img_search); 
    3461  
     3437        //tr1.appendChild(td_to2); 
    34623438        tbody_message.appendChild(tr1); 
    34633439////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    34663442        tr2.style.display = 'none'; 
    34673443        var td2 = document.createElement("TD"); 
    3468         td2.innerHTML = "Cc:"; 
    3469         td2.setAttribute("noWrap","true"); 
    3470         td2.style.width = "1%"; 
     3444        td2.innerHTML = '<button title="Cc:" id="cc_button_'+ID+'" name="cc" class="button small adress_button">Cc:</button>'; 
     3445        //td2.setAttribute("noWrap","true"); 
     3446        //td2.style.width = "1%"; 
    34713447 
    34723448        var td_cc = document.createElement("TD"); 
    3473         td_cc.setAttribute("noWrap","true"); 
     3449        //td_cc.setAttribute("noWrap","true"); 
    34743450        td_cc.style.width = "100%"; 
    3475  
     3451        //td_cc.colSpan = "2"; 
     3452         
    34763453        var input_cc = document.createElement('TEXTAREA'); 
    34773454        input_cc.id = "cc_"+ID; 
     
    34793456        input_cc.setAttribute("tabIndex","1"); 
    34803457        input_cc.style.width = "100%"; 
     3458        input_cc.className = "mail_fields"; 
    34813459        input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 
    34823460        input_cc.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
     3461        input_cc.rows = 1; 
     3462        //td_cc.setAttribute("noWrap","true"); 
    34833463        if (!is_ie) 
    34843464        { 
    3485                 input_cc.rows = 2; 
     3465                //input_cc.rows = 1; 
    34863466                input_cc.onkeydown = function (e) 
    34873467                { 
     
    35093489        else if (is_ie) 
    35103490        { 
    3511                 input_cc.rows = 3; 
     3491                //input_cc.rows = 1; 
    35123492                input_cc.onkeyup = function (e) 
    35133493                { 
     
    35223502                } 
    35233503        } 
    3524  
    35253504        td_cc.appendChild(input_cc); 
    3526         var img_search = document.createElement("IMG"); 
    3527         img_search.src = "./templates/"+template+"/images/search.gif"; 
    3528         img_search.onclick = function () {             
    3529             emQuickSearch(document.getElementById('cc_'+ID).value, 'cc', ID) 
    3530         } 
    3531         img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
    3532         var span_search = document.createElement("SPAN"); 
    3533         span_search.innerHTML = get_lang('Search'); 
    3534  
    3535         var td2_img_search = document.createElement("TD"); 
    3536         td2_img_search.setAttribute("noWrap","true"); 
    3537         var td2_span_search = document.createElement("TD"); 
    3538         td2_span_search.setAttribute("noWrap","true"); 
    3539  
    3540         td2_img_search.appendChild(img_search); 
    3541         td2_span_search.appendChild(span_search); 
    3542  
    35433505        tr2.appendChild(td2); 
    35443506        tr2.appendChild(td_cc); 
    3545         tr2.appendChild(td2_img_search); 
    35463507        tbody_message.appendChild(tr2); 
    35473508////////////////////////////////////////////////////////////////////////////////////////////////////// 
    35483509         
    3549 if( allow_hidden_copy )  
    3550                         {  
     3510        if( allow_hidden_copy )  
     3511        {  
    35513512                  
    3552         var tr3 = document.createElement("TR"); 
    3553         tr3.id = "tr_cco_"+ID; 
    3554         tr3.style.display = 'none'; 
    3555         var td3 = document.createElement("TD"); 
    3556         td3.setAttribute("noWrap","true"); 
    3557         td3.innerHTML = get_lang("CCo")+":"; 
    3558         td3.style.width = "1%"; 
    3559  
    3560         var td_cco = document.createElement("TD"); 
    3561         td_cco.setAttribute("noWrap","true"); 
    3562         td_cco.style.width = "100%"; 
    3563  
    3564         var input_cco = document.createElement('TEXTAREA'); 
    3565         input_cco.id = "cco_"+ID; 
    3566         input_cco.name = "input_cco"; 
    3567         input_cco.setAttribute("tabIndex","1"); 
    3568         input_cco.style.width = "100%"; 
    3569         input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 
    3570         input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
    3571  
    3572         if (!is_ie) 
    3573         { 
    3574                 input_cco.rows = 2; 
    3575                                 input_cco.onkeydown  = function (e)  
     3513                var tr3 = document.createElement("TR"); 
     3514                tr3.id = "tr_cco_"+ID; 
     3515                tr3.style.display = 'none'; 
     3516                var td3 = document.createElement("TD"); 
     3517                //td3.setAttribute("noWrap","true"); 
     3518                td3.innerHTML = '<button title="'+get_lang("CCo")+':" id="cc_button_'+ID+'" name="cco" class="button small adress_button">'+get_lang("CCo")+':</button>'; 
     3519                //td3.style.width = "1%"; 
     3520 
     3521                var td_cco = document.createElement("TD"); 
     3522                //td_cco.colSpan = "2"; 
     3523                //td_cco.setAttribute("noWrap","true"); 
     3524                td_cco.style.width = "100%"; 
     3525 
     3526                var input_cco = document.createElement('TEXTAREA'); 
     3527                input_cco.id = "cco_"+ID; 
     3528                input_cco.name = "input_cco"; 
     3529                input_cco.setAttribute("tabIndex","1"); 
     3530                input_cco.style.width = "100%"; 
     3531                input_cco.className = "mail_fields"; 
     3532                input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 
     3533                input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
     3534                input_cco.rows = 1; 
     3535                if (!is_ie) 
    35763536                { 
    3577                         if ((e.keyCode) == 120) //F9 
    3578                         { 
    3579                                 emQuickSearch(input_cco.value, 'cco', ID); 
    3580                         } 
    3581                         else 
    3582                         { 
    3583                                 if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden')) 
     3537                         
     3538                        input_cco.onkeydown  = function (e)  
     3539                        { 
     3540                                if ((e.keyCode) == 120) //F9 
    35843541                                { 
    3585                                         e.preventDefault(); 
     3542                                        emQuickSearch(input_cco.value, 'cco', ID); 
     3543                                } 
     3544                                else 
     3545                                { 
     3546                                        if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden')) 
     3547                                        { 
     3548                                                e.preventDefault(); 
     3549                                                search_contacts(e.keyCode,this.id); 
     3550                                        } 
     3551                                } 
     3552                        } 
     3553                        input_cco.onkeyup = function (e) 
     3554                        { 
     3555                                if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40)) 
     3556                                { 
    35863557                                        search_contacts(e.keyCode,this.id); 
    35873558                                } 
    35883559                        } 
    35893560                } 
    3590                 input_cco.onkeyup = function (e) 
     3561                else if (is_ie) 
    35913562                { 
    3592                         if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40)) 
    3593                         { 
    3594                                 search_contacts(e.keyCode,this.id); 
    3595                         } 
    3596                 } 
    3597         } 
    3598         else if (is_ie) 
    3599         { 
    3600                 input_cco.rows = 3; 
    3601                 input_cco.onkeyup = function (e) 
    3602                 { 
    3603                         if ((window.event.keyCode) == 120) //F9 
    3604                         { 
    3605                                 emQuickSearch(input_cco.value, 'cco', ID); 
    3606                         } 
    3607                         else 
    3608                         { 
    3609                                 search_contacts(window.event.keyCode,this.id); 
    3610                         } 
    3611                 } 
    3612         } 
    3613  
    3614         td_cco.appendChild(input_cco); 
    3615         var img_search = document.createElement("IMG"); 
    3616         img_search.src = "./templates/"+template+"/images/search.gif"; 
    3617         img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
    3618                             img_search.onclick = function () { 
    3619                                 emQuickSearch(document.getElementById('cco_'+ID).value, 'cco', ID); 
    3620                             };  
    3621         var span_search = document.createElement("SPAN"); 
    3622         span_search.innerHTML = get_lang('Search'); 
    3623  
    3624         var td3_img_search = document.createElement("TD"); 
    3625         td3_img_search.setAttribute("noWrap","true"); 
    3626         var td3_span_search = document.createElement("TD"); 
    3627         td3_span_search.setAttribute("noWrap","true"); 
    3628  
    3629         td3_img_search.appendChild(img_search); 
    3630         td3_span_search.appendChild(span_search); 
    3631  
    3632         tr3.appendChild(td3); 
    3633         tr3.appendChild(td_cco); 
    3634         tr3.appendChild(td3_img_search); 
    3635         tbody_message.appendChild(tr3); 
    3636                         }  
     3563                        input_cco.onkeyup = function (e) 
     3564                        { 
     3565                                if ((window.event.keyCode) == 120) //F9 
     3566                                { 
     3567                                        emQuickSearch(input_cco.value, 'cco', ID); 
     3568                                } 
     3569                                else 
     3570                                { 
     3571                                        search_contacts(window.event.keyCode,this.id); 
     3572                                } 
     3573                        } 
     3574                } 
     3575 
     3576                td_cco.appendChild(input_cco); 
     3577 
     3578                tr3.appendChild(td3); 
     3579                tr3.appendChild(td_cco); 
     3580                tbody_message.appendChild(tr3); 
     3581        }  
    36373582////////////////////////////////////////////////////////////////////////////////////////////////////// 
    3638         var tr_link = document.createElement("TR"); 
    3639         tr_link.id = "tr_link_"+ID; 
    3640         var td1_link = document.createElement("TD"); 
    3641         var td2_link = document.createElement("TD"); 
    3642         td1_link.innerHTML = "&nbsp;"; 
    3643         var a_cc_link = document.createElement('A'); 
     3583        var a_cc_link = document.createElement('button'); 
    36443584        a_cc_link.innerHTML = get_lang('Add CC'); 
    36453585        a_cc_link.id = "a_cc_link_"+ID; 
    3646         a_cc_link.setAttribute("href","javascript:void(0)"); 
     3586        a_cc_link.className = "button small another_adress"; 
    36473587        a_cc_link.setAttribute("tabIndex","-1"); 
     3588        var cc_load = ""; 
    36483589        a_cc_link.onclick = function () { 
    3649                 this.style.display='none'; 
    3650                 document.getElementById('tr_cc_'+ID).style.display=''; 
    3651                 if(document.getElementById('space_link_'+ID) !== null) 
    3652                         document.getElementById('space_link_'+ID).style.display='none'; 
     3590                var remove = function(){ 
     3591                        document.getElementById('tr_cc_'+ID).style.display = 'none'; 
     3592                        $("#cc_"+ID).parent().find("div").remove(); 
     3593                        $("#cc_"+ID).val(""); 
     3594                        $("#a_cc_link_"+ID).toggleClass("expressomail-button-icon-ative"); 
     3595                } 
     3596                if(!($("#cc_"+ID).parent().find("div")[0])){ 
     3597                        document.getElementById('tr_cc_'+ID).style.display = ''; 
     3598                        document.getElementById('cc_'+ID).style.width = "100%"; 
     3599                        $(this).find("span").html(get_lang('Remove CC')); 
     3600                        $("#cc_"+ID).elastic().unbind('blur'); 
     3601                        $(this).toggleClass("expressomail-button-icon-ative"); 
     3602                } 
     3603                else{ 
     3604                        if($("#cc_"+ID).val() != ""){ 
     3605                                if(confirm("Tem certeza que deseja remover o campo CC")){ 
     3606                                        remove(); 
     3607                                        $(this).find("span").html(get_lang('Add CC')); 
     3608                                } 
     3609                        }else{ 
     3610                                remove(); 
     3611                                $(this).find("span").html(get_lang('Add CC')); 
     3612                        } 
     3613                } 
    36533614                input_cc.focus(); 
    3654                 return false;}; 
    3655         td2_link.appendChild(a_cc_link); 
    3656         var space = document.createElement("span"); 
     3615                 
     3616                return false; 
     3617        }; 
    36573618         
    36583619        if( allow_hidden_copy )  
    3659                         {  
    3660                             space.id ="space_link_"+ID;  
    3661         space.innerHTML="&nbsp;|&nbsp;"; 
    3662         td2_link.appendChild(space); 
    3663                             var a_cco_link = document.createElement('A');  
    3664                             a_cco_link.innerHTML = get_lang('Add BCC');  
    3665                             a_cco_link.id = "a_cco_link_"+ID;  
    3666                             a_cco_link.setAttribute("href","javascript:void(0)");  
    3667                             a_cco_link.setAttribute("tabIndex","-1");  
    3668             a_cco_link.onclick = function () { 
    3669                 this.style.display='none'; 
    3670                 document.getElementById('tr_cco_'+ID).style.display=''; 
    3671                 if(document.getElementById('space_link_'+ID) !== null) 
    3672                         document.getElementById('space_link_'+ID).style.display='none'; 
     3620        {  
     3621                var a_cco_link = document.createElement('button');  
     3622                a_cco_link.innerHTML = get_lang('Add BCC');  
     3623                a_cco_link.id = "a_cco_link_"+ID;  
     3624                a_cco_link.className = "button small another_adress"; 
     3625                a_cco_link.setAttribute("tabIndex","-1");  
     3626                var cco_load = ""; 
     3627                a_cco_link.onclick = function () { 
     3628                        var remove = function(){ 
     3629                                document.getElementById('tr_cco_'+ID).style.display = 'none'; 
     3630                                $("#cco_"+ID).parent().find("div").remove(); 
     3631                                $("#cco_"+ID).val(""); 
     3632                                $("#a_cco_link_"+ID).toggleClass("expressomail-button-icon-ative"); 
     3633                        } 
     3634                        if(!($("#cco_"+ID).parent().find("div")[0])){ 
     3635                                document.getElementById('tr_cco_'+ID).style.display=''; 
     3636                                document.getElementById('cco_'+ID).style.width = "100%"; 
     3637                                $(this).find("span").html(get_lang('Remove CCo')); 
     3638                                $("#cco_"+ID).elastic().unbind('blur'); 
     3639                                $(this).toggleClass("expressomail-button-icon-ative"); 
     3640                        } 
     3641                        else{ 
     3642                        if($("#cco_"+ID).val() != ""){ 
     3643                                if(confirm("Tem certeza que deseja remover o campo CCO")){ 
     3644                                        remove(); 
     3645                                        $(this).find("span").html(get_lang('Add BCC')); 
     3646                                } 
     3647                        }else{ 
     3648                                remove(); 
     3649                                $(this).find("span").html(get_lang('Add BCC')); 
     3650                        } 
     3651                } 
    36733652                        input_cco.focus(); 
    3674                         return false;};  
    3675                             td2_link.appendChild(a_cco_link);  
    3676                         } 
     3653                };  
     3654                //td2_link.appendChild(a_cco_link);  
     3655        } 
    36773656         
    3678         tr_link.appendChild(td1_link); 
    3679         tr_link.appendChild(td2_link); 
    3680         tbody_message.appendChild(tr_link); 
    36813657////////////////////////////////////////////////////////////////////////////////////////////////////// 
    36823658        var tr4 = document.createElement("TR"); 
    36833659        var td4 = document.createElement("TD"); 
    3684         //td4.setAttribute("noWrap","true"); 
    36853660        td4.innerHTML = get_lang("Subject")+":"; 
     3661        //td4.style.width = "1%"; 
    36863662        var td_subject = document.createElement("TD"); 
    36873663        var input_subject = document.createElement('input'); 
     
    36923668        input_subject.setAttribute("autocomplete","off"); 
    36933669        input_subject.onkeydown = function(event){   
    3694                    var k;   
    3695                    if(window.event) k = window.event.keyCode;   
    3696                    else k = event.keyCode;   
    3697           
    3698                     if (k == 9)    
    3699                     {           
    3700                          RichTextEditor.focus(ID);   
    3701                          return false;   
    3702                         }    
     3670                var k;   
     3671                if(window.event){ 
     3672                        k = window.event.keyCode;   
     3673                }else{ 
     3674                        k = event.keyCode;   
     3675                } 
     3676                 
     3677                if (k == 9){           
     3678                        RichTextEditor.focus(ID);   
     3679                        return false;   
     3680                }    
    37033681        }  
     3682        //td_subject.colSpan = "2"; 
    37043683        td_subject.appendChild(input_subject); 
    37053684        tr4.appendChild(td4); 
     
    37153694                        var input_return_digital = '<input type="checkbox" class="checkbox" name="input_return_digital" id="return_digital_'+ID+'" tabIndex="-1" '+input_return_digital_chk+' />'; 
    37163695                        var label_return_digital = '<label for="return_digital_'+ID+'">'+get_lang("Digitally sign message?")+'</label>'; 
    3717  
     3696                        var button_return_digital = '<button title="'+get_lang("Include digital signature")+'" class="send_option header-button button small '+(input_return_digital_chk != "" ? "expressomail-button-icon-ative" : "")+'" name="return_digital_'+ID+'" id="return_digital_options_'+ID+'">&nbsp;</button>'; 
    37183697                        td_content += input_return_digital + label_return_digital; 
    3719  
     3698                        $("#content_id_"+ID).find(".new-message-menu").append(button_return_digital); 
     3699                         
    37203700                        var input_return_cripto_chk = (parseInt(preferences.use_signature_cripto)==1) ? 'checked="checked"' : ''; 
    37213701                        var input_return_cripto = '<input type="checkbox" class="checkbox" name="input_return_cripto" id="return_cripto_'+ID+'" tabIndex="-1" '+input_return_cripto_chk+' />'; 
    37223702                        var label_return_cripto = '<label for="return_cripto_'+ID+'">'+get_lang("Digitally crypt message?")+'</label>'; 
    3723  
     3703                        var button_return_cripto = '<button title="'+get_lang("Encrypted email")+'" class="send_option header-button button small '+(input_return_cripto_chk != "" ? "expressomail-button-icon-ative" : "")+'" name="return_cripto_'+ID+'" id="return_cripto_options_'+ID+'">&nbsp;</button>'; 
     3704                        $("#content_id_"+ID).find(".new-message-menu").append(button_return_cripto); 
    37243705                        td_content += input_return_cripto + label_return_cripto; 
    3725                             } 
    3726                         } 
     3706                } 
     3707        } 
    37273708 
    37283709        var input_return_receipt_chk = (preferences.return_recipient_deafault != '0') ? 'checked="checked"' : ''; 
    37293710        var input_return_receipt = '<input type="checkbox" class="checkbox" name="input_return_receipt" id="return_receipt_'+ID+'" tabIndex="-1" '+input_return_receipt_chk+' />'; 
    37303711        var label_return_receipt = '<label for="return_receipt_'+ID+'">'+get_lang("Return receipt")+'</label>'; 
    3731  
     3712        if(input_return_receipt_chk != ''){ 
     3713                $("#conf_leitura_message_options_"+ID).toggleClass("expressomail-button-icon-ative"); 
     3714        } 
    37323715        td_content += input_return_receipt + label_return_receipt; 
    37333716 
     
    37493732        } 
    37503733 
    3751         jQuery(tr5).append('<td>&nbsp;</td><td class="message-general-options">'+td_content+'</td>'); 
    3752          
     3734        jQuery(tr5).append('<td>&nbsp;</td><td class="message-general-options" colspan="2">'+td_content+'</td>'); 
     3735        tr5.style.display = "none" 
    37533736        tbody_message.appendChild(tr5); 
    37543737 
     
    37573740        */ 
    37583741        function save_onchange_attachment_handler () { 
    3759             away = false; 
    3760             var save_link = Element("save_message_options_"+ID); 
    3761             save_link.onclick = function onclick(event) { 
    3762                 openTab.toPreserve[ID] = true; 
    3763                 save_msg(ID); 
    3764             }; 
    3765             save_link.className = 'message_options'; 
    3766         }; 
     3742                away = false; 
     3743                var save_link = Element("save_message_options_"+ID); 
     3744                save_link.onclick = function onclick(event) { 
     3745                        openTab.toPreserve[ID] = true; 
     3746                        save_msg(ID); 
     3747                }; 
     3748                $("#save_message_options_"+ID).button({ disabled: false }); 
     3749        }; 
    37673750 
    37683751        var add_files = document.createElement("A"); 
    37693752        add_files.setAttribute("href", "javascript:void(0)"); 
    37703753        add_files.onclick = function () { 
    3771             var obj = addFile(ID); 
    3772             if (preferences.auto_save_draft == 1 && obj) { 
    3773                 if ( obj.addEventListener ) 
    3774                     obj.addEventListener('click', save_onchange_attachment_handler, false); 
    3775             } 
    3776             return false; 
     3754                var obj = addFile(ID); 
     3755                if (preferences.auto_save_draft == 1 && obj) { 
     3756                        if ( obj.addEventListener ){ 
     3757                                obj.addEventListener('click', save_onchange_attachment_handler, false); 
     3758                        } 
     3759                } 
     3760                return false; 
    37773761        }; 
     3762         
    37783763        add_files.innerHTML =  get_lang("Attachments: add+"); 
    37793764        add_files.setAttribute("tabIndex","-1"); 
     
    38103795                                                        var subject = onceOpenedMessages[folder_name][message_number].subject; 
    38113796                                                        var text_input  = '<input type="text" name="message_attachments['+folder_name+']['+message_number+']" value="'+subject+'"/>'; 
    3812                                                             text_input += '<a href="javascript:void(0)" onclick="javascript:this.parentNode.parentNode.removeChild(this.parentNode);">' + get_lang("Remove")+'</a>'; 
    3813  
    3814                                                             if( isOffline ) 
     3797                                                        text_input += '<a href="javascript:void(0)" onclick="javascript:this.parentNode.parentNode.removeChild(this.parentNode);">' + get_lang("Remove")+'</a>'; 
     3798                                                        if( isOffline ) 
    38153799                                                                text_input += '<input type="hidden" name="message_attachments_content['+folder_name+']['+message_number+']" value="'+Base64.encode( onceOpenedMessages[folder_name][message_number].eml )+'"/>'; 
    38163800                                                        jQuery(divfiles).append('<div>'+text_input+'</div>'); 
     
    38313815        var td5_input = document.createElement("TD"); 
    38323816        td5_input.innerHTML = "&nbsp;" 
     3817        //td5_input.style.width = "1%"; 
    38333818        td5_link.setAttribute("valign","top"); 
    3834         td5_link.setAttribute("colSpan","2"); 
     3819        //td5_link.setAttribute("colSpan","2"); 
    38353820        td5_link.appendChild(add_files); 
    38363821        td5_link.appendChild(add_msgs); 
     
    38423827        var td6_link  = document.createElement("TD"); 
    38433828        var td6_input = document.createElement("TD"); 
     3829        //td6_link.style.width = "1%"; 
    38443830        tr6.appendChild(td6_link); 
    38453831        td6_input.appendChild(divfiles); 
     
    38483834////////////////////////////////////////////////////////////////////////////////////////////////////// 
    38493835        var tr5 = document.createElement("TR"); 
    3850         var td5 = document.createElement("TD"); 
    3851         td5.innerHTML = "&nbsp;"; 
     3836        //var td5 = document.createElement("TD"); 
     3837        //td5.innerHTML = "&nbsp;"; 
    38523838        var td_body = document.createElement("TD"); 
    38533839        td_body.setAttribute("colSpan","2"); 
     
    38553841        div_body_position.id = "body_position_" + ID; 
    38563842        td_body.appendChild(div_body_position); 
    3857         tr5.appendChild(td5); 
     3843        //tr5.appendChild(td5); 
    38583844        tr5.appendChild(td_body); 
    38593845        tbody_message.appendChild(tr5); 
     
    38763862        form.appendChild(table_message); 
    38773863        RichTextEditor.loadEditor(ID); 
     3864         
     3865        var rich_button = document.createElement("button"); 
     3866         
     3867        if(preferences.plain_text_editor == 1){ 
     3868                var texto = get_lang("Rich Text"); 
     3869        }else{ 
     3870                var texto = get_lang("Simple Text"); 
     3871        } 
     3872                 
     3873        rich_button.innerHTML = texto; 
     3874        rich_button.className = "button small rich-button"; 
     3875        rich_button.name = "textplain_rt_checkbox_"+ID; 
     3876         
    38783877////////////////////////////////////////////////////////////////////////////////////////////////////// 
    38793878        if(!expresso_offline) 
    38803879                draw_from_field(sel_from,tr1_1); 
     3880                 
    38813881        resizeWindow(); 
    38823882 
    3883         if ( ! expresso_offline ) 
    3884         { 
    3885                 if ( mobile_device ) 
    3886                 { 
    3887                         text_plain.click( ); 
    3888                         text_plain.parentNode.style.display = 'none'; 
    3889                 } 
    3890         } 
     3883        if ( ! expresso_offline ) 
     3884        { 
     3885                        if ( mobile_device ) 
     3886                        { 
     3887                                        text_plain.click( ); 
     3888                                        text_plain.parentNode.style.display = 'none'; 
     3889                        } 
     3890        } 
     3891        //var a_cc_link2 = document.createElement("button"); 
    38913892         
     3893        $("#another_adress_"+ID).append(a_cc_link); 
     3894         
     3895        if(a_cco_link != undefined) 
     3896                $("#another_adress_"+ID).append(a_cco_link); 
     3897                 
     3898        $("#another_adress_"+ID).append(rich_button); 
     3899         
     3900        $("#to_"+ID).elastic().unbind('blur'); 
     3901        //$(".mail_fields"); 
     3902        //$(".mail_fields").css("width","100%"); 
     3903         
     3904        $(".another_adress").button(); 
     3905        $(".rich-button").button(); 
     3906        $(".rich-button").click(function(){ 
     3907                //TO-DO : Se o usuário clicar varias vezes no botão, a função de iniciar o ckeditor se perde e morre. 
     3908                $(this).button({ disabled: true }); 
     3909                if($(this).find("span:first-child").html() == get_lang("Rich text")){ 
     3910                        $(this).find("span:first-child").html(get_lang("Simple Text")); 
     3911                }else{ 
     3912                        $(this).find("span:first-child").html(get_lang("Rich Text")); 
     3913                } 
     3914                 
     3915                var check = $("#"+$(this).attr("name")).attr("checked"); 
     3916                $("#"+$(this).attr("name")).attr("checked", (!check ? true : false)); 
     3917                $("#"+$(this).attr("name")).trigger('click'); 
     3918                $("#"+$(this).attr("name")).attr("checked", (!check ? true : false)); 
     3919                //$(this).button({ disabled: false }); 
     3920        }); 
     3921         
     3922        if($("#send_and_custom_save_"+ID)[0]) 
     3923                $("#send_and_custom_save_"+ID).button({ 
     3924                        icons : { 
     3925                                primary :"expressomail-icon-save_and_send" 
     3926                        } 
     3927                }) 
     3928        $("#content_id_"+ID).find(".adress_button").button().click(function(){ 
     3929                emQuickSearch($("#"+($(this).attr("name"))+"_"+ID).val(), $(this).attr("name"), ID, undefined, true); 
     3930        }); 
     3931         
     3932        $("#send_button_"+ID).button({ 
     3933                icons : { 
     3934                        primary : "expressomail-icon-send" 
     3935                } 
     3936        }).next().button({ 
     3937                icons : { 
     3938                        primary : "expressomail-icon-save" 
     3939                } 
     3940        }); 
     3941        $("#content_id_"+ID).find("[name=return_receipt_"+ID+"]").button({ 
     3942                icons : { 
     3943                        primary : "expressomail-icon-read-confirmation" 
     3944                } 
     3945        }); 
     3946        $("#important_message_options_"+ID).button({ 
     3947                icons : { 
     3948                        primary : "expressomail-icon-important" 
     3949                } 
     3950        }); 
     3951        $("#return_digital_options_"+ID).button({ 
     3952                icons : { 
     3953                        primary : "expressomail-icon-signature" 
     3954                } 
     3955        }); 
     3956        $("#return_cripto_options_"+ID).button({ 
     3957                icons : { 
     3958                        primary : "expressomail-icon-encryption" 
     3959                } 
     3960        }); 
     3961 
     3962        $("#content_id_"+ID).find(".send_option").click(function(){ 
     3963                var check = $("#"+$(this).attr("name")).attr("checked"); 
     3964                $("#"+$(this).attr("name")).attr("checked", (!check ? true : false)); 
     3965                $(this).toggleClass("expressomail-button-icon-ative"); 
     3966        }); 
    38923967         
    38933968        return ID; 
  • trunk/expressoMail1_2/js/main.js

    r5415 r5417  
    233233                        var save_link = Element("save_message_options_"+border_id); 
    234234                        save_link.onclick = function onclick(event) {openTab.toPreserve[border_id] = true;save_msg(border_id);} ; 
    235                         save_link.className = 'message_options'; 
     235                        $("#save_message_options_"+border_id).button({ disabled: false }); 
     236                        $(".header-button").button(); 
    236237                }; 
    237238 
     
    247248                else if ( to_obj.attachEvent ) 
    248249                        to_obj.attachEvent('onkeypress', keypress_handler); 
    249          
     250                         
     251                var cc_obj = document.getElementById('cc_'+border_id); 
     252                if ( cc_obj.addEventListener ) 
     253                                cc_obj.addEventListener('keypress', keypress_handler, false); 
     254                else if ( cc_obj.attachEvent ) 
     255                        cc_obj.attachEvent('onkeypress', keypress_handler); 
     256                 
     257                var cco_obj = document.getElementById('cco_'+border_id); 
     258                if ( cco_obj.addEventListener ) 
     259                                cco_obj.addEventListener('keypress', keypress_handler, false); 
     260                else if ( cco_obj.attachEvent ) 
     261                        cco_obj.attachEvent('onkeypress', keypress_handler); 
     262 
     263                //var important_obj = $("important_message_options_"+border_id).bind('click',keypress_handler); 
     264                        //important_obj.addEventListener('click', keypress_handler, false); 
     265                         
    250266        var txtarea_obj = Element('body_'+border_id); 
    251267        if (txtarea_obj){ 
     
    13971413                        Element("subject_" + new_border_ID).value = "Re: " + data.subject;                       
    13981414 
    1399         if (data.is_local_message){   
    1400                 alert(get_lang("In the local file attachments, including images, will be disregarded. To forward / reply with the attachments, please first make the reopening of the message")+'.');   
    1401         var imagens = data.body.match(/<img[^>]*>/g);   
    1402         if(imagens != null)   
    1403                         for (var x = 0; x < imagens.length; x++)   
    1404                                 data.body = data.body.replace(imagens[x],'');   
    1405         }else{ 
    1406                 useOriginalAttachments(new_border_ID,border_ID);                         
    1407         }       
     1415                        if (data.is_local_message){   
     1416                                alert(get_lang("In the local file attachments, including images, will be disregarded. To forward / reply with the attachments, please first make the reopening of the message")+'.');   
     1417                                var imagens = data.body.match(/<img[^>]*>/g);   
     1418                                if(imagens != null)   
     1419                                        for (var x = 0; x < imagens.length; x++)   
     1420                                                data.body = data.body.replace(imagens[x],'');   
     1421                        }else{ 
     1422                                useOriginalAttachments(new_border_ID,border_ID);                         
     1423                        }       
    14081424 
    14091425                        // Insert the signature automaticaly at message body if use_signature preference is set 
     
    14671483                                data.cc = removeUserEmail(_array_cc); 
    14681484                                data.cc = removeAlternative(data.cc,_array_to_alternative); 
    1469          
    1470                                 Element("cc_" + new_border_ID).value = data.cc; 
    1471                                 Element("a_cc_link_" + new_border_ID).style.display='none'; 
    1472                                 Element("tr_cc_" + new_border_ID).style.display=''; 
    1473                                 var space_link = Element('space_link_' + new_border_ID); 
    1474                                 if (space_link) 
    1475                                         space_link.style.display='none'; 
     1485                                        if (data.cc != get_lang("undisclosed-recipient")) 
     1486                                                data.cc = data.cc.join(","); 
     1487                                        else 
     1488                                                data.cc = "";                    
     1489                                if(data.cc == ""){ 
     1490                                        //document.getElementById("cc_" + new_border_ID).value = data.cc; 
     1491                                        document.getElementById("tr_cc_" + new_border_ID).style.display='none'; 
     1492                                }else{ 
     1493                                        document.getElementById("cc_" + new_border_ID).value = data.cc; 
     1494                                        document.getElementById("tr_cc_" + new_border_ID).style.display=''; 
     1495                                        //document.getElementById("a_cc_link" + new_border_ID).value = data.cc; 
     1496                                        $("#a_cc_link_"+new_border_ID).toggleClass("expressomail-button-icon-ative"); 
     1497                                        $("#a_cc_link_"+new_border_ID).find("span").html("Remover CC"); 
     1498                                        $("#cc_"+new_border_ID).elastic().unbind('blur'); 
     1499                                } 
    14761500                        } 
    14771501                        if (data.is_local_message){   
     
    15181542                                        else 
    15191543                                                data.cc = "";                    
    1520                                 document.getElementById("cc_" + new_border_ID).value = data.cc; 
    1521                                 document.getElementById("a_cc_link_" + new_border_ID).style.display='none'; 
    1522                                 document.getElementById("tr_cc_" + new_border_ID).style.display=''; 
    1523                                 var space_link = document.getElementById('space_link_' + new_border_ID); 
    1524                                 if ( space_link ) 
    1525                                   space_link.style.display='none'; 
     1544                                if(data.cc == ""){ 
     1545                                        //document.getElementById("cc_" + new_border_ID).value = data.cc; 
     1546                                        document.getElementById("tr_cc_" + new_border_ID).style.display='none'; 
     1547                                }else{ 
     1548                                        document.getElementById("cc_" + new_border_ID).value = data.cc; 
     1549                                        document.getElementById("tr_cc_" + new_border_ID).style.display=''; 
     1550                                        //document.getElementById("a_cc_link" + new_border_ID).value = data.cc; 
     1551                                        $("#a_cc_link_"+new_border_ID).toggleClass("expressomail-button-icon-ative"); 
     1552                                        $("#a_cc_link_"+new_border_ID).find("span").html("Remover CC"); 
     1553                                        $("#cc_"+new_border_ID).elastic().unbind('blur'); 
     1554                                } 
    15261555                        } 
    15271556                        document.getElementById("subject_" + new_border_ID).value = "Re: " + data.subject; 
     
    16671696                                data.cc = data.cc.replace(/&gt;/gi,">"); 
    16681697                                Element("cc_" + new_border_ID).value = data.cc; 
    1669                                 Element("a_cc_link_" + new_border_ID).style.display = 'none'; 
    1670                                 if(Element("cco_" + new_border_ID) != null) 
    1671                                         Element("space_link_" + new_border_ID).style.display = 'none'; 
     1698                                Element("cc_" + new_border_ID).style.display = ""; 
    16721699                                Element("tr_cc_"+ new_border_ID).style.display = ''; 
     1700                                Element("cc_" + new_border_ID).style.width = "100%"; 
     1701                                $("#a_cc_link_"+new_border_ID).toggleClass("expressomail-button-icon-ative"); 
     1702                                $("#a_cc_link_"+new_border_ID).find("span").html("Remover CC"); 
     1703                                $("#cc_"+new_border_ID).elastic().unbind('blur'); 
     1704                                //Element("a_cc_link_" + new_border_ID).style.display = 'none'; 
     1705                                //if(Element("cco_" + new_border_ID) != null) 
     1706                                //      Element("space_link_" + new_border_ID).style.display = 'none'; 
    16731707                        } 
    16741708                        if (data.cco){ 
    16751709                                if(Element("cco_" + new_border_ID) != null){ 
    16761710                                Element("cco_" + new_border_ID).value = data.cco; 
    1677                                 Element("space_link_" + new_border_ID).style.display = 'none'; 
    1678                                 Element("a_cco_link_" + new_border_ID).style.display = 'none'; 
     1711                                Element("cco_" + new_border_ID).style.display = ''; 
     1712                                Element("cco_" + new_border_ID).style.width = "100%"; 
     1713                                Element("tr_cco_"+ new_border_ID).style.display = ''; 
     1714                                $("#a_cco_link_"+new_border_ID).toggleClass("expressomail-button-icon-ative"); 
     1715                                $("#a_cco_link_"+new_border_ID).find("span").html("Remover CC"); 
     1716                                $("#cco_"+new_border_ID).elastic().unbind('blur'); 
     1717                                //Element("space_link_" + new_border_ID).style.display = 'none'; 
     1718                                //Element("a_cco_link_" + new_border_ID).style.display = 'none'; 
    16791719                                Element("tr_cco_"+ new_border_ID).style.display = ''; 
    16801720                        } 
     
    16821722                        Element("subject_" + new_border_ID).value = data.subject; 
    16831723                         
    1684                         if( Element("disposition_notification_" + border_ID) ) 
    1685                                 Element("return_receipt_" + new_border_ID).checked = true; 
     1724                        if( Element("disposition_notification_" + border_ID) ){ 
     1725                                $("#return_receipt_"+new_border_ID).attr("checked", true); 
     1726                                $("[name=return_receipt_"+new_border_ID+"]").toggleClass("expressomail-button-icon-ative"); 
     1727                                //Element("return_receipt_" + new_border_ID).checked = true; 
     1728                        } 
    16861729 
    16871730                        var element_important_message = Element("important_message_" + new_border_ID); 
    16881731                        if(element_important_message) { 
    16891732                                         
    1690                                 if(Element("disposition_important_" + border_ID)) 
    1691                                         element_important_message.checked = true;                                
     1733                                if(Element("disposition_important_" + border_ID)){ 
     1734                                        $("#important_message_"+new_border_ID).attr("checked", true); 
     1735                                        $("[name=important_message_"+new_border_ID+"]").toggleClass("expressomail-button-icon-ative"); 
     1736                                        //element_important_message.checked = true;              
     1737                                } 
    16921738                        } 
    16931739 
     
    17301776        Element("border_id_" + new_border_ID).title = title; 
    17311777        set_border_caption("border_id_" + new_border_ID, title); 
    1732  
    17331778        resizeWindow(); 
    17341779        //save_msg(new_border_ID); 
     
    19081953                var save_link = Element("save_message_options_"+ID); 
    19091954                save_link.onclick = function onclick(event) {openTab.toPreserve[ID] = true;save_msg(ID);} ; 
    1910                 save_link.className = 'message_options'; 
     1955                $("#save_message_options_"+ID).button({ disabled: false }); 
     1956                //save_link.className = 'message_options'; 
    19111957        } 
    19121958        if(!expresso_offline) 
     
    19892035                //entrava em execucao (a aba de edicao da mensagem continuava aberta e a mensagem exibida era a de que a mensagem foi 
    19902036                //salva na pasta Rascunhos e nao que tinha sido enviada, como deveria); 
    1991                 if (preferences.auto_save_draft == 1) 
     2037        if (preferences.auto_save_draft == 1) 
    19922038        { 
    19932039                if (openTab.autosave_timer[ID]) 
     
    20012047        var onClick = save_link.onclick; 
    20022048        save_link.onclick = ''; 
    2003         save_link.className = 'message_options_inactive'; 
     2049        $("#save_message_options_"+ID).button({ disabled: true }); 
     2050        //save_link.className = 'message_options_inactive'; 
    20042051 
    20052052        ID_tmp = ID; 
     
    20842131         
    20852132        if ( Element("cco_"+ID) != null) 
    2086                 stringEmail += Element("cco_"+ID).value =='' ? "":", "+Element("cco_"+ID).value; 
    2087          
    2088         stringEmail += Element("cc_"+ID).value =='' ? "":", "+Element("cc_"+ID).value; 
     2133                if(Element("tr_cco_"+ID).style.display != "none") 
     2134                        stringEmail += Element("cco_"+ID).value =='' ? "":", "+Element("cco_"+ID).value; 
     2135                         
     2136        if(Element("tr_cc_"+ID).style.display != "none") 
     2137                stringEmail += Element("cc_"+ID).value =='' ? "":", "+Element("cc_"+ID).value; 
     2138                 
    20892139        if (expresso_offline) { 
    20902140                 
     
    21042154        } 
    21052155        else{ 
     2156                alert(form); 
    21062157                if(stringEmail != "") 
    21072158                        cExecuteForm("$this.imap_functions.send_mail", form, handler_send_message, ID); 
     
    23482399                        if(!withImage){ 
    23492400                                if(data.append === true){ 
    2350                                         save_link.className = 'message_options_inactive'; 
    2351                                         save_link.onclick = ''; 
     2401                                        $("#save_message_options_"+border_id).button(); 
     2402                                        $("#save_message_options_"+border_id).button({ disabled: true }); 
    23522403                                        watch_changes_in_msg(border_id);         
    23532404                                        write_msg(get_lang('Your message was save as draft in folder %1.', lang_folder(folder_name))); 
  • trunk/expressoMail1_2/js/rich_text_editor.js

    r5385 r5417  
    104104         
    105105        if(preferences.plain_text_editor == 1) 
    106             { 
    107           RichTextEditor.plain[ID] = true;   
    108                 RichTextEditor.editorReady = true; 
    109             } 
     106                { 
     107                        RichTextEditor.plain[ID] = true;   
     108                        RichTextEditor.editorReady = true; 
     109                } 
    110110        else  
    111                   RichTextEditor.active(pObj); 
     111                        RichTextEditor.active(pObj); 
    112112} 
    113113 
     
    264264 
    265265cRichTextEditor.prototype.execPosInstance = function(inst) { 
    266           
    267         var editor =  CKEDITOR.instances[inst];  
     266        var editor =  CKEDITOR.instances[inst];  
     267        var id = inst.replace('body_',''); 
     268        editor.document.on('keydown', function(event) 
     269        { 
     270                away = false; 
     271                var save_link = Element("save_message_options_"+id); 
     272                save_link.onclick = function onclick() {openTab.toPreserve[id] = true;save_msg(id);} ; 
     273                $("#save_message_options_"+id).button({ disabled: false }); 
     274        }); 
    268275         
    269         
    270         var id = inst.replace('body_',''); 
    271          
    272         editor.document.on('keydown', function(event) 
    273         { 
    274             away = false; 
    275             var save_link = Element("save_message_options_"+id); 
    276             save_link.onclick = function onclick() {openTab.toPreserve[id] = true;save_msg(id);} ; 
    277             save_link.className = 'message_options'; 
    278         }); 
    279          
    280         //Adicionando atalhos de preferencias   
     276//Adicionando atalhos de preferencias   
    281277//TODO: Não esta pegando o numero (keycode) 
    282278//        if (preferences.use_shortcuts == '1') 
     
    291287        if( window.parent.loadscript && loadscript.autoStatusIM ) 
    292288        { 
    293             CKEDITOR.instances[inst].document.on('keydown', function(event){ 
    294                    loadscript.autoStatusIM; 
    295             });                  
     289                CKEDITOR.instances[inst].document.on('keydown', function(event){ 
     290                        loadscript.autoStatusIM; 
     291                });              
    296292        } 
    297293         
    298         if (preferences.auto_save_draft == 1) 
     294        if (preferences.auto_save_draft == 1) 
    299295        { 
    300             openTab.autosave_timer[id] = false; 
    301             var save_link = document.getElementById("save_message_options"+id); 
    302             CKEDITOR.instances[inst].document.on('keydown', function(event){ 
    303                if (openTab.autosave_timer[id]) 
    304                     clearTimeout(openTab.autosave_timer[id]); 
    305                openTab.autosave_timer[id] = setTimeout("save_msg("+id+")", autosave_time); 
    306                          
    307             });   
    308         } 
    309         ///////////////////////////////////////////////////////////////////////////////////// 
    310          
    311     
    312         
    313        RichTextEditor.editorReady = true; 
     296                openTab.autosave_timer[id] = false; 
     297                var save_link = document.getElementById("save_message_options"+id); 
     298                CKEDITOR.instances[inst].document.on('keydown', function(event){ 
     299                   if (openTab.autosave_timer[id]) 
     300                                clearTimeout(openTab.autosave_timer[id]); 
     301                   openTab.autosave_timer[id] = setTimeout("save_msg("+id+")", autosave_time); 
     302                                         
     303                });   
     304        } 
     305         
     306        /*var rich_button = document.createElement("a"); 
     307        //rich_button.className = "button small"; 
     308        rich_button.name = "textplain_rt_checkbox_"+id; 
     309        rich_button.innerHTML = get_lang('Simple text mode')+" >>"; 
     310        rich_button.href = "#"; 
     311        rich_button.onclick = function (){ 
     312                var check = $("#"+$(this).attr("name")).attr("checked"); 
     313                $("#"+$(this).attr("name")).attr("checked", (!check ? true : false)); 
     314                $("#"+$(this).attr("name")).trigger('click'); 
     315                //RichTextEditor.setPlain($("#"+$(this).attr("name")).attr("checked"), id); 
     316        }; 
     317        if($("#cke_top_body_"+id).find(".cke_toolbar:last")) 
     318        $("#cke_top_body_"+id).find(".cke_toolbar:last").append("<span class='button small'></span>"); 
     319        $("#cke_top_body_"+id).find("span:last").append(rich_button); 
     320        $("#cke_top_body_"+id).attr("colSpan", "2"); 
     321        $("#cke_contents_body_"+id).attr("colSpan", "2"); 
     322        $("#cke_bottom_body_"+id).attr("colSpan", "2");*/ 
     323        $(".cke_editor").css("white-space", "normal"); 
     324         
     325        RichTextEditor.editorReady = true; 
    314326} 
    315327cRichTextEditor.prototype.setPlain = function (active,id){ 
     
    325337                var save_link = Element("save_message_options_"+id); 
    326338                save_link.onclick = function onclick() {openTab.toPreserve[id] = true;save_msg(id);} ; 
    327                 save_link.className = 'message_options'; 
     339                                $("#save_message_options_"+id).button({ disabled: false }); 
     340                //save_link.className = 'message_options'; 
    328341            }); 
    329  
     342                        $("[name=textplain_rt_checkbox_"+id+"]").button({ disabled: false }); 
    330343      }    
    331344      else 
    332           RichTextEditor.active('body_'+id); 
     345          RichTextEditor.active('body_'+id, id); 
    333346} 
    334347 
     
    412425             CKEDITOR.remove(CKEDITOR.instances[id]); 
    413426} 
    414 cRichTextEditor.prototype.active = function(id) 
     427cRichTextEditor.prototype.active = function(id, just_id) 
    415428{ 
    416429    
     
    428441              height: height 
    429442          });  
    430  
     443        $("[name=textplain_rt_checkbox_"+just_id+"]").button({ disabled: false }); 
    431444} 
    432445cRichTextEditor.prototype.focus = function(id) 
  • trunk/expressoMail1_2/setup/phpgw_pt-br.lang

    r5372 r5417  
    464464Sender's Information    expressoMail1_2 pt-br   Dados do Remetente 
    465465Send    expressoMail1_2 pt-br   Enviar 
     466Send Mail       expressoMail1_2 pt-br   Enviar Email 
     467Save Mail       expressoMail1_2 pt-br   Salvar Email 
    466468Send and not file       expressoMail1_2 pt-br   Enviar sem Arquivar 
    467469Send from queue expressoMail1_2 pt-br   Enviar fila 
  • trunk/expressoMail1_2/templates/default/expressomail.css

    r5134 r5417  
    55ul.expressomail-attachments-list li {} 
    66.expressomail-attachments-link { font-size:11px;} 
     7 
     8textarea{ 
     9    overflow:hidden; 
     10    height:auto; 
     11    width:18px; 
     12        resize: none; 
     13} 
     14a.rich{ 
     15        padding : 5px; 
     16        cursor : pointer; 
     17        text-align: center; 
     18} 
     19button.adress_button {width: 47px; text-align: center;} 
     20span.ui-icon.expressomail-icon-read-confirmation { background-image: url(images/notification.gif) !important; background-position: 0px 0px; width: 24px; height: 24px;} 
     21span.ui-icon.expressomail-icon-save { background-image: url(images/disk.png) !important; background-position: 0px 2px; width: 16px; height: 16px; background-size: 13px;} 
     22span.ui-icon.expressomail-icon-signature { background-image: url(images/signature.gif) !important; background-position: 8px 2px; width: 24px; height: 24px; background-size: 13px;} 
     23span.ui-icon.expressomail-icon-encryption{ background-image: url(images/lock.png) !important; background-position: 7px 1px; width: 24px; height: 24px; background-size: 13px;} 
     24span.ui-icon.expressomail-icon-send { background-image: url(images/send.png) !important; background-position: -2px 2px; width: 25px; height: 16px; background-size: 19px;} 
     25span.ui-icon.expressomail-icon-save_and_send { background-image: url(images/save_and_send.png) !important; width: 25px; height: 16px; background-size: 17px;} 
     26span.ui-icon.expressomail-icon-important { background-image: url(images/star.png) !important; background-position: 7px 1px; width: 24px; height: 24px; background-size: 13px;} 
    727 
    828/* thumbs list on message screen */ 
     
    1737 .jcarousel-container { width: auto;} 
    1838  
    19  
    20  
     39 button.expressomail-button-icon-ative{color:#E17009; border: 1px solid #E17009;background: none repeat scroll 0 0 #FFE1CC;} 
    2140 
    2241/* todo o resto */ 
Note: See TracChangeset for help on using the changeset viewer.