Changeset 36 for trunk/calendar
- Timestamp:
- 06/29/07 15:18:52 (17 years ago)
- Location:
- trunk/calendar
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/doc/change_log.txt
r29 r36 2 2 módulo Agenda de Eventos, e a partir da versão 29/11/2006 [0.9.17] 3 3 Nilton Emilio Buhrer Neto. 4 5 05/06/2007 - [0.9.2] 6 - Adicionando funcionalidade de adicionar eventos externos, pelo email 7 - Corrigido problema de carregar os usuários da organização selecionada, ao criar um compromisso. 4 8 5 9 22/05/2007 - [0.9.2] -
trunk/calendar/inc/class.bocalendar.inc.php
r29 r36 2687 2687 } 2688 2688 2689 if(!is_object($GLOBALS['phpgw']->send))2689 /*if(!is_object($GLOBALS['phpgw']->send)) 2690 2690 { 2691 2691 $GLOBALS['phpgw']->send = CreateObject('phpgwapi.send'); 2692 } 2692 }*/ 2693 2693 // $send = &$GLOBALS['phpgw']->send; 2694 2694 … … 2708 2708 foreach($to_notify as $userid => $statusid) 2709 2709 { 2710 2710 $mail->ClearAllRecipients(); 2711 $mail->ClearAttachments(); 2712 2711 2713 $userid = (int)$userid; 2712 2714 … … 2731 2733 2732 2734 $to = $preferences->email_address($userid); 2735 2733 2736 if (empty($to) || $to[0] == '@' || $to[0] == '$') // we have no valid email-address 2734 2737 { … … 2945 2948 break; 2946 2949 } 2947 $mail->AddAddress( implode(",",$to));2950 $mail->AddAddress($to); 2948 2951 $mail->Body = $tmpbody; 2949 2952 $mail->From = $sender; … … 2957 2960 if(!$mail->Send()) 2958 2961 { 2962 2959 2963 $returncode=false; 2960 2964 } … … 2991 2995 if($ex_participant) 2992 2996 $to[] = $ex_participant; 2993 } 2994 $mail->AddAddress(implode(",",$to)); 2997 } 2998 foreach($to as $i => $to_array) 2999 $mail->AddAddress($to_array); 2995 3000 $_body = explode("<hr size='1' width='100%'>",$tmpbody); 2996 3001 $tmpbody = $_body[0]; … … 2998 3003 $tmpbody.= "<br>".lang("Summary").": ".$this->so->cal->event[title]."<br>"; 2999 3004 $tmpbody.= "<br>".lang("Start date").": ".$GLOBALS['phpgw']->common->show_date($starttime)."<br>".lang("End date").": ".$GLOBALS['phpgw']->common->show_date($endtime)."<br>"; 3000 $tmpbody.= "<br><br><hr size='1' width='100%'><font color='red'>".lang("This message was sent by server. You must send a message to sender to confirm this event")."</font>"; 3001 3005 $tmpbody.= "<br><br><hr size='1' width='100%'><font color='red'>" 3006 .lang("This message was sent by server. You must send a message to sender to confirm this event")."<br>" 3007 .lang("This is an external event. Even if it added to your expresso its can be changed any time at all")."</font><br>"; 3008 3009 if ($GLOBALS['bocalendar']->so->cal->event[start][month] > 10) 3010 $event_month=$GLOBALS['bocalendar']->so->cal->event[start][month]; 3011 else 3012 $event_month="0".$GLOBALS['bocalendar']->so->cal->event[start][month]; 3013 $tmpbody .="<a href='../index.php?menuaction=calendar.uicalendar.add&date=" 3014 .$GLOBALS['bocalendar']->so->cal->event[start][year] 3015 .$event_month 3016 .$GLOBALS['bocalendar']->so->cal->event[start][mday] 3017 ."&hour=".$GLOBALS['bocalendar']->so->cal->event[start][hour] 3018 ."&minute=".$GLOBALS['bocalendar']->so->cal->event[start][min] 3019 ."&title=".$GLOBALS['bocalendar']->so->cal->event['title'] 3020 ."&description=".$GLOBALS['bocalendar']->so->cal->event['description'] 3021 ."&location=".$GLOBALS['bocalendar']->so->cal->event['location']."'>" 3022 ."<h2>".lang("Add to my expresso")."</h2>"; 3023 3002 3024 //attach extern vcard 3003 3025 // define('context','$GLOBALS.bocalendar.so.cal.event'); … … 3013 3035 fclose($attach_fd); 3014 3036 $mail->From = $sender; 3015 $mail->FromName = lang("Expresso external user").": ".$GLOBALS['phpgw_info']['user']['fullname'];3037 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 3016 3038 $mail->Sender = $mail->From; 3017 3039 $mail->SenderName = $mail->FromName; -
trunk/calendar/inc/class.uicalendar.inc.php
r29 r36 1181 1181 $endmin = $startmin + (int)$this->bo->prefs['calendar']['defaultlength']; 1182 1182 $endhour = $starthour + $this->bo->normalizeminutes($endmin); 1183 ; 1183 1184 $subject = (string)(get_var('title',array('GET'),0)); 1185 if ($subject != '0') 1186 { 1187 $description = (string)(get_var('description',array('GET'),0)); 1188 $location = (string)(get_var('location',array('GET'),0)); 1189 } 1190 else 1191 unset($subject); 1192 1184 1193 $this->bo->set_start($this->bo->year,$this->bo->month,$this->bo->day,$starthour,$startmin,0); 1185 1194 $this->bo->set_end($this->bo->year,$this->bo->month,$this->bo->day,$endhour,$endmin,0); 1186 $this->bo->set_title(''); 1187 $this->bo->set_description(''); 1195 $this->bo->set_title($subject); 1196 $this->bo->set_description($description); 1197 $this->bo->add_attribute('location',$location); 1188 1198 $this->bo->set_ex_participants(''); 1189 $this->bo->add_attribute('location','');1190 1199 $this->bo->add_attribute('uid',''); 1191 1200 $this->bo->add_attribute('priority',2); … … 4005 4014 $user_context[] = $dn_part; 4006 4015 } 4007 $user_context = implode(",",$user_context); 4008 $combo_org = $this->get_organizations($context, trim(strtolower($user_context))); 4016 // Prepara o contexto do usuario com sua OU raiz, pois ele pode pertencer a uma OU de nivel N. 4017 $user_ou = explode(",",str_replace($context,"",implode(",",$user_context))); 4018 $user_context = trim(strtolower($user_ou[count($user_ou) - 2].",".$context)); 4019 // Fim 4020 $combo_org = $this->get_sectors(trim(strtolower($user_context))); 4009 4021 $footer_ext_participantes = lang("Tip: To search in the <b>Global Catalog</b>, type the <b>F9</b> key, like the ExpressoMail."); 4010 4022 … … 4045 4057 "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ". 4046 4058 "<script type='text/javascript'>" . 4047 "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\')',1000);" .4059 "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\')',1000);". 4048 4060 "</script> " 4049 4061 … … 4630 4642 } 4631 4643 4632 function get_ organizations($context,$selected='')4644 function get_sectors($selected='') 4633 4645 { 4634 4646 $s = CreateObject('phpgwapi.sector_search_ldap'); 4635 $sectors_info = $s->get_ organizations($context,$selected, false, false);4647 $sectors_info = $s->get_sectors($selected, false, false); 4636 4648 return $sectors_info; 4637 4649 } 4650 4638 4651 /* 4639 4652 function get_organizations($context, $selected='') -
trunk/calendar/templates/celepar/js/edit_exmail.js
r18 r36 52 52 } 53 53 var options = '###'; 54 if (data) { 54 if (data) { 55 55 if(data.groups && data.groups.length > 0) { 56 56 data.groups = '<option value="-1" disabled>------------------- '+document.getElementById("txt_groups").value+' ------------------ </option>' + data.groups; … … 75 75 } 76 76 77 cExecute (path+'.ldap_functions.get_available_users&context='+context, handler_get_available_users); 77 document.getElementById('combo_org').value = context; 78 cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type=search', handler_get_available_users); 78 79 } 79 80 function add_user()
Note: See TracChangeset
for help on using the changeset viewer.