Browse Source

Add legend indicating each event icon

merge-requests/18/head
Mike Koch 6 years ago
parent
commit
40e2b6dad3
  1. 18
      admin/calendar.php
  2. 15
      js/calendar/mods-for-hesk-calendar-admin-readonly.js
  3. 2
      language/en/text.php

18
admin/calendar.php

@ -101,6 +101,24 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php echo $hesklang['legend']; ?></h4>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6">
<i class="fa fa-calendar"></i> <?php echo $hesklang['event']; ?>
</div>
<div class="col-sm-6">
<i class="fa fa-ticket"></i> <?php echo $hesklang['ticket']; ?>
</div>
<div class="col-sm-6">
<i class="fa fa-exclamation-triangle"></i> <?php echo $hesklang['overdue_ticket']; ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-9">
<div class="panel panel-default">

15
js/calendar/mods-for-hesk-calendar-admin-readonly.js

@ -110,7 +110,7 @@ function buildEvent(id, dbObject) {
owner: dbObject.owner,
priority: dbObject.priority,
textColor: calculateTextColor(dbObject.categoryColor),
fontIconMarkup: '<i class="fa fa-ticket"></i>'
fontIconMarkup: getIcon(dbObject)
};
}
@ -129,10 +129,21 @@ function buildEvent(id, dbObject) {
color: dbObject.categoryColor === '' || dbObject.categoryColor === null ? '#fff' : dbObject.categoryColor,
textColor: calculateTextColor(dbObject.categoryColor),
reminderValue: dbObject.reminderValue == null ? '' : dbObject.reminderValue,
reminderUnits: dbObject.reminderUnits
reminderUnits: dbObject.reminderUnits,
fontIconMarkup: '<i class="fa fa-calendar"></i>'
};
}
function getIcon(dbObject) {
var endOfDay = moment(dbObject.startTime).endOf("day");
if (moment(endOfDay).isBefore(moment())) {
return '<i class="fa fa-exclamation-triangle"></i>';
}
return '<i class="fa fa-ticket"></i>';
}
function calculateTextColor(color) {
if (color === null || color === '') {
return 'black';

2
language/en/text.php

@ -107,6 +107,8 @@ $hesklang['events'] = 'Events';
$hesklang['add_files'] = '<i class="fa fa-plus"></i> Add File';
$hesklang['select_all_title_case'] = 'Select All';
$hesklang['deselect_all_title_case'] = 'Deselect All';
$hesklang['event'] = 'Event';
$hesklang['overdue_ticket'] = 'Overdue ticket';
// ADDED OR MODIFIED IN Mods for HESK 2.5.2
$hesklang['manage_statuses'] = 'Manage Statuses';

Loading…
Cancel
Save