Changeset 4001
- Timestamp:
- 04/13/11 11:10:10 (12 years ago)
- Location:
- branches/2.2.0.1/calendar
- Files:
-
- 355 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
r3997 r4001 586 586 if (!$this->bo->printer_friendly) 587 587 { 588 $account_name = $_POST['user'] ? 589 $_POST['user'] : 590 ($_GET['account_name'] ? 591 $_GET['account_name'] : ''); 592 593 $accounts = CreateObject('phpgwapi.accounts'); 594 $accountId = $accounts->name2id($account_name); 595 596 $prefs = CreateObject('phpgwapi.preferences', $accountId); 597 $account_prefs = $prefs->read(); 598 588 599 $printer = ''; 589 600 $prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev.'&sday='.$sday).'"><<</a>'; … … 591 602 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$day_ini.'&num_dias='.$num_dias; 592 603 //$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'; 593 $print = lang('Printer Friendly').": <a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param.'&classic_print=1'). 604 if($account_prefs['calendar']['type_month_print'] == '0') 605 { 606 $print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param). 594 607 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 595 lang('columns')."'\">[".lang('columns')."]</a> | <a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param.'&classic_print=0'). 596 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 597 lang('lines')."'\">[".lang('lines')."]</a>"; 608 lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 609 } 610 else 611 { 612 $print = '<a href="javascript:void(0)" onclick="scheduler.toPDF('."'calendar/js/dhtmlx/server/generate.php'".')">['.lang('Printer Friendly').']</a>'; 613 } 598 614 //linha abaixo foi adicionada para exibir a pagina do mes em tela 599 $large_month = $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner); 615 //$month,$year,$showyear,$owner=0; 616 $params = Array( 617 'month' => $this->bo->month, 618 'year' => $this->bo->year, 619 'showyear' => True, 620 'owner' => $this->bo->owner 621 ); 622 $large_month = $this->display_month($params); 600 623 } 601 624 else … … 608 631 //linha abaixo foi adicionada para exibir a pagina do mes para impressao 609 632 610 if($_GET['classic_print']==1)611 $large_month = $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner);612 else633 //if($_GET['classic_print']==1) 634 // $large_month = $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner); 635 //else 613 636 $large_month = $this->display_month_print($this->bo->month,$this->bo->year,True,$this->bo->owner); 614 637 } … … 616 639 $this->bo->read_holidays(); 617 640 641 $aux_month_identifier = lang(strftime("%B",$m)).' '.$this->bo->year; 642 if(isset($_GET['friendly']) && $_GET['friendly'] ==1) 643 { 644 if( isset($_GET['num_dias']) && ($_GET['num_dias'] == 1) ) 645 { 646 $year = $_GET['year']; 647 $month = $_GET['month']; 648 $day = $_GET['day_ini']; 649 $aux_month_identifier = $this->month_day_of_week($year,$month,$day).', '.$day.' de '.lang(strftime("%B",$m)).' de '.$this->bo->year; 650 } 651 } 652 618 653 $var = Array( 619 'printer_friendly' => $printer, 620 'bg_text' => $this->theme['bg_text'], 621 'small_calendar_prev' => $minical_prev, 622 'prev_month_link' => $prev_month_link, 623 'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year, 624 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 625 'next_month_link' => $next_month_link, 626 'small_calendar_next' => $minical_next, 654 'printer_friendly' => $printer, 655 'bg_text' => $this->theme['bg_text'], 656 'small_calendar_prev' => $minical_prev, 657 'prev_month_link' => $prev_month_link, 658 'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year, 659 'month_identifier' => $aux_month_identifier, 660 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 661 'next_month_link' => $next_month_link, 662 'small_calendar_next' => $minical_next, 627 663 //'large_month' => $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner), 628 'large_month' =>$large_month,629 'print' =>$print664 'large_month' => $large_month, 665 'print' => $print 630 666 ); 631 667 … … 711 747 $prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>'; 712 748 $next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>'; 713 $print = '<a href="'.$this->page('week','&friendly=1&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day))."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 749 $print = '<a href="javascript:void(0);" onclick="scheduler.toPDF('."'calendar/js/dhtmlx/server/generate.php'".')">['.lang('Printer Friendly').']</a>'; 750 //$print = '<a href="'.$this->page('week','&friendly=1&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day))."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."' \">[".lang('Printer Friendly').']</a>'; 714 751 } 715 752 else … … 1726 1763 { 1727 1764 $this->bo->read_holidays(); 1728 1729 $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 1,$this->bo->year); 1730 $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 1,$this->bo->year); 1731 1765 $legend_holiday = $this->bo->cached_holidays[$_GET['date']][0]['name']?'('.$this->bo->cached_holidays[$_GET['date']][0]['name'].')':''; 1732 1766 if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals'])) 1733 1767 { … … 1737 1771 'month' => $this->bo->month, 1738 1772 'year' => $this->bo->year, 1739 'link' => 'day' 1773 'link' => 'day', 1774 'outside_month' => False 1740 1775 ) 1741 1776 ); … … 1746 1781 //NDEE: printer-friendly (what?) 1747 1782 $minical = ''; 1783 } 1784 1785 if(isset($_GET['date'])) 1786 { 1787 $dia = substr($_GET['date'],-2); 1788 } 1789 else 1790 { 1791 $dia = $_POST['day']; 1748 1792 } 1749 1793 … … 1753 1797 $prev_day_link = '<a href="'.$this->page('day','&date='.$prev['full']).'"><<</a>'; 1754 1798 $next_day_link = '<a href="'.$this->page('day','&date='.$next['full']).'">>></a>'; 1755 $param = '&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day).'&friendly=1'; 1756 $print = '<a href="'.$this->page('day'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 1799 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1'; 1800 $print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param). 1801 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 1802 lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 1757 1803 } 1758 1804 else … … 1781 1827 'printer_friendly' => $printer, 1782 1828 'bg_text' => $this->theme['bg_text'], 1783 'daily_events' => $this->print_day (1829 'daily_events' => $this->print_day_new( 1784 1830 Array( 1785 1831 'year' => $this->bo->year, … … 1789 1835 ), 1790 1836 'small_calendar' => $minical, 1791 'date' => $this->bo->long_date($now) ,1837 'date' => $this->bo->long_date($now) . $legend_holiday, 1792 1838 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 1793 1839 'prev_day_link' => $prev_day_link, … … 3132 3178 Array( 3133 3179 'footer' => 'footer.tpl', 3134 'form_button' => 'form_button_script.tpl' 3180 'form_button' => 'form_button_script.tpl', 3181 'new_component' => 'new_component.tpl' 3135 3182 ) 3136 3183 ); … … 3181 3228 $display = ''; 3182 3229 $display_view = ''; 3183 if ( ($menuaction == 'calendar.uicalendar.week') || ($menuaction == 'calendar.uicalendar.day') ) 3230 if ($menuaction == 'calendar.uicalendar.month') 3231 { 3232 $accounts = CreateObject('phpgwapi.accounts'); 3233 $accountId = $accounts->name2id($account_name); 3234 $prefs = CreateObject('phpgwapi.preferences', $accountId); 3235 $account_prefs = $prefs->read(); 3236 } 3237 if ( ($menuaction == 'calendar.uicalendar.week') || ($menuaction == 'calendar.uicalendar.day') || $account_prefs['calendar']['type_month_print'] == '1') 3184 3238 { 3185 3239 $display = 'none'; … … 3336 3390 ); 3337 3391 $this->output_template_array($p,'b_row2','form_button',$var); 3392 if ( $menuaction == 'calendar.uicalendar.week' || ($menuaction == 'calendar.uicalendar.month' && $account_prefs['calendar']['type_month_print'] == '1')) 3393 { 3394 $aux = explode('.',$menuaction); 3395 $typeview = $aux[2]; 3396 if($typeview == 'week') 3397 $params['period'] = 2; 3398 else 3399 $params['period'] = 3; 3338 3400 3401 if(isset($_GET['date'])) 3402 $date = $_GET['date']; 3403 else 3404 $date = $_POST['date']; 3405 if($date) 3406 { 3407 $params['year'] = substr($date, 0,4); 3408 $params['month'] = substr($date, 4,2); 3409 $params['day'] = substr($date, 6,2); 3410 } 3411 else 3412 { 3413 $params['year'] = $_GET['year']?$_GET['year']:$_POST['year']; 3414 $params['month'] = $_GET['month']?$_GET['month']:$_POST['month']; 3415 if(!$params['month']) 3416 { 3417 $params['month'] = $this->bo->month; 3418 } 3419 $params['day'] = $this->bo->day; 3420 } 3421 3422 $result_events_json = $this->print_events_to_show_json($params); 3423 $var = Array( 3424 'typeview' => $typeview, 3425 'typeview_aux' => $typeview, 3426 'date' => $result_events_json['date_events_json'], 3427 'hora_final' => $result_events_json['hora_final'], 3428 'hora_inicial' => $result_events_json['hora_inicial'], 3429 'events_json' => json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null' 3430 ); 3431 $this->output_template_array($p,'place_component','new_component',$var); 3432 } 3433 else 3434 { 3435 $p->set_var('place_component',''); 3436 } 3339 3437 $p->parse('table_row','blank_row',True); 3340 3341 3438 $p->pparse('out','footer_table'); 3342 3439 unset($p); … … 4055 4152 $month = (int)substr($date,4,2); 4056 4153 $day = (int)substr($date,6,2); 4154 4057 4155 $var = Array( 4058 4156 'column_data' => '', … … 4229 4327 $month = (int)substr($date,4,2); 4230 4328 $day = (int)substr($date,6,2); 4231 $var = Array( 4232 'column_data' => '', 4233 'extra' => '' 4234 ); 4329 4235 4330 $p->set_var($var); 4236 4331 if ($weekly || ($date >= $monthstart && $date <= $monthend)) … … 4246 4341 'extra' => $day_params['extra'], 4247 4342 'new_event_link'=> $new_event_link, 4248 'day_number' => $day_number4343 'day_number' => (isset($_GET['num_dias']) && ($_GET['num_dias'] > 1 || $_GET['num_dias'] == "")?$day_number:'') 4249 4344 ); 4250 4345 … … 4355 4450 4356 4451 $var = Array( 4357 'cols' => 1, 4358 'day_events'=> '' //$this->month_week_header($month,$year,False) 4359 ); 4360 // $this->output_template_array($p,'row','event',$var); 4452 'cols' => 1 4453 //'day_events'=> '' 4454 ); 4361 4455 4362 4456 $cellcolor = $this->theme['row_on']; … … 4376 4470 /***************************************************************************************/ 4377 4471 4378 function display_month($month,$year,$showyear,$owner=0) 4379 { 4472 function display_month($params) //($month,$year,$showyear,$owner=0) 4473 { 4474 $month = $params['month']; 4475 $year = $params['year']; 4476 $showyear = $params['showyear']; 4477 $owner = $params['owner']; 4478 4380 4479 if($this->debug) 4381 4480 { … … 4420 4519 4421 4520 $cellcolor = $this->theme['row_on']; 4521 4522 $result_events_json = $this->print_events_to_show_json($params); 4523 $p->set_var('date','Date(2011,1,1)'); 4524 $p->set_var('hora_final',$result_events_json['hora_final']); 4525 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 4526 4422 4527 4423 4528 for($i = (int)($start + $GLOBALS['phpgw']->datetime->tz_offset);(int)(date('Ymd',$i)) <= $monthend;$i += 604800) … … 4787 4892 return $p->fp('out','day'); 4788 4893 } // end function 4894 4895 //função para exibição do calendário novo. 4896 4897 function print_day_new($params){ 4898 $this->bo->store_to_cache( 4899 Array( 4900 'syear' => $params['year'], 4901 'smonth' => $params['month'], 4902 'sday' => $params['day'], 4903 'eyear' => $params['year'], 4904 'emonth' => $params['month'], 4905 'eday' => $params['day'] 4906 ) 4907 ); 4908 4909 $p = CreateObject('phpgwapi.Template',$this->template_dir); 4910 $p->set_unknowns('keep'); 4911 4912 $tpl = 'day_cal.tpl'; 4913 $new_component_tpl = 'new_component.tpl'; 4914 4915 if((int)($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])==2 && 4916 $GLOBALS['phpgw_info']['flags']['currentapp'] == 'home') 4917 { 4918 $tpl = 'day_list.tpl'; 4919 } 4920 4921 4922 4923 $templates = Array( 4924 'day_cal' => $tpl, 4925 'new_component_tpl' => $new_component_tpl 4926 ); 4927 4928 $p->set_file($templates); 4929 $p->set_block('day_cal','day','day'); 4930 $p->set_block('new_component_tpl','new_component','new_component'); 4931 $params['period'] = 3; 4932 $result_events_json = $this->print_events_to_show_json($params); 4933 $p->set_var('date',$result_events_json['date_events_json']); 4934 $p->set_var('hora_final',$result_events_json['hora_final']); 4935 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 4936 $p->set_var('hour_size_px',$result_events_json['hour_size_px']); 4937 4938 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 4939 return $p->fp('out','day'); 4940 } 4941 4942 4943 //função vai devolver os eventos do mês atual para exibição no novo componente da Agenda 4944 function print_events_to_show_json($params) 4945 { 4946 if(!is_array($params)) 4947 { 4948 $this->index(); 4949 } 4950 4951 // $params['period'] pode ser 1 pra dia, 2 pra semana e 3 pra mes 4952 4953 if(!$params['period'] || $params['period'] == '') 4954 $period = 3; 4955 else 4956 $period = $params['period']; 4957 $accounts = CreateObject('phpgwapi.accounts'); 4958 $accountId = $accounts->name2id($account_name); 4959 $date_to_eval = sprintf("%04d%02d%02d",$params['year'],$params['month'],$params['day']); 4960 $dates = array(); 4961 if($period == 1){ 4962 $dates[] = $date_to_eval; 4963 $this->bo->store_to_cache( 4964 Array( 4965 'smonth'=> $params['month'], 4966 'sday' => $params['day'], 4967 'syear' => $params['year'] 4968 ) 4969 ); 4970 }else if($period == 2){ 4971 $daily = $this->set_week_array($GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True); 4972 4973 foreach($daily as $key => $value) 4974 $dates[] = $key; 4975 4976 $this->bo->store_to_cache( 4977 Array( 4978 'smonth'=> (int)substr($dates[0],4,2), 4979 'sday' => (int)substr($dates[0],6), 4980 'syear' => (int)substr($dates[0],0,4), 4981 'eyear' => 0, 4982 'emonth'=> 0, 4983 'eday' => ((int)substr($dates[0],6))+6, 4984 ) 4985 ); 4986 }else{ 4987 $month_tmp = substr($date_to_eval, 0, 6); 4988 4989 $this->bo->store_to_cache( 4990 Array( 4991 'smonth'=> (int)substr($date_to_eval,4,2), 4992 'sday' => 1, 4993 'syear' => (int)substr($date_to_eval,0,4), 4994 'eyear' => 0, 4995 'emonth'=> 0, 4996 'eday' => ((int)substr($date_to_eval,6))+30, 4997 ) 4998 ); 4999 for( $i=1 ; $i<=31; $i++){ 5000 if($i<10) 5001 $day= $month_tmp."0".(string)$i; 5002 else 5003 $day=$month_tmp.(string)$i; 5004 $dates[] = $day; 5005 5006 } 5007 5008 } 5009 5010 $prefs = CreateObject('phpgwapi.preferences', $accountId); 5011 $account_prefs = $prefs->read(); 5012 //print_debug('in print_day()'); 5013 5014 $month = (string)((Int)$params['month']-1); 5015 $date_events_json = 'Date('.$params['year'].','.$month.','.$params['day'].')'; 5016 5017 print_debug('Date to Eval',$date_to_eval); 5018 5019 $hora_inicial = $account_prefs['calendar']['workdaystarts']; 5020 $hora_final = $account_prefs['calendar']['workdayends']; //18; 5021 5022 $hour_size_px = $account_prefs['calendar']['interval'] ? $account_prefs['calendar']['interval'] : 42; 5023 5024 $events_to_show_json = array(); 5025 5026 foreach($dates as $day) 5027 { 5028 5029 $events = $this->bo->cached_events[$day]; 5030 5031 foreach($events as $event) 5032 { 5033 //$is_private = !$event['public'] && !$this->bo->check_perms(PHPGW_ACL_READ,$event); 5034 if($event['users_status'] == 'R' && $this->bo->prefs['calendar']['show_rejected'] == 0 && $event['owner'] != $GLOBALS['phpgw_info']['user']['account_id']) 5035 continue; 5036 5037 if($event['recur_type']){ 5038 $recur = $day; 5039 $event['start']['year'] = (int)substr($day,0,4); 5040 $event['start']['month'] = (int)substr($day,4,2); 5041 $event['start']['mday'] = (int)substr($day,6,2); 5042 $event['end']['year'] = (int)substr($day,0,4); 5043 $event['end']['month'] = (int)substr($day,4,2); 5044 $event['end']['mday'] = (int)substr($day,6,2); 5045 $event['id'] = $event['id'].'rc'.$day; 5046 }else{ 5047 $recur = false; 5048 } 5049 5050 if($_GET['menuaction'] == 'calendar.uicalendar.day') 5051 { 5052 $text = $event['description']; 5053 } 5054 else 5055 { 5056 $text = $event['title']; 5057 } 5058 5059 $isPublic = 1; 5060 if(($event['type'] == E && $event['public'] == 0)) 5061 { 5062 $isPublic = 0; 5063 $isPublicTitle = "Restrito"; 5064 } 5065 5066 if(($event['type'] == P && $event['public'] == 0)) 5067 { 5068 $isPublic = 0; 5069 $isPublicTitle = "Privado"; 5070 } 5071 5072 $eventTime = ( (mktime($event['end']['hour'], $event['end']['min'], 0, $event['end']['month'], $event['end']['mday'], $event['end']['year'])-mktime($event['start']['hour'], $event['start']['min'], 0, $event['start']['month'], $event['start']['mday'], $event['start']['year']) )/60 ); 5073 5074 $participants = $this->planner_participants($event['participants']); 5075 $intersection = FALSE; 5076 5077 foreach($events as $ev) 5078 { 5079 if($ev['id'] == $event['id']) continue; 5080 if($ev['users_status'] == 'R') continue; 5081 $event_start = 60*$event['start']['hour']+$event['start']['min']; 5082 $event_end = 60*$event['end']['hour']+$event['end']['min']; 5083 $event_i_start = 60*$ev['start']['hour']+$ev['start']['min']; 5084 $event_i_end = 60*$ev['end']['hour']+$ev['end']['min']; 5085 if((($event_start >= $event_i_start) && ($event_start < $event_i_end))||(($event_start < $event_i_start) && ($event_i_start < $event_end))) 5086 { 5087 $intersection = TRUE; 5088 break; 5089 } 5090 } 5091 if($event['users_status'] == 'R') 5092 $rejected = TRUE; 5093 else 5094 $rejected = FALSE; 5095 5096 $events_to_show_json[] = array( 5097 start_date => $event['start']['year'].'-'.$event['start']['month'].'-'.$event['start']['mday'].' '.$event['start']['hour'].':'.$event['start']['min'], 5098 end_date => $event['end']['year'].'-'.$event['end']['month'].'-'.$event['end']['mday'].' '.$event['end']['hour'].':'.$event['end']['min'] . ' - ' . utf8_encode($event['title']), 5099 text => utf8_encode($text), 5100 descOnTitle => ($eventTime <= 30) ? 1 : 0, 5101 title => utf8_encode($event['title']), 5102 observation => utf8_encode($event['observations']), 5103 location => utf8_encode($event['location']), 5104 id => $event['id'], 5105 participants => (count($event['participants']) > 1) ? 1 : 0, 5106 participants_title => $participants, 5107 attachments => $event['attachment'] ? 1 : 0 , 5108 isPublic => $isPublic, 5109 isPublicTitle => $isPublicTitle, 5110 alarm => (isset($event['alarm']) && count($event['alarm']) >= 1) ? 1 : 0, 5111 recur => $recur, 5112 intersection => $intersection, 5113 rejected => $rejected 5114 ); 5115 5116 if($event['start']['hour'] < $hora_inicial) 5117 { 5118 $hora_inicial = $event['start']['hour']; 5119 } 5120 5121 if($event['end']['hour'] >= $hora_final) 5122 { 5123 $hora_final = $event['end']['hour'] + 1; 5124 } 5125 } 5126 } 5127 5128 $result = Array( 5129 'hora_inicial' => $hora_inicial, 5130 'hora_final' => $hora_final, 5131 'hour_size_px' => $hour_size_px, 5132 'date_events_json' => $date_events_json, 5133 'events_to_show_json' => $events_to_show_json 5134 ); 5135 5136 return $result; 5137 } // end function 5138 5139 4789 5140 4790 5141 function timematrix($param) … … 5836 6187 $appts = False; 5837 6188 } 6189 5838 6190 $holidays = $this->bo->cached_holidays[$date]; 5839 6191 if($weekly) -
branches/2.2.0.1/calendar/templates/default/app_print.css
r855 r4001 3 3 4 4 .calendar_print_main { 5 text-align: center;5 text-align:left; 6 6 font-family: Verdana, Arial, Helvetica, sans-serif; 7 font-size: 8px;7 font-size: 11px; 8 8 color: #000066; 9 9 background-color: #F7F7F7; 10 border: 1px solid #CCCCCC; 11 margin: 5px; 12 padding: 5px; 13 height: 700px; 14 width: 600px; 10 /*border: 1px solid #CCCCCC;*/ 11 margin: 0px; 12 padding: 0px; 13 /*height: 100%;*/ 14 width: 98%; 15 position:absolute; 16 top: 10px; 17 bottom: 10px; 18 left: 15px; 19 right: 10px; 15 20 } 16 21 .button { … … 139 144 } 140 145 141 / /Mini Calendar146 /*Mini Calendar*/ 142 147 143 148 .calendar_minical_table … … 267 272 .calendar_month_identifier 268 273 { 269 font-size:1 8px;274 font-size:14px; 270 275 font-weight: bold; 271 276 } … … 273 278 .calendar_user_identifier 274 279 { 275 font-size:1 2px;276 color: # 009999;280 font-size:10px; 281 color: #778899; 277 282 font-weight: bold; 278 283 } -
branches/2.2.0.1/calendar/templates/default/day_cal.tpl
r2 r4001 1 1 <!-- BEGIN day --> 2 <div class="th"> 3 <table class="calendar_dayview_maintable" width="100%" cellpadding="0"> 4 {row} 5 </table> 2 3 4 <script src="calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js" type="text/javascript" charset="utf-8"></script> 5 <script src="calendar/js/dhtmlx/codebase/ext/dhtmlxscheduler_pdf.js"></script> 6 <script src="calendar/js/dhtmlx/sources/locale_pt.js"></script> 7 <script src="calendar/js/dhtmlx/sources/ext/ext_new_week.js"></script> 8 <link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8"> 9 10 <div class="th" style='width:1000px; height:470px;'> 11 12 <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> 13 <div class="dhx_cal_navline" style="display: none;"> 14 <div class="dhx_cal_prev_button" style="display: none;"> </div> 15 <div class="dhx_cal_next_button" style="display: none;"> </div> 16 <div class="dhx_cal_today_button" style="display: none;" ></div> 17 <div class="dhx_cal_date" style="display:none;"></div> 18 <div class="dhx_cal_tab" name="day_tab" style="right:204px; display: none;"></div> 19 <div class="dhx_cal_tab" name="week_tab" style="right:140px; display: none;"></div> 20 <div class="dhx_cal_tab" name="month_tab" style="right:76px; display: none;"></div> 6 21 </div> 22 <div class="dhx_cal_header" style="visibility: hidden;"> 23 </div> 24 <div class="dhx_cal_data"> 25 </div> 26 </div> 27 </div> 28 29 <body onload="loadScheduler()"></body> 30 31 <script> 32 33 function loadScheduler() 34 { 35 36 //inicializa o calendário 37 scheduler.showLightbox = function(id) 38 { 39 40 var ev = scheduler.getEvent(id); 41 42 var bgYea = ev.start_date.getFullYear().toString(); 43 var bgMon = (ev.start_date.getMonth() + 1).toString(); 44 45 if (bgMon.length < 2) 46 { 47 bgMon = '0' + bgMon; 48 } 49 50 var bgDay = ev.start_date.getDate().toString(); 51 52 if (bgDay.length < 2) 53 { 54 bgDay = '0' + bgDay; 55 } 56 57 var bgHou = ev.start_date.getHours(); 58 var bgMin = ev.start_date.getMinutes(); 59 60 window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin; 61 62 } 63 64 scheduler.templates.event_class=function(start,end,event){ 65 if (event.rejected) 66 return "rejected"; 67 if (event.intersection) 68 return "intersection"; 69 70 } 71 72 scheduler.templates.event_header=function(start,end,event){ 73 74 var imgs = ''; 75 if(event.recur && event.recur != false) 76 { 77 imgs += '<img width="10px" height="10px" border="0" title="Evento recorrente" src="/calendar/templates/serpro/images/recur.png"/>'; 78 } 79 80 if(event.participants == 1) 81 { 82 imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="/calendar/templates/serpro/images/multi_3.png"/>'; 83 } 84 else 85 { 86 imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="/calendar/templates/serpro/images/single.png"/>'; 87 } 88 89 if(event.attachments == 1) 90 { 91 imgs += " " + '<img width="10px" height="10px" border="0" title="Foram enviadas notificações com anexos" src="/calendar/templates/serpro/images/clip.png"/>'; 92 } 93 94 if(event.isPublic == 0) 95 { 96 imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.isPublicTitle+'" src="/calendar/templates/serpro/images/private.png"/>'; 97 } 98 99 if(event.alarm == 1) 100 { 101 imgs += " " + '<img width="11px" height="10px" border="0" title="Alarme" src="/calendar/templates/serpro/images/alarm.png"/>'; 102 } 103 104 if(event.title) 105 { 106 var eventTitle = (" - ") + event.title; 107 } 108 else 109 { 110 var eventTitle = ""; 111 } 112 113 if(event.descOnTitle == 1) 114 { 115 var eventDescOnTitle = (" - ") + event.text; 116 } 117 else 118 { 119 var eventDescOnTitle = ''; 120 } 121 122 return imgs + " " + scheduler.templates.hour_scale(start) + " " + scheduler.templates.hour_scale(end) + eventTitle + eventDescOnTitle; 123 } 124 125 scheduler.xy.scale_height=0; 126 //scheduler.xy.nav_height=0; 127 scheduler.config.hour_size_px = {hour_size_px}; 128 scheduler.config.scroll_hour = 8; 129 scheduler.config.time_step = 30; //- {numeric} minimal date size step in minutes; 130 scheduler.config.start_on_monday = true; //{boolean} if true week starts from Monday ( if false, week start from Sunday); 131 scheduler.config.first_hour = {hora_inicial}; 132 scheduler.config.last_hour = {hora_final}; 133 scheduler.config.drag_resize = false;//- {boolean} allows resizing events by dnd; 134 scheduler.config.drag_move = false;//- {boolean} allows moving events by dnd; 135 scheduler.config.drag_create = false;// - {boolean} allows creating new events by dnd; 136 scheduler.config.dblclick_create = true;//- {boolean} allows creating new events by double click; 137 scheduler.config.edit_on_create = true;//- {boolean} shows form on new event creation; 138 scheduler.config.details_on_create = true;//- {boolean} uses extended form on new event creation by drag or by dbl-click (option doesn't affect monthly view - where details form is the only way to change data); 139 scheduler.config.details_on_dblclick = true;// - {boolean} uses extended form on event double-click (double-click on existing event). 140 scheduler.attachEvent("onClick",function(){ return false;}); 141 scheduler.attachEvent("onDblClick",function(id){ 142 var ev = scheduler.getEvent(id); 143 var id_mod = ev.id; 144 if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; 145 window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;}); 146 147 scheduler.config.xml_date="%Y-%m-%d %H:%i"; 148 scheduler.init('scheduler_here',new {date},"day"); 149 scheduler.parse({events_json},"json"); 150 151 } 152 153 function callViewEvent(id) //double click on events title bar 154 { 155 var ev = scheduler.getEvent(id); 156 var id_mod = ev.id; 157 if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; 158 window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod; 159 } 160 161 </script> 162 7 163 <!-- END day --> 8 <!-- BEGIN day_row -->9 <tr>{time}{event}10 </tr>11 <!-- END day_row -->12 <!-- BEGIN day_event_on -->13 <td class="event-on"{extras}> {event}</td>14 <!-- END day_event_on -->15 <!-- BEGIN day_event_off -->16 <td class="event-off"{extras}> {event}</td>17 <!-- END day_event_off -->18 <!-- BEGIN day_event_holiday -->19 <td class="event-holiday"{extras}> {event}</td>20 <!-- END day_event_holiday -->21 <!-- BEGIN day_time -->22 <td class="time" nowrap>{open_link}{time}{close_link}</td>23 <!-- END day_time -->24 -
branches/2.2.0.1/calendar/templates/default/event_link.tpl
r3989 r4001 20 20 21 21 <!-- BEGIN link_event_text --> 22 <tr style="font-size: 1 0px;background: #dddddd;">23 <td valign="top" style="color: black; font-size: 11px;">22 <tr style="font-size: 12px;background: #dddddd;"> 23 <td valign="top" style="color: black;"> 24 24 <span> 25 25 {time} 26 26 </span> 27 27 </td> 28 <td style="font-size: 11px; border: #E8F0F0 1px solid;" colspan="3">28 <td valign="top" style=" border: #b3b3b3 1px solid;" colspan="5"> 29 29 <span><b>{title}</b></span> 30 30 <br /> -
branches/2.2.0.1/calendar/templates/default/month_print.tpl
r855 r4001 2 2 <table class="calendar_index_table" id="calendar_index_table" width="100%" cols="5"> 3 3 <tr> 4 <td align="left" width=" 33%">4 <td align="left" width="27%"> 5 5 <span class="calendar_user_identifier"> 6 6 {username} 7 7 </span> 8 8 </td> 9 <td align="center" width=" 33%">9 <td align="center" width="45%"> 10 10 <span class="calendar_month_identifier"> 11 11 {month_identifier} 12 12 </span> 13 13 </td> 14 <td align="right" style="width: 33%; font-size: 14px;">14 <td align="right" style="width: 27%; font-size: 14px;"> 15 15 <span class="calendar_user_identifier"> 16 16 <p>Agenda de Eventos</p>
Note: See TracChangeset
for help on using the changeset viewer.