Skip to content
Snippets Groups Projects
Commit b14a1b2a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1832 from KreizIT/Calendar

Fix allday event move
parents 137efaa1 8d13ab0d
Branches
Tags
No related merge requests found
...@@ -1192,14 +1192,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa ...@@ -1192,14 +1192,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; $cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;
// Defined style to disable drag and drop feature // Defined style to disable drag and drop feature
if (empty($event->fulldayevent)) if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
{
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
{ {
$tmpyearend = date('Y',$event->date_end_in_calendar); $tmpyearend = date('Y',$event->date_end_in_calendar);
$tmpmonthend = date('m',$event->date_end_in_calendar); $tmpmonthend = date('m',$event->date_end_in_calendar);
$tmpdayend = date('d',$event->date_end_in_calendar); $tmpdayend = date('d',$event->date_end_in_calendar);
if ($tmpyearend != $annee || $tmpmonthend != $mois || $tmpdayend != $jour) if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
{ {
$cssclass.= " unsortable"; $cssclass.= " unsortable";
} }
...@@ -1208,7 +1206,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa ...@@ -1208,7 +1206,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{ {
$cssclass.= " unsortable"; $cssclass.= " unsortable";
} }
}
// Show rect of event // Show rect of event
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'">'; print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'">';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment