diff --git a/admin/manage_categories.php b/admin/manage_categories.php index 55e1006b..e164166b 100644 --- a/admin/manage_categories.php +++ b/admin/manage_categories.php @@ -389,7 +389,12 @@ while ($mycat = hesk_dbFetchAssoc($res)) {
- +
@@ -397,7 +402,12 @@ while ($mycat = hesk_dbFetchAssoc($res)) {
- +
@@ -466,16 +476,33 @@ while ($mycat = hesk_dbFetchAssoc($res)) { var $modal = $('#edit-category-modal'); $modal.find('input[name="name"]').val(name).end() - .find('input[name="color"]').val(color).colorpicker({format:'hex', color: color}).end() .find('select[name="priority"]').val(priority).end() .find('select[name="manager"]').val(manager).end() .find('input[name="id"]').val(id).end() .find('select[name="usage"]').val(usage).end() - .modal('show'); + .find('input[name="color"]').val(color).end(); + + var colorpickerOptions = null; + if (color == '') { + colorpickerOptions = { + format: 'hex' + }; + } else { + colorpickerOptions = { + format: 'hex', + color: color + }; + } + $modal.find('input[name="color"]') + .colorpicker(colorpickerOptions).end().modal('show'); + + if (color == '') { + $modal.find('input[name="color"]').val(''); + } }); $('.cancel-callback').click(function() { - $('#edit-category-modal').find('input[name="color"]').colorpicker('destroy'); + $('#edit-category-modal').find('input[name="color"]').val('').colorpicker('destroy').end(); }); }); diff --git a/cron/calendar_reminders.php b/cron/calendar_reminders.php index 1cd8d710..c3937826 100644 --- a/cron/calendar_reminders.php +++ b/cron/calendar_reminders.php @@ -123,6 +123,9 @@ $sql = "SELECT `ticket`.`id` AS `id`, `ticket`.`trackid` AS `trackid`, `ticket`. `ticket`.`custom17` AS `custom17`, `ticket`.`custom18` AS `custom19`, `ticket`.`custom19` AS `custom19`, `ticket`.`custom20` AS `custom20`, `ticket`.`html` AS `html` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` AS `ticket` + INNER JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` AS `status` + ON `ticket`.`status` = `status`.`ID` + AND `status`.`IsClosed` = 0 LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS `user` ON `ticket`.`owner` = `user`.`id` WHERE `due_date` IS NOT NULL