Changeset 1474 for trunk/mobile
- Timestamp:
- 10/01/09 10:11:24 (15 years ago)
- Location:
- trunk/mobile
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mobile/inc/class.mobiletemplate.inc.php
r623 r1474 1 1 <?php 2 include_once(PHPGW_INCLUDE_ROOT.'/mobile/inc/class.ui_mobile.inc.php'); 2 3 class mobiletemplate 3 4 { … … 46 47 */ 47 48 private function print_navbar(){ 49 $this->ui_mobilemail = new ui_mobilemail(); 50 48 51 $this-> template->set_var('href_newmail', 'index.php?menuaction=mobile.ui_mobilemail.new_msg&clk=01'); 49 52 $this-> template->set_var('lang_newmail', lang('Create mail')); 50 53 $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.mail_list"); 51 54 $this-> template->set_var('lang_email', lang('E-mail')); 55 56 $save_in_folder = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] : "-1"; 57 $save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 58 $save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 59 $save_in_folder = $save_in_folder == '' ? 'INBOX/Sent':$save_in_folder; 60 $folder_number = $this->ui_mobilemail->get_folder_number($save_in_folder); 61 62 $this-> template->set_var('href_sent', "index.php?menuaction=mobile.ui_mobilemail.mail_list&folder=".$folder_number); 63 $this-> template->set_var('lang_sent', str_replace('*','',lang(str_replace('INBOX/','',$save_in_folder)))); 64 52 65 $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); 53 66 $this-> template->set_var('lang_calendar', lang('Calendar')); -
trunk/mobile/inc/class.ui_mobilecc.inc.php
r623 r1474 3 3 4 4 var $nextmatchs; 5 var $bo; 5 var $bo; 6 6 var $page_info = array ( 7 7 'actual_catalog' => false, … … 195 195 if(!$from_calendar) 196 196 $p->set_file(Array('entries' => 'cc_main.tpl')); 197 else 197 else if($from_calendar =='mobilecalendar') 198 198 $p->set_file(Array('entries' => 'add_participants.tpl')); 199 199 else 200 $p->set_file(Array('entries' => 'add_recipients.tpl')); 201 200 202 $p->set_block('entries','body'); 201 203 $p->set_block('entries','people_header'); … … 213 215 'lang_name' => lang("Name"), 214 216 'lang_catalog' => lang("Catalog"), 215 'lang_ buscar' => lang("Search")217 'lang_search' => lang("Search") 216 218 ); 217 219 $p->set_var($texts); … … 219 221 $p->set_var('lang_already_addeds:',lang('already_addeds:')); 220 222 221 if($from_calendar )223 if($from_calendar == 'mobilecalendar') 222 224 $p->set_var('lang_continue_scheduling',lang('continue scheduling')); 225 else if($from_calendar == 'mobilemail'){ 226 $p->set_var('lang_continue',lang('continue')); 227 } 223 228 224 229 /////////// Preenche o combo de catálogos … … 227 232 $branchs = $bo_cc->get_catalog_tree(); 228 233 229 if(!$from_calendar ) {234 if(!$from_calendar || $from_calendar == 'mobilemail') { 230 235 foreach($branchs as $branch) { //Pego apenas a estrutura dos ramos vindos do banco, pois as do ldap estão confusas e com dados aparentemente inconsistentes. 231 236 if($branch['class']!="bo_global_ldap_catalog" && $branch['class']!="bo_catalog_group_catalog") { … … 260 265 } 261 266 262 if(!$from_calendar ) {267 if(!$from_calendar || $from_calendar == 'mobilemail') { 263 268 $branchs = $bo_ldap_manager->get_external_ldap_sources(); 264 269 if(is_array($branchs)) foreach($branchs as $id=>$branch) { //Ldaps externos … … 366 371 } 367 372 if(!$from_calendar) 368 $var['form_action'] = "index.php?menuaction=mobile. ui_mobilemail.new_msg";369 else {373 $var['form_action'] = "index.php?menuaction=mobile.mobilemail.new_msg"; 374 else if($from_calendar == 'mobilecalendar'){ 370 375 $var['id_contact'] = $entry['uidnumber'][0].'U'; 371 376 $var['form_action'] = "index.php?menuaction=mobile.ui_mobilecalendar.add_participant"; 377 }else{ 378 $var['id_contact'] = $entry['uidnumber'][0].'U'; 379 $var['form_action'] = "index.php?menuaction=mobile.ui_mobilemail.add_recipient"; 372 380 } 373 381 $var['lang_select'] = lang("select"); … … 378 386 } 379 387 380 if($from_calendar ) {381 $p->set_var('lang_choose_the_ participants',lang("choose the participants"));382 $participants = $_SESSION['mobile_ calendar'];383 @reset($participants);384 if(count($participants))while (($participant = current($participants))!==false) {388 if($from_calendar == 'mobilemail') { 389 $p->set_var('lang_choose_the_recipients',lang("choose the recipients")); 390 $participants = $_SESSION['mobile_mail']; 391 reset($participants); 392 while (($participant = current($participants))!==false) { 385 393 $p->set_var('row_contact_name',$participant); 386 394 if(next($participants)!==false) … … 390 398 $p->parse('rows_addeds','row_addeds',True); 391 399 } 400 }else if($from_calendar == 'mobilecalendar'){ 401 $p->set_var('lang_choose_the_participants',lang("choose the participants")); 402 $participants = $_SESSION['mobile_calendar']; 403 reset($participants); 404 while (($participant = current($participants))!==false) { 405 $p->set_var('row_contact_name',$participant); 406 if(next($participants)!==false) 407 $p->set_var('row_separate',','); 408 else 409 $p->set_var('row_separate','.'); 410 $p->parse('rows_addeds','row_addeds',True); 411 } 392 412 } 393 413 -
trunk/mobile/inc/class.ui_mobilemail.inc.php
r1453 r1474 29 29 'delete_msg' => True, 30 30 'confirm_delete_msg' => True, 31 'init_schedule' => true, 32 'redirect' => true, 33 'add_recipients' => true, 34 'add_recipient' => true, 31 35 ); 32 36 … … 187 191 188 192 193 $p->set_var('reply_all_text', lang("Reply to all")); 194 $p->set_var('forward_text', lang("Forward")); 195 189 196 $p->set_var('reply_text', lang("Reply")); 190 197 $p->set_var('Delete', lang("Delete")); … … 193 200 $p->set_var('reply', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder"); 194 201 $p->set_var('delete', "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder"); 202 $p->set_var('reply_all', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&reply_all=true"); 203 $p->set_var('forward', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&forward=true"); 195 204 if (!empty($msg['attachments']) && !empty($msg['attachments']['names'])) 196 205 { … … 243 252 // TODO: Talvez seja melhor voltar sempre para o Inbox e primeira página 244 253 function index() 245 { 254 { 246 255 $this->print_folder_selection(); 247 256 $this->mail_list(); … … 250 259 } 251 260 252 function load_session(){ 261 function load_session(){ 253 262 /************************************\ 254 263 * Inicialização do expressoMail1_2 * … … 292 301 293 302 include("../expressoMail1_2/inc/load_lang.php"); 294 303 295 304 } 296 305 … … 302 311 function print_folder_selection() 303 312 { 304 305 313 $p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 306 314 $p->set_file( … … 311 319 $p->set_block('mobilemail_t', 'inbox_folder_list'); 312 320 $p->set_var('lang_folder', lang('Folder')); 313 $p->set_var('lang_inbox', lang('Inbox')); 321 322 $folder_number = $this->get_folder_number($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']); 323 $save_in_folder = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']; 324 $save_in_folder = str_replace("*","",lang(str_replace("INBOX/","",$save_in_folder))); 325 if(!$this->current_folder == 0){ 326 $p->set_var('lang_inbox', $save_in_folder.' :: <a title="'.lang('Inbox').'" href="index.php?menuaction=mobile.ui_mobilemail.mail_list&folder=0">'.lang('Inbox').'</a>'); 327 }else{ 328 $p->set_var('lang_inbox', lang('Inbox').' :: <a title="'.$save_in_folder.'" href="index.php?menuaction=mobile.ui_mobilemail.mail_list&folder='.$folder_number.'">'.$save_in_folder.'</a>'); 329 } 330 314 331 //$p->set_var('folder_items', $folder_items); 315 332 $p->parse('mobilemail_t', 'inbox_folder_list'); … … 385 402 */ 386 403 function mail_list() 387 { 388 404 { 405 406 if($_GET['folder']){ 407 $this->current_folder = $_GET['folder']; 408 }else{ 409 $this->current_folder = 0; 410 } 411 $this->print_folder_selection(); 389 412 $this->messages_per_page = 390 413 isset($GLOBALS['phpgw_info']['user']['preferences']['mobile']['max_message_per_page'])? … … 475 498 $p->set_block('mobilemail_t', 'mail_list'); 476 499 $p->set_var('mail_rows', $mail_rows); 500 477 501 //$p->pfp('out', 'mail_list'); 478 502 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out', 'mail_list')); … … 688 712 if($_GET['clk']) 689 713 { 690 714 $p->set_var('field_add_user', '<p> <input type="submit" name="action" value="'.lang("Add Recipient").'"></p>'); 691 715 $p->set_var('to_label', lang("To")); 692 716 $p->set_var('to', ""); … … 711 735 $p->set_var('read_only', 'readonly'); 712 736 } 713 else 714 { 715 737 else if($_GET['reply_all']){ 738 $reply_to_all = $msg['from']['full']; 739 $reply_to_all = $msg['toaddress2'] ? $reply_to_all.','.$msg['toaddress2']:$reply_to_all; 740 $reply_to_all = $msg['cc'] ? $reply_to_all.','.$msg['cc']:$reply_to_all; 741 $reply_to_all = $msg['bcc'] ? $reply_to_all.','.$msg['bcc']:$reply_to_all; 742 $names = implode(',<br/>',explode(',',$reply_to_all)); 743 744 $array_emails = explode(',',$reply_to_all); 745 $reply_to_all =''; 746 foreach ($array_emails as $index => $email){ 747 $flag = preg_match('/<(.*?)>/',$email,$reply); 748 $reply_to_all .= $flag == 0 ? $email.', ':$reply[1].', '; 749 } 750 751 $p->set_var('to_label', lang("To")); 752 $p->set_var('to', $reply_to_all); 753 754 $p->set_var('to_mail', $_GET['input_to_mail']); 755 756 $p->set_var('subject_label', lang("Subject")); 757 $p->set_var('subject', "Re:" . $msg['subject']); 758 759 $p->set_var('msg_number', $_GET['msg_number']); 760 $p->set_var('msg_folder', $_GET['msg_folder']); 761 } 762 else if($_GET['user_add']){ 763 $p->set_var('to_label', lang("To")); 764 765 $listMail = implode(',',$_SESSION['mobile_mail']); 766 767 $p->set_var('field_add_user', '<p> <input type="submit" name="action" value="'.lang("Add Recipient").'"></p>'); 768 $p->set_var('to', $listMail); 769 $p->set_var('to_mail', $listMail); 770 $p->set_var('subject_label', lang("Subject")); 771 $p->set_var('subject', $_SESSION['subject_mail']); 772 $p->set_var('body_value', $_SESSION['body_mail']); 773 774 $p->set_var('msg_number', $_GET['msg_number']); 775 $p->set_var('msg_folder', $_GET['msg_folder']); 776 777 } 778 else if($_GET['forward']){ 779 $p->set_var('field_add_user', '<p> <input type="submit" name="action" value="'.lang("Add Recipient").'"></p>'); 780 $p->set_var('from_label', lang("From")); 781 $p->set_var('from', $msg['toaddress2']); 782 783 $p->set_var('to_label', lang("To")); 784 $mail_to = $msg['from']['full']; 785 786 $p->set_var('subject_label', lang("Subject")); 787 $p->set_var('subject', "Enc:" . $msg['subject']); 788 $p->set_var('body_value', strip_tags($msg['body'])); // Usa a função strip_tags() para filtrar 789 // as tags que estão presentes no corpo do e-mail. 790 791 $p->set_var('msg_number', $_GET['msg_number']); 792 $p->set_var('msg_folder', $_GET['msg_folder']); 793 794 } 795 else{ 716 796 $p->set_var('from_label', lang("From")); 717 797 $p->set_var('from', $msg['toaddress2']); … … 730 810 $p->set_var('read_only', "readonly"); 731 811 } 732 812 $_SESSION['mobile_mail'] = Array(); 733 813 $p->set_var('send_label', lang("Send")); 734 735 $p->set_var('form_action', "index.php?menuaction=mobile.ui_mobilemail.send_mail"); 814 $p->set_var('form_action', "index.php?menuaction=mobile.ui_mobilemail.redirect"); 736 815 737 816 /*$p->pfp('out', 'begin_form'); … … 739 818 $p->pfp('out', 'text'); 740 819 $p->pfp('out', 'hidden_area'); 741 $p->pfp('out', 'end_form'); 742 */820 $p->pfp('out', 'end_form');*/ 821 743 822 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out', 'begin_form')); 744 823 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out', 'msg_header')); … … 875 954 876 955 } 956 957 function get_folder_number($folder_name){ 958 $i = 0; 959 foreach($this->folders as $folder){ 960 if($folder['folder_id'] == $folder_name){ 961 return $i; 962 } 963 $i++; 964 } 965 return 0; 966 } 877 967 878 968 function retorna() 879 969 { 880 970 971 } 972 973 function init_schedule() { 974 975 if($_POST['input_to'] != '' && !is_null($_POST['input_to'])) 976 array_push($_SESSION['mobile_mail'],$_POST['input_to']); 977 $_SESSION['subject_mail'] = $_POST['input_subject']; 978 $_SESSION['body_mail'] = $_POST['body']; 979 $this->add_recipients(); 980 } 981 982 983 function add_recipients() { 984 985 $ui_cc = CreateObject('mobile.ui_mobilecc'); 986 $ui_cc->contacts_list('mobilemail'); 987 } 988 989 function add_recipient() { 990 991 $participants = $_SESSION["mobile_mail"]; 992 993 if(!is_array($participants)) 994 $participants = array(); 995 996 $participants[$_GET['cn']] = $_GET['mail']; 997 998 $_SESSION["mobile_mail"] = $participants; 999 $this->add_recipients(); 1000 } 1001 1002 function redirect() { 1003 if($_POST[action] == lang("Send")){ 1004 $this->send_mail(); 1005 }else{ 1006 $this->init_schedule(); 1007 } 881 1008 } 882 1009 -
trunk/mobile/setup/phpgw_pt-br.lang
r1453 r1474 1 Add Recipient mobile pt-br Adicionar Destinatário 1 2 Calendar mobile pt-br Agenda 2 3 contact center mobile pt-br Endereços 4 continue mobile pt-br Continuar 3 5 Do you like to delete this message? mobile pt-br Deseja excluir esta mensagem? 4 6 download attachs mobile pt-br Deseja baixar anexos em e-mails? 5 7 Download mobile pt-br Baixar 8 Drafts mobile pt-br Rascunhos 6 9 E-mail mobile pt-br Caixa de Entrada 7 10 From mobile pt-br De 11 Forward mobile pt-br Encaminhar 8 12 Logout mobile pt-br Sair 9 13 To mobile pt-br Para … … 11 15 Send mobile pt-br Enviar 12 16 Reply mobile pt-br Responder 17 Reply to All mobile pt-br Responder a Todos 13 18 Folder mobile pt-br Pasta 14 19 of mobile pt-br de … … 37 42 Start Date/Time mobile pt-br Data/Hora Início 38 43 End Date/Time mobile pt-br Data/Hora Término 39 hedule mobile pt-br Agendar44 schedule mobile pt-br Agendar 40 45 continue scheduling mobile pt-br Continuar o agendamento 41 46 already_addeds: mobile pt-br Já adicionados: … … 47 52 your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: mobile pt-br Horário sugerido: <B> %1 - %2 </B> está em conflito com as seguintes entradas no calendário: 48 53 scheduling conflict mobile pt-br Conflito de agendamento 54 Sent mobile pt-br Enviados 49 55 ignore conflict mobile pt-br Ignorar conflito 50 56 re-edit event mobile pt-br Re-Editar evento … … 53 59 the search argument must have at least 4 digits mobile pt-br O argumento da busca deve possuir pelo menos 4 dígitos 54 60 choose the participants mobile pt-br Escolha os participantes 61 choose the recipients mobile pt-br Escolha os destinatários 55 62 Added mobile pt-br Adicionado 56 63 To See Commitment mobile pt-br Para ver compromisso 57 64 To accept mobile pt-br Aceitar 58 65 To reject mobile pt-br Rejeitar 66 Trash mobile pt-br Lixeira 59 67 alarm mobile pt-br Alarme 60 68 To Delegate mobile pt-br Delegar 69 No matches found mobile pt-br Contato não localizado 61 70 The message was moved to trash mobile pt-br A mensagem foi movida para a lixeira. 62 71 What is the maximum number of messages per page? mobile pt-br Qual o número máximo de mensagens por página? 63 72 Option mobile pt-br Opção 64 73 Value mobile pt-br Valor 74 Search mobile pt-br Procurar -
trunk/mobile/templates/default/home.tpl
r623 r1474 18 18 :: <a href="{href_newmail}">{lang_newmail}</a> <br> 19 19 :: <a href="{href_email}">{lang_email}</a> <br> 20 :: <a href="{href_sent}">{lang_sent}</a> <br> 20 21 :: <a href="{href_calendar}">{lang_calendar}</a> <br> 21 22 :: <a href="{href_cc}">{lang_cc}</a> <br> -
trunk/mobile/templates/default/new_msg.tpl
r518 r1474 6 6 <p> <strong>{to_label}</strong>: </p> 7 7 <p> <input type="text" size="30" id="input_to" name="input_to" value='{to}' "{read_only}" /></p> 8 {field_add_user} 8 9 <p> <strong>{subject_label}</strong>: </p> 9 10 <p> <input type="text" size="30" id="input_subject" name="input_subject" value='{subject}' /></p> … … 11 12 12 13 <!-- BEGIN text --> 13 <textarea id="body" wrap="virtual" rows="8" name="body"> </textarea>14 <textarea id="body" wrap="virtual" rows="8" name="body">{body_value}</textarea> 14 15 <br /> 15 <input type="submit" id="reply_send" value="{send_label}" /> 16 17 <input type="submit" name="action" id="reply_send" value="{send_label}" /> 16 18 <!-- END text --> 17 19 -
trunk/mobile/templates/default/view_msg.tpl
r1453 r1474 14 14 15 15 <!-- BEGIN reply_msg --> 16 <p> <a href="{reply}">{reply_text}</a> <a href="{ delete}">{Delete}</a></p>16 <p> <a href="{reply}">{reply_text}</a> <a href="{reply_all}">{reply_all_text}</a><br/> <a href="{forward}">{forward_text}</a> <a href="{delete}">{Delete}</a></p> 17 17 <!-- END reply_msg --> 18 18
Note: See TracChangeset
for help on using the changeset viewer.