X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FCalendar.class.php;h=01bd354bd06b4b49ea15abb8e3661e2e22690eaa;hb=ac5189157ef60820dd125400baee9f408a9ba2ea;hp=b2cdf33b111db0e06d185ab8b9db37f8dfdb5913;hpb=33399ff6a8bdfe9b989810dafe9c4dbf3cf3b685;p=timetracker.git diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index b2cdf33b..01bd354b 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -45,9 +45,9 @@ class Calendar extends FormElement { var $controlName = ""; var $highlight = "time"; // Determines what type of active days to highlight ("time" or "expenses"). // var $mAllDays = true; - var $cClassName = "Calendar"; + var $class = "Calendar"; - function Calendar($name) { + function __construct($name) { $this->controlName = $name; $this->mMonthNames = array('January','February','March','April','May','June','July','August','September','October','November','December'); $this->mWeekDayShortNames = array('Su','Mo','Tu','We','Th','Fr','Sa'); @@ -73,7 +73,7 @@ class Calendar extends FormElement { $this->weekStartDay = $user->week_start; } - function setStyle($style) { $this->mStyle = $style; } + function setStyle($style) { $this->style = $style; } function setCellStyle($style) { $this->mCellStyle = $style; } function setACellStyle($style) { $this->mACellStyle = $style; } function setLinkStyle($style) { $this->mLinkStyle = $style; } @@ -90,11 +90,9 @@ class Calendar extends FormElement { function toString($date="") { global $i18n; - $indate = $this->mValue; + $indate = $this->value; if (!$indate) $indate = strftime(DB_DATEFORMAT); - if (!$this->isRenderable()) return ""; - //current year and month if ( strlen ( $indate ) > 0 ) { $indateObj = new DateAndTime(DB_DATEFORMAT, $indate); @@ -166,7 +164,7 @@ class Calendar extends FormElement { $stl_cell = ""; $stl_link = ""; - // weeekend + // weekend if ($j==$weekend_start || $j==$weekend_end) { $stl_cell = ' class="CalendarDayWeekend"'; $stl_link = ' class="CalendarLinkWeekend"';