- Timestamp:
- 10/15/12 16:02:25 (12 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/hook_settings.inc.php
r6996 r7420 514 514 515 515 create_check_box('Would you like to have a read receipt option to read messages?','confirm_read_message',''); 516 create_check_box('Would you like to activate the alert for message attachment?','alert_message_attachment',''); 516 517 517 518 $default = array( -
trunk/expressoMail1_2/index.php
r7414 r7420 234 234 $_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; 235 235 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['confirm_read_message'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['confirm_read_message'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['confirm_read_message'] : 0; 236 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['alert_message_attachment'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['alert_message_attachment'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['alert_message_attachment'] : 0; 236 237 // ACL for block edit Personal Data. 237 238 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['enable_quickadd_telephonenumber'] = $current_config['expressoMail_enable_quickadd_telephonenumber'] == 'true' ? $current_config['expressoMail_enable_quickadd_telephonenumber'] : ""; … … 331 332 var token_param = "'.$var_tokens.'"; 332 333 var locale = "'.$GLOBALS['phpgw']->common->getPreferredLanguage().'"; 334 var language = "'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'"; 333 335 var defaultCalendar = "'. (isset($config['defaultCalendar']) ? $config['defaultCalendar'] : "calendar" ) .'"; 334 336 $("#sideboxdragarea").hide(); -
trunk/expressoMail1_2/js/main.js
r7414 r7420 2988 2988 } 2989 2989 2990 /* 2991 * Método que verifica se existe algum item de 'words' em 'body'. 2992 * Se houver, retorna a primeira ocorrência encontrada de words, caso contrário retorna false. 2993 */ 2994 function verifyBodyWords(body, words) { 2995 for(i = 0; i < words.length; i++) { 2996 if(body.search(words[i]) != -1) { 2997 return words[i]; 2998 } 2999 } 3000 return false; 3001 } 3002 3003 2990 3004 function send_message(ID, folder, folder_name){ 2991 if(!zebraDiscardEventDialog && $('#fileupload_msg'+ID).find('.att-box-loading').length ) 2992 { 2993 zebraDiscardEventDialog = true; 2994 window.setTimeout(function() { 2995 $.Zebra_Dialog('Existem anexos sendo enviados para o servidor. Caso envie sua mensagem agora estes arquivos serão perdidos.', { 2996 'type': 'question', 2997 'overlay_opacity': '0.5', 2998 'buttons': ['Descartar anexos e enviar', 'Continuar editando e esperar anexos'], 2999 'width' : 500, 3000 'onClose': function(clicked) { 3001 if(clicked == 'Descartar anexos e enviar' ){ 3002 $.each($('#fileupload_msg'+ID).find('.att-box'), function(index, value){ 3003 if($(value).find(".att-box-loading").length) 3004 $(value).find('.att-box-delete').trigger("click"); 3005 }); 3006 send_valided_message(ID, folder, folder_name); 3007 } 3008 window.setTimeout(function() { 3009 zebraDiscardEventDialog = false; 3010 }, 500); 3011 } 3012 }) 3013 }, 300); 3014 }else 3015 send_valided_message(ID, folder, folder_name); 3005 var content_body = RichTextEditor.getData('body_'+ID); 3006 /* 3007 Funcionalidade que verifica se o usuário escreveu a palavra anexo no corpo da mensagem e não anexou nenhum arquivo. 3008 Esta funcionalidade é ativada nas preferências do módulo ExpressoMail. 3009 */ 3010 /* Lista de palavras que vão ser procuradas no corpo do email, referente às variantes da palavra anexo em português, inglês e espanhol. */ 3011 if(language == "pt-br") //Português brasileiro 3012 var words = ['anexo', 'anexos', 'anexada', 'anexado', 'anexei', 'anexando']; 3013 else if(language == "es") //Espanhol 3014 var words = ['adjunto', 'adjuntos', 'adjuntado']; 3015 else //Inglês ('en') 3016 var words = ['attach', 'attachment', 'attached', 'annex', 'appending']; 3017 3018 if($('#fileupload_msg'+ID).find('.att-box').length == 0 && preferences.alert_message_attachment == '1' ) { 3019 var bodyWord = verifyBodyWords(content_body, words); 3020 if(bodyWord) { 3021 $.Zebra_Dialog(get_lang('You wrote "%1" in your message, but there are no files attached. Send it anyway?', bodyWord), { 3022 'type': 'question', 3023 'overlay_opacity': '0.5', 3024 'buttons': ['OK', 'Cancelar'], 3025 'width' : 500, 3026 'onClose': function(clicked) { 3027 if(clicked == 'OK' ){ 3028 send_valided_message(ID, folder, folder_name); 3029 return; 3030 } else { 3031 return; 3032 } 3033 } 3034 }); 3035 } 3036 else 3037 send_valided_message(ID, folder, folder_name); 3038 } 3039 else if(!zebraDiscardEventDialog && $('#fileupload_msg'+ID).find('.att-box-loading').length) 3040 { 3041 zebraDiscardEventDialog = true; 3042 window.setTimeout(function() { 3043 $.Zebra_Dialog('Existem anexos sendo enviados para o servidor. Caso envie sua mensagem agora estes arquivos serão perdidos.', { 3044 'type': 'question', 3045 'overlay_opacity': '0.5', 3046 'buttons': ['Descartar anexos e enviar', 'Continuar editando e esperar anexos'], 3047 'width' : 500, 3048 'onClose': function(clicked) { 3049 if(clicked == 'Descartar anexos e enviar' ){ 3050 $.each($('#fileupload_msg'+ID).find('.att-box'), function(index, value){ 3051 if($(value).find(".att-box-loading").length) 3052 $(value).find('.att-box-delete').trigger("click"); 3053 }); 3054 send_valided_message(ID, folder, folder_name); 3055 } 3056 window.setTimeout(function() { 3057 zebraDiscardEventDialog = false; 3058 }, 500); 3059 } 3060 }) 3061 }, 300); 3062 }else { 3063 send_valided_message(ID, folder, folder_name); 3064 } 3016 3065 } 3017 3066 -
trunk/expressoMail1_2/setup/phpgw_pt-br.lang
r7414 r7420 626 626 Voided message expressoMail1_2 pt-br Mensagem violada 627 627 Would you like to send the read receipt? expressoMail1_2 pt-br Deseja enviar a mensagem de confirmação de leitura? 628 Would you like to activate the alert for message attachment? expressoMail1_2 pt-br Exibir confirmação de envio de mensagem quando houver a palavra 'anexo' no corpo do email e não houver anexos? 628 629 Warning: Your Mailbox is almost full! expressoMail1_2 pt-br Aviso: Sua caixa postal está quase cheia! 629 630 was succefully removed expressoMail1_2 pt-br foi removida com sucesso … … 674 675 You must wait while the messages will be exported... expressoMail1_2 pt-br Aguarde enquanto as mensagens serão exportadas... 675 676 You must wait while the messages will be imported... expressoMail1_2 pt-br Aguarde enquanto as mensagens serão importadas... 677 You wrote "%1" in your message, but there are no files attached. Send it anyway? expressoMail1_2 pt-br Você escreveu "%1" na sua mensagem, mas não há arquivos anexados. Enviar assim mesmo? 676 678 Your Mailbox is 100% full! You must free more space or will not receive messages. expressoMail1_2 pt-br Sua caixa postal está 100% cheia! Libere espaço ou não irá receber mensagens. 677 679 Your mailbox is shared with expressoMail1_2 pt-br Sua caixa postal está compartilhada com
Note: See TracChangeset
for help on using the changeset viewer.