mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Fix some app_id vs id issues breaking drag & drop
This commit is contained in:
parent
0d5760ad39
commit
e172ff448b
@ -787,6 +787,8 @@ class calendar_ui
|
||||
{
|
||||
$icons = calendar_uiviews::integration_get_icons($app,$app_id,$event);
|
||||
}
|
||||
$event['app'] = $app;
|
||||
$event['app_id'] = $app_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -798,8 +800,14 @@ class calendar_ui
|
||||
$event['class'] .= 'rowNoView ';
|
||||
}
|
||||
|
||||
$event['app'] = 'calendar';
|
||||
$event['app_id'] = $event['id'];
|
||||
if(!$event['app'])
|
||||
{
|
||||
$event['app'] = 'calendar';
|
||||
}
|
||||
if(!$event['app_id'])
|
||||
{
|
||||
$event['app_id'] = $event['id'];
|
||||
}
|
||||
|
||||
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ app.classes.calendar = AppJS.extend(
|
||||
if (match[1]== _id) do_refresh = true;
|
||||
}
|
||||
});
|
||||
if (jQuery('div [data-app="infolog"][data-id="'+_id+'"]').length > 0) do_refresh = true;
|
||||
if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true;
|
||||
switch (_type)
|
||||
{
|
||||
case 'add':
|
||||
@ -797,13 +797,12 @@ app.classes.calendar = AppJS.extend(
|
||||
|
||||
// Integrated infolog event
|
||||
//Get infologID if in case if it's an integrated infolog event
|
||||
var infolog_id = widget.options.value.id.split('infolog')[1];
|
||||
if (infolog_id)
|
||||
if (widget.options.value.app == 'infolog')
|
||||
{
|
||||
// If it is an integrated infolog event we need to edit infolog entry
|
||||
egw().json(
|
||||
'stylite_infolog_calendar_integration::ajax_moveInfologEvent',
|
||||
[infolog_id, widget.options.value.start, widget.options.value.duration],
|
||||
[widget.options.value.app_id, widget.options.value.start, widget.options.value.duration],
|
||||
// Remove loading spinner
|
||||
function() {if(widget.div) widget.div.removeClass('loading');}
|
||||
).sendRequest();
|
||||
|
@ -661,7 +661,7 @@ et2_register_widget(et2_calendar_event, ["calendar-event"]);
|
||||
*/
|
||||
et2_calendar_event.recur_prompt = function(event_data, callback)
|
||||
{
|
||||
var edit_id = event_data.id;
|
||||
var edit_id = event_data.app_id;
|
||||
var edit_date = event_data.start;
|
||||
var egw = this.egw ? (typeof this.egw == 'function' ? this.egw() : this.egw) : (window.opener || window).egw;
|
||||
var that = this;
|
||||
|
@ -426,7 +426,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
|
||||
// If it is an integrated infolog event we need to edit infolog entry
|
||||
egw().json('stylite_infolog_calendar_integration::ajax_moveInfologEvent',
|
||||
[event_data.id, event_widget._parent.date_helper.getValue()||false,duration],
|
||||
[event_data.app_id, event_widget._parent.date_helper.getValue()||false,duration],
|
||||
function() {loading.remove();}
|
||||
).sendRequest(true);
|
||||
}
|
||||
@ -458,7 +458,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
// Check for modifying a series that started before today
|
||||
var tempDate = new Date();
|
||||
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
|
||||
if (today >= new Date(event_widget.options.value.start))
|
||||
if (event_widget.options.value.recur_type && today >= new Date(event_widget.options.value.start))
|
||||
{
|
||||
et2_dialog.show_dialog(function(_button_id)
|
||||
{
|
||||
@ -469,7 +469,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
loading.remove();
|
||||
}
|
||||
},
|
||||
egw.lang("Do you really want to change the start of this series? If you do, the original series will be terminated as of today and a new series for the future reflecting your changes will be created."),
|
||||
|
Loading…
Reference in New Issue
Block a user