diff --git a/admin/admin_settings.php b/admin/admin_settings.php index 1f055ddc..8ccfaea6 100644 --- a/admin/admin_settings.php +++ b/admin/admin_settings.php @@ -2220,6 +2220,22 @@ $modsForHesk_settings = mfh_getSettings(); +
+ +
+

+

'; ?> +
+

+

+

new \v330\ServiceMessagesImprovements\CreateServiceMessageToLocationTable(164), 165 => new \v330\ServiceMessagesImprovements\UpdateExistingServiceMessagesLocations(165), 166 => new \v330\ServiceMessagesImprovements\AddLanguageColumnToServiceMessages(166), + 167 => new \v330\CalendarImprovements\AddBusinessHoursTable(167), + 168 => new \v330\CalendarImprovements\InsertDefaultBusinessHours(168), + 169 => new \v330\CalendarImprovements\AddShowStartTimeSetting(169), ); } \ No newline at end of file diff --git a/install/migrations/v330/CalendarImprovements/AddBusinessHoursTable.php b/install/migrations/v330/CalendarImprovements/AddBusinessHoursTable.php index 90f881c5..42483d29 100644 --- a/install/migrations/v330/CalendarImprovements/AddBusinessHoursTable.php +++ b/install/migrations/v330/CalendarImprovements/AddBusinessHoursTable.php @@ -6,8 +6,7 @@ class AddBusinessHoursTable extends \AbstractUpdatableMigration { function innerUp($hesk_settings) { $this->executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` - (`day_of_week` INT NOT NULL, `all_day` INT NOT NULL, - `start_time` VARCHAR(5) NOT NULL, `end_time` VARCHAR(5) NOT NULL)"); + (`day_of_week` INT NOT NULL, `start_time` VARCHAR(5) NOT NULL, `end_time` VARCHAR(5) NOT NULL)"); } function innerDown($hesk_settings) { diff --git a/install/migrations/v330/CalendarImprovements/AddShowStartTimeSetting.php b/install/migrations/v330/CalendarImprovements/AddShowStartTimeSetting.php new file mode 100644 index 00000000..89c0cd81 --- /dev/null +++ b/install/migrations/v330/CalendarImprovements/AddShowStartTimeSetting.php @@ -0,0 +1,17 @@ +executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) + VALUES ('calendar_show_start_time', 'true')"); + } + + function innerDown($hesk_settings) { + $this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` + WHERE `Key` = 'calendar_show_start_time'"); + } +} \ No newline at end of file diff --git a/install/migrations/v330/CalendarImprovements/InsertDefaultBusinessHours.php b/install/migrations/v330/CalendarImprovements/InsertDefaultBusinessHours.php new file mode 100644 index 00000000..970b59ca --- /dev/null +++ b/install/migrations/v330/CalendarImprovements/InsertDefaultBusinessHours.php @@ -0,0 +1,28 @@ +executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (0, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (1, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (2, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (3, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (4, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (5, '00:00', '23:59')"); + $this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours` (`day_of_week`, `start_time`, `end_time`) + VALUES (6, '00:00', '23:59')"); + } + + function innerDown($hesk_settings) { + $this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours`"); + } +} \ No newline at end of file diff --git a/js/calendar/mods-for-hesk-calendar-admin-readonly.js b/js/calendar/mods-for-hesk-calendar-admin-readonly.js index 7acce334..43ce1b43 100644 --- a/js/calendar/mods-for-hesk-calendar-admin-readonly.js +++ b/js/calendar/mods-for-hesk-calendar-admin-readonly.js @@ -12,6 +12,7 @@ $(document).ready(function() { eventLimit: true, timeFormat: 'H:mm', axisFormat: 'H:mm', + displayEventTime: $('#setting_show_start_time').text(), businessHours: [ { dow: [0], diff --git a/js/calendar/mods-for-hesk-calendar-readonly.js b/js/calendar/mods-for-hesk-calendar-readonly.js index dca8b66f..72774ce5 100644 --- a/js/calendar/mods-for-hesk-calendar-readonly.js +++ b/js/calendar/mods-for-hesk-calendar-readonly.js @@ -12,6 +12,7 @@ $(document).ready(function() { eventLimit: true, timeFormat: 'H:mm', axisFormat: 'H:mm', + displayEventTime: $('#setting_show_start_time').text(), businessHours: [ { dow: [0], diff --git a/js/calendar/mods-for-hesk-calendar.js b/js/calendar/mods-for-hesk-calendar.js index 621102b1..08f1b4f4 100644 --- a/js/calendar/mods-for-hesk-calendar.js +++ b/js/calendar/mods-for-hesk-calendar.js @@ -12,6 +12,7 @@ $(document).ready(function() { eventLimit: true, timeFormat: 'H:mm', axisFormat: 'H:mm', + displayEventTime: $('#setting_show_start_time').text() === 'true', businessHours: [ { dow: [0], diff --git a/language/en/text.php b/language/en/text.php index 19ac1eb5..8a621218 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -2233,6 +2233,8 @@ $hesklang['sm_login_page'] = 'Login Page'; $hesklang['business_hours'] = 'Business Hours'; $hesklang['business_hours_help'] = 'Set business hours for the calendar. There is no functional change by setting this, but times outside of the defined business hours will have a darker gray background for increased visibility.'; +$hesklang['show_event_start_time'] = 'Show event start time in title'; +$hesklang['show_event_start_time_help'] = 'Always show the start time on event titles (unless the event is an all-day event).'; // DO NOT CHANGE BELOW if (!defined('IN_SCRIPT')) die('PHP syntax OK!');