forked from extern/egroupware
Remove another inline-script in calendar dayView which was causing CSP violation
This commit is contained in:
parent
107a48ce2c
commit
68864a0683
@ -545,8 +545,8 @@ class calendar_ui
|
||||
$vars['hour'] = $hour;
|
||||
$vars['minute'] = $minute;
|
||||
}
|
||||
return html::a_href($content,'/index.php',$vars,' target="_blank" title="'.html::htmlspecialchars(lang('Add')).
|
||||
'" onclick="'.$this->popup('this.href','this.target').'; return false;"');
|
||||
return html::a_href($content,'',$vars,' data-date="' .$vars['date'].'|'.$vars['hour'].'|'.$vars['minute']
|
||||
. '" title="'.html::htmlspecialchars(lang('Add')).'"');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -410,14 +410,17 @@ app.classes.calendar = AppJS.extend(
|
||||
})
|
||||
|
||||
//Click event handler for calendar cells
|
||||
.on("click","div.calendar_calAddEvent",function(ev){
|
||||
.on("click","div.calendar_calAddEvent, div.calendar_calTimeRowTime",function(ev){
|
||||
var timestamp = ev.target.getAttribute('data-date').split("|");
|
||||
var owner = ev.target.getAttribute('id').split("_");
|
||||
|
||||
var ownerId = owner[2].match( /Ogroup/g)?owner[2].replace( /Ogroup/g, '-'):owner[2].replace( /^\D+/g, '');
|
||||
if (owner[2].match( /Or/g))
|
||||
if (typeof ev.target.getAttribute('id') != 'undefined' && ev.target.getAttribute('id'))
|
||||
{
|
||||
ownerId = 'r' + ownerId;
|
||||
var owner = ev.target.getAttribute('id').split("_");
|
||||
|
||||
var ownerId = owner[2].match( /Ogroup/g)?owner[2].replace( /Ogroup/g, '-'):owner[2].replace( /^\D+/g, '');
|
||||
if (owner[2].match( /Or/g))
|
||||
{
|
||||
ownerId = 'r' + ownerId;
|
||||
}
|
||||
}
|
||||
|
||||
var eventInfo =
|
||||
@ -427,7 +430,7 @@ app.classes.calendar = AppJS.extend(
|
||||
minute: timestamp[2]
|
||||
};
|
||||
|
||||
if (ownerId != 0)
|
||||
if (typeof ownerId !='undefined' && ownerId != 0)
|
||||
{
|
||||
$j(eventInfo).extend(eventInfo,{owner: ownerId});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user