Calendar: Fix full day non blocking events could not be dragged

This commit is contained in:
nathan 2023-05-25 13:40:48 -06:00
parent f671009c3d
commit d4112e34d1
3 changed files with 18 additions and 16 deletions

View File

@ -665,10 +665,10 @@ class calendar_ui
$this->cal_prefs['saved_states']['cat_id']))
{
$filter_check = array(
'start' => $event['start'],
'users' => $this->cal_prefs['saved_states']['owner'],
'cat_id' => $this->cal_prefs['saved_states']['cat_id'],
'filter' => $this->cal_prefs['saved_states']['status_filter'],
'start' => $event['start'] - 1,
'users' => $this->cal_prefs['saved_states']['owner'],
'cat_id' => $this->cal_prefs['saved_states']['cat_id'],
'filter' => $this->cal_prefs['saved_states']['status_filter'],
'num_rows' => 1
);
$filter_match = (bool)$this->bo->search($filter_check, $this->bo->so->cal_table.".cal_id = {$event['id']}");

View File

@ -964,28 +964,30 @@ export class CalendarApp extends EgwApp
let sortablejs = Sortable.create(sortable, {
ghostClass: 'srotable_cal_wk_ph',
draggable: state.view == 'day'? '.calendar_calDayColHeader' : '.view_row',
handle: state.view == 'day'? '.calendar_calToday' : '.calendar_calGridHeader',
draggable: state.view == 'day' ? '.calendar_calDayColHeader' : '.view_row',
handle: state.view == 'day' ? '.calendar_calToday' : '.calendar_calGridHeader',
animation: 100,
filter: state.view == 'day'? '.calendar_calTimeGridScroll' : '.calendar_calDayColHeader',
filter: state.view == 'day' ? '.calendar_calTimeGridScroll' : '.calendar_calDayColHeader',
preventOnFilter: false, // Required for dnd fullday nonblocking
dataIdAttr: 'data-owner',
direction: state.view == 'day'? 'horizental' : 'vertical',
direction: state.view == 'day' ? 'horizental' : 'vertical',
sort: state.owner.length > 1 && (
state.view == 'day' && state.owner.length < parseInt(''+egw.preference('day_consolidate','calendar')) ||
(state.view == 'week' || state.view == 'day4') && state.owner.length < parseInt(''+egw.preference('week_consolidate','calendar'))), // enable/disable sort
onStart: function (event)
state.view == 'day' && state.owner.length < parseInt('' + egw.preference('day_consolidate', 'calendar')) ||
(state.view == 'week' || state.view == 'day4') && state.owner.length < parseInt('' + egw.preference('week_consolidate', 'calendar'))), // enable/disable sort
onStart: function(event)
{
// Put owners into row IDs
CalendarApp.views[app.calendar.state.view].etemplates[0].widgetContainer.iterateOver(function(widget) {
CalendarApp.views[app.calendar.state.view].etemplates[0].widgetContainer.iterateOver(function(widget)
{
if(widget.options.owner && !widget.disabled)
{
widget.div.parents('tr').attr('data-owner',widget.options.owner);
widget.div.parents('tr').attr('data-owner', widget.options.owner);
}
else
{
widget.div.parents('tr').removeAttr('data-owner');
}
},this,et2_calendar_timegrid);
}, this, et2_calendar_timegrid);
},
onSort: function(event)
{

View File

@ -243,8 +243,8 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet
}
// Load the event
timegrid._get_event_info(this);
if(this.classList.contains("resizing"))
const event_info = timegrid._get_event_info(this);
if(this.classList.contains("resizing") || event_info.whole_day === "true")
{
// Currently already resizing
return;