diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a2b49628fd2..5021fa11f94 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -331,7 +331,7 @@ if ($conf->use_javascript_ajax) $s.='jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });' . "\n"; $s.='jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n"; $s.='jQuery(".family_birthday").toggle();' . "\n"; - if ($action=="show_week" || $action=="show_month" || empty($action)) + if ($action=="show_week" || $action=="show_month" || empty($action)) { $s.='jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {'; $s.='var frm=jQuery("#move_event");frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(jQuery(event.target).closest("div").attr("id"));frm.submit();}});'."\n"; @@ -943,7 +943,7 @@ if (empty($action) || $action == 'show_month') // View by month echo ''; echo '' ; echo ''; - + } elseif ($action == 'show_week') // View by week { @@ -1175,14 +1175,15 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } $cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; - if (empty($event->fulldayevent)) + // Defined style to disable drag and drop feature + if (empty($event->fulldayevent)) { if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) { $tmpyearend = date('Y',$event->date_end_in_calendar); $tmpmonthend = date('m',$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"; } @@ -1192,7 +1193,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cssclass.= " unsortable"; } } - + // Show rect of event print '
'; print '