Changeset 4114
- Timestamp:
- 04/20/11 16:19:07 (13 years ago)
- Location:
- branches/2.2.0.1/calendar
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
r4098 r4114 506 506 507 507 } 508 if($_GET['friendly']==1) 509 echo $this->printer_friendly($this->get_month(),lang('Monthview')); 510 else 511 echo $this->printer_friendly($this->print_month_new($params),lang('Weekview')); 508 509 if($_GET['friendly']==1) 510 { 511 echo $this->printer_friendly($this->get_month(),lang('Monthview')); 512 } 513 else 514 { 515 echo $this->printer_friendly($this->print_month_new($params),lang('Monthview')); 516 } 517 512 518 $GLOBALS['phpgw']->common->phpgw_footer(); 513 519 } … … 563 569 564 570 } 565 566 $hoje = date('Ymd',$GLOBALS['phpgw']->datetime->gmtnow); 567 $mes_hoje = (int)substr($hoje,4,2); 568 $sday = 1; 569 if($_POST['day']) { 570 $day_ini = (int)$_POST['day']; 571 } 572 elseif($_GET['sday']){ 573 if($_GET['month'] == $mes_hoje) 574 { 575 $day_ini = $this->bo->day; 576 } 577 578 else 579 { 580 $day_ini = (int)$_GET['sday']; 581 } 582 } 583 elseif( ($_POST['dia_ini']) && ($_POST['dia_ini'] == $this->bo->day) ) 584 { 585 $day_ini = (int)substr($hoje,6,2); 571 572 if (!$this->bo->printer_friendly) 573 { 574 $account_name = $_POST['user'] ? $_POST['user'] : ($_GET['account_name'] ? $_GET['account_name'] : ''); 575 576 $accounts = CreateObject('phpgwapi.accounts'); 577 $accountId = $accounts->name2id($account_name); 578 579 $prefs = CreateObject('phpgwapi.preferences', $accountId); 580 $account_prefs = $prefs->read(); 581 582 $printer = ''; 583 $prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev.'&sday='.$sday).'"><<</a>'; 584 $next_month_link = '<a href="'.$this->page('month','&year='.$nextyear.'&month='.$next.'&sday='.$sday).'">>></a>'; 585 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$day_ini.'&num_dias='.$num_dias; 586 //$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'; 587 /*if($account_prefs['calendar']['type_month_print'] == '0') 588 { 589 $print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param). 590 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 591 lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 592 } 593 else 594 { 595 $print = '<a href="javascript:void(0)" onclick="scheduler.toPDF('."'calendar/js/dhtmlx/server/generate.php'".')">['.lang('Printer Friendly').']</a>'; 596 }*/ 597 598 //linha abaixo foi adicionada para exibir a pagina do mes em tela 599 //$month,$year,$showyear,$owner=0; 600 $params = Array( 601 'month' => $this->bo->month, 602 'year' => $this->bo->year, 603 'showyear' => True, 604 'owner' => $this->bo->owner 605 ); 606 $large_month = $this->display_month($params); 586 607 } 587 608 else 588 609 { 589 $day_ini = $this->bo->day; 590 } 591 if($_POST['qtd_dias']) 592 { 593 $num_dias = (int)$_POST['qtd_dias']; 594 } 595 else 596 { 597 $num_dias = ''; 598 } 599 600 if (!$this->bo->printer_friendly) 601 { 602 $account_name = $_POST['user'] ? 603 $_POST['user'] : 604 ($_GET['account_name'] ? 605 $_GET['account_name'] : ''); 606 607 $accounts = CreateObject('phpgwapi.accounts'); 608 $accountId = $accounts->name2id($account_name); 609 610 $prefs = CreateObject('phpgwapi.preferences', $accountId); 611 $account_prefs = $prefs->read(); 612 613 $printer = ''; 614 $prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev.'&sday='.$sday).'"><<</a>'; 615 $next_month_link = '<a href="'.$this->page('month','&year='.$nextyear.'&month='.$next.'&sday='.$sday).'">>></a>'; 616 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$day_ini.'&num_dias='.$num_dias; 617 //$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'; 618 if($account_prefs['calendar']['type_month_print'] == '0') 619 { 620 $print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param). 621 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 622 lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 623 } 624 else 625 { 626 $print = '<a href="javascript:void(0)" onclick="scheduler.toPDF('."'calendar/js/dhtmlx/server/generate.php'".')">['.lang('Printer Friendly').']</a>'; 627 } 628 //linha abaixo foi adicionada para exibir a pagina do mes em tela 629 //$month,$year,$showyear,$owner=0; 630 $params = Array( 631 'month' => $this->bo->month, 632 'year' => $this->bo->year, 633 'showyear' => True, 634 'owner' => $this->bo->owner 635 ); 636 $large_month = $this->display_month($params); 637 } 638 else 639 { 640 $printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">'; 641 $prev_month_link = ''; 642 $next_month_link = ''; 643 $print = ''; 644 $GLOBALS['phpgw_info']['flags']['nofooter'] = True; 645 //linha abaixo foi adicionada para exibir a pagina do mes para impressao 646 647 //if($_GET['classic_print']==1) 648 // $large_month = $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner); 649 //else 650 $large_month = $this->display_month_print($this->bo->month,$this->bo->year,True,$this->bo->owner); 610 $printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">'; 611 $prev_month_link = ''; 612 $next_month_link = ''; 613 $print = ''; 614 $GLOBALS['phpgw_info']['flags']['nofooter'] = True; 615 //linha abaixo foi adicionada para exibir a pagina do mes para impressao 616 617 //if($_GET['classic_print']==1) 618 // $large_month = $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner); 619 //else 620 $large_month = $this->display_month_print($this->bo->month,$this->bo->year,True,$this->bo->owner); 651 621 } 652 622 … … 670 640 'small_calendar_prev' => $minical_prev, 671 641 'prev_month_link' => $prev_month_link, 672 'month_identifier' => lang(strftime("%B",$m)).' '.$this->bo->year,673 642 'month_identifier' => $aux_month_identifier, 674 643 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 675 644 'next_month_link' => $next_month_link, 676 645 'small_calendar_next' => $minical_next, 677 //'large_month' => $this->display_month($this->bo->month,$this->bo->year,True,$this->bo->owner),678 646 'large_month' => $large_month, 679 647 'print' => $print … … 717 685 718 686 echo $this->printer_friendly($this->print_week_new($params),lang('Weekview')); 687 719 688 $GLOBALS['phpgw']->common->phpgw_footer(); 720 689 } … … 771 740 if (!$this->bo->printer_friendly) 772 741 { 742 773 743 $printer = ''; 774 744 $prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>'; 775 745 $next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>'; 776 746 $print = '<a href="javascript:void(0);" onclick="scheduler.toPDF('."'calendar/js/dhtmlx/server/generate.php'".')">['.lang('Printer Friendly').']</a>'; 747 777 748 //$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>'; 778 749 } … … 1829 1800 $prev_day_link = '<a href="'.$this->page('day','&date='.$prev['full']).'"><<</a>'; 1830 1801 $next_day_link = '<a href="'.$this->page('day','&date='.$next['full']).'">>></a>'; 1831 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1';1832 $print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param).1833 "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '".1834 lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';1802 //$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1'; 1803 //$print = "<a href='javascript:void(0)' onClick=\"javascript:window.open('".$this->page('month'.$param). 1804 // "','','width=600,height=600,toolbar=no,scrollbars=yes,resizable=no');\" onMouseOver=\"window.status = '". 1805 // lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 1835 1806 } 1836 1807 else … … 1840 1811 $GLOBALS['phpgw_info']['flags']['nofooter'] = True; 1841 1812 $printer = '<body bgcolor="'.$this->theme['bg_color'].'">'; 1842 $print = ''; 1843 } 1813 //$print = ''; 1814 } 1815 $print = '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 1816 1817 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1'; 1844 1818 1845 1819 $now = $GLOBALS['phpgw']->datetime->makegmttime(0, 0, 0, $this->bo->month, $this->bo->day, $this->bo->year); … … 1857 1831 $todos = $this->get_todos($todo_label); 1858 1832 $var = Array( 1859 'printer_friendly' => $printer,1860 'bg_text' 1861 'daily_events' => $this->print_day_new(1833 'printer_friendly' => $printer, 1834 'bg_text' => $this->theme['bg_text'], 1835 'daily_events' => $this->print_day_new( 1862 1836 Array( 1863 'year' => $this->bo->year,1864 'month' => $this->bo->month,1865 'day' => $this->bo->day1837 'year' => $this->bo->year, 1838 'month' => $this->bo->month, 1839 'day' => $this->bo->day 1866 1840 ) 1867 1841 ), 1868 'small_calendar' => $minical, 1869 'date' => $this->bo->long_date($now) . $legend_holiday, 1870 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 1871 'prev_day_link' => $prev_day_link, 1872 'next_day_link' => $next_day_link, 1873 'print' => $print, 1874 'lang_todos' => $todo_label, 1875 'todos' => $this->bo->printer_friendly ? $todos : 1842 'small_calendar' => $minical, 1843 'date' => $this->bo->long_date($now) . $legend_holiday, 1844 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 1845 'prev_day_link' => $prev_day_link, 1846 'next_day_link' => $next_day_link, 1847 'iprint' => $print, 1848 'param' => $param, 1849 'lang_todos' => $todo_label, 1850 'todos' => $this->bo->printer_friendly ? $todos : 1876 1851 1877 1852 //NDEE: todo's layout … … 1881 1856 $p->set_var($var); 1882 1857 $p->parse('day_events','day_event'); 1883 print$this->printer_friendly($p->fp('out','day'),lang('Dayview'));1858 echo $this->printer_friendly($p->fp('out','day'),lang('Dayview')); 1884 1859 $GLOBALS['phpgw']->common->phpgw_footer(); 1885 1860 } … … 3210 3185 Array( 3211 3186 'footer' => 'footer.tpl', 3212 'form_button' => 'form_button_script.tpl' ,3213 'new_component' => 'new_component.tpl'3187 'form_button' => 'form_button_script.tpl' 3188 //'new_component' => 'new_component.tpl' 3214 3189 ) 3215 3190 ); … … 3230 3205 { 3231 3206 $day = $this->bo->day; 3232 } 3207 } 3233 3208 else 3234 3209 { … … 3260 3235 $display = ''; 3261 3236 $display_view = ''; 3262 if ($menuaction == 'calendar.uicalendar.month')3263 {3264 $accounts = CreateObject('phpgwapi.accounts');3265 $accountId = $accounts->name2id($account_name);3266 $prefs = CreateObject('phpgwapi.preferences', $accountId);3267 $account_prefs = $prefs->read();3268 }3269 if ( ($menuaction == 'calendar.uicalendar.week') || ($menuaction == 'calendar.uicalendar.day') || $account_prefs['calendar']['type_month_print'] == '1')3237 // if ($menuaction == 'calendar.uicalendar.month') 3238 // { 3239 // $accounts = CreateObject('phpgwapi.accounts'); 3240 // $accountId = $accounts->name2id($account_name); 3241 // $prefs = CreateObject('phpgwapi.preferences', $accountId); 3242 // $account_prefs = $prefs->read(); 3243 // } 3244 if ( ($menuaction == 'calendar.uicalendar.week') || ($menuaction == 'calendar.uicalendar.day') || ($menuaction == 'calendar.uicalendar.year') || ($menuaction == 'calendar.uicalendar.planner')) 3270 3245 { 3271 3246 $display = 'none'; … … 3283 3258 'num_dias_label' => lang('quantity of days'), 3284 3259 'tip' => lang('empty prints from the start day chosen to the end of the current month'), 3285 'day_ini_name' => 'day',3286 'num_dias_name' => 'qtd_dias',3260 // 'day_ini_name' => 'day', 3261 // 'num_dias_name' => 'qtd_dias', 3287 3262 'row_ini' => $str_ini, 3288 3263 'row_qtd' => $str_qtd, … … 3319 3294 'form_onchange' => 'document.SelectMonth.submit()', 3320 3295 'row' => $str, 3321 'dia_ini' => $dia_ini,3296 // 'dia_ini' => $dia_ini, 3322 3297 'go' => lang('Go!') 3323 3298 ); … … 3422 3397 ); 3423 3398 $this->output_template_array($p,'b_row2','form_button',$var); 3424 // if ( $menuaction == 'calendar.uicalendar.week' || ($menuaction == 'calendar.uicalendar.month' && $account_prefs['calendar']['type_month_print'] == '1')) 3425 // { 3426 // $aux = explode('.',$menuaction); 3427 // $typeview = $aux[2]; 3428 // if($typeview == 'week') 3429 // $params['period'] = 2; 3430 // else 3431 // $params['period'] = 3; 3432 // 3433 // if(isset($_GET['date'])) 3434 // $date = $_GET['date']; 3435 // else 3436 // $date = $_POST['date']; 3437 // if($date) 3438 // { 3439 // $params['year'] = substr($date, 0,4); 3440 // $params['month'] = substr($date, 4,2); 3441 // $params['day'] = substr($date, 6,2); 3442 // } 3443 // else 3444 // { 3445 // $params['year'] = $_GET['year']?$_GET['year']:$_POST['year']; 3446 // $params['month'] = $_GET['month']?$_GET['month']:$_POST['month']; 3447 // if(!$params['month']) 3448 // { 3449 // $params['month'] = $this->bo->month; 3450 // } 3451 // $params['day'] = $this->bo->day; 3452 // } 3453 // 3454 // $result_events_json = $this->print_events_to_show_json($params); 3455 // $var = Array( 3456 // 'typeview' => $typeview, 3457 // 'typeview_aux' => $typeview, 3458 // 'date' => $result_events_json['date_events_json'], 3459 // 'hora_final' => $result_events_json['hora_final'], 3460 // 'hora_inicial' => $result_events_json['hora_inicial'], 3461 // 'events_json' => json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null' 3462 // ); 3463 // $this->output_template_array($p,'place_component','new_component',$var); 3464 // } 3465 // else 3466 // { 3467 $p->set_var('place_component',''); 3468 // } 3399 3400 //$p->set_var('place_component',''); 3469 3401 $p->parse('table_row','blank_row',True); 3470 3402 $p->pparse('out','footer_table'); … … 4368 4300 $id_aux = mktime(0,0,0,$month,$day,$year); 4369 4301 $month_identifier = substr(lang(strftime("%B",$id_aux)),0,3); 4370 $day_number = $ month_identifier . " - " . $dia_semana . ", " . $day_num;4302 $day_number = $dia_semana . ", " . $day_num; 4371 4303 4372 4304 $var = Array( … … 5072 5004 5073 5005 $tpl = 'day_cal.tpl'; 5074 $new_component_tpl = 'new_component.tpl';5006 //$new_component_tpl = 'new_component.tpl'; 5075 5007 5076 5008 if((int)($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])==2 && … … 5080 5012 } 5081 5013 5082 5083 5084 5014 $templates = Array( 5085 'day_cal' => $tpl ,5086 'new_component_tpl' => $new_component_tpl5015 'day_cal' => $tpl 5016 //'new_component_tpl' => $new_component_tpl 5087 5017 ); 5088 5018 5089 5019 $p->set_file($templates); 5090 5020 $p->set_block('day_cal','day','day'); 5091 $p->set_block('new_component_tpl','new_component','new_component');5021 //$p->set_block('new_component_tpl','new_component','new_component'); 5092 5022 $params['period'] = 1; 5093 5023 $result_events_json = $this->print_events_to_show_json($params); … … 5101 5031 } 5102 5032 5103 function print_week_new($params){ 5104 5105 $p = CreateObject('phpgwapi.Template',$this->template_dir); 5106 $p->set_unknowns('keep'); 5107 5108 $tpl = 'new_week.tpl'; 5109 5110 if((int)($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])==2 && 5111 $GLOBALS['phpgw_info']['flags']['currentapp'] == 'home') 5112 { 5113 $tpl = 'day_list.tpl'; 5114 } 5115 5116 $minical_prev = $this->mini_calendar( 5117 Array( 5118 'day' => 1, 5119 'month' => $this->bo->month -1, 5120 'year' => $this->bo->year, 5121 'link' => 'week', 5122 'outside_month' => False 5123 ) 5124 ); 5125 5126 $minical_next1 = $this->mini_calendar( 5127 Array( 5128 'day' => 1, 5129 'month' => $this->bo->month + 1, 5130 'year' => $this->bo->year, 5131 'link' => 'week', 5132 'outside_month' => False 5133 ) 5134 ); 5135 5136 $minical_next = $this->mini_calendar( 5137 Array( 5138 'day' => 1, 5139 'month' => $this->bo->month, 5140 'year' => $this->bo->year, 5141 'link' => 'week', 5142 'outside_month' => False 5143 ) 5144 ); 5145 $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 5146 5147 $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year); 5148 $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 5149 $prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>'; 5150 $next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>'; 5151 5152 5153 $templates = Array( 5154 'new_week' => $tpl, 5155 ); 5156 5157 $p->set_file($templates); 5158 $p->set_block('new_week','day','day'); 5159 $params['period'] = 2; 5160 $result_events_json = $this->print_events_to_show_json($params); 5161 $p->set_var('date',$result_events_json['date_events_json']); 5162 $p->set_var('hora_final',$result_events_json['hora_final']); 5163 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 5164 $p->set_var('minical',$minical_prev.'<br>'.$minical_next.'<br>'.$minical_next1); 5165 $p->set_var('title',$this->bo->get_week_label()); 5166 $p->set_var('user',$prev_week_link.' '.$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner).' '.$next_week_link); 5167 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 5168 return $p->fp('out','day'); 5033 function print_week_new($params){ 5034 5035 $p = CreateObject('phpgwapi.Template',$this->template_dir); 5036 $p->set_unknowns('keep'); 5037 5038 $tpl = 'new_week.tpl'; 5039 5040 if((int)($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])==2 && 5041 $GLOBALS['phpgw_info']['flags']['currentapp'] == 'home') 5042 { 5043 $tpl = 'day_list.tpl'; 5044 } 5045 5046 $minical_prev = $this->mini_calendar( 5047 Array( 5048 'day' => 1, 5049 'month' => $this->bo->month -1, 5050 'year' => $this->bo->year, 5051 'link' => 'week', 5052 'outside_month' => False 5053 ) 5054 ); 5055 5056 $minical_next1 = $this->mini_calendar( 5057 Array( 5058 'day' => 1, 5059 'month' => $this->bo->month + 1, 5060 'year' => $this->bo->year, 5061 'link' => 'week', 5062 'outside_month' => False 5063 ) 5064 ); 5065 5066 $minical_next = $this->mini_calendar( 5067 Array( 5068 'day' => 1, 5069 'month' => $this->bo->month, 5070 'year' => $this->bo->year, 5071 'link' => 'week', 5072 'outside_month' => False 5073 ) 5074 ); 5075 5076 $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year); 5077 $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 5078 $prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>'; 5079 $next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>'; 5080 5081 $daily = $this->set_week_array($GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True); 5082 foreach($daily as $key => $value) 5083 { 5084 $dates[] = $key; 5085 } 5086 5087 $day_ini = (int)substr($dates[0],6,2); 5088 5089 $print = '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 5090 5091 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$day_ini.'&num_dias=7'; 5092 5093 $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 5094 5095 $templates = Array( 5096 'new_week' => $tpl, 5097 ); 5098 5099 $p->set_file($templates); 5100 $p->set_block('new_week','day','day'); 5101 $params['period'] = 2; 5102 $result_events_json = $this->print_events_to_show_json($params); 5103 $p->set_var('date',$result_events_json['date_events_json']); 5104 $p->set_var('hora_final',$result_events_json['hora_final']); 5105 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 5106 $p->set_var('minical',$minical_prev.'<br>'.$minical_next.'<br>'.$minical_next1); 5107 $p->set_var('iprint',$print); 5108 $p->set_var('param',$param); 5109 $p->set_var('title',$this->bo->get_week_label()); 5110 $p->set_var('user',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)); 5111 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 5112 return $p->fp('out','day'); 5113 5169 5114 } 5170 5115 … … 5217 5162 ) 5218 5163 ); 5164 5165 $print = '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 5166 5167 $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'; 5219 5168 5220 5169 $next = $this->bo->month + 1; … … 5244 5193 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 5245 5194 $p->set_var('minical',$minical_prev.'<br>'.$minical_next.'<br>'.$minical_next1); 5195 $p->set_var('iprint',$print); 5196 $p->set_var('param',$param); 5246 5197 $p->set_var('title',lang(strftime("%B",$m)).' '.$this->bo->year); 5247 5198 $p->set_var('user',$prev_month_link." ".$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner).' '.$next_month_link); -
branches/2.2.0.1/calendar/inc/hook_settings.inc.php
r4010 r4114 198 198 '2' => lang('Title, description and observations') 199 199 ),'This option enables the choice of fields to print.'); 200 create_select_box('Choose type of month print','type_month_print',array( 201 '0' => lang('Events list'), 202 '1' => lang('Events grid') 203 ),'This option enables the choice of type of month print.'); 200 -
branches/2.2.0.1/calendar/templates/default/app.css
r855 r4114 6 6 color: #000066; 7 7 background-color: #F7F7F7; 8 border: 1px solid #CCCCCC;9 margin: 5px;8 /*border: 1px solid #CCCCCC;*/ 9 margin: 1px; 10 10 padding: 5px; 11 11 height: 156px; 12 width: 480px;12 width: 600px; 13 13 } 14 14 -
branches/2.2.0.1/calendar/templates/default/day_cal.tpl
r4032 r4114 27 27 </div> 28 28 29 <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> 30 <br /> 31 {iprint} 32 <input type="radio" name="group1" id="list" value="list" onclick="muda(this.value);" checked> Lista 33 <input type="radio" name="group1" id="grid" value="grid" onclick="muda(this.value);" > Grade 34 35 </div> 36 29 37 <body onload="loadScheduler()"></body> 30 38 31 39 <script> 32 40 41 function muda(printType) 42 { 43 if(printType == "grid") 44 { 45 //document.getElementById("listPrint").style.visibility = 'hidden'; 46 document.getElementById("printFriendly").onclick = function(){ 47 scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); 48 }; 49 } 50 else if(printType =="list") 51 { 52 //document.getElementById("listPrint").style.visibility = ''; 53 document.getElementById("printFriendly").onclick = function(){ 54 window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); 55 }; 56 } 57 } 58 33 59 function loadScheduler() 34 60 { 61 62 document.getElementById("listPrint").style.visibility = 'hidden'; 35 63 36 64 //inicializa o calendário -
branches/2.2.0.1/calendar/templates/default/footer.tpl
r4005 r4114 7 7 </tr> 8 8 </table> 9 {place_component} 9 10 10 <!-- END footer_table --> 11 11 <!-- BEGIN footer_row --> … … 37 37 <td valign="top" width="30%"> 38 38 <font size="-1"> 39 <form action="{acao}" method="post" name="{formname}">39 <form id="listPrint" action="{acao}" method="post" name="{formname}"> 40 40 41 41 <span style="display: {display}"> 42 42 <b>{day_ini_label}:</b> 43 <select name="{day_ini_name}" onchange="{formonchange}">43 <select id="dayIni" name="{day_ini_name}" > 44 44 {row_ini} 45 45 </select> … … 48 48 <br /> <br /> 49 49 50 51 <label>50 <span style="display: {display}" > 51 <label> 52 52 <b>{num_dias_label}:</b> 53 </label>54 <select name="{num_dias_name}" onchange="{formonchange}"/>53 </label> 54 <select id="numDays" name="{num_dias_name}" > 55 55 {row_qtd} 56 </select>57 <br />58 <span style="font-size: 9px;">56 </select> 57 <br /> 58 <span style="font-size: 9px;"> 59 59 {tip} 60 </span> 60 61 </span> 61 </span> 62 <input type="hidden" name="user" value="{user}"> 62 <input type="hidden" name="user" value="{user}"> 63 63 <noscript><input type="submit" value="{go}"></noscript> 64 64 </form> -
branches/2.2.0.1/calendar/templates/default/new_month.tpl
r4098 r4114 53 53 54 54 {minical} 55 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 55 56 <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> 57 <br /> 58 {iprint} 59 <input type="radio" name="group1" id="list" value="list" onclick="muda(this.value);" checked> Lista 60 <input type="radio" name="group1" id="grid" value="grid" onclick="muda(this.value);" > Grade<br> 61 62 </div> 63 64 <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 65 56 66 <body onload="resize();loadScheduler();"></body> 57 67 58 68 <script> 59 69 70 function muda(printType) 71 { 72 if(printType == "grid") 73 { 74 document.getElementById("listPrint").style.visibility = 'hidden'; 75 document.getElementById("printFriendly").onclick = function(){ 76 scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); 77 }; 78 } 79 else if(printType =="list") 80 { 81 document.getElementById("listPrint").style.visibility = ''; 82 document.getElementById("printFriendly").onclick = function(){ 83 window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}"+"&day_ini="+document.getElementById('dayIni').value+"&num_dias="+document.getElementById('numDays').value,"","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); 84 }; 85 } 86 } 87 60 88 function loadScheduler() 61 89 { 62 90 document.getElementById("printFriendly").onclick = function(){ 91 if(document.getElementById("grid").checked == true) 92 { 93 document.getElementById("listPrint").style.visibility = 'hidden'; 94 scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); 95 } 96 else 97 { 98 window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}"+"&day_ini="+document.getElementById('dayIni').value+"&num_dias="+document.getElementById('numDays').value,"","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); 99 } 100 }; 63 101 //inicializa o calendário 64 102 scheduler.showLightbox = function(id) -
branches/2.2.0.1/calendar/templates/default/new_week.tpl
r4098 r4114 53 53 </div> 54 54 </div> 55 55 56 {minical} 56 57 57 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 58 <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> 59 <br /> 60 {iprint} 61 <input type="radio" name="group1" id="list" value="list" onclick="muda(this.value);" checked> Lista 62 <input type="radio" name="group1" id="grid" value="grid" onclick="muda(this.value);" > Grade<br> 63 64 </div> 65 66 <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 67 58 68 <body onload="resize();loadScheduler();"></body> 59 69 60 70 <script> 61 71 72 function muda(printType) 73 { 74 if(printType == "grid") 75 { 76 document.getElementById("listPrint").style.visibility = 'hidden'; 77 document.getElementById("printFriendly").onclick = function(){ 78 scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); 79 }; 80 } 81 else if(printType =="list") 82 { 83 document.getElementById("listPrint").style.visibility = ''; 84 document.getElementById("printFriendly").onclick = function(){ 85 window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); 86 }; 87 } 88 } 89 62 90 function loadScheduler() 63 91 { 64 92 document.getElementById("printFriendly").onclick = function(){ 93 if(document.getElementById("grid").checked == true) 94 { 95 document.getElementById("listPrint").style.visibility = 'hidden'; 96 scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); 97 } 98 else 99 { 100 window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); 101 } 102 }; 65 103 66 104 scheduler.showLightbox = function(id)
Note: See TracChangeset
for help on using the changeset viewer.