Changeset 934 for trunk/calendar


Ignore:
Timestamp:
05/27/09 18:57:47 (15 years ago)
Author:
rafaelraymundo
Message:

Ticket #515 - Melhorado tempo de resposta ao visualizar agenda semanal e mensal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.uicalendar.inc.php

    r933 r934  
    427427                        } 
    428428 
    429                         if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals'])) 
     429                        if (isset($this->bo->prefs['calendar']['display_minicals']) && $this->bo->prefs['calendar']['display_minicals'] == "1" && !$this->bo->printer_friendly) 
    430430                        { 
    431431                                $minical_prev = $this->mini_calendar( 
     
    567567                        $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 
    568568 
    569                         if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals'])) 
     569                        if (isset($this->bo->prefs['calendar']['display_minicals']) && $this->bo->prefs['calendar']['display_minicals'] == "1" && !$this->bo->printer_friendly) 
    570570                        { 
    571571                                $minical_this = $this->mini_calendar( 
     
    656656                        return $p->fp('out','week_t'); 
    657657 
    658 /* 
    659                         $this->bo->read_holidays(); 
    660  
    661                         if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals'])) 
    662                         { 
    663                                 $minical = $this->mini_calendar( 
    664                                         Array( 
    665                                                 'day'   => $this->bo->day, 
    666                                                 'month' => $this->bo->month, 
    667                                                 'year'  => $this->bo->year, 
    668                                                 'link'  => 'day' 
    669                                         ) 
    670                                 ); 
    671                         } 
    672                         else 
    673                         { 
    674                                 $minical = ''; 
    675                         } 
    676  
    677                         if (!$this->bo->printer_friendly) 
    678                         { 
    679                                 unset($GLOBALS['phpgw_info']['flags']['noheader']); 
    680                                 unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
    681                                 $GLOBALS['phpgw']->common->phpgw_header(); 
    682                                 $printer = ''; 
    683                                 $param = '&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day).'&friendly=1'; 
    684                                 $print = '<a href="'.$this->page('day'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>'; 
    685                         } 
    686                         else 
    687                         { 
    688                                 $GLOBALS['phpgw_info']['flags']['nofooter'] = True; 
    689                                 $printer = '<body bgcolor="'.$this->theme['bg_color'].'">'; 
    690                                 $print =        ''; 
    691                         } 
    692  
    693                         $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 0, 0, $this->bo->month, $this->bo->day, $this->bo->year); 
    694                         $now['raw'] += $GLOBALS['phpgw']->datetime->tz_offset; 
    695                         $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 
    696  
    697                         $p = $GLOBALS['phpgw']->template; 
    698                         $p->set_file( 
    699                                 Array( 
    700                                         'day_t' => 'day.tpl' 
    701                                 ) 
    702                         ); 
    703                         $p->set_block('day_t','day','day'); 
    704                         $p->set_block('day_t','day_event','day_event'); 
    705  
    706                         $var = Array( 
    707                                 'printer_friendly'              => $printer, 
    708                                 'bg_text'                       => $this->theme['bg_text'], 
    709                                 'daily_events'                  => $this->print_day( 
    710                                         Array( 
    711                                                 'year'  => $this->bo->year, 
    712                                                 'month' => $this->bo->month, 
    713                                                 'day'   => $this->bo->day 
    714                                         ) 
    715                                 ), 
    716                                 'small_calendar'                => $minical, 
    717                                 'date'                          => lang(date('F',$m)).' '.sprintf("%02d",$this->bo->day).', '.$this->bo->year, 
    718                                 'username'                      => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 
    719                                 'print'                         => $print 
    720                         ); 
    721  
    722                         $p->set_var($var); 
    723                         $p->parse('day_events','day_event'); 
    724                         $p->pparse('out','day'); 
    725 */ 
    726658                } 
    727659 
Note: See TracChangeset for help on using the changeset viewer.