forked from extern/egroupware
Fix tooltip on plannerEvent, replace the handle with jquery tooltip
This commit is contained in:
parent
957683087c
commit
e6ce77b303
@ -569,12 +569,13 @@ class calendar_uiviews extends calendar_ui
|
||||
$width = $this->time2pos($event['end_m'] - $event['start_m']);
|
||||
$color = $data['color'] ? $data['color'] : 'gray';
|
||||
|
||||
$tooltip = html::htmlspecialchars(str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$data['tooltip']));
|
||||
$content .= $indent.'<div class="calendar_plannerEvent'.($data['private'] ? 'Private' : '').
|
||||
'" data-tooltip ="'.$tooltip .
|
||||
'" style="position: absolute; left: '.$left.'%; width: '.$width.'%; height: '.
|
||||
$row_height.'%; top: '.($n * $row_height).'%;'.
|
||||
'background-color: '.$color.';" '.$data['popup'].' '.
|
||||
html::tooltip($data['tooltip'],False,array('BorderWidth'=>0,'Padding'=>0)).
|
||||
'>'."\n".$data['html'].$indent."</div>\n";
|
||||
'>'."\n".$data['html'].$indent.'" data-tooltip ="'.$tooltip ."</div>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,6 +266,45 @@ app.classes.calendar = AppJS.extend(
|
||||
jQuery(this).tooltip("disable");
|
||||
}
|
||||
});
|
||||
|
||||
//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))
|
||||
{
|
||||
egw.open(eventId,'calendar','edit');
|
||||
}
|
||||
else
|
||||
{
|
||||
that.edit_series(event,eventId,startDate);
|
||||
}
|
||||
},
|
||||
mouseover: function(){
|
||||
|
||||
var ttp = jQuery(this).tooltip({
|
||||
items: "[data-tooltip]",
|
||||
content: function()
|
||||
{
|
||||
var elem = jQuery(this);
|
||||
if (elem.is("[data-tooltip]"))
|
||||
return this.getAttribute('data-tooltip') ;
|
||||
},
|
||||
track:true,
|
||||
|
||||
open: function(event,ui){
|
||||
ui.tooltip.removeClass("ui-tooltip");
|
||||
ui.tooltip.addClass("calendar_uitooltip");
|
||||
}
|
||||
});
|
||||
ttp.tooltip("enable");
|
||||
},
|
||||
mousedown: function(){
|
||||
jQuery(this).tooltip("disable");
|
||||
}
|
||||
});
|
||||
|
||||
//onClick Handler for calendar cells
|
||||
jQuery("div.calendar_calAddEvent").click(function(ev)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user