Changeset 3576
- Timestamp:
- 12/10/10 14:53:10 (13 years ago)
- Location:
- branches/2.2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r3575 r3576 570 570 //return $return; 571 571 }else{ 572 573 574 575 572 $return['body'] = $body; 573 $return['attachments'] = $return_get_body['attachments']; 574 $return['thumbs'] = $return_get_body['thumbs']; 575 $return['signature'] = $return_get_body['signature']; 576 576 } 577 577 -
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r3571 r3576 86 86 87 87 88 $this-> template->set_var('lang_logout', lang('logout')); 88 89 $this-> template->set_var('lang_back', lang('Back')); 89 90 $this-> template->set_var('lang_home', lang('home')); … … 91 92 $this-> template->set_var('lang_contacts', lang('Contact Center')); 92 93 $this-> template->set_var('lang_calendar', lang('Calendar')); 94 $this-> template->set_var('href_logout', 'login.php?cd=1'); 95 $this-> template->set_var('href_back', 'javascript:history.back()'); 93 96 $this-> template->set_var('href_cc', 'index.php?menuaction=mobile.ui_mobilecc.contacts_list'); 94 97 $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0"); 95 98 $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); 96 99 $this-> template->set_var('href_home', "index.php?menuaction=mobile.ui_home.index"); 97 98 100 } 99 101 -
branches/2.2/mobile/inc/class.ui_mobilemail.inc.php
r3573 r3576 33 33 'add_recipient' => true, 34 34 'list_folders' => true, 35 'save_draft' => true 35 'save_draft' => true, 36 'mark_message_with_flag' => true 36 37 ); 37 38 38 39 var $template; 40 var $common; 39 41 var $folders; // Pastas imap 40 42 var $current_folder; // Pasta corrente … … 54 56 $this-> load_session(); 55 57 $this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 58 $this->common = CreateObject('mobile.common_functions'); 56 59 57 60 // Recupera atributos da classe gravados na sessão … … 126 129 * @author Mário César Kolling <mario.kolling@serpro.gov.br> 127 130 */ 128 function change_folder( )129 { 130 $folder = $ _GET['folder'];131 function change_folder($params) 132 { 133 $folder = $params['folder']; 131 134 if (isset($folder)) 132 135 { … … 134 137 $this->current_page = 1; 135 138 } 136 $this->mail_list(); 139 140 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 141 $this->mail_list($params); 137 142 $this->save_session(); 138 143 } 139 144 145 function mark_message_with_flag($params=array()) 146 { 147 $return = $this->imap_functions->set_messages_flag($params); 148 149 if($return) 150 header('Location: index.php?menuaction=menuaction=mobile.ui_mobilemail.change_folder&folder='.$this->current_folder); 151 else 152 header('Location: index.php?menuaction=menuaction=mobile.ui_mobilemail.show_msg&msg_number='.$params["msgs_to_set"].'&msg_folder='.$return["msg_folder"].'&error_message='.$return["msg"]); 153 154 exit; 155 } 156 140 157 /* 141 158 * @function show_msg … … 144 161 */ 145 162 // TODO: retirar msg_folder dos parâmentros necessários no GET e usar $this->current_folder 146 function show_msg() 147 { 148 $params = array(); 149 150 //TODO: testar chamar sem parâmetros para determinar se ocorre algum problema 151 if (isset($_GET['msg_number']) && isset($_GET['msg_folder'])) 152 { 153 $params = array( 154 'msg_number' => $_GET['msg_number'], 155 'msg_folder' => $_GET['msg_folder'], 156 ); 157 } 158 163 function show_msg($params = array()) 164 { 159 165 $msg = $this->imap_functions->get_info_msg($params); 160 166 161 167 // Carrega o template 162 $this->template->set_file(array('view_msg_t' => 'view_msg.tpl')); 163 $this->template->set_block('view_msg_t', 'mail_header'); 164 $this->template->set_block('view_msg_t', 'mail_body'); 165 $this->template->set_block('view_msg_t', 'mail_footer'); 166 $this->template->set_block('view_msg_t', 'reply_msg'); 167 $this->template->set_block('view_msg_t', 'attachment_list'); 168 $this->template->set_block('view_msg_t', 'begin_anchor'); 169 $this->template->set_block('view_msg_t', 'end_anchor'); 168 $this->template->set_file(array('view_msg' => 'view_msg.tpl')); 169 $this->template->set_block('view_msg', 'page'); 170 $this->template->set_block('view_msg', 'begin_anchor'); 171 $this->template->set_block('view_msg', 'end_anchor'); 172 $this->template->set_var('lang_back', lang("back")); 173 $this->template->set_var('lang_reading_message', lang("Reading Message")); 170 174 171 175 // Define o cabeçalho do e-mail 172 $this->template->set_var(' from_label', lang("From"));176 $this->template->set_var('lang_from', lang("From")); 173 177 $this->template->set_var('from', $msg['from']['full']); 174 $this->template->set_var('to_label', lang("To")); 175 176 $this->template->set_var('subject_label', lang("Subject")); 178 $this->template->set_var('lang_cc', lang("cc")); 179 $this->template->set_var('cc', $msg['cc']); 180 $this->template->set_var('size', $this->common->borkb($msg['Size'])); 181 182 $this->template->set_var('lang_subject', lang("Subject")); 177 183 $this->template->set_var('subject', $msg['subject']); 178 $this->template->set_var('date_label', lang("Date")); 179 $this->template->set_var('date', $msg['fulldate']); 180 184 $this->template->set_var('date', $msg['msg_day']." ".$msg['msg_hour']); 181 185 182 186 // Mostra o corpo do e-mail 183 187 $this->template->set_var('body', strip_tags($msg['body'], $this->allowed_tags)); // Usa a função strip_tags() para filtrar 184 188 // as tags que estão presentes no corpo do e-mail. 185 $this->template->set_var('l ink_text', lang("Return"));186 $this->template->set_var(' link', "index.php?menuaction=mobile.ui_mobilemail.mail_list");187 188 189 $this->template->set_var(' reply_all_text', lang("Reply to all"));190 $this->template->set_var(' forward_text', lang("Forward"));191 192 $this->template->set_var(' reply_text', lang("Reply"));193 $ this->template->set_var('Delete', lang("Delete"));194 $msg_ number = $_GET['msg_number'];195 $ msg_folder = $_GET['msg_folder'];196 $this->template->set_var('reply ', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder");197 $this->template->set_var('delete ', "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder");198 $this->template->set_var('reply_all ', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply_all");199 $this->template->set_var('forward ', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=forward");189 $this->template->set_var('lang_link', lang("Return")); 190 $this->template->set_var('return_link', "index.php?menuaction=mobile.ui_mobilemail.mail_list"); 191 192 $this->template->set_var('lang_reply_all', lang("Reply to all")); 193 $this->template->set_var('lang_forward', lang("Forward")); 194 $this->template->set_var('lang_mark_as_unread', lang("mark as unread")); 195 $this->template->set_var('lang_reply', lang("Reply")); 196 $this->template->set_var('lang_delete', lang("Delete")); 197 $msg_number = $params['msg_number']; 198 $msg_folder = $params['msg_folder']; 199 $this->template->set_var('mark_as_unread_link', "index.php?menuaction=mobile.ui_mobilemail.mark_message_with_flag&flag=unseen&msgs_to_set=$msg_number&msg_folder=$msg_folder"); 200 $this->template->set_var('reply_link', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder"); 201 $this->template->set_var('delete_link', "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder"); 202 $this->template->set_var('reply_all_link', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply_all"); 203 $this->template->set_var('forward_link', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=forward"); 200 204 if (!empty($msg['attachments'])) 201 205 { … … 209 213 lang('Download').": ".$attach['name']."</a><br>"; 210 214 } 211 $this->template->set_var('attachment_message', $attachs); 212 } 213 //$this->template->set_var('attachment_message', lang('This message have attachment(s)')); 215 } 216 $this->template->set_var('attachment_message', $attachs); 214 217 } 215 218 else … … 220 223 $this->template->parse('view_msg_t', 'end_anchor'); 221 224 $this->template->parse('view_msg_t', 'begin_anchor'); 222 //$this->template->pfp('view_msg_t', 'mail_header'); 223 /*$this->template->pfp('out', 'mail_header'); 224 //$this->template->pfp('view_msg_t', 'mail_body'); 225 $this->template->pfp('out', 'mail_body'); 226 //$this->template->pfp('view_msg_t', 'attachment_list'); 227 $this->template->pfp('out', 'attachment_list'); 228 //$this->template->pfp('view_msg_t', 'mail_footer'); 229 $this->template->pfp('out', 'reply_msg'); 230 //$this->template->pfp('out', 'mail_footer');*/ 231 232 //$this->template->pfp('view_msg_t', 'mail_header'); 233 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'mail_header')); 234 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'mail_body')); 235 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'attachment_list')); 236 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'reply_msg')); 225 226 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 227 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page')); 237 228 } 238 229 … … 283 274 $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter']; 284 275 285 echo '<script> var array_lang = new Array();var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' </script>';276 // echo '<script> var array_lang = new Array();var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' </script>'; 286 277 287 278 // End Set Anti-Spam options. … … 293 284 $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] : "Sent"; 294 285 295 include("../expressoMail1_2/inc/load_lang.php"); 296 286 // include("../expressoMail1_2/inc/load_lang.php"); 297 287 } 298 288 … … 376 366 * @author Mário César Kolling <mario.kolling@serpro.gov.br> 377 367 */ 378 function mail_list( )368 function mail_list($params) 379 369 { 380 370 381 if($ _GET['folder']){382 $this->current_folder = $ _GET['folder'];371 if($params['folder']){ 372 $this->current_folder = $params['folder']; 383 373 }else{ 384 374 $this->current_folder = 0; … … 391 381 if (!isset($this->number_of_messages)) 392 382 { 393 $params = array(383 $params_num_msg = array( 394 384 'folder' => $this->folders[$this->current_folder]['folder_id'], 395 385 ); 396 $this->number_of_messages = $this->imap_functions->get_num_msgs($params );386 $this->number_of_messages = $this->imap_functions->get_num_msgs($params_num_msg); 397 387 } 398 388 … … 402 392 403 393 if($_POST["searchEmail"]){ 404 $params = array(405 'filter' 394 $params_mobile_search = array( 395 'filter' => $_POST["searchEmail"] 406 396 ); 407 397 408 $messages = $this->imap_functions->mobile_search($params );398 $messages = $this->imap_functions->mobile_search($params_mobile_search); 409 399 }else{ 410 $params = array(400 $params_get_range_msgs = array( 411 401 'folder' => $this->folders[$this->current_folder]['folder_id'], 412 402 'msg_range_begin' => $this->current_page * $this->messages_per_page - ($this->messages_per_page - 1), … … 416 406 ); 417 407 418 $messages = $this->imap_functions->get_range_msgs2($params );408 $messages = $this->imap_functions->get_range_msgs2($params_get_range_msgs); 419 409 } 420 410 $this->print_mails_list($messages); 421 411 $this->print_page_navigation($this->pages, $this->current_page); 422 423 412 } 424 413 -
branches/2.2/mobile/setup/phpgw_pt-br.lang
r3573 r3576 29 29 more mobile pt-br mais 30 30 mark as important mobile pt-br marcar como importante 31 mark as unread mobile pt-br marcar como não lido 31 32 read confirmation mobile pt-br receber confirmação de leitura 32 33 add history mobile pt-br adicionar histórico … … 99 100 No matches found mobile pt-br Contato não localizado 100 101 The message was moved to trash mobile pt-br A mensagem foi movida para a lixeira. 102 Reading Message mobile pt-br Lendo mensagem 101 103 What is the maximum number of messages per page? mobile pt-br Qual o número máximo de mensagens por página? 102 104 Option mobile pt-br Opção -
branches/2.2/mobile/templates/css/mobile.css
r3571 r3576 39 39 40 40 .busca{ padding-left: 5px; padding-top:5px; height:25px;; background-color:#E4E4E4} 41 .busca input{height:20px;} 41 .busca input{height:15px;} 42 .busca input.btn-generico{height:20px;} 42 43 .par{background-color:#EEF7FA} 43 44 .topo{background-color:#3E3E3D;} … … 48 49 .menu-contexto{ padding-top:3px; padding-left:5px; height:20px; font-size:60%; background-color:#3399CC; color:#FFFFFF;} 49 50 .btn-contexto{ font-size:90%; background-color:#2B84AF; color:#FFFFFF; border:none;} 50 .btn-generico, .btn-contexto{ height: 18px; }51 .btn-generico, .btn-contexto{ height:20px; } 51 52 .titulo_mensagem{ font-size:75%; font-weight:bold;} 52 53 .titulo-sdt{ padding:2px 0px 0px 5px; height:20px; font-weight:bold; font-size: 80%; color:#3E3E3D; background-color:#CEE5EF;} … … 69 70 .label-normal{font-style:italic;} 70 71 71 .campos-entrada{ height: 75px; font-size:70%; background-color:#CEE5EF;}72 .campos-correspondencia{ height: 75px; font-size:70%; background-color:#CEE5EF;}73 .campos-correspondencia input{height: 20px;}72 .campos-entrada{ height:110px; font-size:70%; background-color:#CEE5EF;} 73 .campos-correspondencia{ height:80px; font-size:70%; background-color:#CEE5EF;} 74 .campos-correspondencia input{height:15px;} 74 75 .campos-entrada input{height:10px;} 76 .campos-entrada .posiciona-esquerda p{height:20px;} 75 77 .posiciona-esquerda{padding:5px 0px 0px 10px; float:left;} 76 .posiciona-esquerda p{height:2 2px;}78 .posiciona-esquerda p{height:25px;} 77 79 .posiciona-esquerda p label{float:left;width:75px;} 78 80 -
branches/2.2/mobile/templates/default/login.tpl
r3571 r3576 22 22 <input type="hidden" name="passwd_type" value="text"> 23 23 <input type="hidden" name="account type" value="u"> 24 <p><strong><label>{lang_username}: </label></strong> <input name="login"></p> 24 <p><strong><label>{lang_username}: </label></strong></p> 25 <p><input name="login"></p> 25 26 <script>document.form_login.login.focus();</script> 26 <p><strong><label>{lang_password}: </label></strong> <input name="passwd" type="password" autocomplete=off></p> 27 <p><strong><label>{lang_password}: </label></strong></p> 28 <p><input name="passwd" type="password" autocomplete=off></p> 27 29 <p><button name="submitit" class="btn-contexto">{lang_login}</button></p> 28 30 </form> -
branches/2.2/mobile/templates/default/new_msg.tpl
r3571 r3576 14 14 <div class="campos-correspondencia"> 15 15 <div class="posiciona-esquerda"> 16 <p><strong><label>{lang_to} </label></strong> <input id="input_to" name="input_to" value='{to}' "{read_only}"></p>17 <p><strong><label>{lang_cc} </label></strong> <input id="input_cc" name="input_cc" value='{cc}' "{read_only}"></p>18 <p><strong><label>{lang_subject} </label></strong> <input id="input_subject" name="input_subject" value='{subject}'></p>16 <p><strong><label>{lang_to}:</label></strong> <input id="input_to" name="input_to" value='{to}' "{read_only}"></p> 17 <p><strong><label>{lang_cc}:</label></strong> <input id="input_cc" name="input_cc" value='{cc}' "{read_only}"></p> 18 <p><strong><label>{lang_subject}:</label></strong> <input id="input_subject" name="input_subject" value='{subject}'></p> 19 19 </div> 20 20 -
branches/2.2/mobile/templates/default/template.tpl
r3571 r3576 26 26 <p><a href="{href_cc}">{lang_contacts}</a></p> 27 27 <p><a href="{href_calendar}">{lang_calendar}</a></p> 28 <p><a href="{href_logout}">{lang_logout}</a></p> 28 29 </div> 29 30 <div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licença de Software</div> -
branches/2.2/mobile/templates/default/view_msg.tpl
r3461 r3576 1 <!-- BEGIN mail_header --> 2 <!-- <h1>{subject_label}: {subject}</h1> --> 3 <h1>{subject}</h1> 4 <hr /> 5 <p><strong>{from_label}</strong>: {from}</p> 6 <!-- <p> <strong>{to_label}</strong>: {to}</p> --> 7 <p><strong>{date_label}</strong>: {date}</p> 8 <br /> 9 <!-- END mail_header --> 1 <!-- BEGIN page --> 2 <div class="menu-contexto"> 3 <span><a href="javascript:history.back()">{lang_back}</a><span class="titulo-secao">{lang_reading_message}</span> 4 </div> 10 5 11 <!-- BEGIN mail_body --> 12 <h4>{body}</h4> 13 <br /> 14 <!-- END mail_body --> 6 <div class="campos-correspondencia"> 7 <div class="posiciona-esquerda"> 8 <p><strong>{lang_from}:</strong> {from}</p> 9 <p><strong>{lang_cc}:</strong> {cc}</p> 10 <p><strong>{lang_subject}:</strong> {subject}</p> 11 </div> 12 13 <div class="posiciona-esquerda"> 14 <p>{date}</p> 15 <p>{size}</p> 16 </div> 17 </div> 15 18 16 <!-- BEGIN reply_msg --> 17 <p> 18 <a href="{reply}">{reply_text}</a> <a href="{reply_all}">{reply_all_text}</a><br /> 19 <a href="{forward}">{forward_text}</a> <a href="{delete}">{Delete}</a> 20 </p> 21 <!-- END reply_msg --> 19 <div id="corpo_mensagem"> 20 {body} 21 22 <p>{begin_anchor}{lang_link}{end_anchor}</p> 22 23 23 <!-- BEGIN mail_footer --> 24 <p>{begin_anchor}{link_text}{end_anchor}</p> 25 <!-- END mail_footer --> 24 <p>{attachment_message}</p> 25 </div> 26 26 27 <!-- BEGIN attachment_list --> 28 <p>{attachment_message}</p> 29 <br /> 30 <!-- END attachment_list --> 27 <div id="operacao_lista"> 28 <a href="{mark_as_unread_link}"><button id="mark_as_read" class="btn-generico" >{lang_mark_as_unread}</button></a> 29 <a href="{forward_link}"><button id="forward" class="btn-generico" >{lang_forward}</button></a> 30 <a href="{reply_link}"><button id="replay" class="btn-generico" >{lang_reply}</button></a> 31 <a href="{reply_all_link}"><button id="replay_all" class="btn-generico" >{lang_reply_all}</button></a> 32 <a href="{delete_link}"><button id="delete" class="btn-generico" >{lang_delete}</button></a> 33 </div> 34 35 <!-- END page --> 31 36 32 37 <!-- BEGIN begin_anchor --> 33 <a href="{ link}">38 <a href="{return_link}"> 34 39 <!-- END begin_anchor --> 35 40
Note: See TracChangeset
for help on using the changeset viewer.