- Timestamp:
- 07/13/11 17:29:49 (13 years ago)
- Location:
- trunk/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.uicalendar.inc.php
r4705 r4707 477 477 if($this->bo->printer_friendly || $_GET['plain'] == 'True') 478 478 { 479 $app_css_path = $_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 480 $app_print_css_path = $app_css_path; 481 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css')) 482 $app_css_path = 'default'; 483 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css')) 479 $app_css_path = $_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 480 $app_print_css_path = $app_css_path; 481 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css')) 482 $app_css_path = 'default'; 483 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css')) 484 484 $app_print_css_path = 'default'; 485 486 485 487 486 $new_body = '<html>'."\n" 488 487 .'<head>'."\n" … … 531 530 532 531 }else{ 533 $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 534 $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2);535 $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4); 532 $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 533 $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2); 534 $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4); 536 535 537 536 } … … 705 704 $params['month'] = $_GET['month']?(int)$_GET['month']:(int)$_POST['month']; 706 705 $params['year'] = $_GET['year']?(int)$_GET['year']:(int)$_POST['year']; 707 $params['day'] = $_GET['day']?(int)$_GET['day']:(int)$_POST['day']; ;706 $params['day'] = $_GET['day']?(int)$_GET['day']:(int)$_POST['day']; 708 707 709 708 }else{ 710 $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 711 $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2); 712 709 $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 710 $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2); 711 $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4); 713 712 714 713 } … … 3659 3658 } 3660 3659 else 3661 { 3660 {if ($texttitle) 3662 3661 $picture[] = Array( 3663 3662 'pict' => $GLOBALS['phpgw']->common->image('calendar','single'), … … 5088 5087 if(isset($_GET['date'])) 5089 5088 { 5090 $dia = substr($_GET['date'],-2); 5091 } 5092 elseif(isset($_POST['day'])) 5093 { 5094 $dia = $_POST['day']; 5095 } 5096 else 5097 { 5098 $dia = $params['day']; 5099 } 5100 5101 $print = '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 5102 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1'; 5089 $dia = substr($_GET['date'],-2); 5090 } 5091 elseif(isset($_POST['day'])) 5092 { 5093 $dia = $_POST['day']; 5094 } 5095 else 5096 { 5097 $dia = $params['day']; 5098 } 5103 5099 5104 5100 $print = '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 5101 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1'; 5102 5105 5103 $p->set_file($templates); 5106 5104 $p->set_block('day_cal','day','day'); … … 5110 5108 $p->set_var('date',$result_events_json['date_events_json']); 5111 5109 $p->set_var('templateSet',$templateSet); 5112 $p->set_var('iprint',$print); 5113 $p->set_var('param',$param); 5110 $p->set_var('iprint',$print); 5111 $p->set_var('param',$param); 5114 5112 $p->set_var('hora_final',$result_events_json['hora_final']); 5115 5113 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); … … 5398 5396 5399 5397 $events_to_show_json = array(); 5400 $templateSet = $GLOBALS['phpgw_info']['server']['template_set']; 5401 5398 $templateSet = $GLOBALS['phpgw_info']['server']['template_set']; 5402 5399 foreach($dates as $day) 5403 5400 { … … 5424 5421 } 5425 5422 5426 5427 5423 $isPublic = 1; 5428 5424 if(($event['type'] == E && $event['public'] == 0)) 5429 5425 { 5430 5426 $isPublic = 0; 5431 $isPublicTitle = lang(' private');5427 $isPublicTitle = lang('restrict'); 5432 5428 } 5433 5429 … … 5435 5431 { 5436 5432 $isPublic = 0; 5437 $isPublicTitle = "Privado";5433 $isPublicTitle = lang('private'); 5438 5434 } 5439 5435 … … 5458 5454 } 5459 5455 if($event['users_status'] == 'R') 5460 5456 { 5461 5457 $rejected = TRUE; 5462 5463 5464 5458 } 5459 else 5460 { 5465 5461 $rejected = FALSE; 5466 } 5467 5468 if($title_view == 0) 5469 { 5470 if($_GET['menuaction'] == 'calendar.uicalendar.day') 5471 { 5472 $text = $event['description']; 5473 } 5474 elseif($_GET['menuaction'] == 'calendar.uicalendar.week') 5475 { 5476 $text = ' - '.$event['end']['hour'].':'.$event['end']['min']; 5477 5478 //is recurrent? 5479 $text .= (isset($recur) && $recur != false) ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('recurring event').'" src="calendar/templates/'.$templateSet.'/images/recur.png"/>' : '' ; 5480 5481 //participants? 5482 if(count($event['participants']) > 1) 5483 { 5484 $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/multi_3.png"/>'; 5485 } 5486 else 5487 { 5488 $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/single.png"/>'; 5489 } 5490 5491 //has attachments? 5492 $text .= (isset($event['attachment']) && $event['attachment'] != '') ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('email notifications with attachments has been sent').'" src="calendar/templates/'.$templateSet.'/images/clip.png"/>' : '' ; 5493 5494 //is public? 5495 $text .= $isPublic == 0 ? ' ' . '<img width="11px" height="10px" border="0" title="'.$isPublicTitle.'" src="calendar/templates/'.$templateSet.'/images/private.png"/>' : '' ; 5496 5497 //has alarm? 5498 $text .= (isset($event['alarm']) && count($event['alarm']) >= 1) ? ' ' . '<img width="11px" height="10px" border="0" title="'.lang('alarm').'" src="calendar/templates/'.$templateSet.'/images/alarm.png"/>' : '' ; 5499 5500 $text .= ' - ' . $event['title']." - ".$event['description']; 5501 } 5502 else 5503 { 5504 $text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title']." - ".$event['description']; 5505 } 5506 5507 } 5508 else 5509 { 5510 $text = ''; 5511 } 5512 5513 5514 5462 } 5463 5464 $evDescription = ''; 5465 if($title_view == 0) 5466 { 5467 $evDescription = " - ".$event['description']; 5468 } 5469 5470 if($_GET['menuaction'] == 'calendar.uicalendar.day') 5471 { 5472 $text = $event['description']; 5473 } 5474 elseif($_GET['menuaction'] == 'calendar.uicalendar.week') 5475 { 5476 5477 $text = ' - '.$event['end']['hour'].':'.$event['end']['min']; 5478 5479 //is recurrent? 5480 $text .= (isset($recur) && $recur != false) ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('recurring event').'" src="calendar/templates/'.$templateSet.'/images/recur.png"/>' : '' ; 5481 5482 //participants? 5483 if(count($event['participants']) > 1) 5484 { 5485 $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/multi_3.png"/>'; 5486 } 5487 else 5488 { 5489 $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/single.png"/>'; 5490 } 5491 5492 //has attachments? 5493 $text .= (isset($event['attachment']) && $event['attachment'] != '') ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('email notifications with attachments has been sent').'" src="calendar/templates/'.$templateSet.'/images/clip.png"/>' : '' ; 5494 5495 //is public? 5496 $text .= $isPublic == 0 ? ' ' . '<img width="11px" height="10px" border="0" title="'.$isPublicTitle.'" src="calendar/templates/'.$templateSet.'/images/private.png"/>' : '' ; 5497 5498 //has alarm? 5499 $text .= (isset($event['alarm']) && count($event['alarm']) >= 1) ? ' ' . '<img width="11px" height="10px" border="0" title="'.lang('alarm').'" src="calendar/templates/'.$templateSet.'/images/alarm.png"/>' : '' ; 5500 5501 $text .= ' - ' . $event['title'].$evDescription; 5502 } 5503 else 5504 { 5505 $text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title'].$evDescription; 5506 } 5507 5515 5508 $events_to_show_json[] = array( 5516 5509 start_date => $event['start']['year'].'-'.$event['start']['month'].'-'.$event['start']['mday'].' '.$event['start']['hour'].':'.$event['start']['min'], 5517 5510 end_date => $event['end']['year'].'-'.$event['end']['month'].'-'.$event['end']['mday'].' '.$event['end']['hour'].':'.$event['end']['min'] . ' - ' . utf8_encode($event['title']), 5518 5511 text => utf8_encode($text), 5519 textTitle => utf8_encode($event['description']),5520 descOnTitle => ($eventTime <= 30) ? 1 : 0,5512 textTitle => utf8_encode($event['description']), //week and month tooltip 5513 descOnTitle => ($eventTime <= 57) ? 1 : 0, 5521 5514 title => utf8_encode($event['title']), 5522 5515 observation => utf8_encode($event['observations']), … … 5526 5519 participants_title => $participants, 5527 5520 attachments => $event['attachment'] ? 1 : 0 , 5528 attachmentsTitle=> utf8_encode(lang('email notifications with attachments has been sent')),5521 attachmentsTitle => utf8_encode(lang('email notifications with attachments has been sent')), 5529 5522 isPublic => $isPublic, 5530 5523 isPublicTitle => utf8_encode($isPublicTitle), 5531 5524 alarm => (isset($event['alarm']) && count($event['alarm']) >= 1) ? 1 : 0, 5532 alarmTitle=> utf8_encode(lang('alarm')),5525 alarmTitle => utf8_encode(lang('alarm')), 5533 5526 recur => $recur, 5534 recurTitle=> utf8_encode(lang('recurring event')),5527 recurTitle => utf8_encode(lang('recurring event')), 5535 5528 intersection => $intersection, 5536 5529 rejected => $rejected, 5537 title_view 5530 title_view => $title_view 5538 5531 ); 5539 5532 … … 6013 6006 // End load array_lang 6014 6007 } 6015 6016 $edit_js_path = 'calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 6017 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].$edit_js_path.'/js/edit.js')) 6018 $edit_js_path = 'calendar'; 6008 6009 $edit_js_path = 'calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 6010 if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].$edit_js_path.'/js/edit.js')) 6011 $edit_js_path = 'calendar'; 6019 6012 6020 6013 $var['participants'] = array … … 6107 6100 } 6108 6101 6109 // Reminder6102 // Reminder 6110 6103 // The user must use "Alarm Management" to change/modify an alarm 6111 6104 // so only display the email reminder fields if this is a new event … … 6190 6183 ); 6191 6184 6192 $preferences = CreateObject('phpgwapi.preferences',(int)$this->owner); 6193 $selected_creator = $selected_owner = ''; 6194 if($event['notifications_owner'] == 1) 6195 $selected_owner = ' selected'; 6196 else 6197 $selected_creator = ' selected'; 6198 6199 $option = '<option value="0" '.$selected_creator.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$_SESSION['phpgw_session']['account_id']).'</option>'; 6200 if($_SESSION['phpgw_session']['account_id'] != $event['owner']){ 6201 $option .= '<option value="1" '.$selected_owner.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$event['owner']).'</option>'; 6202 } 6203 $var['notifications_owner'] = Array( 6204 'field' => lang('Send notificatios as'), 6205 'data' => '<select name="cal[notifications_owner]" >'.$option.'</select>' 6206 ); 6207 6185 6186 $preferences = CreateObject('phpgwapi.preferences',(int)$this->owner); 6187 $selected_creator = $selected_owner = ''; 6188 if($event['notifications_owner'] == 1) 6189 $selected_owner = ' selected'; 6190 else 6191 $selected_creator = ' selected'; 6192 6193 $option = '<option value="0" '.$selected_creator.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$_SESSION['phpgw_session']['account_id']).'</option>'; 6194 if($_SESSION['phpgw_session']['account_id'] != $event['owner']){ 6195 $option .= '<option value="1" '.$selected_owner.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$event['owner']).'</option>'; 6196 } 6197 6198 6199 $var['notifications_owner'] = Array( 6200 'field' => lang('Send notificatios as'), 6201 'data' => '<select name="cal[notifications_owner]" >'.$option.'</select>' 6202 ); 6203 6204 6208 6205 if($event['recur_enddate']['year'] != 0 && $event['recur_enddate']['month'] != 0 && $event['recur_enddate']['mday'] != 0) 6209 6206 { -
trunk/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js
r4554 r4707 3173 3173 if (cse) cs=cs+" "+cse; 3174 3174 //alert(h); 3175 //alert(title_view); 3176 var evDescription = contentB; 3177 3175 3178 var html = ''; 3176 3179 if(h == 41) … … 3186 3189 else 3187 3190 { 3191 //hide/show event description according to the preference title_view 3192 if(ev.title_view == 1) 3193 { 3194 evDescription = ''; 3195 } 3196 3188 3197 html='<div event_id="'+id+'" class="'+cs+'" ondblclick="javascript:callViewEvent(\''+id+'\');" title="'+contentB+'" style="position:absolute; top:'+y+'px; left:'+x+'px; width:'+(w-4)+'px; height:'+h+'px;'+(style||"")+'">'; 3189 3198 //var html='<div event_id="'+id+'" class="'+cs+'" ondblclick="javascript:callViewEvent(\''+id+'\');" title="'+contentB+'" style="position:absolute; top:'+y+'px; left:'+x+'px; width:'+(w-4)+'px; height:'+(h-(this._quirks?15:25))+'px;">'; … … 3191 3200 html+='<div class="dhx_title">'+contentA+'</div>'; 3192 3201 //html+='<div class="dhx_title" style="height:'+(h-(this._quirks?15:25))+'px;">'+contentA+'</div>'; 3193 html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;">'+ contentB+'</div>';3202 html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;">'+evDescription+'</div>'; 3194 3203 html+='<div class="dhx_footer" style=" width:'+(w-8)+'px;'+(bottom?' margin-top:-1px;':'')+'" ></div></div>'; 3195 3204 } -
trunk/calendar/templates/default/day_cal.tpl
r4565 r4707 150 150 } 151 151 152 if(event.title_view == 0) 153 { 154 if(event.descOnTitle == 1) 155 { 156 var eventDescOnTitle = (" - ") + event.text; 157 } 158 else 159 { 160 var eventDescOnTitle = ''; 161 } 152 //hide/show event description according to the preference title_view 153 if(event.title_view == 0) 154 { 155 if(event.descOnTitle == 1) //to show, or not, description beside the title 156 { 157 var eventDescOnTitle = (" - ") + event.text; 158 } 159 else 160 { 161 var eventDescOnTitle = ''; 162 } 162 163 } 163 164 else … … 209 210 <!-- END day --> 210 211 <!-- BEGIN day_event_off --> 211 212 <!--<font class="event-on">{event}</font>--> 212 213 <!-- END day_event_off --> 213 214 <!-- BEGIN day_time --> 214 215 <!--{time}--> 215 216 <!--<td class="time" nowrap>{open_link}{time}{close_link}</td>--> 216 217 <!-- END day_time --> … … 219 220 <!-- END day_row --> 220 221 <!-- BEGIN day_event_on --> 221 222 <!--<font class="event-on">{event}</font>--> 222 223 <!-- END day_event_on --> 223 224 <!-- BEGIN day_event_holiday --> 224 225 <!--{event}--> 225 226 <!-- END day_event_holiday -->
Note: See TracChangeset
for help on using the changeset viewer.