Ignore:
Timestamp:
11/03/11 13:24:28 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo ExpressoMail?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/hook_settings.inc.php

    r5083 r5134  
    1919        *  option) any later version.                                              * 
    2020        \**************************************************************************/ 
    21  
     21//include_once("fckeditor.php"); 
     22//include_once("class.functions.inc.php"); 
    2223$type = isset($_GET['type']) ? $_GET['type']:$GLOBALS['type']; // FIX ME 
    2324 
    2425//if ($type == 'user' || $type == ''){ 
     26global $prefs; 
     27//      create_select_box('Signature Type','',$default,'','','','onchange="javascript:changeType(this.value);"'); 
    2528create_script('function exibir_ocultar() 
    2629{ 
    2730    var type = ("'.$type.'" == "") ? "user" : "'.$type.'"; 
    28     var use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[0]; 
     31    var use_signature_digital_cripto = null; 
     32 
     33    if (document.all) 
     34    { 
     35        // is_ie 
     36        use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[1]; 
     37    } 
     38    else 
     39    { 
     40        // not_ie 
     41        use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[0]; 
     42    } 
     43 
    2944    var default_signature_digital_cripto = "'.$GLOBALS['phpgw_info']['default']['preferences']['expressoMail']['use_signature_digital_cripto'].'"; 
    3045 
     
    287302        document.getElementById( "user_signature" + counter ).value = old_signature; 
    288303    } 
    289 }'); 
     304    } 
     305'); 
    290306//} 
    291  
     307$default = false; 
     308create_check_box('Do you want to show common name instead of UID?','uid2cn',$default, 
     309        'Do you want to show common name instead of UID?'); 
     310create_check_box('Do you want to automatically display the message header?','show_head_msg_full',$default,''); 
    292311$default = array( 
    293312        '25'    => '25', 
     
    297316); 
    298317 
    299 // Cria nova opção nas preferências do ExpressoMail  
     318create_select_box('What is the maximum number of messages per page?','max_email_per_page',$default,'This is the number of messages shown in your mailbox per page'); 
     319 
    300320create_check_box('View the user name in the header of the messages printed?', 'show_name_print_messages', 'Displays the user name in the header print email'); 
    301321 
    302 create_select_box('What is the maximum number of messages per page?','max_email_per_page',$default,'This is the number of messages shown in your mailbox per page'); 
     322//$default = 0; 
     323create_check_box('Preview message text within subject column','preview_msg_subject','this exhibits a sample of message within the message subject column'); 
     324 
     325//$default = 0; 
     326create_check_box('Preview message text within a tool-tip box','preview_msg_tip','this exhibits a sample of message within a tool-tip box'); 
     327 
     328create_check_box('View extended information about users','extended_info','This exhibits employeenumber and ou from LDAP in searchs'); 
    303329create_check_box('Save deleted messages in trash folder?','save_deleted_msg','When delete message, send it automatically to trash folder'); 
    304330$default = array( 
     
    310336); 
    311337 
     338$arquived_messages = array(true => lang("Copy"), false => lang("Move")); 
     339 
    312340create_select_box('Delete trash messages after how many days?','delete_trash_messages_after_n_days',$default,'Delete automatically the messages in trash folder in how many days'); 
    313341create_check_box('Would you like to use local messages?','use_local_messages','Enabling this options you will be able to store messages in your local computer'); 
    314 create_check_box('Would you like to keep archived messages?','keep_archived_messages','After store email in your local computer delete it from server'); 
     342create_select_box('Desired action to archive messages to local folders','keep_archived_messages',$arquived_messages,'After store email in your local computer delete it from server'); 
     343create_check_box('Automaticaly create Default local folders?','auto_create_local','Enable this option if you want to automaticaly create the Inbox, Draft, Trash and Sent folders'); 
    315344create_check_box('Show previous message, after delete actual message?','delete_and_show_previous_message','Enable this option if you want to read the next message everytime you delete a message'); 
    316345create_check_box('Do you wanna receive an alert for new messages?','alert_new_msg','Everytime you receive new messages you will be informed'); 
     
    318347create_check_box('Do you want to use remove attachments function?','remove_attachments_function','It allow you to remove attachments from messages'); 
    319348create_check_box('Do you want to use important flag in email editor?','use_important_flag','It allow you to send emails with important flag, but you can receive unwanted messages with important flag'); 
    320  
     349create_check_box('Do you want to use SpellChecker in email editor?','use_SpellChecker','It allow you to check the spelling of your emails'); 
    321350//Use user folders from email 
     351 
     352require_once('class.imap_functions.inc.php'); 
     353$boemailadmin = CreateObject('emailadmin.bo'); 
     354$emailadmin_profile = $boemailadmin->getProfileList(); 
     355$_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 
     356$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
     357$e_server = $_SESSION['phpgw_info']['expressomail']['email_server']; 
     358$imap = CreateObject('expressoMail1_2.imap_functions'); 
     359 
    322360if ($type != "" && $type != "user"){ 
     361         
    323362        $trash = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']; 
    324363        $drafts = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']; 
     
    328367        $default = Array( 
    329368                'INBOX' =>      lang('INBOX'),  
    330                 'INBOX'.$delimiter.$trash => $trash,   
    331                 'INBOX'.$delimiter.$drafts => $drafts, 
    332                 'INBOX'.$delimiter.$spam => $spam, 
    333                 'INBOX'.$delimiter.$sent => $sent 
     369                'INBOX' . $imap->imap_delimiter . $drafts => lang($drafts), 
     370                'INBOX' . $imap->imap_delimiter . $spam => lang($spam), 
     371                'INBOX' . $imap->imap_delimiter . $trash => lang($trash),   
     372                'INBOX' . $imap->imap_delimiter . $sent => lang($sent) 
    334373        ); 
    335374} 
    336375else 
    337376{ 
    338 require_once('class.imap_functions.inc.php'); 
    339 $boemailadmin = CreateObject('emailadmin.bo'); 
    340 $emailadmin_profile = $boemailadmin->getProfileList(); 
    341 $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 
    342 $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
    343 $e_server = $_SESSION['phpgw_info']['expressomail']['email_server']; 
    344 $imap = CreateObject('expressoMail1_2.imap_functions'); 
    345377$save_in_folder_selected = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']; 
    346378 
     
    378410} 
    379411create_select_box('Save sent messages in folder','save_in_folder',$default,'Save automatically sent messages in selected folder'); 
     412create_check_box('Show TO: in place of FROM: only in Automatic SEND folder','from_to_sent','Show TO: in place of FROM: only in Automatic SEND folder'); 
     413 
     414 
    380415create_check_box('Hide menu folders?','hide_folders','You can use it if your screen does not have good resolution'); 
     416 
     417 
     418$default =  array( 
     419    '50'    => '50', 
     420    '100'   => '100', 
     421    '150'   => '150', 
     422    '200'   => '200', 
     423    '300'   => '300', 
     424    '400'   => '400', 
     425    '65536' => lang('unlimited') 
     426); 
     427 
     428create_select_box('What is the maximum number of results in an e-mail search?','search_result_number',$default,''); 
    381429 
    382430$default =  array( 
     
    390438create_select_box('What is the minimum number of characters in searching contacts?','search_characters_number',$default,'what is the minimum number of characters in searching contacts'); 
    391439 
    392 $default = array( 
     440        $default = array(  
    393441        '20' => lang('normal'), 
    394442        '30' => lang('medium'), 
    395443        '40' => lang('big') 
    396 ); 
     444        ); 
     445 
    397446 
    398447create_select_box('What is the height of the lines in the list of messages?','line_height',$default,''); 
     448create_check_box('Increases th maximum size of show messages?','max_msg_size','Increases the maximum size of show emails from 100kb to 1mb'); 
    399449create_check_box('Use dynamic contacts?','use_dynamic_contacts','Store your\'s most used contacts'); 
    400 create_check_box('Use shortcuts?','use_shortcuts',''); 
     450create_check_box('Use shortcuts?','use_shortcuts','n key (Open new message)<br>ESC key (Close tab)<br>i key (print)<br>e key (forward)<br>r key (reply)<br>DELETE key (delete the current message)<br>Ctrl + up (go to previous message)<br>Ctrl + down (go to next message)<br>Shift + up or down (select multiple messages)<br>F9  key (search at catalog)<br>'); 
    401451create_check_box('Auto save draft','auto_save_draft','When you are away from computer it saves automatically the message you are writing'); 
     452create_check_box('Send messages with return recipient option by default','return_recipient_deafault','With this option every new email will get the return recipient option marked'); 
     453 
     454unset($default); 
     455$functions = new functions(); 
     456$zones = $functions->getTimezones(); 
     457$default = array(sprintf("%s", array_search('America/Sao_Paulo', $zones)) => 'America/Sao_Paulo'); 
     458create_select_box('What is your timezone?', 'timezone', $zones, 'The Timezone you\'re in.', $default); 
     459 
     460$default =  array( 
     461    '1' => lang('contacts'), 
     462    '2' => lang('email') 
     463); 
     464 
     465create_select_box('Where should the quick search be performed by default?','quick_search_default',$default,'It is where the keyword should be searched when the user executes a quick search.'); 
     466 
    402467$default =  array( 
    403468        '65536' => lang('unlimited'), 
     
    416481                    'personal'   => lang("Personal catalog"),  
    417482                    'all' => lang("All catalogs")  
    418                 );  
    419                   
    420         create_select_box('The dynamic search will use the catalog','catalog_search',$default,'Seleciona o catálogo que será usado para fazer a busca');  
    421  
     483); 
     484 
     485create_select_box('The dynamic search will use the catalog','catalog_search',$default,'Seleciona o catálogo que será usado para fazer a busca'); 
     486$default = false; 
     487create_check_box('Display default fields on the quick search screen?','default_fields_quick_search', $default, 'Mostrar o nome, email e telefone do contato por padrão'); 
    422488 
    423489 
     
    441507        'html' => lang('rich text') 
    442508); 
     509create_check_box('Auto close the first tab on reaching the maximum number of tabs?','auto_close_first_tab',''); 
    443510create_check_box('Insert signature automatically in new messages?','use_signature',''); 
    444511 
     512$default = array('0' => lang('nested in the same tab of the main message'), '1' => lang('in your own tab, one for each attached message')); 
     513create_select_box('Nested messages are shown','nested_messages_are_shown', $default,'How to show nested messages'); 
     514 
     515$default = array( 
     516    'Arial'     => 'Arial', 
     517    'Verdana'   => 'Verdana', 
     518    'Times new roman'   => 'Times New Roman', 
     519    'Tahoma'   => 'Tahoma', 
     520); 
     521create_select_box( 'Default font editor' , 'font_family_editor' , $default ); 
     522 
     523$default = array( 
     524    '8pt'     => '8', 
     525    '9pt'     => '9', 
     526    '10pt'    => '10', 
     527    '11pt'    => '11', 
     528    '12pt'    => '12', 
     529    '14pt'    => '14', 
     530    '16pt'    => '16', 
     531    '18pt'    => '18', 
     532    '20pt'    => '20', 
     533    '22pt'    => '22', 
     534    '24pt'    => '24', 
     535    '26pt'    => '26', 
     536    '28pt'    => '28', 
     537    '36pt'    => '36', 
     538    '48pt'    => '48', 
     539    '72pt'    => '72', 
     540); 
     541 
     542create_select_box( 'Default font size editor' , 'font_size_editor' , $default ); 
     543 
    445544if ($type == 'user' || $type == ''){ 
    446  
    447         global $prefs; 
    448 //      create_select_box('Signature Type','type_signature',$default,'','','','onchange="javascript:changeType(this.value);"'); 
    449  
    450545        $vars = $GLOBALS['phpgw']->preferences->user['expressoMail']; 
    451546 
    452 create_html_code("signature","<script src='../library/jquery/jquery.js' language='javascript'></script>  
     547 
     548        create_html_code("signature","<script src='../library/jquery/jquery.js' language='javascript'></script> 
    453549                            <script src='../library/ckeditor/ckeditor.js' language='javascript'></script>  
    454550                            <script src='../library/ckeditor/adapters/jquery.js' language='javascript'></script> 
     551             
    455552        <input type='hidden' id='counter' value='0'> 
    456553        <input type='hidden' id='signatures' name='user[signatures]' value='". $vars['signatures']."'> 
    457554        <input type='hidden' id='signature_default' name='user[signature_default]' value='".$vars['signature_default']."'> 
    458         <input type='hidden' id='type_signature' name='user[type_signature]' value='".$vars['type_signature']."'> 
    459555        <input type='hidden' id='signature' name='user[signature]' value='","' > 
    460556        <input type='hidden' id='signature_types' name='user[signature_types]' value='".$vars['signature_types']."'> 
     
    503599 
    504600        document.getElementById( 'counter' ).value = ++counter; 
    505         } 
     601} 
    506602 
    507603function removeSignature( el ) 
     
    513609 
    514610    return( false ); 
    515             } 
     611} 
    516612</script> 
    517613<input id='add_signature' type='button' onclick='addSignature();' value='Adicionar Assinatura'> 
    518614"); 
    519         }else{ 
    520         create_select_box('Signature Type','type_signature',$default,'','','',''); 
    521  
    522615} 
    523616?> 
Note: See TracChangeset for help on using the changeset viewer.