Add config value "agenda_on_hover_info" see BT#13559

- By default show comment and description when on hover an event in
the calendar (default behaviour in past).
pull/2487/head
Julio 7 years ago
parent a4b99a9089
commit 0f7eda7256
  1. 12
      main/calendar/agenda_js.php
  2. 7
      main/install/configuration.dist.php
  3. 17
      main/template/default/agenda/month.tpl

@ -283,6 +283,18 @@ if ($agenda->type === 'course') {
$tpl->assign('form_add', $form->returnForm());
$tpl->assign('legend_list', api_get_configuration_value('agenda_legend'));
$onHoverInfo = api_get_configuration_value('agenda_on_hover_info');
if (!empty($onHoverInfo)) {
$options = $onHoverInfo['options'];
} else {
$options = [
'comment' => true,
'description' => true,
];
}
$tpl->assign('on_hover_info', $options);
$templateName = $tpl->get_template('agenda/month.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);

@ -662,3 +662,10 @@ $_configuration['gradebook_badge_sidebar'] = [
//$_configuration['messages_hide_mail_content'] = false;
// If you install plugin redirection you need to change to true
//$_configuration['plugin_redirection_enabled'] = false;
// Customize on hover agenda view. Show agenda comment and/or description
/*$_configuration['agenda_on_hover_info'] = [
'options' => [
'comment' => true,
'description' => true,
]
];*/

@ -393,9 +393,24 @@ $(document).ready(function() {
}).removeData('qtip'); // this is an special hack to add multiple qtip in the same target
*/
}
var onHoverInfo = '';
{% if on_hover_info.description %}
if (event.description) {
onHoverInfo = event.description;
}
{% endif %}
{% if on_hover_info.comment %}
if (event.comment) {
onHoverInfo = onHoverInfo + event.comment;
}
{% endif %}
if (onHoverInfo) {
element.qtip({
content: event.comment,
content: onHoverInfo,
position: {
at: 'top center',
my: 'bottom center'

Loading…
Cancel
Save