Summary | Possible typo or bug in workweek FB view |
Queue | Kronolith |
Queue Version | 2.0.2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) |
Requester | scalero (at) datadec (dot) es |
Created | 03/16/2005 (7497 days ago) |
Due | |
Updated | 04/27/2005 (7455 days ago) |
Assigned | 04/25/2005 (7457 days ago) |
Resolved | 04/27/2005 (7455 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
bug 1868.New Attachment: week2.diff
that _getBlocks() of the parent class does now the same job.
Anyway there are still two problems:
1) the grid of the dates works only if the difference between
_endHours and _startHours are dividable by 3 (w/o modulus)
(e.g. startHours==8:00 and endHours=0:00)
2) the painting (resp. the size) of the occupied blocks in
workweek.php and week still aren't correct.
The first problem should be solved by the patch.
If I find a solution for prob. 2 I will let you know.
Ciao
Walter
Assigned to
State ⇒ Assigned
New Attachment: workweek.patch.txt
if (($right - $left) != 0) {
I upload the patch, is correct??
Summary ⇒ Possible typo or bug in workweek FB view
State ⇒ Feedback
if (($right - $left) != 0) {
is for?
And please upload the patch as a unified diff and as an attachment to
this ticket.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Posible typo or bug in workweek FB view
Queue ⇒ Kronolith
State ⇒ Unconfirmed
view, the blocks that happen before to 9:00 and after to 18:00 not
appear. This is due to the function '_getBlocks' of file
'kronolith/lib/FBView/workweek.php', compared with
'kronolith/lib/FBView/week.php' it seems the following variables have
been fixed:
$this->_startHour --> 9
$this->_endHour --> 18
I think this function must be the same function as the week view but
with $dayWidth fixed to 20.
Is this correct?
If I apply this patch all works OK:
RCS file: /horde/kronolith/lib/FBView/workweek.php
diff -r1.1 -r1.2
40,43c40,43
< if ($start_hour >= 9 && $start_hour < 18) {
< $left += ($start_hour - 9) * (20 / 9);
< $left += ($start_min / 60) * (20 / 9);
< } elseif ($start_hour >= 18) {
---
< $this->_endHour) {
$left += ($start_hour - $this->_startHour) * (20
/ $this->_startHour);
$left += ($start_min / 60) * (20 / $this->_startHour);
} elseif ($start_hour >= $this->_endHour) {
< $left = max(0, $left);
---
< if ($end_hour >= 9 && $end_hour < 18) {
< $right += ($end_hour - 9) * (20 / 9);
< $right += ($end_min / 60) * (20 / 9);
< } elseif ($end_hour >= 18) {
---
$this->_endHour) {
$right += ($end_hour - $this->_startHour) * (20
/ $this->_startHour);
$right += ($end_min / 60) * (20 / $this->_startHour);
} elseif ($end_hour >= $this->_endHour) {
< $template->set('left', $left);
< $template->set('width', $right - $left);
< $template->set('top', $count++ * 15);
< $template->set('label', $label);
---
$template->set('left', $left);
$template->set('width', $right - $left);
$template->set('top', $count++ * 15);
$template->set('label', $label);
< $blocks .= $template->fetch(KRONOLITH_TEMPLATES .
'/fbview/' . $blockfile);
---
. '/fbview/' . $blockfile);
}
< if ($start_hour >= 9 && $start_hour < 18) {
< $right += ($start_hour - 9) * (20 / 9);
< $right += ($start_min / 60) * (20 / 9);
< } elseif ($start_hour >= 18) {
---
< $this->_endHour) {
$right += ($start_hour - $this->_startHour) *
(20 / $this->_startHour);
$right += ($start_min / 60) * (20 / $this->_startHour);
} elseif ($start_hour >= $this->_endHour) {
< if ($end_hour >= 9 && $end_hour < 18) {
< $left += ($end_hour - 9) * (20 / 9);
< $left += ($end_min / 60) * (20 / 9);
< } elseif ($end_hour >= 18) {
---
$this->_endHour) {
$left += ($end_hour - $this->_startHour) * (20 /
$this->_startHour);
$left += ($end_min / 60) * (20 / $this->_startHour);
} elseif ($end_hour >= $this->_endHour) {