Fixes #508 Update category visibility after loading events

This commit is contained in:
Mike Koch 2017-03-27 20:59:13 -04:00
parent ba0a035d88
commit 938bb20c3f
2 changed files with 2 additions and 3 deletions

View File

@ -68,7 +68,7 @@ while ($row = hesk_dbFetchAssoc($rs)) {
continue; continue;
} }
$row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000;' : 'border: solid 1px ' . $row['color'] . '; background: ' . $row['color']; $row['css_style'] = $row['color'] == null ? 'background: white; color: black; border: solid 1px #000;' : 'border: solid 1px ' . $row['color'] . '; background: ' . $row['color'];
$categories[] = $row; $categories[] = $row;
} }
@ -83,7 +83,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li class="header text-uppercase"><?php echo $hesklang['calendar_categories']; ?></li> <li class="header text-uppercase"><?php echo $hesklang['calendar_categories']; ?></li>
<?php foreach ($categories as $category): ?> <?php foreach ($categories as $category): ?>
<!-- TODO Clean this up -->
<li> <li>
<div class="ticket-info"> <div class="ticket-info">
<div class="hide-on-overflow no-wrap event-category background-volatile" <div class="hide-on-overflow no-wrap event-category background-volatile"

View File

@ -22,9 +22,9 @@ $(document).ready(function() {
events.push(buildEvent(this.id, this)); events.push(buildEvent(this.id, this));
}); });
callback(events); callback(events);
updateCategoryVisibility();
}, },
error: function(data) { error: function(data) {
console.error(data);
$.jGrowl($('#lang_error_loading_events').text(), { theme: 'alert-danger', closeTemplate: '' }); $.jGrowl($('#lang_error_loading_events').text(), { theme: 'alert-danger', closeTemplate: '' });
} }
}); });