Fix some bugs in drag to create event

- Firefox needed drag helper explicitly removed
- bug in move exceptions caused SQL error
This commit is contained in:
nathangray 2016-07-05 13:14:10 -06:00
parent 24dcb5e2cf
commit 3de70526d0
3 changed files with 10 additions and 0 deletions

View File

@ -613,6 +613,11 @@ class calendar_ui
public function update_client($event_id, Api\DateTime $recurrence_date = null)
{
if(!$event_id) return false;
if(is_string($event_id) && strpos($event_id,':') !== FALSE)
{
list($event_id, $date) = explode(':',$event_id);
$recurrence_date = new Api\DateTime($date);
}
// Directly update stored data.
// Make sure we have the whole event

View File

@ -324,6 +324,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Cancel drag to create, we're dragging an existing event
timegrid.drag_create.start = null;
timegrid._drag_create_end();
})
.on('mousemove', function(event) {
timegrid._get_time_from_position(event.clientX, event.clientY);

View File

@ -488,6 +488,10 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend
_drag_create_end: function(end)
{
this.div.css('cursor','');
if(typeof end === 'undefined')
{
end = {};
}
if(this.drag_create.start && end.date &&
JSON.stringify(this.drag_create.start.date) !== JSON.stringify(end.date))