Ignore:
Timestamp:
Mar 8, 2006, 4:22:25 AM (18 years ago)
Author:
rvelices
Message:

calendar: removed some warnings, improved display for weekly style and
worked on css (still not perfect due to IE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_weekly.class.php

    r1062 r1069  
    4747    parent::initialize($date_field, $inner_sql, $date_components);
    4848    global $lang;
     49    $week_no_labels=array();
     50    for ($i=1; $i<=53; $i++)
     51    {
     52      $week_no_labels[$i] = sprintf( l10n("Week %d"), $i);
     53      //$week_no_labels[$i] = $i;
     54    }
     55
    4956    $this->calendar_levels = array(
    5057      array(
     
    5461      array(
    5562          'sql'=> 'WEEK('.$this->date_field.')+1',
    56           'labels' => null
     63          'labels' => $week_no_labels,
    5764        ),
    5865      array(
     
    8794  if ( count($this->date_components)==1 )
    8895  {
    89     $this->build_nav_bar(CWEEK); // week nav bar 1-53
     96    $this->build_nav_bar(CWEEK, array()); // week nav bar 1-53
    9097  }
    9198  if ( count($this->date_components)==2 )
     
    112119  }
    113120  $res = '';
    114   if (isset($date[CYEAR]) and $date[CYEAR]!='any')
     121  if (isset($date[CYEAR]) and $date[CYEAR]!=='any')
    115122  {
    116123    $y = $date[CYEAR];
     
    118125  }
    119126
    120   if (isset($date[CWEEK]) and $date[CWEEK]!='any')
     127  if (isset($date[CWEEK]) and $date[CWEEK]!=='any')
    121128  {
    122129    $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK];
    123130  }
    124   if (isset($date[CDAY]) and $date[CDAY]!='any')
     131  if (isset($date[CDAY]) and $date[CDAY]!=='any')
    125132  {
    126133    $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
Note: See TracChangeset for help on using the changeset viewer.