mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
[OP#65516] completely disable resizing for events without start & end times
This commit is contained in:
@@ -210,6 +210,9 @@ export default class MyTimeTrackingController extends Controller {
|
||||
);
|
||||
}
|
||||
|
||||
// mark the event explicitly as resizable if it is not an all day event
|
||||
info.event.setProp('durationEditable', !info.event.allDay);
|
||||
|
||||
this.calendar.setOption('defaultTimedEventDuration', this.DEFAULT_TIMED_EVENT_DURATION);
|
||||
},
|
||||
eventClick: (info) => {
|
||||
|
||||
@@ -57,7 +57,7 @@ module FullCalendar
|
||||
"title" => title,
|
||||
"url" => url,
|
||||
"classNames" => class_names
|
||||
}.merge(additional_attributes).compact_blank.as_json
|
||||
}.merge(additional_attributes).compact.as_json
|
||||
end
|
||||
|
||||
def to_json(*)
|
||||
|
||||
@@ -47,8 +47,9 @@ module FullCalendar
|
||||
end
|
||||
end
|
||||
|
||||
def additional_attributes
|
||||
def additional_attributes # rubocop:disable Metrics/AbcSize
|
||||
{
|
||||
durationEditable: time_entry.start_time.present?,
|
||||
hours: time_entry.hours,
|
||||
typeId: time_entry.work_package.type_id,
|
||||
workPackageId: time_entry.work_package.id,
|
||||
|
||||
Reference in New Issue
Block a user