Changeset 6528 for trunk/expressoMail1_2
- Timestamp:
- 06/15/12 17:00:17 (12 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
- 12 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/sandbox/2.4.1-3 merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/expressoMail1_2/inc/class.db_functions.inc.php
r6331 r6528 24 24 include_once(PHPGW_API_INC.'/class.db.inc.php'); 25 25 } 26 include_once('class.dynamic_contacts.inc.php');27 26 28 27 class db_functions … … 249 248 250 249 //Gera lista de contatos para ser gravado e acessado pelo expresso offline. 251 function get_dropdown_contacts_to_cache() {250 /*function get_dropdown_contacts_to_cache() { 252 251 return $this->get_dropdown_contacts(); 253 252 } … … 275 274 } 276 275 return $stringDropDownContacts; 277 } 276 }*/ 278 277 function getUserByEmail($params){ 279 278 // Follow the referral … … 308 307 return $result; 309 308 } 310 309 /* 311 310 function get_dynamic_contacts() 312 311 { … … 333 332 return $contacts; 334 333 } 334 */ 335 /* 335 336 function update_contacts($contacts=array()) 336 337 { … … 364 365 } 365 366 return $contacts; 366 } 367 } */ 368 367 369 function update_preferences($params){ 368 370 $string_serial = urldecode($params['prefe_string']); … … 377 379 } 378 380 381 /* 379 382 function insert_contact($contact) 380 383 { … … 396 399 $this->db->delete('phpgw_expressomail_contacts',$where,$line,$file); 397 400 } 398 401 */ 399 402 function import_vcard($params){ 400 403 include_once('class.imap_functions.inc.php'); -
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r6487 r6528 3087 3087 error_log("$now - $userip - $sent [$subject] - $userid => $addrs\r\n", 3, "/home/expressolivre/mail_senders.log"); 3088 3088 } 3089 if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) { 3090 $contacts = new dynamic_contacts(); 3091 $new_contacts = $contacts->add_dynamic_contacts($toaddress . "," . $ccaddress . "," . $ccoaddress); 3092 return array("success" => true, "new_contacts" => $new_contacts); 3093 } 3094 3095 if($params['uids_save'] ) 3096 $this->delete_msgs(array('folder'=> $params['save_folder'] , 'msgs_number' => $params['uids_save'])); 3089 if($params['uids_save'] ) 3090 $this->delete_msgs(array('folder'=> $params['save_folder'] , 'msgs_number' => $params['uids_save'])); 3097 3091 3098 3099 3092 //return array("success" => true, "folder" => $folder_list); 3100 3093 return array("success" => true, "load" => $has_new_folder); -
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r6459 r6528 564 564 '<tr class="quicksearchcontacts_unselected">' . 565 565 '<td class="cc" width="1%">' . 566 '<a title="'.$this->functions->getLang("Write message").'" onClick="javascript:QuickSearchUser.create_new_message(\''.$contacts_result["cn"].'\', \''.$contacts_result["mail"].'\' )">' .566 '<a title="'.$this->functions->getLang("Write message").'" onClick="javascript:QuickSearchUser.create_new_message(\''.$contacts_result["cn"].'\', \''.$contacts_result["mail"].'\', \''.$contacts_result["uid"].'\')">' . 567 567 $photo_link . 568 568 '</a>' . … … 570 570 '<td class="cc">' . 571 571 '<span name="cn">' . ($empNumber != "" ? $empNumber : $uid) . $contacts_result['cn'] . '</span>' . '<br>' . 572 '<a title="'.$functions->getLang("Write message").'" onClick="javascript:QuickSearchUser.create_new_message(\''.$contacts_result["cn"].'\', \''.$contacts_result["mail"].'\' )">' .572 '<a title="'.$functions->getLang("Write message").'" onClick="javascript:QuickSearchUser.create_new_message(\''.$contacts_result["cn"].'\', \''.$contacts_result["mail"].'\', \''.$contacts_result["uid"].'\')">' . 573 573 '<font color=blue>' . 574 574 '<span name="mail">' . $contacts_result['mail'] . '</span></a></font>'. -
trunk/expressoMail1_2/index.php
r6487 r6528 38 38 <script src="../prototype/plugins/farbtastic/farbtastic.js" language="javascript"></script> 39 39 <script src="../prototype/api/datalayer.js" language="javascript"></script> 40 <script src="../prototype/api/rest.js" language="javascript"></script> 40 41 <script type="text/javascript" src="../prototype/plugins/scrollto/jquery.scrollTo.js"></script> 41 <script language="javascript">DataLayer.dispatchPath = "../prototype/";</script> 42 <script language="javascript"> 43 DataLayer.dispatchPath = "../prototype/"; 44 REST.dispatchPath = "../prototype/"; 45 REST.load(""); 46 </script> 42 47 <script src="../library/ckeditor/ckeditor.js" language="javascript" charset="utf-8"></script> 43 48 <script src="../library/ckeditor/adapters/jquery.js" language="javascript"></script> … … 56 61 <script type="text/javascript" src="../prototype/plugins/datejs/sugarpak.js"></script> 57 62 <script type="text/javascript" src="../prototype/plugins/datejs/parser.js"></script> 63 <script type="text/javascript" src="../prototype/plugins/jq-raty/js/jquery.raty.min.js"></script> 58 64 59 65 <script type="text/javascript" src="../prototype/plugins/watermark/jquery.watermarkinput.js"></script> … … 71 77 <script type="text/javascript" src="../prototype/modules/calendar/js/calendar.date.js"></script> 72 78 <script type="text/javascript" src="../prototype/modules/calendar/js/calendar.codecs.js"></script> 73 74 79 <link rel="stylesheet" type="text/css" href="../prototype/plugins/freeow/style/freeow/freeow.css" > 75 80 <script type="text/javascript" src="../prototype/plugins/freeow/jquery.freeow.min.js"></script> 76 81 <script type="text/javascript" src="../prototype/plugins/freeow/jquery.freeow.js"></script> 82 77 83 78 84 <script src="js/rich_text_editor.js" type="text/javascript"></script> … … 197 203 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; 198 204 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; 205 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['expressoMail_ldap_identifier_recipient'] = $current_config['expressoMail_ldap_identifier_recipient']; 199 206 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_x_origin'] = $current_config['expressoMail_use_x_origin']; 200 207 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; … … 218 225 $_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"; 219 226 $_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"; 220 221 227 $_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; 222 228 // ACL for block edit Personal Data. … … 277 283 $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter']; 278 284 echo '<script> var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' 279 var sieve_forward_domains = \''.$current_config['expressoMail_sieve_forward_domains'].'\' </script>'; 285 var sieve_forward_domains = \''.$current_config['expressoMail_sieve_forward_domains'].'\' 286 </script>'; 280 287 // End Set Anti-Spam options. 281 288 -
trunk/expressoMail1_2/js/QuickCatalogSearch.js
r6480 r6528 290 290 var signal = "+"; 291 291 var btnClass = "add"; 292 var emailList = content.find(field_).val(); 293 var emails_adicionados = emailList.split(","); 292 emails_adicionados = ""; 293 var emailList = content.find(field_).filter("input").parent().find("div input"); 294 // var array = content.find(".to-tr").find(".box"); 295 $.each(emailList, function(index, value){ 296 emails_adicionados += $(value).val() + ","; 297 }); 298 emails_adicionados = emails_adicionados.split(","); 294 299 for(aux=0; aux<emails_adicionados.length -1; aux++) { 295 300 if(emails_adicionados[aux].match(/<([^<]*)>[\s]*$/)){ … … 697 702 var nome = $(contact).clone().find('.name').text(); 698 703 var email = $(contact).clone().find('.email').text(); 699 700 704 if(email == get_lang("No mail")){ 701 705 alert(get_lang("It is not possible to add this contact as a recipient because it does not have email")); … … 704 708 return; 705 709 } 706 707 710 verifyEmails(email, divs); 708 709 final_contact = "\""+nome +"\" <"+email+">, "; 710 711 var emailList = content.find(field_).val(); 712 //remove os caracteres da busca 713 emailList = emailList.substr(0,emailList.lastIndexOf(',')+1); 714 715 if (emailList[0] != '"' && emailList.indexOf(",") < 0) 716 emailList = emailList.substr(end_); 717 if(emailList.lastIndexOf(",") > 0){ 718 if(emailList.substr(emailList.length-1, emailList.length) == "," || emailList.substr(emailList.length-2, 1) == ","){ 719 emailList = emailList.substr(0, emailList.lastIndexOf(",") + 1); 720 } else { 721 emailList = emailList.substr(0, emailList.lastIndexOf("") + 1); 722 final_contact = ","+final_contact; 711 final_contact = "\""+nome +"\" <"+email+">"; 712 713 final_contact = final_contact.replace(/\/n/, ""); 714 var index = parseInt(divs.split("_")[1])-1; 715 if(data_[index].type_contact == "G"){ 716 var ldap_id = preferences.expressoMail_ldap_identifier_recipient; 717 if(ldap_id){ 718 draw_email_box( 719 (data_[index][ldap_id.toLowerCase()] ? data_[index][ldap_id.toLowerCase()][0] : final_contact) 720 , content.find(field_).filter("input") 721 ); 722 }else{ 723 draw_email_box(final_contact, content.find(field_).filter("input")); 724 } 725 }else{ 726 draw_email_box((data_[index].id_contact ? data_[index].id_contact : data_[index].id), content.find(field_).filter("input"), (data_[index].id_contact ? true : "G")); 723 727 } 724 }725 726 final_contact = final_contact.replace(/\/n/, "");727 new_emailList = emailList + final_contact;728 content.find(field_).val(new_emailList);729 730 content.find(field_).trigger("update");731 732 728 button.onclick = function(){ 733 729 remove_contact_field(document.getElementById(divs).innerHTML, button, divs); 734 730 }; 735 731 var div = document.getElementById(divs); 736 737 732 div.ondblclick = function(){ 738 733 remove_contact_field(div.innerHTML, button, divs); 739 734 }; 740 741 735 button.innerHTML = '<span class="ui-button-text" style="">x</span>'; 742 736 } … … 748 742 function remove_contact_field(contact, button, divs) { 749 743 var email = $(contact).clone().find('.email').text(); 750 var exist = false; 751 752 var emailList = content.find(field_).val(); 753 var emails_adicionados = emailList.split(","); 754 755 verifyEmails(email, divs); 756 757 for(i=0; i<emails_adicionados.length -1; i++) { 758 759 if(emails_adicionados[i].match(/<([^<]*)>[\s]*$/)){ 760 if(emails_adicionados[i].match(/<([^<]*)>[\s]*$/)[1].toLowerCase() == email.toLowerCase()) { 761 emails_adicionados[i] = "%"; 762 exist = true; 763 } 764 }else{ 765 if(emails_adicionados[i].toLowerCase() == email.toLowerCase()) { 766 emails_adicionados[i] = "%"; 767 exist = true; 768 } 769 } 770 } 771 772 if (exist == false) 773 return false; 774 var novos_contatos = emails_adicionados.join(","); 775 novos_contatos = novos_contatos.replace(/%,/g, ""); 776 content.find(field_).val(novos_contatos); 777 744 var array = content.find(field_).parent().find("div input"); 745 $.each(array, function(index, value){ 746 var validated_email = $(value).val(); 747 if(validated_email.match(/<([^<]*)>[\s]*$/)){ 748 if(validated_email.match(/<([^<]*)>[\s]*$/)[1].toLowerCase() == email.toLowerCase()) { 749 $(value).parent().remove(); 750 } 751 } 752 }); 753 778 754 button.onclick = function(){ 779 755 add_contact_field(document.getElementById(divs).innerHTML, button, divs); 780 756 }; 781 782 757 var div = document.getElementById(divs); 783 784 758 div.ondblclick = function(){ 785 759 add_contact_field(div.innerHTML, button, divs); 786 760 }; 787 788 content.find(field_).trigger("update");789 761 button.innerHTML = '<span class="ui-button-text" style="">+</span>'; 790 762 } -
trunk/expressoMail1_2/js/QuickSearchUser.js
r5477 r6528 53 53 } 54 54 55 emQuickSearchUser.prototype.create_new_message = function (cn, mail )55 emQuickSearchUser.prototype.create_new_message = function (cn, mail, uid) 56 56 { 57 57 QuickSearchUser.closeWindow(); 58 var ldap_id = preferences.expressoMail_ldap_identifier_recipient; 58 59 59 if (openTab.type[currentTab] != 4) 60 { 61 Element("msg_number").value = "\""+cn+"\" <"+mail+">"; 60 if (openTab.type[currentTab] != 4){ 62 61 new_message("new","null"); 63 62 } 64 else 65 { 66 var ToField = Element('to_'+currentTab); 67 ToField.value = ToField.value +"\""+cn+"\" <"+mail+">,"; 63 64 if(ldap_id){ 65 draw_email_box(uid, $("#content_id_"+currentTab).find(".to").filter("input")); 66 }else{ 67 draw_email_box("\""+cn+"\" <"+mail+">", $("#content_id_"+currentTab).find(".to").filter("input")); 68 68 } 69 69 } -
trunk/expressoMail1_2/js/ccQuickAdd.js
r6341 r6528 33 33 data = data + $(this).find('#quickAddOne_firstName').val() + ','; 34 34 data = data + $(this).find('#quickAddOne_lastName').val() + ',,'; 35 data = data + $(this).find('#quickAddOne_email').val(); 35 data = data + $(this).find('#quickAddOne_email').val(); 36 36 if(ccQuickAddOne.send(data)) 37 37 $(this).dialog("close"); … … 102 102 103 103 connector.newRequest('cQuickAdd.Send', CC_url+'quick_add', 'POST', handler, sdata); 104 105 updateDynamicPersonalContacts(); 106 updateDynamicContactList(); 104 107 return true; 105 108 } -
trunk/expressoMail1_2/js/common_functions.js
r6291 r6528 775 775 } 776 776 777 function search_emails(value ){777 function search_emails(value, data){ 778 778 var resize = false; 779 779 resize = resize_borders(); … … 815 815 connector.loadScript("search"); 816 816 if (typeof(EsearchE) == 'undefined' || typeof(ttree) == 'undefined'){ 817 setTimeout("search_emails('"+value+"' )",500);817 setTimeout("search_emails('"+value+"', '"+data+"')",500); 818 818 return false; 819 819 } 820 EsearchE.showForms(value );820 EsearchE.showForms(value, data); 821 821 $("#em_message_search").val(""); 822 822 } -
trunk/expressoMail1_2/js/doiMenuData.js
r5866 r6528 195 195 items: menuToolsItems 196 196 }); 197 197 var reComplexEmail = /<([^<]*)>[\s]*$/; 198 $.contextMenu({ 199 selector: ".box", 200 autoHide:true, 201 items: { 202 "add" : {name:"Adicao Rapida", icon : "quick-add",callback: function(key, opt){ var fname = $(opt.$trigger).find("input").val().split('"')[1];ccQuickAddOne.showList(','+fname+', ,'+$.trim($(opt.$trigger).find("input").val()).match(reComplexEmail)[1]); }}, 203 "remove" : {name:"Remover Destinatario", icon:"delete-box",callback: function(key, opt){ $(opt.$trigger).remove(); }}, 204 "sep1": "---------", 205 "quick_search" : {name:"Busca Rapida de Mensagens", icon: "quick-search-contact",callback: function(key, opt){ search_emails($.trim($(opt.$trigger).find("input").val()).match(reComplexEmail)[1]); }}, 206 "full_search" : {name:"Buscar Mensagens de ...", icon: "quick-search-contact",callback: function(key, opt){ search_emails("", $.trim($(opt.$trigger).find("input").val()).match(reComplexEmail)[1]);}} 207 } 208 }); 198 209 199 210 function updateLabelsColumn(messageInfo) { … … 294 305 } 295 306 296 297 298 299 300 301 307 function loadExtraLDAPBox(data, element){ 308 menuItensLabel = {}; 309 menuItensLabel["Name"] = {name: "<b>"+data[0].value+"</b>", disabled: true}; 310 menuItensLabel["Email"] = {name: data[1].value, disabled: true}; 311 if(data[2].value){ 312 menuItensLabel["TelefoneLabel"] = {name: "<b>Telefone</b>", disabled: true}; 313 menuItensLabel["TelefoneValue"] = {name: data[2].value, disabled: true}; 314 } 315 $.contextMenu({ 316 selector: "#content_id_"+currentTab+" "+element+" .box-info", 317 trigger: 'hover', 318 delay:100, 319 autoHide:true, 320 items: menuItensLabel 321 }); 322 } 323 324 function loadGroupBox(data, element){ 325 menuItensLabel = {}; 326 menuItensLabel["ContactGroupLabelAll"] = {name:"<b>Contatos do Grupo</b>", disabled: true}; 327 menuItensLabel["sep1"] = "---------"; 328 if(data.itens){ 329 var aux = 0; 330 for(var item in data.itens){ 331 if(parseInt(item) <= 4){ 332 menuItensLabel["ContactGroupLabel"+item] = {name: "<b>"+data.itens[item].data[0].value+"</b>", disabled: true}; 333 menuItensLabel["ContactGroupValue"+item] = {name: data.itens[item].data[2].value, disabled: true}; 334 }else{ 335 aux++; 336 if(aux == 1) 337 menuItensLabel["MoreContactGroupValue"] = {name : "E mais "+aux+" contato...", disabled: true }; 338 else 339 menuItensLabel["MoreContactGroupValue"] = {name : "E mais "+aux+" contatos...", disabled: true }; 340 } 341 } 342 } 343 $.contextMenu({ 344 selector: "#content_id_"+currentTab+" "+element+" .box-info", 345 trigger: 'hover', 346 delay:100, 347 autoHide:true, 348 items: menuItensLabel 349 }); 350 } 351 352 353 354 355 -
trunk/expressoMail1_2/js/draw_api.js
r6487 r6528 1495 1495 if ((headers_msgs.Forwarded == 'F') || (headers_msgs.Draft == 'X' && headers_msgs.Answered == 'A')){ 1496 1496 td_element21.onclick=function(){search_emails(headers_msgs.subject.replace(/^(re: ?|fw: ?|enc: ?|res: ?|fwd: ?)*/gi,''),true);}; 1497 td_element21.innerHTML = "<img src ='templates/"+template+"/images/forwarded. gif' title='"+get_lang('Forwarded')+"'>";1497 td_element21.innerHTML = "<img src ='templates/"+template+"/images/forwarded.png' title='"+get_lang('Forwarded')+"'>"; 1498 1498 headers_msgs.Draft = '' 1499 1499 headers_msgs.Answered = ''; … … 1501 1501 } 1502 1502 else if (headers_msgs.Draft == 'X') 1503 td_element21.innerHTML = "<img src ='templates/"+template+"/images/draft. gif' title='"+get_lang('Draft')+"'>";1503 td_element21.innerHTML = "<img src ='templates/"+template+"/images/draft.png' title='"+get_lang('Draft')+"'>"; 1504 1504 else if (headers_msgs.Answered == 'A'){ 1505 1505 td_element21.onclick=function(){search_emails(headers_msgs.subject.replace(/^(re: ?|fw: ?|enc: ?|res: ?|fwd: ?)*/gi,''),true);}; 1506 td_element21.innerHTML = "<img src ='templates/"+template+"/images/answered. gif' title='"+get_lang('Answered')+"'>";1506 td_element21.innerHTML = "<img src ='templates/"+template+"/images/answered.png' title='"+get_lang('Answered')+"'>"; 1507 1507 }else 1508 1508 td_element21.innerHTML = " "; … … 3540 3540 } 3541 3541 3542 function input_binds(input, ID){ 3543 var mySource = new Array(); 3544 var myArray = contacts.split(","); 3545 for(var i in myArray){ 3546 var teste = myArray[i].split(";"); 3547 if(teste.length > 1) 3548 mySource.push({name : teste[0], email: teste[1], value : (teste[0] +" - "+teste[1])}); 3549 else 3550 mySource.push({name : "", email: teste[0], value :teste[0]}); 3551 } 3552 input.bind( "keydown", function( event ) { 3553 if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { 3554 event.preventDefault(); 3555 } 3556 if((event.keyCode) == 120){ 3542 //DESENHO DAS CAIXA DE EMAIL 3543 function draw_email_box(input_data, location, personal){ 3544 if($.trim(input_data) != ""){ 3545 var box_data = valid_emails(input_data); 3546 DataLayer.render("../prototype/modules/mail/templates/emailBox.ejs", box_data, function(html){ 3547 var newBox = location.before(html).prev(); 3548 box_actions(newBox); 3549 if((preferences.expressoMail_ldap_identifier_recipient || personal)&& $(newBox).hasClass("invalid-email-box")){ 3550 //$(newBox).find(".loading").css("background-image", "../prototype/modules/mail/img/ajax-loader.gif"); 3551 show_detais(newBox, input_data, personal); 3552 }else{ 3553 $(newBox).find(".box-loading").remove(); 3554 } 3555 }); 3556 } 3557 } 3558 3559 function valid_emails(email){ 3560 var ContactBox = {name:"", email:"", valid : false}; 3561 var reSimpleEmail = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[_a-z0-9-]+(\.[_a-z0-9-]+)+$/; 3562 var reComplexEmail = /<([^<]*)>[\s]*$/; 3563 var validation = email.split('"'); 3564 3565 //FUNÇÃO QUE VALIDA OS DADOS QUANDO O EMAIL É DIGITADO COM ("NOME SOBRENOME" <Email@dominio.com>) 3566 var complexValidation = function(complexMail){ 3567 var Objct = {}; 3568 if($.trim(complexMail[1]).match(reComplexEmail)){ 3569 if($.trim(complexMail[1]).match(reComplexEmail).length){ 3570 Objct['email'] = $.trim(complexMail[1]).match(reComplexEmail)[1]; 3571 } 3572 }else{ 3573 Objct['email'] = $.trim(complexMail[1]); 3574 } 3575 Objct['name'] = complexMail[0]; 3576 Objct['valid'] = reSimpleEmail.test(Objct['email'].toLowerCase()); 3577 return Objct; 3578 } 3579 switch (validation.length) { 3580 //PEGA TODO O CONTEUDO E SETA COMO SE FOSSE O EMAIL 3581 case 1: 3582 validation.unshift(""); 3583 ContactBox = complexValidation(validation); 3584 break; 3585 //CORRIGI ERRO DE DIGITAÇÃO COMO ( huahua"<huhau@hauhau.com>) ou (hahahaha"huahua@email.com) ou ainda (hahahaha"huahua@ema il.com) 3586 case 2: 3587 ContactBox = complexValidation(validation); 3588 break; 3589 //RECEBE O EMAIL CORRETAMENTE SÓ VALIDA POSSIVEIS ERROS COMO O DE CIMA E OS CORRIGI CASO ACONTEÇAM 3590 case 3: 3591 //RETIRA O PRIMEIRO INDICE QUE FICOU "INUTIL" 3592 validation.shift(); 3593 ContactBox = complexValidation(validation); 3594 break; 3595 //SE EXISTIREM MAIS DO QUE 2 (") 3596 default: 3597 if($.trim(validation[validation.length-1]).match(reComplexEmail)){ 3598 if($.trim(validation[validation.length-1]).match(reComplexEmail).length){ 3599 ContactBox.mail = $.trim(validation[validation.length-1]).match(reComplexEmail)[1]; 3600 } 3601 }else{ 3602 ContactBox.mail = $.trim(complexMail[1]); 3603 } 3604 ContactBox.valid = reSimpleEmail.test(ContactBox.mail.toLowerCase()); 3605 } 3606 return ContactBox; 3607 } 3608 3609 //EVENTO DOS INPUTS PARA - CC - CCO 3610 function input_keydowns(input, ID){ 3611 var f9 = false; 3612 input.keydown(function(e){ 3613 f9 = false; 3614 var focusing = input.parent().find(".email-text"); 3615 //SE OS CONTATOS DINAMICOS ESTAO ATIVOS 3616 if(parseInt(preferences.use_dynamic_contacts) && !input.hasClass("box-input")){ 3617 //SELECIONA O CONTATO E EVITA OUTROS COMANDOS 3618 if ( e.keyCode === $.ui.keyCode.TAB && $( this ).data( "catcomplete" ).menu.active ) { 3619 e.preventDefault(); 3620 return false; 3621 } 3622 3623 //FECHA OS CONTATOS DINÂMICOS 3624 if( (e.keyCode == 27) && $( this ).data( "catcomplete" ).menu.active ){ 3625 e.stopPropagation(); 3626 e.preventDefault(); 3627 } 3628 3629 //SELECIONA O CONTATO E EVITA OUTROS COMANDOS 3630 if(e.keyCode == $.ui.keyCode.ENTER && $( this ).data( "catcomplete" ).menu.active){ 3631 e.preventDefault(); 3632 return false; 3633 } 3634 3635 if(e.keyCode == $.ui.keyCode.DELETE && $( this ).data( "catcomplete" ).menu.active){ 3636 if($($( this ).data( "catcomplete" ).menu.element).find(".ui-state-hover").parents("li:first").hasClass("dynamic-recent")) 3637 $($( this ).data( "catcomplete" ).menu.element).find(".ui-state-hover").next().trigger("click"); 3638 return false; 3639 } 3640 } 3641 //BUSCA COM A TECLA F9 3642 if((e.keyCode) == 120){ 3643 f9 = true; 3557 3644 emQuickSearch($(this).val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 3558 }else if( (event.keyCode == 27) && $( this ).data( "autocomplete" ).menu.active ){ 3559 event.stopPropagation(); 3560 event.preventDefault(); 3561 } 3562 }).autocomplete({ 3563 minLength: 0, 3564 source: function( request, response ) { 3565 response( $.ui.autocomplete.filter( 3566 mySource, extractLast( request.term ) ) ); 3645 e.preventDefault(); 3646 return false; 3647 } 3648 3649 //AO DIGITAR ENTER, ";", "," " " 3650 if(e.keyCode == 13 || e.keyCode == 9 || (e.keyCode == 188 && !e.shiftKey) || (e.keyCode == 191 && !e.shiftKey) ){ 3651 if(e.keyCode == 13){ 3652 e.preventDefault(); 3653 } 3654 if(input.val() != ""){ 3655 if(e.keyCode != 9) 3656 e.preventDefault(); 3657 draw_email_box(input.val(), input); 3658 if(input.hasClass("box-input")){ 3659 input.remove(); 3660 focusing.focus(); 3661 return; 3662 } 3663 } 3664 if(input.length) 3665 input.val(""); 3666 } 3667 if((e.keyCode == 8 || e.keyCode == 37) && input.val() == "" && input.prev().hasClass("box")){ 3668 e.preventDefault(); 3669 input.prev().focus(); 3670 return; 3671 } 3672 //AO DIGITAR " " 3673 if(e.keyCode == 32){ 3674 if(!input.val().length){ 3675 e.preventDefault(); 3676 return; 3677 }else{ 3678 var texto = input.val(); 3679 texto = texto.substring(0, getPosition(input[0])); 3680 if(texto.split('"').length-1 == 0){ 3681 if(input.val().split('"').length-1 == 0){ 3682 e.preventDefault(); 3683 e.stopPropagation(); 3684 draw_email_box(input.val(), input); 3685 input.val(""); 3686 if(input.hasClass("box-input")){ 3687 input.remove(); 3688 focusing.focus(); 3689 return; 3690 } 3691 return; 3692 } 3693 } 3694 } 3695 } 3696 //AO DIGITAR ">" 3697 if(e.keyCode == 190 && e.shiftKey && input.val().length == getPosition(input[0])){ 3698 input.val(input.val()+">"); 3699 draw_email_box(input.val(), input); 3700 e.preventDefault(); 3701 input.val(""); 3702 if(input.hasClass("box-input")){ 3703 input.remove(); 3704 focusing.focus(); 3705 return; 3706 } 3707 } 3708 3709 //INPUT AUTO RESIZE 3710 setTimeout(function(){ 3711 input.css("width", 15+(input.val().length * 9)); 3712 input.parent().scrollTo(":last"); 3713 }, 100); 3714 }) 3715 //AO SAIR DO FOCO MONTAGEM DA CAIXA DE EMAIL 3716 .focusout(function(){ 3717 if(!$(this).data('is_open')){ 3718 if(!(f9 || $(this).parents("tr:first").find("button").hasClass("ui-state-active"))){ 3719 if($(input).val() != "") 3720 draw_email_box(input.val(), input); 3721 if(input.hasClass("box-input")) 3722 input.remove(); 3723 } 3724 3725 input_search = $(input).val(); 3726 $(input).val(""); 3727 } 3728 }) 3729 //AO COLAR UM TEXTO NO CAMPO 3730 .bind("paste", function(e){ 3731 $(this).trigger("keydown"); 3732 var pthis = $(this); 3733 setTimeout(function() { 3734 var str = pthis.val().replace(/[,;\t\n]/gi, ","); 3735 str = str.split(","); 3736 $.each(str, function(index, value){ 3737 draw_email_box(value, pthis); 3738 }); 3739 pthis.val(""); 3740 }, 50); 3741 }); 3742 //SE FOR EDIÇÃO DE EMAILS RECALCULA O INPUT E SETA O FOCO 3743 if(input.hasClass("box-input")){ 3744 input.trigger("keydown"); 3745 input.focus(); 3746 } 3747 } 3748 var input_search = ""; 3749 //EVENTOS DA CAIXA 3750 function box_actions(box){ 3751 //AO PRESSIONAR UMA TECLA COM A CAIXA SELECIONADA 3752 box.keydown(function(e){ 3753 switch (e.keyCode) { 3754 case $.ui.keyCode.LEFT: 3755 //VERIFICA SE EXISTE ALGUMA CAIXA A ESQUERDA 3756 if($(this).prev().hasClass("box")) 3757 $(this).removeClass("box-selected").prev().focus(); 3758 break; 3759 case $.ui.keyCode.RIGHT: 3760 //VERIFICA SE EXISTE ALGUMA CAIXA A DIREITA 3761 if($(this).next().hasClass("box")) 3762 $(this).removeClass("box-selected").next().focus(); 3763 //SENAO FOCO O INPUT DO EMAIL 3764 else 3765 $(this).removeClass("box-selected").next().focus(); 3766 break; 3767 case $.ui.keyCode.HOME: 3768 //SELECIONO A PRIMEIRA CAIXA 3769 e.preventDefault(); 3770 $(this).parents(".email-area").find("div:first").focus(); 3771 break; 3772 case $.ui.keyCode.END: 3773 //SELECIONO A ULTIMA CAIXA 3774 e.preventDefault(); 3775 $(this).parents(".email-area").find("div:last").focus(); 3776 break; 3777 case $.ui.keyCode.DELETE: 3778 //VERIFICA SE EXISTE ALGUMA CAIXA A DIREITA 3779 if($(this).next().hasClass("box")) 3780 $(this).next().focus(); 3781 //SENAO FOCO O INPUT DO EMAIL 3782 else 3783 $(this).next().focus(); 3784 //REMOVO ESTA CAIXA 3785 $(this).remove(); 3786 break; 3787 case $.ui.keyCode.BACKSPACE: 3788 //VERIFICA SE EXISTE ALGUMA CAIXA A ESQUERDA 3789 if($(this).prev().hasClass("box")) 3790 $(this).removeClass("box-selected").prev().focus(); 3791 //SENAO HOUVER VERIFICA SE EXISTE ALGUMA CAIXA A DIREITA 3792 else if($(this).next().hasClass("box")) 3793 $(this).next().focus(); 3794 //SENAO HOUVER NEM A DIREITA NEM A ESQUERDA SETO O FOCO NO INPUT DO EMAIL 3795 else 3796 $(this).next().focus(); 3797 //REMOVO ESTA CAIXA 3798 $(this).remove(); 3799 e.preventDefault(); 3800 break; 3801 case $.ui.keyCode.ENTER: 3802 e.preventDefault(); 3803 $(this).trigger("dblclick"); 3804 break; 3805 } 3806 }) 3807 //AO FAZER UM DUPLO CLICK NA CAIXA 3808 .dblclick(function(e){ 3809 var input = $(this).find("input").clone(); 3810 input.css("display" , "inline-block"); 3811 $(this).before(input); 3812 input_keydowns(input, currentTab); 3813 $(this).remove(); 3814 //CLICK SIMPLES NA CAIXA 3815 }).click(function(){ 3816 $(this).focus(); 3817 //AO DAR O FOCO NA CAIXA 3818 }).focus(function(){ 3819 $(this).parent().find("div").removeClass("box-selected"); 3820 $(this).addClass("box-selected"); 3821 }).focusout(function(){ 3822 $(this).removeClass("box-selected"); 3823 }).draggable({ 3824 revert: 'invalid', 3825 helper : 'clone', 3826 stack: "body", 3827 containment : ".new-msg-head-data", 3828 start: function(e, ui){ 3829 $(this).parent().droppable( "disable" ); 3567 3830 }, 3568 focus: function() { 3569 return false; 3570 }, 3571 select: function( event, ui ) { 3572 var terms = mySplit( this.value ); 3573 terms.pop(); 3574 terms.push( (ui.item.name != "" ? "\""+ui.item.name+"\" " : "") + (ui.item.email ? "<"+ui.item.email+">" : "")); 3575 terms.push( "" ); 3576 this.value = terms.join( ", " ); 3577 return false; 3578 }, 3579 autoFocus: true 3580 }).data( "autocomplete" )._renderItem = function( ul, item ) { 3581 ul.css({"max-height" : "115px", "overflow-y" : "auto"}); 3582 if( $(ul).find("li").length > 10 ){ 3583 return; 3584 } 3585 return $( "<li></li>" ) 3586 .data( "item.autocomplete", item ) 3587 .append( "<a>" + item.name + " - " + item.email + "</a>" ) 3588 .appendTo( ul ); 3589 }; 3590 input.parents("tr:first").find("button").button().click(function(){ 3591 emQuickSearch($(this).parents("tr:first").find("textarea").val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 3831 stop : function(e, ui){ 3832 $(this).parent().droppable( "enable" ); 3833 } 3834 }); 3835 } 3836 3837 //MOSTRA OS DETALHES DAS CAIXA DE EMAIL NOS CAMPOS PARA - CC - CCO 3838 function show_detais(box, value, personal){ 3839 var ldap_id = preferences.expressoMail_ldap_identifier_recipient; 3840 var group = (personal != undefined ? (personal == "G" ? true : false) : false); 3841 3842 if(group){ 3843 REST.get("/group/"+value, {}, function(data){ 3844 if(!data.error){ 3845 if(data.collection.error) 3846 box.find(".box-loading").remove(); 3847 else{ 3848 //box.find(".box-loading").css("background-image", "url(templates/default/images/information.png) no-repeat! !important"); 3849 box.find(".box-loading").removeClass("box-loading").addClass("box-info"); 3850 box.addClass("box-"+value).removeClass("invalid-email-box"); 3851 loadGroupBox(data.collection, ".box-"+value); 3852 box.unbind("dblclick").bind("dblclick", function(e){ 3853 new $.Zebra_Dialog('<strong>Impossivel editar</strong> um contato do catálogo pessoal\n' + 3854 '<strong>Porém</strong> é possivel remove-lo', { 3855 'buttons': false, 3856 'modal': false, 3857 'position': ['right - 20', 'top + 20'], 3858 'auto_close': 3000 3859 }); 3860 }).find(".box-input").val("\""+data.collection.data[1].value+"\" <"+data.collection.data[1].value+">"); 3861 box.find(".email-box-value").html( (data.collection.data[1].value.length > 18 ? data.collection.data[1].value.substring(0, 15)+"...": data.collection.data[1].value)) 3862 } 3863 }else{ 3864 box.find(".box-loading").remove(); 3865 } 3866 }); 3867 return; 3868 } 3869 3870 if(personal){ 3871 REST.get("/contact/"+value, {}, function(data){ 3872 if(!data.error){ 3873 if(data.collection.error) 3874 box.find(".box-loading").remove(); 3875 else{ 3876 //box.find(".box-loading").css("background-image", "url(templates/default/images/information.png) no-repeat! !important"); 3877 box.find(".box-loading").removeClass("box-loading").addClass("box-info"); 3878 box.addClass("box-"+value).removeClass("invalid-email-box"); 3879 loadExtraLDAPBox(data.collection.data, ".box-"+value); 3880 box.unbind("dblclick").bind("dblclick", function(e){ 3881 new $.Zebra_Dialog('<strong>Impossivel editar</strong> um contato do catálogo pessoal\n' + 3882 '<strong>Porém</strong> é possivel remove-lo', { 3883 'buttons': false, 3884 'modal': false, 3885 'position': ['right - 20', 'top + 20'], 3886 'auto_close': 3000 3887 }); 3888 }).find(".box-input").val("\""+data.collection.data[0].value+"\" <"+data.collection.data[1].value+">"); 3889 box.find(".email-box-value").html( (data.collection.data[0].value.length > 18 ? data.collection.data[0].value.substring(0, 15)+"...": data.collection.data[0].value)) 3890 } 3891 }else{ 3892 box.find(".box-loading").remove(); 3893 } 3894 }); 3895 return; 3896 } 3897 3898 REST.get("/usersldap", {field : ldap_id,value: value}, function(data){ 3899 if(!data.error){ 3900 if(data.collection.error) 3901 box.find(".box-loading").remove(); 3902 else{ 3903 //box.find(".box-loading").css("background-image", "url(templates/default/images/information.png) no-repeat! !important"); 3904 box.find(".box-loading").removeClass("box-loading").addClass("box-info"); 3905 box.addClass("box-"+value).removeClass("invalid-email-box"); 3906 loadExtraLDAPBox(data.collection.itens[0].data, ".box-"+value); 3907 box.unbind("dblclick").bind("dblclick", function(e){ 3908 new $.Zebra_Dialog('<strong>Impossivel editar</strong> um contato do catálogo geral\n' + 3909 '<strong>Porém</strong> é possivel remove-lo', { 3910 'buttons': false, 3911 'modal': false, 3912 'position': ['right - 20', 'top + 20'], 3913 'auto_close': 3000 3914 }); 3915 }).find(".box-input").val("\""+data.collection.itens[0].data[0].value+"\" <"+data.collection.itens[0].data[1].value+">"); 3916 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)) 3917 } 3918 }else{ 3919 box.find(".box-loading").remove(); 3920 } 3921 }); 3922 } 3923 3924 //FUNÇÃO QUE "SETA" OS BINDS DOS CAMPOS PARA - CC - CCO 3925 function input_binds(div, ID){ 3926 3927 //AO CLICAR NA DIV SETA O FOCO NO INPUT 3928 div.click(function(e){ 3929 if(e.target == $(this)[0]){ 3930 $(this).find("input:last").focus(); 3931 $(this).find("div").removeClass("box-selected"); 3932 } 3933 }) 3934 3935 //AO SAIR DO FOCO DA DIV ELE RETIRA TODAS AS CLASSES DE CAIXAS SELECIONADAS 3936 .focusout(function(e){ 3937 if(!$(e.target).parents(".email-area:first").length) 3938 $(this).find("div").removeClass("box-selected"); 3939 }).droppable({ 3940 hoverClass: "box-draggable-hover", 3941 accept : ".box", 3942 drop : function(e, ui){ 3943 ui.draggable.parent().droppable( "enable" ); 3944 var box = ui.draggable.clone(); 3945 box_actions(box); 3946 if(box.find(".box-info").length){ 3947 box.unbind("dblclick").bind("dblclick", function(e){ 3948 new $.Zebra_Dialog('<strong>Impossivel editar</strong> um contato do ldap\n' + 3949 '<strong>Porém</strong>é possivel remove-lo', { 3950 'buttons': false, 3951 'modal': false, 3952 'position': ['right - 20', 'top + 20'], 3953 'auto_close': 3000 3954 }); 3955 }); 3956 } 3957 $(this).prepend(box); 3958 ui.draggable.remove(); 3959 } 3960 }); 3961 3962 //MAKE KEYDOWN 3963 input_keydowns(div.find("input"), ID); 3964 3965 3966 //VERIFICA PREFERENCIA DE CONTATOS DINÂMICOS ESTA ATIVA 3967 if(parseInt(preferences.use_dynamic_contacts)){ 3968 //PREPARAÇÃO DA ARRAY DOS CONTATOS DINÂMICOS 3969 3970 $.widget( "custom.catcomplete", $.ui.autocomplete, { 3971 _renderMenu: function( ul, items ) { 3972 var self = this, 3973 currentType = ""; 3974 $.each( items, function( index, item ) { 3975 if ( item.type != currentType) { 3976 if(item.type == "G" && $(ul).find(".dynamic-recent").length) 3977 self._renderItem( ul, {name:"", value:"", type:"linha"} ); 3978 if(item.type == "P" && $(ul).find(".dynamic-group").length) 3979 self._renderItem( ul, {name:"", value:"", type:"linha"} ); 3980 currentType = item.type; 3981 } 3982 self._renderItem( ul, item ); 3983 $(ul).find("li:last").find(".dynamic-stars").raty({ 3984 readOnly : true, 3985 half : true, 3986 hints : ['','','','',''], 3987 score : ((parseInt(item.qtd)*5)/topContact), 3988 starOn : '../../prototype/plugins/jq-raty/img/star-on.png', 3989 starOff : '../../prototype/plugins/jq-raty/img/star-off.png', 3990 starHalf : '../../prototype/plugins/jq-raty/img/star-half.png' 3991 }); 3992 }); 3993 } 3994 }); 3995 //INSERÇÃO DO AUTO COMPLETE AO INPUT 3996 div.find("input").catcomplete({ 3997 minLength: 1, 3998 source: function(request, response){ 3999 response( $.ui.autocomplete.filter(dynamicContactList, request.term ) ); 4000 }, 4001 focus: function() { 4002 return false; 4003 }, 4004 4005 //EVENTO AO SELECIONAR UM CONTATO DINÂMICO 4006 select: function( event, ui ) { 4007 event.preventDefault(); 4008 $(this).val(""); 4009 if(ui.item.type == "P") 4010 draw_email_box(""+ui.item.id, $(this), true); 4011 else if(ui.item.type == "G") 4012 draw_email_box(""+ui.item.id, $(this), "G"); 4013 else 4014 draw_email_box(ui.item.name ? "\""+ui.item.name+"\" <"+ui.item.email+">" : ui.item.email, $(this)); 4015 return false; 4016 }, 4017 autoFocus: true, 4018 position : { my: "left top", at: "left bottom", collision: "fit" } 4019 }).bind('catcompleteopen', function(event, ui) { 4020 $(this).data('is_open',true); 4021 }).bind('catcompleteclose', function(event, ui) { 4022 $(this).data('is_open',false); 4023 }) 4024 4025 //MONTAGEM DA LISTA DE CONTATOS DINÂMICOS DO AUTO COMPLETE 4026 .data( "catcomplete" )._renderItem = function( ul, item ) { 4027 ul.css({"min-width":"400px", "width":"50%", "max-height" : "180px", "overflow-y" : "auto", "min-height": "30px"}); 4028 var listContacts = DataLayer.render("../prototype/modules/mail/templates/listContacts.ejs", item); 4029 return $(listContacts).data( "item.autocomplete", item ).appendTo( ul ).find("span:last").button({ 4030 icons : { 4031 primary : "ui-icon-close" 4032 }, 4033 text: false 4034 }).click(function(){ 4035 var removeLi = $(this).parents("li:first"); 4036 $.Zebra_Dialog('Deseja remover <b>'+(item.name ? item.name+" - " : "")+ item.email+'</b>?', { 4037 'type': 'question', 4038 'custom_class': (is_ie ? 'configure-zebra-dialog' : ''), 4039 'title': 'Atenção', 4040 'buttons': ['Sim','Não'], 4041 'overlay_opacity': '0.5', 4042 'onClose': function(caption) { 4043 if(caption == 'Sim'){ 4044 $(removeLi).remove(); 4045 REST.delete("/dynamiccontact/"+item.id); 4046 updateDynamicContact(); 4047 updateDynamicContactList(); 4048 } 4049 } 4050 }); 4051 }); 4052 }; 4053 } 4054 4055 //FUNÇÃO DOS BOTÕES PARA - CC - CCO 4056 div.parents("tr:first").find("button").button().click(function(){ 4057 if(!$(":focus").hasClass("new-message-input")) 4058 emQuickSearch(($(this).parents("tr:first").find("input").val() ? $(this).parents("tr:first").find("input").val() : input_search), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 3592 4059 }); 3593 4060 } … … 3596 4063 connector.loadScript("color_palette"); 3597 4064 connector.loadScript('wfolders'); 4065 connector.loadScript("ccQuickAdd"); 3598 4066 3599 4067 if(typeof(RichTextEditor) == 'undefined' || typeof(ColorPalette) == 'undefined' || typeof(wfolders) == 'undefined') … … 3643 4111 button.toggleClass("expressomail-button-icon-ative"); 3644 4112 field.toggle(); 3645 field.find("textarea").val("").focus(); 3646 if(!field.find("textarea").hasClass("elastic")){ 3647 field.find("textarea").css({"max-height" : "115px", "overflow-y" : "auto"}).addClass("elastic").elastic().unbind('blur'); 3648 input_binds(field.find("textarea"), ID); 4113 field.find("textarea").val("").parent().find("input").focus(); 4114 field.find(".email-area div").remove(); 4115 if(!field.find("textarea").hasClass("track")){ 4116 field.find("textarea").css({"max-height" : "115px", "overflow-y" : "auto"}).addClass("track"); 4117 input_binds(field.find(".email-area"), ID); 3649 4118 } 3650 4119 } 3651 4120 3652 input_binds(content.find('[name="input_ to"]').css({"max-height" : "115px", "overflow-y" : "auto"}).addClass("elastic").elastic().unbind('blur').focus(), ID);4121 input_binds(content.find('[name="input_aux_to"]').css("max-width" , parseInt($(".email-area").css("width"))-5).focus().parent().css({"max-height" : "115px", "overflow-y" : "auto"}), ID); 3653 4122 3654 4123 //Botão TextoRico/TextoSimples -
trunk/expressoMail1_2/js/main.js
r6494 r6528 9 9 var checkAlarmsFilter = false; 10 10 11 var dynamicPersonalContacts = new Array(); 12 var dynamicPersonalGroups = new Array(); 13 var dynamicContacts = new Array(); 14 var dynamicContactList = new Array(); 15 var topContact = 0; 16 11 17 //Os IE's < 9 não possui suporte a trim() introduzida no JavaScript 1.8.1 12 18 if(!String.prototype.trim){ 13 19 String.prototype.trim = function(){ 14 15 20 return this.replace(/^\s+|\s+$/g,''); 21 } 16 22 } 17 23 … … 21 27 return folders.join(cyrus_delimiter); 22 28 } 29 30 function updateDynamicContactList(){ 31 dynamicContactList = new Array(); 32 $.merge(dynamicContactList, dynamicContacts); 33 $.merge(dynamicContactList, dynamicPersonalGroups); 34 $.merge(dynamicContactList, dynamicPersonalContacts); 35 } 36 37 function updateDynamicContact(){ 38 dynamicContacts = new Array(); 39 var dynamicData = REST.get("/dynamiccontacts").collection.itens; 40 if(dynamicData){ 41 $.each(dynamicData, function(index, value){ 42 if(index ==0){ 43 topContact = parseInt(value.data[2].value); 44 } 45 var dynamic = { 46 name : value.data[0].value, 47 email : value.data[1].value, 48 value: value.data[0].value + " - " + value.data[1].value, 49 type: "", 50 id: parseInt(value.data[3].value), 51 qtd : parseInt(value.data[2].value) 52 }; 53 dynamicContacts.push(dynamic); 54 }); 55 } 56 } 57 58 function updateDynamicPersonalGroups(){ 59 dynamicPersonalGroups = new Array(); 60 var groupsData = REST.get("/groups").collection.itens; 61 if(groupsData){ 62 $.each(groupsData, function(index, value){ 63 var group = { 64 id : parseInt(value.data[0].value), 65 name : value.data[2].value, 66 email : value.data[2].value, 67 value: value.data[2].value + " - " + value.data[2].value, 68 type: "G" 69 }; 70 dynamicPersonalGroups.push(group); 71 }); 72 } 73 } 74 75 function updateDynamicPersonalContacts(){ 76 dynamicPersonalContacts = new Array(); 77 var contactsData = REST.get("/contacts").collection.itens; 78 if(contactsData){ 79 $.each(contactsData, function(index, value){ 80 var contact = { 81 id : parseInt(value.data[0].value), 82 name : value.data[1].value, 83 email : value.data[2].value, 84 value: value.data[1].value + " - " + value.data[2].value, 85 type: "P" 86 }; 87 dynamicPersonalContacts.push(contact); 88 }); 89 } 90 } 91 23 92 function init(){ 24 93 if (!is_ie) 25 94 Element('tableDivAppbox').width = '100%'; 26 95 27 var save_contacts = function(data){96 /*var save_contacts = function(data){ 28 97 contacts = data; 29 98 if (preferences.use_local_messages == 1 && window.google && google.gears) … … 31 100 expresso_local_messages.capt_url('controller.php?action=$this.db_functions.get_dropdown_contacts_to_cache'); 32 101 102 }*/ 103 if(parseInt(preferences.use_dynamic_contacts)){ 104 var load_dynamics = function(){ 105 updateDynamicContact(); 106 updateDynamicPersonalGroups(); 107 updateDynamicPersonalContacts(); 108 updateDynamicContactList(); 109 }; 110 load_dynamics(); 33 111 } 34 112 var save_preferences = function(data){ … … 71 149 //Substituido por padrão Jquery 72 150 cExecute ("$this.imap_functions.get_range_msgs2&folder=INBOX&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type=SORTARRIVAL&search_box_type=ALL&sort_box_reverse=1", handler_draw_box); 73 cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences.151 //cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences. 74 152 if(preferences.hide_folders == "1") 75 153 Element('divAppboxHeader').innerHTML = title_app_menu; … … 193 271 cyrus_delimiter = Element('cyrus_delimiter').value; 194 272 195 cExecute ("$this.db_functions.get_dropdown_contacts_to_cache", function(data) {contacts = data;});273 //cExecute ("$this.db_functions.get_dropdown_contacts_to_cache", function(data) {contacts = data;}); 196 274 //cExecute ("$this.functions.get_preferences", save_preferences); 197 275 } … … 1760 1838 case "reply_without_history": 1761 1839 RichTextEditor.replyController = true; //Seta o editor como modo reply 1762 content.find('[name="input_to"]').val(data.to); 1840 content.find('[name="input_to"]').val(data.to); 1841 1842 draw_reply_boxes_by_field("to", data.to, content); 1843 1763 1844 title = "Re: " + html_entities(data.subject); 1764 1845 content.find(".subject").val("Re: " + data.subject); … … 1777 1858 content.find(".subject").val("Re: " + data.subject); 1778 1859 content.find('[name="input_to"]').val(data.to); 1860 1861 draw_reply_boxes_by_field("to", data.to, content); 1862 1779 1863 content.find('[name="msg_reply_from"]').val($("#msg_number_" + border_ID).val()); 1780 1864 … … 1807 1891 else 1808 1892 content.find('[name="input_to"]').val(data.to + ',' + data.to_all); 1809 1893 1894 draw_reply_boxes_by_field("to", data.to_all, content); 1895 1810 1896 if (data.cc){ 1811 1897 data.cc = new Array(); … … 1818 1904 if(data.cc != ""){ 1819 1905 content.find('[name="input_cc"]').val(data.cc); 1820 input_binds(content.find('[name="input_cc"]') , new_border_ID);1906 input_binds(content.find('[name="input_cc"]').parent(), new_border_ID); 1821 1907 content.find(".cc-tr").show();//cc-button 1822 1908 //document.getElementById("a_cc_link" + new_border_ID).value = data.cc; 1823 1909 content.find(".cc-button").toggleClass("expressomail-button-icon-ative"); 1824 1910 content.find(".cc-button").find("span").html("Remover CC"); 1825 content.find('[name="input_cc"]').elastic().unbind('blur'); 1826 content.find('[name="input_cc"]').trigger("update"); 1911 draw_reply_boxes_by_field("cc", data.cc, content); 1827 1912 } 1828 1913 } … … 1846 1931 else 1847 1932 data.to_all = ""; 1933 1934 draw_reply_boxes_by_field("to", data.to_all, content); 1935 1848 1936 title = "Re: " + html_entities(data.subject); 1849 1937 … … 1862 1950 if(data.cc != ""){ 1863 1951 content.find('[name="input_cc"]').val(data.cc); 1864 input_binds(content.find('[name="input_cc"]') , new_border_ID);1952 input_binds(content.find('[name="input_cc"]').parent(), new_border_ID); 1865 1953 content.find(".cc-tr").show(); 1866 1954 content.find(".cc-button").toggleClass("expressomail-button-icon-ative"); 1867 1955 content.find(".cc-button").find("span").html("Remover CC"); 1868 content.find('[name="input_cc"]').elastic().unbind('blur');1869 content.find('[name="input_cc"]').trigger("update");1956 1957 draw_reply_boxes_by_field("cc", data.cc, content); 1870 1958 } 1871 1959 } … … 1922 2010 } 1923 2011 content.find('[name="input_to"]').val(_to +','); 2012 draw_email_box(_to, content.find(".to").filter("input")); 1924 2013 Element('msg_number').value = ''; 1925 2014 } … … 1947 2036 } 1948 2037 2038 draw_reply_boxes_by_field("to", data.to, content); 2039 1949 2040 content.find('[name="input_to"]').val(data.to); 1950 2041 if (data.cc){ … … 1952 2043 data.cc = data.cc.replace(/>/gi,">"); 1953 2044 content.find('[name="input_cc"]').val(data.cc); 1954 input_binds(content.find('[name="input_cc"]') , new_border_ID);2045 input_binds(content.find('[name="input_cc"]').parent(), new_border_ID); 1955 2046 content.find(".cc-tr").show(); 1956 2047 content.find(".cc-button").toggleClass("expressomail-button-icon-ative"); 1957 2048 content.find(".cc-button").find("span").html(get_lang('Remove CC')); 1958 content.find('[name="input_cc"]').elastic().unbind('blur'); 1959 content.find('[name="input_cc"]').trigger("update"); 2049 draw_reply_boxes_by_field("cc", data.cc, content); 1960 2050 } 1961 2051 if (data.cco){ … … 1965 2055 content.find(".cco-button").toggleClass("expressomail-button-icon-ative"); 1966 2056 content.find(".cco-button").find("span").html(get_lang('Remove CCo')); 1967 content.find('[name="input_cco"]').elastic().unbind('blur');1968 content.find('[name="input_cco"]').trigger("update");2057 input_binds(content.find('[name="input_cco"]').parent(), new_border_ID); 2058 draw_reply_boxes_by_field("cco", data.cco, content); 1969 2059 } 1970 2060 } … … 2006 2096 resizeWindow(); 2007 2097 return new_border_ID; //Preciso retornar o ID da nova mensagem. 2098 } 2099 2100 //DESENHA OS RETANGULOS PARA OS E-MAIL NA OPÇÃO REPLY 2101 function draw_reply_boxes_by_field(field, value, context){ 2102 array = value.split(","); 2103 $.each(array, function(index, value){ 2104 draw_email_box(value, context.find("."+field).filter("input")); 2105 }); 2008 2106 } 2009 2107 … … 2241 2339 watch_changes_in_msg(ID); 2242 2340 2341 var content = $("#content_id_"+ID); 2243 2342 var sign = false; 2244 2343 var crypt = false; 2344 var reComplexEmail = /<([^<]*)>[\s]*$/; 2245 2345 if ((preferences.use_assinar_criptografar != '0') && (preferences.use_signature_digital_cripto != '0')){ 2246 2346 var checkSign = document.getElementById('return_digital_'+ID) … … 2282 2382 if(data && data.success == true ){ 2283 2383 // if send ok, set a flag as answered or forwarded 2284 var msg_number_replied = $("#content_id_" + ID).find('[name="msg_reply_from"]');2285 var msg_number_forwarded = $("#content_id_" + ID).find('[name="msg_forward_from"]');2384 var msg_number_replied = content.find('[name="msg_reply_from"]'); 2385 var msg_number_forwarded = content.find('[name="msg_forward_from"]'); 2286 2386 2287 2387 if (msg_number_replied.val()){ … … 2304 2404 } 2305 2405 } 2406 2407 $ 2408 //REFAZER ISTO COM UMA CHAMADA ASSINCRONA PARA REGISTRAR E ATUALIZAR A LISTA DOS NOVOS CONTATOS DINAMICOS 2306 2409 // If new dynamic contacts were added, update the autocomplete .... 2307 if(data.new_contacts){2410 /*if(data.new_contacts){ 2308 2411 var ar_contacts = data.new_contacts.split(',;'); 2309 2412 for(var j in ar_contacts){ … … 2313 2416 } 2314 2417 } 2418 var dynamicPersonalContacts = new Array(); 2419 var dynamicPersonalGroups = new Array(); 2420 var dynamicContacts = new Array(); 2421 var dynamicContactList = new Array(); 2422 2423 */ 2424 var array = content.find(".to-tr").find(".box").clone(); 2315 2425 delete_border(ID,'true'); 2426 if(parseInt(preferences.use_dynamic_contacts)){ 2427 $.each(array, function(i, value){ 2428 var stop = false; 2429 $.each(dynamicPersonalContacts, function(x, valuex){ 2430 if(valuex.email == $(value).find("input").val().match(reComplexEmail)[1]){ 2431 stop = true; 2432 return false; 2433 } 2434 }); 2435 if(!stop){ 2436 var exist = 0; 2437 $.each(dynamicContacts, function(x, valuex){ 2438 if(valuex.email == $(value).find("input").val().match(reComplexEmail)[1]){ 2439 exist = valuex.id; 2440 return false; 2441 } 2442 }); 2443 if(exist){ 2444 REST.put("/dynamiccontact/"+exist, {name: $(value).find("input").val().split('"')[1], mail:$(value).find("input").val().match(reComplexEmail)[1]}); 2445 }else{ 2446 REST.post("/dynamiccontacts", {name: $(value).find("input").val().split('"')[1], mail:$(value).find("input").val().match(reComplexEmail)[1]}); 2447 } 2448 } 2449 }); 2450 updateDynamicContact(); 2451 updateDynamicContactList(); 2452 } 2316 2453 } 2317 2454 else{ 2318 2455 if(data == 'Post-Content-Length') 2319 2456 write_msg(get_lang('The size of this message has exceeded the limit (%1B).',Element('upload_max_filesize').value)); 2320 else if(data) 2457 else if(data){ 2458 var error_mail = $.trim(data.split(":")[data.split(":").length-1]); 2459 var array = content.find(".to-tr").find(".box"); 2460 //$(value).find("input").val() 2461 $.each(array, function(index, value){ 2462 if(error_mail == $(value).find("input").val().match(reComplexEmail)[1]) 2463 $(value).addClass("invalid-email-box"); 2464 }); 2465 if ( content.find('[name="input_cco"]').length){ 2466 if(content.find(".cco-tr").css("display") != "none"){ 2467 var array = content.find(".cco-tr").find(".box"); 2468 $.each(array, function(index, value){ 2469 if(error_mail == $(value).find("input").val().match(reComplexEmail)[1]) 2470 $(value).addClass("invalid-email-box"); 2471 }); 2472 } 2473 } 2474 if(content.find(".cc-tr").css("display") != "none") 2475 { 2476 var array = content.find(".cc-tr").find(".box"); 2477 $.each(array, function(index, value){ 2478 if(error_mail == $(value).find("input").val().match(reComplexEmail)[1]) 2479 $(value).addClass("invalid-email-box"); 2480 }); 2481 } 2321 2482 write_msg(data); 2322 else2483 }else 2323 2484 write_msg(get_lang("Connection failed with %1 Server. Try later.", "Web")); 2324 2485 … … 2525 2686 return; 2526 2687 } 2527 stringEmail = content.find('[name="input_to"]').val(); 2528 2529 if ( content.find('[name="input_cco"]').length) 2530 if(content.find(".cco-tr").css("display") != "none") 2531 stringEmail += content.find('[name="input_cco"]').val() =='' ? "":", "+content.find('[name="input_cco"]').val(); 2688 //stringEmail = content.find('[name="input_to"]').val(); 2689 var stringEmail = ""; 2690 var array = content.find(".to-tr").find(".box"); 2691 $.each(array, function(index, value){ 2692 stringEmail += $(value).find("input").val() + ","; 2693 }); 2694 content.find('[name="input_to"]').val(stringEmail); 2695 if ( content.find('[name="input_cco"]').length){ 2696 if(content.find(".cco-tr").css("display") != "none"){ 2697 var array = content.find(".cco-tr").find(".box"); 2698 $.each(array, function(index, value){ 2699 stringEmail += $(value).find("input").val() + ","; 2700 }); 2701 content.find('[name="input_cco"]').val(stringEmail); 2702 } 2703 } 2532 2704 2533 2705 if(content.find(".cc-tr").css("display") != "none") 2534 stringEmail += content.find('[name="input_cc"]').val() =='' ? "":", "+content.find('[name="input_cc"]').val(); 2706 { 2707 var array = content.find(".cc-tr").find(".box"); 2708 $.each(array, function(index, value){ 2709 stringEmail += $(value).find("input").val() + ","; 2710 }); 2711 content.find('[name="input_cc"]').val(stringEmail); 2712 } 2535 2713 2536 2714 if (expresso_offline) { … … 2632 2810 autoSaveControl.status[border_id] = true; 2633 2811 /////////////////////////////////////////// 2634 2812 var content = $("#content_id_"+border_id); 2813 2814 var stringEmail = ""; 2815 var array = content.find(".to-tr").find(".box"); 2816 $.each(array, function(index, value){ 2817 stringEmail += $(value).find("input").val() + ","; 2818 }); 2819 content.find('[name="input_to"]').val(stringEmail); 2820 stringEmail = ""; 2821 if ( content.find('[name="input_cco"]').length){ 2822 if(content.find(".cco-tr").css("display") != "none"){ 2823 var array = content.find(".cco-tr").find(".box"); 2824 $.each(array, function(index, value){ 2825 stringEmail += $(value).find("input").val() + ","; 2826 }); 2827 content.find('[name="input_cco"]').val(stringEmail); 2828 } 2829 } 2830 2831 stringEmail = ""; 2832 if(content.find(".cc-tr").css("display") != "none") 2833 { 2834 var array = content.find(".cc-tr").find(".box"); 2835 $.each(array, function(index, value){ 2836 stringEmail += $(value).find("input").val() + ","; 2837 }); 2838 content.find('[name="input_cc"]').val(stringEmail); 2839 } 2840 2635 2841 var idJavascript = saveBorderError[border_id]; 2636 2842 -
trunk/expressoMail1_2/js/search.js
r6456 r6528 20 20 21 21 //Monta os forms dentro da janela; 22 searchE.prototype.showForms = function(value )22 searchE.prototype.showForms = function(value, data) 23 23 { 24 24 if( trim(value) != "" ) … … 39 39 var div = document.createElement("div"); 40 40 var args = null; 41 41 42 42 args = 43 43 { … … 63 63 "Old" : get_lang('Old'), 64 64 "Search_the_messages_in_these_folders" : get_lang('Search the messages in these folders'), 65 "In_all_the_folders" : get_lang('In all the folders') 66 } 67 65 "In_all_the_folders" : get_lang('In all the folders'), 66 "From_value" : (data != "undefined" ? data : "") 67 } 68 68 69 $(div).html(DataLayer.render("./templates/default/searchMails.ejs", args )); 69 70 div.setAttribute( "style","overflow:hidden"); … … 515 516 td.id = "td_message_answered_"+uid_msg; 516 517 if (aux.flag.match('X')) 517 td1 = '<img src=templates/'+template+'/images/forwarded. giftitle="'+get_lang('Forwarded')+'">';518 td1 = '<img src=templates/'+template+'/images/forwarded.png title="'+get_lang('Forwarded')+'">'; 518 519 else 519 520 if (aux.flag.match('A')) 520 td1 = '<img src=templates/'+template+'/images/answered. giftitle="'+get_lang('Answered')+'">';521 td1 = '<img src=templates/'+template+'/images/answered.png title="'+get_lang('Answered')+'">'; 521 522 else 522 523 td1 = ''; -
trunk/expressoMail1_2/setup/default_records.inc.php
r5988 r6528 1 1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Setup * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 2 12 $oProc->query("ALTER TABLE expressomail_message_followupflag ADD CONSTRAINT expressomail_message_followupflag_followupflag_id_fkey FOREIGN KEY (followupflag_id) REFERENCES expressomail_followupflag (id);"); 3 13 … … 15 25 $oProc->query("INSERT INTO phpgw_hooks( \"hook_appname\", \"hook_location\", \"hook_filename\") VALUES ('expressoMail1_2', 'config_validate', 'hook_config_validate.inc.php')"); 16 26 17 27 /* Cria um indice unico para um owner e mail para nao ocorrer duplicidade em e-mails para um mesmo owner */ 28 $oProc->query("ALTER TABLE expressomail_dynamic_contact ADD CONSTRAINT owner_mail UNIQUE (owner, mail)"); 18 29 ?> -
trunk/expressoMail1_2/setup/setup.inc.php
r6255 r6528 13 13 $setup_info['expressoMail1_2']['name'] = 'expressoMail1_2'; 14 14 $setup_info['expressoMail1_2']['title'] = 'Expresso Mail'; 15 $setup_info['expressoMail1_2']['version'] = '2.4. 7';15 $setup_info['expressoMail1_2']['version'] = '2.4.8'; 16 16 $setup_info['expressoMail1_2']['app_order'] = 2; 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_expressomail_contacts';18 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_certificados'; 19 18 … … 22 21 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_message_followupflag'; 23 22 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_followupflag'; 23 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_dynamic_contact'; 24 24 25 25 … … 48 48 'versions' => Array('2.4') 49 49 ); 50 51 $setup_info['expressoMail1_2']['depends'][] = array( 52 'appname' => 'rest', 53 'versions' => Array('1.0') 54 ); 55 50 56 ?> -
trunk/expressoMail1_2/setup/tables_current.inc.php
r5981 r6528 10 10 \**************************************************************************/ 11 11 $phpgw_baseline = array( 12 ' phpgw_expressomail_contacts' => array(12 'expressomail_dynamic_contact' => array( 13 13 'fd' => array( 14 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 15 'data' => array( 'type' => 'text') 14 'id' => array('type' => 'auto','nullable' => False), 15 'owner' => array('type' => 'int','precision' => '16','nullable' => False), 16 'name' => array('type' => 'varchar','precision' => '100','nullable' => true), 17 'mail' => array('type' => 'varchar','precision' => '100','nullable' => False), 18 'number_of_messages' => array('type' => 'int','precision' => '16','nullable' => False), 19 'timestamp' => array('type' => 'int','precision' => '16','nullable' => False), 16 20 ), 17 'pk' => array('id _owner'),21 'pk' => array('id'), 18 22 'fk' => array(), 19 23 'ix' => array(), 20 24 'uc' => array() 21 25 ), 26 22 27 'phpgw_certificados' => array( 23 28 'fd' => array( -
trunk/expressoMail1_2/setup/tables_update.inc.php
r6255 r6528 267 267 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 268 268 } 269 269 270 $test[] = '2.4.7'; 271 function expressoMail1_2_upgrade2_4_7() { 272 $oProc = $GLOBALS['phpgw_setup']->oProc; 273 274 //Criando nova tabela de contatos dinamicos 275 $oProc->CreateTable('expressomail_dynamic_contact',array( 276 'fd' => array( 277 'id' => array('type' => 'auto','nullable' => False), 278 'owner' => array('type' => 'int','precision' => '16','nullable' => False), 279 'name' => array('type' => 'varchar','precision' => '100','nullable' => true), 280 'mail' => array('type' => 'varchar','precision' => '100','nullable' => False), 281 'number_of_messages' => array('type' => 'int','precision' => '16','nullable' => False), 282 'timestamp' => array('type' => 'int','precision' => '16','nullable' => False), 283 ), 284 'pk' => array('id'), 285 'fk' => array(), 286 'ix' => array(), 287 'uc' => array() 288 ) 289 ); 290 291 /* Cria um indice unico para um owner e mail para nao ocorrer duplicidade em e-mails para um mesmo owner */ 292 $oProc->query("ALTER TABLE expressomail_dynamic_contact ADD CONSTRAINT owner_mail UNIQUE (owner, mail)"); 293 294 //Migra dados antigos para nova tabela 295 $oProc->query('SELECT * FROM phpgw_expressomail_contacts'); 296 $return = array(); 297 while($oProc->next_record()) 298 $return[$oProc->f('id_owner')] = $oProc->f('data'); 299 300 foreach ($return as $owner => &$value) { 301 $contacts = unserialize($value); 302 foreach ($contacts as &$contact) { 303 $info = explode('#', $contact['email']); 304 $oProc->query("INSERT INTO expressomail_dynamic_contact (owner, name ,mail , number_of_messages ,timestamp) values ('".$owner."', '".$info[0]."', '".$info[1]."', 1, '".$contact['timestamp']."');"); 305 } 306 } 307 308 //Deleta tabela antiga 309 $oProc->DropTable('phpgw_expressomail_contacts'); 310 311 /* Remove a restricao de quantidade de contatos recentes */ 312 $oProc->query("DELETE FROM phpgw_config WHERE config_app = 'expressoMail1_2' AND config_name = 'expressoMail_Number_of_dynamic_contacts'"); 313 314 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.8'; 315 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 316 } 270 317 ?> -
trunk/expressoMail1_2/templates/default/config.tpl
r5988 r6528 98 98 </td> 99 99 </tr> 100 <!-- <tr bgcolor="{row_on}"> 101 <td>{lang_Number_of_dynamic_contacts}</td> 102 <td> 103 <input size="1" name="newsettings[expressoMail_Number_of_dynamic_contacts]" value="{value_expressoMail_Number_of_dynamic_contacts}"> 104 </td> 105 </tr> --> 100 106 <tr bgcolor="{row_on}"> 101 <td>{lang_Number_of_dynamic_contacts}</td>102 <td>103 <input size="1" name="newsettings[expressoMail_Number_of_dynamic_contacts]" value="{value_expressoMail_Number_of_dynamic_contacts}">104 </td>105 </tr>106 <tr bgcolor="{row_off}">107 107 <td>{lang_imap_max_folders}:</td> 108 108 <td> … … 110 110 </td> 111 111 </tr> 112 <tr bgcolor="{row_o n}">112 <tr bgcolor="{row_off}"> 113 113 <td>{lang_Max_attachment_size}</td> 114 114 <td> … … 118 118 </td> 119 119 </tr> 120 <tr bgcolor="{row_o ff}">120 <tr bgcolor="{row_on}"> 121 121 <td>{lang_allow_hidden_copy}</td> 122 122 <td> … … 133 133 </td> 134 134 </tr> 135 <tr bgcolor="{row_o ff}">135 <tr bgcolor="{row_on}"> 136 136 <td>{lang_gears_firefox_windows_url}</td> 137 137 <td> … … 139 139 </td> 140 140 </tr> 141 <tr bgcolor="{row_o n}">141 <tr bgcolor="{row_off}"> 142 142 <td>{lang_gears_firefox_linux_url}</td> 143 143 <td> … … 145 145 </td> 146 146 </tr> 147 <tr bgcolor="{row_o ff}">147 <tr bgcolor="{row_on}"> 148 148 <td>{lang_gears_ie_url}</td> 149 149 <td> … … 151 151 </td> 152 152 </tr> 153 <tr bgcolor="{row_o n}">153 <tr bgcolor="{row_off}"> 154 154 <td>{lang_Do_you_want_to_use_x_origin_in_source_menssage?}</td> 155 155 <td> … … 160 160 </td> 161 161 </tr> 162 <tr bgcolor="{row_o ff}">162 <tr bgcolor="{row_on}"> 163 163 <td>{lang_Number_max_of_labels}</td> 164 164 <td> … … 244 244 </td> 245 245 </tr> 246 247 <tr bgcolor="{th_bg}"> 248 <td colspan="2"> 249 250 </td> 251 </tr> 252 <tr bgcolor="{row_on}"> 253 <td colspan="2"> 254 <label style="font-weight:bold;">{lang_Identifier_of_the_recipient_of_a_message}</label> 255 </td> 256 </tr> 257 <tr bgcolor="{row_off}"> 258 <td>{lang_LDAP_attribute_used_to_replacement}</td> 259 <td> 260 <select id="identifier_recipient" name="newsettings[expressoMail_ldap_identifier_recipient]"> 261 {rows_ldap_identifier} 262 </select> 263 </td> 264 </tr> 265 266 <!-- <tr bgcolor="{row_off}"> 267 <td>{lang_LDAP_attribute_used_to_replacement}</td> 268 <td> 269 <input type="text" id="identifier_recipient " value="{value_expressoMail_ldap_identifier_recipient}" name="newsettings[expressoMail_ldap_identifier_recipient]" size=10 maxlength=10 /> 270 </td> 271 </tr> --> 246 272 <!--tr bgcolor="{row_on}"> 247 273 <td>{lang_Days_interval_to_show_balloon_for_user}</td> -
trunk/expressoMail1_2/templates/default/main.css
r6459 r6528 127 127 .context-menu-item.icon-normal { background-image: url(images/door.png); } 128 128 .context-menu-item.icon-followupflag { background-image: url(images/door.png); } 129 .context-menu-item.icon-quick-add { background-image: url(images/vcard_add.png); } 130 .context-menu-item.icon-delete-box{ background-image: url(images/user_delete.png); } 131 .context-menu-item.icon-quick-search-contact{ background-image: url(images/zoom.png); } 129 132 130 133 … … 700 703 } 701 704 .message_options_trash { 702 background-image: url( ../../../phpgwapi/templates/default/images/foldertree_trash.png);705 background-image: url(images/page_white_delete.png); 703 706 background-repeat: no-repeat; 704 707 background-position:left center; … … 1274 1277 } 1275 1278 1276 #detalhes_contato img{ margin-bottom: -4px;} 1279 #detalhes_contato img{ margin-bottom: -4px;} 1280 1281 button.expressomail-button-icon-ative{color:#E17009 !important; border: 1px solid #E17009 !important;background: none repeat scroll 0 0 #FFE1CC !important;} 1282 1283 .box{ 1284 background-color: #96B3D3; 1285 border-radius: 5px; 1286 border: 1px solid #201b41; 1287 display: inline-block; 1288 cursor : pointer; 1289 margin-top : 1px; 1290 margin-right: 1px; 1291 outline : none; 1292 padding : 1px; 1293 } 1294 1295 1296 .box span{ 1297 font-family: Verdana, Arial, Helvetica, sans-serif; 1298 font-size: 13px; 1299 color : #201b41; 1300 outline : none; 1301 } 1302 1303 .invalid-email-box{ 1304 background-color: #F08080; 1305 border : 1px solid #540303 !important; 1306 } 1307 1308 .invalid-email-box span{ 1309 color: #540303; 1310 } 1311 1312 .email-area{ 1313 border-radius: 5px; 1314 width: 98.5%; 1315 padding: 5px; 1316 border : 1px solid #BBBBBB; 1317 heigth : auto; 1318 max-height : 115px; 1319 overflow-y: auto; 1320 } 1321 .email-text{ 1322 outline:none; 1323 width:15px; 1324 border : none; 1325 font-family: Verdana, Arial, Helvetica, sans-serif; 1326 font-size: 13px; 1327 } 1328 1329 .box-input{ 1330 outline:none; 1331 border : none; 1332 font-family: Verdana, Arial, Helvetica, sans-serif; 1333 font-size: 13px; 1334 display : none; 1335 } 1336 1337 .box-selected{ 1338 background-color : #BBBBBB; 1339 } 1340 1341 .hidden { 1342 display : none; 1343 } 1344 1345 .loading { 1346 background: url(../../../prototype/modules/mail/img/loader.gif) !important; 1347 background-position: 0 0 !important; 1348 background-repeat : no-repeat !important; 1349 } 1350 1351 .line-separator{ 1352 background: url("images/linha.png") repeat-x scroll 0 8px transparent; 1353 clear : both; 1354 } 1355 1356 .box-draggable-hover{ 1357 border : 1px solid #474747; 1358 } 1359 1360 .box-loading{ 1361 background : url("../../../prototype/modules/mail/img/loading.gif") no-repeat !important; 1362 background-size: 17px auto !important; 1363 } 1364 1365 .box-info{ 1366 background : url("images/information.png") no-repeat !important; 1367 } -
trunk/expressoMail1_2/templates/default/searchMails.ejs
r5751 r6528 3 3 4 4 <label><%=data.From%>:</label> 5 <input style="margin-left: 6px;" type="text" id="txt_de" size="20" />5 <input style="margin-left: 6px;" type="text" id="txt_de" size="20" value="<%=data.From_value%>"/> 6 6 <br style="margin-bottom:15px" /> 7 7
Note: See TracChangeset
for help on using the changeset viewer.