+ public function ajaxOneMonth(Array $data)
+ {
+ list($year, $month) = explode('-', $data['month']);
+ if (!empty($data['direction'])) {
+ switch ($data['direction']) {
+ case 'prev':
+ if ($month > 1) $month--;
+ else {$year--; $month = 12;}
+ break;
+ case 'next':
+ if ($month < 12) $month++;
+ else {$year++; $month = 1;}
+ break;
+ }
+ }
+
+ $monthStr = sprintf('%04d-%02d', $year, $month);
+ $right = $this->formatOneMonth($year, $month);
+
+ $out = '<div class="onemonth">';
+
+ $out .= '<div class="monthcolumn">';
+ $out .= $right;
+ $out .= '</div>';
+
+ $out .= '</div>';
+
+ return array('values' => array('thismonth' => $monthStr),
+ 'html' => array('termine' => $out));
+ }
+