mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 15:59:23 +01:00
Fix onclick handler for calendar yearly planner and year view
This commit is contained in:
parent
b6ca39d9dd
commit
a9c800229c
@ -574,7 +574,7 @@ class calendar_uiviews extends calendar_ui
|
||||
'" data-tooltip ="'.$tooltip .
|
||||
'" style="position: absolute; left: '.$left.'%; width: '.$width.'%; height: '.
|
||||
$row_height.'%; top: '.($n * $row_height).'%;'.
|
||||
'background-color: '.$color.';" '.'" data-date ="'.$this->bo->date2string($event['start']).' '.
|
||||
'background-color: '.$color.';" '.'" data-date ="'.$this->bo->date2string($event['start']).'|'.$data['popup'].'" '.
|
||||
'>'."\n".$data['html'].$indent."</div>\n";
|
||||
}
|
||||
}
|
||||
@ -1772,7 +1772,14 @@ class calendar_uiviews extends calendar_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
// Replaced with jquery click handler due to CSP consern
|
||||
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
||||
{
|
||||
$popup = $event['id']."|r";
|
||||
}
|
||||
else
|
||||
{
|
||||
$popup = $event['id']."|n";
|
||||
}
|
||||
}
|
||||
//_debug_array($event);
|
||||
|
||||
@ -2740,7 +2747,7 @@ class calendar_uiviews extends calendar_ui
|
||||
$tooltip = html::htmlspecialchars(str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$data['tooltip']));
|
||||
return $indent.'<div class="calendar_plannerEvent'.($data['private'] ? 'Private' : '').'" style="left: '.$left.
|
||||
'%; width: '.$width.'%; background-color: '.$color.';"'.'data-tooltip="'. $tooltip.'" '.
|
||||
'>'."\n".$data['html'].$indent."</div>\n";
|
||||
'" data-date ="'.$this->bo->date2string($event['start']).'|'.$data['popup'].'">'."\n".$data['html'].$indent."</div>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -270,9 +270,10 @@ app.classes.calendar = AppJS.extend(
|
||||
//Click Handler for calendar planner
|
||||
jQuery("div.calendar_plannerEvent").on({
|
||||
click:function(ev){
|
||||
var eventId = ev.currentTarget.id.replace(/drag_/g,'').split("_")[0];
|
||||
var startDate = ev.currentTarget.getAttribute('data-resize').split("|")[0];
|
||||
if (ev.currentTarget.id.match(/drag_/g))
|
||||
var eventId = ev.currentTarget.getAttribute('data-date').split("|")[1];
|
||||
var startDate = ev.currentTarget.getAttribute('data-date').split("|")[0];
|
||||
var recurrFlag = ev.currentTarget.getAttribute('data-date').split("|")[2];
|
||||
if (recurrFlag == "n")
|
||||
{
|
||||
egw.open(eventId,'calendar','edit');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user