mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
* Calendar: Fix opening a calendar entry sometimes doesn't work
This commit is contained in:
parent
207be43f17
commit
a58c881af1
@ -1021,7 +1021,16 @@ et2_calendar_event.recur_prompt = function(event_data, callback, extra_data)
|
|||||||
{
|
{
|
||||||
var edit_id = event_data.app_id;
|
var edit_id = event_data.app_id;
|
||||||
var edit_date = event_data.start;
|
var edit_date = event_data.start;
|
||||||
|
|
||||||
|
// seems window.opener somehow in certian conditions could be from different origin
|
||||||
|
// we try to catch the exception and in this case retrive the egw object from current window.
|
||||||
|
try {
|
||||||
var egw = this.egw ? (typeof this.egw == 'function' ? this.egw() : this.egw) : window.opener && typeof window.opener.egw != 'undefined' ? window.opener.egw('calendar'):window.egw('calendar');
|
var egw = this.egw ? (typeof this.egw == 'function' ? this.egw() : this.egw) : window.opener && typeof window.opener.egw != 'undefined' ? window.opener.egw('calendar'):window.egw('calendar');
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
|
var egw = window.egw('calendar');
|
||||||
|
}
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
var extra_params = extra_data && typeof extra_data == 'object' ? extra_data : {};
|
var extra_params = extra_data && typeof extra_data == 'object' ? extra_data : {};
|
||||||
@ -1085,7 +1094,15 @@ et2_calendar_event.recur_prompt = function(event_data, callback, extra_data)
|
|||||||
*/
|
*/
|
||||||
et2_calendar_event.series_split_prompt = function(event_data, instance_date, callback)
|
et2_calendar_event.series_split_prompt = function(event_data, instance_date, callback)
|
||||||
{
|
{
|
||||||
|
// seems window.opener somehow in certian conditions could be from different origin
|
||||||
|
// we try to catch the exception and in this case retrive the egw object from current window.
|
||||||
|
try {
|
||||||
var egw = this.egw ? (typeof this.egw == 'function' ? this.egw() : this.egw) : window.opener && typeof window.opener.egw != 'undefined' ? window.opener.egw('calendar'):window.egw('calendar');
|
var egw = this.egw ? (typeof this.egw == 'function' ? this.egw() : this.egw) : window.opener && typeof window.opener.egw != 'undefined' ? window.opener.egw('calendar'):window.egw('calendar');
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
|
var egw = window.egw('calendar');
|
||||||
|
}
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
if(typeof instance_date == 'string')
|
if(typeof instance_date == 'string')
|
||||||
|
Loading…
Reference in New Issue
Block a user