Changeset 3564
- Timestamp:
- 12/06/10 16:09:43 (13 years ago)
- Location:
- branches/2.2
- Files:
-
- 1 deleted
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r3560 r3564 1764 1764 } 1765 1765 1766 //Get quota info of current folder 1767 $current_folder = "INBOX"; 1768 if($params && $params['folder']) 1769 $current_folder = $params['folder']; 1770 1771 $arr_quota_info = $this->get_quota(array('folder_id' => $current_folder)); 1766 if ( $params && !$params['noQuotaInfo'] ) { 1767 //Get quota info of current folder 1768 $current_folder = "INBOX"; 1769 if($params && $params['folder']) 1770 $current_folder = $params['folder']; 1771 1772 $arr_quota_info = $this->get_quota(array('folder_id' => $current_folder)); 1773 } else { 1774 $arr_quota_info = array(); 1775 } 1772 1776 1773 1777 // Sorting resultMine -
branches/2.2/mobile/inc/class.common_functions.inc.php
r3559 r3564 25 25 26 26 if ($size < 1024) 27 $rstring = $left . $size . ' B' . $right;27 $rstring = $left . $size . ' B' . $right; 28 28 else if ($size < 1048576) 29 $rstring = $left . round($size/1024) . ' KB' . $right;29 $rstring = $left . round($size/1024) . ' KB' . $right; 30 30 else if ($size < 1073741824) 31 $rstring = $left . round($size/1024/1024) . ' MB' . $right;31 $rstring = $left . round($size/1024/1024) . ' MB' . $right; 32 32 else 33 $rstring = $left . round($size/1024/1024/1024) . ' GB' . $right;33 $rstring = $left . round($size/1024/1024/1024) . ' GB' . $right; 34 34 35 35 return $rstring; 36 36 } 37 } //end common class 37 38 function complete_string($str = "", $length = 10, $align = "R", $char = " ") { 39 if( $str == null ) 40 $str = ""; 41 else 42 if( strlen($str) > $length ) { 43 return substr($str, 0, $length); 44 } else if( strlen($str) == $length ) { 45 return $str; 46 } 47 48 $char = substr($char, 0, 1); 49 $complete_str = ""; 50 51 while( strlen($str) + strlen($complete_str) < $length ) 52 $complete_str .= $char; 53 54 if( $align == "L" ) 55 return $str . $complete_str; 56 else 57 return $complete_str . $str; 58 } 59 60 } //end common class 61 38 62 39 63 ?> -
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r3554 r3564 47 47 */ 48 48 private function print_navbar(){ 49 49 $ui_mobilemail = CreateObject('mobile.ui_mobilemail'); 50 50 $obj = createobject("expressoMail1_2.functions"); 51 51 // setting timezone preference … … 62 62 $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0"); 63 63 $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); 64 $this-> template->set_var('href_home', " ...");64 $this-> template->set_var('href_home', "index.php?menuaction=mobile.ui_home.index"); 65 65 66 66 } -
branches/2.2/mobile/inc/class.ui_home.inc.php
r3556 r3564 1 1 <?php 2 2 class ui_home { 3 var $imap_functions; 4 var $db; 5 var $bocalendar; 6 var $common; 7 var $template; 3 8 4 5 var $public_functions = array( 9 var $public_functions = array( 10 'index' => true, 6 11 'search' => true 7 12 ); 8 13 9 14 function ui_home() { 10 15 $this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 16 $this->common = CreateObject('mobile.common_functions'); 17 $this->imap_functions = CreateObject('expressoMail1_2.imap_functions'); 18 $this->db = CreateObject('phpgwapi.db'); 19 $this->bocalendar = CreateObject('calendar.bocalendar'); 11 20 } 12 21 13 function search($params) { 22 function index($params) { 23 $this->template->set_file(Array('home_index' => 'home_index.tpl')); 24 $this->template->set_block('home_index','page'); 25 $this->template->set_block('home_index','folder_block'); 26 $this->template->set_block('home_index','commitment_block'); 27 28 //langs 29 $this->template->set_var('lang_context_email', lang("context email")); 30 $this->template->set_var('lang_context_contact', lang("context contact")); 31 $this->template->set_var('lang_context_commitment', lang("context commitment")); 32 $this->template->set_var('lang_search', lang("search")); 33 $this->template->set_var('lang_my_mail', lang("my mail")); 34 $this->template->set_var('lang_my_folders', lang("my folders")); 35 $this->template->set_var('lang_my_commitments', lang("my commitments")); 36 $this->template->set_var('lang_new_mail', lang("new mail")); 37 $this->template->set_var('lang_mark_as_read', lang("mark as read")); 38 $this->template->set_var('lang_selected', lang("selected")); 39 40 $accountId = $GLOBALS['phpgw_info']['user']['account_id']; 41 42 //pegando as pastas 43 $default_folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true, 'folderType' => 'default', 'noQuotaInfo' => true)); 44 $total_quota = $this->imap_functions->get_quota(array()); 45 46 $this->set_folder_block($default_folders, "default_folders_box"); 47 48 if(isset($params["expand_folders"]) && $params["expand_folders"] == 1) 49 { 50 $personal_folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true, 'folderType' => 'personal', 'noQuotaInfo' => true)); 51 $this->set_folder_block($personal_folders, "personal_folders_box", sizeof($default_folders)); 52 $this->template->set_var('expand_folders', 0); 53 } else { 54 $this->template->set_var('expand_folders', 1); 55 } 56 57 $this->template->set_var('quota_percent', $total_quota["quota_percent"]); 58 $this->template->set_var('quota_used', $this->common->borkb($total_quota["quota_used"]*1024)); 59 $this->template->set_var('quota_limit', $this->common->borkb($total_quota["quota_limit"]*1024)); 60 61 //pegando os eventos do dia atual 62 $year = $this->bocalendar->year; 63 $month = $this->bocalendar->month; 64 $day = $this->bocalendar->day; 65 66 $tstart = mktime(0,0,0,$month,$day,$year); 67 //$tstart = $GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day); 68 69 $tstop = $tstart + 86400; //(24horas*60min*60seg*1dia) 70 $this->bocalendar->so->owner = $accountId; 71 $this->bocalendar->so->open_box($accountId); 72 $this->bocalendar->store_to_cache( array( 73 'owner' => $accountId, 74 'syear' => date('Y',$tstart), 75 'smonth' => date('m',$tstart), 76 'sday' => date('d',$tstart), 77 'eyear' => date('Y',$tstop), 78 'emonth' => date('m',$tstop), 79 'eday' => date('d',$tstop) 80 ) ); 81 82 $events = $this->bocalendar->cached_events; 83 84 foreach($events[$year.$this->common->complete_string($month,2,"R","0").$this->common->complete_string($day,2,"R","0")] as $index=>$event) 85 { 86 $this->template->set_var('dd_class', (($index%2==0) ? "par" : "") ); 87 $this->template->set_var('commitment_time', $this->common->complete_string($event["start"]["hour"],2,"R","0") .":". $this->common->complete_string($event["start"]["min"],2,"R","0") ); 88 $this->template->set_var('commitment_title', $event["title"] ); 89 90 $this->template->parse('commitments_box', 'commitment_block' ,True); 91 } 92 93 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page')); 94 } 95 96 /** 97 * 98 * 99 * $index_increment utilizado para quando passar o array das pastas pessoais somar com a quantidade de pastas default. 100 */ 101 function set_folder_block($folders, $box_target, $index_increment = 0) { 102 foreach($folders as $index=>$folder) 103 { 104 $this->template->set_var('dd_class', (($index%2==0) ? "par" : "") ); 105 $this->template->set_var('folder_id', $index + $index_increment ); 106 $this->template->set_var('folder_name', $folder["folder_name"] ); 107 $this->template->set_var('folder_unseen', $folder["folder_unseen"] ); 108 109 $this->imap_functions->open_mbox($folder["folder_id"],true); 110 $this->template->set_var('folder_total_msg', $this->imap_functions->get_num_msgs(array('folder' => $folder["folder_id"] ) ) ); 111 112 $this->template->parse($box_target, 'folder_block' ,True); 113 } 114 } 115 116 function search($params) { 14 117 $params['name'] = 'teste'; 15 118 $params['default_folders'] = 1; … … 64 167 65 168 } 66 169 } 67 170 171 /* TODO Temporário esse método */ 172 function debug($var) { 173 echo "<pre>"; 174 print_r($var); 175 echo "</pre>"; 68 176 } 69 } 177 178 } 70 179 ?> -
branches/2.2/mobile/mobile_header.inc.php
r3492 r3564 18 18 19 19 $GLOBALS['phpgw_info']['flags']['currentapp'] = 'mobile'; 20 $GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = ' mobilemail'; //mobilecalendar, mobilecc ou mobilemail20 $GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'home'; //home, mobilecalendar, mobilecc ou mobilemail 21 21 22 22 if ( is_null($GLOBALS['phpgw_info']['server']['template_set']) ) … … 33 33 //TODO: Determinar qual a aplicação móvel preferida e iniciá-la. 34 34 switch($GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app']){ 35 case home: 36 $link = "ui_home.index"; 37 break; 35 38 case mobilemail: 36 39 $link = "ui_mobilemail.mail_list"; -
branches/2.2/mobile/setup/phpgw_pt-br.lang
r3482 r3564 3 3 contact center mobile pt-br Endereços 4 4 continue mobile pt-br Continuar 5 context email mobile pt-br Email 6 context contact mobile pt-br Contato 7 context commitment mobile pt-br Compromisso 5 8 Do you like to delete this message? mobile pt-br Deseja excluir esta mensagem? 6 9 download attachs mobile pt-br Deseja baixar anexos em e-mails? … … 12 15 Logout mobile pt-br Sair 13 16 To mobile pt-br Para 17 my mail mobile pt-br Meus E-mails 18 my commitments mobile pt-br Meus Compromissos 19 my folders mobile pt-br Minhas Pastas 20 mark as read mobile pt-br marcar como lido 21 new mail mobile pt-br Novo 14 22 Subject mobile pt-br Assunto 15 23 Send mobile pt-br Enviar mensagem … … 22 30 Logout mobile pt-br Sair 23 31 People mobile pt-br Pessoal 32 Search mobile pt-br Procurar 33 Selected mobile pt-br Selecionados 24 34 Calendar mobile pt-br Agenda 25 35 Contact Center mobile pt-br Contatos -
branches/2.2/mobile/templates/default/home_index.tpl
r3484 r3564 1 <!-- BEGIN mobile_home --> 2 <html> 3 <head> 4 <meta http-equiv="Content-Language" content="pt-BR" /> 5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 6 {css} 7 <title>Expresso Mobile {lang_home}</title> 8 </head> 9 <body style="background-color:white !important"> 10 <!-- BEGIN mobile_home_content --> 11 {content}<br>{footer} 12 <!-- END mobile_home_content --> 13 <p><strong>{fullname}: [{account_lid}]</strong></p> 14 <form action="index.php?menuaction=mobile.ui_mobilemail.mail_list" method="post"> 15 <p><input type="text" size="15" name="searchEmail"/><br/> 16 <input type="submit" id="btnSearch" value="{lang_search}"/></p> 17 </form> 18 <hr /> 19 <!-- TODO: Yep! Deveria ser flexível, não hardcoded do jeito que tá --> 20 <!--<p> <strong>:: Expresso Mini</strong> </p>--> 21 <p> 22 :: <a accesskey="1" href="{href_newmail}">{lang_newmail}</a> <br> 23 :: <a accesskey="1" href="{href_email}">{lang_email}</a> <br> 24 :: <a accesskey="1" href="{href_sent}">{lang_sent}</a> <br> 25 :: <a accesskey="1" href="{href_more}">{lang_more_folders}</a> <br> 26 :: <a accesskey="1" href="{href_calendar}">{lang_calendar}</a> <br> 27 :: <a accesskey="1" href="{href_cc}">{lang_cc}</a> <br> 28 :: <a accesskey="1" href="./login.php?cd=1">{lang_logout}</a> 29 </p> 30 <hr /> 31 </body> 32 </html> 33 <!-- END mobile_home --> 1 <!-- BEGIN page --> 2 <div class="busca"> <input name="palavra_chave"> <button id="buscar" class="btn-generico" >{lang_search}</button></div> 3 4 <div class="menu-contexto"> 5 {lang_new_mail}: 6 <button name="email" class="btn-contexto">{lang_context_email}</button> 7 <button name="contato" class="btn-contexto">{lang_context_contact}</button> 8 <button name="compromisso" class="btn-contexto">{lang_context_commitment}</button> 9 </div> 10 11 <dl id="lista_miolo"> 12 <dt><input type="checkbox" name="check_default_folders"></input>{lang_my_mail} | <span class="rotulo-complementar">Usados {quota_percent}% [{quota_used}/{quota_limit}]</span></dt> 13 {default_folders_box} 14 <dt><input type="checkbox" name="check_commitments">{lang_my_commitments}</dt> 15 {commitments_box} 16 <dt><input type="checkbox" name="check_personal_folders"><a href="index.php?menuaction=mobile.ui_home.index&expand_folders={expand_folders}">{lang_my_folders}</a></dt> 17 {personal_folders_box} 18 </dl> 19 20 <!-- END page --> 21 <!-- BEGIN folder_block --> 22 <dd class="{dd_class}"><div class="nome-item"><a href="index.php?menuaction=mobile.ui_mobilemail.change_folder&folder={folder_id}">{folder_name}</a></div> <span class="contagem">[{folder_unseen}/{folder_total_msg}]</span></dd> 23 <!-- END folder_block --> 24 <!-- BEGIN commitment_block --> 25 <dd class="{dd_class}"><strong>{commitment_time}</strong> {commitment_title}</dd> 26 <!-- END commitment_block --> -
branches/2.2/mobile/templates/default/login.tpl
r3553 r3564 19 19 <div class="campos-entrada"> 20 20 <div class="posiciona-esquerda"> 21 <form name="form_login" method="post" action="./login.php" autocomplete=off>21 <form name="form_login" method="post" action="./login.php"> 22 22 <input type="hidden" name="passwd_type" value="text"> 23 23 <input type="hidden" name="account type" value="u"> … … 26 26 <script>document.form_login.login.focus();</script> 27 27 <p><strong>{lang_password}: </strong></p> 28 <p><input name="passwd" type="password" ></p>28 <p><input name="passwd" type="password" autocomplete=off></p> 29 29 <p><button name="submitit" class="btn-contexto">{lang_login}</button></p> 30 30 </form> -
branches/2.2/mobile/templates/default/template.tpl
r3555 r3564 3 3 4 4 <html xmlns="http://www.w3.org/1999/xhtml"> 5 6 5 <head> 7 8 6 <title>Expresso Mini</title> 9 7 <meta content="text/html;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8;" http-equiv="Content-Type" name="viewport" /> 10 8 <meta name="format-detection" content="telephone=no" /> 11 9 {css} 12 13 10 </head> 14 11 15 12 <body> 16 17 13 <div class=topo> 18 <h1>Expresso mini</h1>14 <h1>Expresso Mini</h1> 19 15 </div> 20 21 16 22 17 <!-- BEGIN mobile_home_content -->
Note: See TracChangeset
for help on using the changeset viewer.