Browse Source

#379 Tweak calendar catgory display to prevent overflow issues

tags/2.6.0
Mike Koch 3 years ago
parent
commit
0fdc62734c
3 changed files with 23 additions and 8 deletions
  1. 7
    4
      admin/calendar.php
  2. 7
    4
      calendar.php
  3. 9
    0
      css/mods-for-hesk.css

+ 7
- 4
admin/calendar.php View File

@@ -65,7 +65,7 @@ while ($row = hesk_dbFetchAssoc($rs)) {
continue;
}

$row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000' : 'background: ' . $row['color'];
$row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000; padding-left: 14px' : 'background: ' . $row['color'];
$categories[] = $row;
}

@@ -93,9 +93,12 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<div class="checkbox">
<input type="checkbox" data-select-target="category-toggle" name="category-toggle" value="<?php echo $category['id']; ?>" checked>
</div>
<span class="label background-volatile category-label" style="<?php echo $category['css_style']; ?>">
<?php echo $category['name']; ?>
</span>
<div class="row">
<div class="col-sm-1" style="<?php echo $category['css_style']; ?>">&nbsp;</div>
<div class="col-sm-11 hide-on-overflow no-wrap">
<?php echo $category['name']; ?>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>

+ 7
- 4
calendar.php View File

@@ -58,7 +58,7 @@ $categorySql = "SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "c
$categoryRs = hesk_dbQuery($categorySql);
while ($row = hesk_dbFetchAssoc($categoryRs))
{
$row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000' : 'background: ' . $row['color'];
$row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000; padding-right: 14px' : 'background: ' . $row['color'];
$categories[] = $row;
}

@@ -82,9 +82,12 @@ require_once(HESK_PATH . 'inc/header.inc.php');
<div class="checkbox">
<input type="checkbox" data-select-target="category-toggle" name="category-toggle" value="<?php echo $category['id']; ?>" checked>
</div>
<span class="label background-volatile category-label" style="<?php echo $category['css_style']; ?>">
<?php echo $category['name']; ?>
</span>
<div class="row">
<div class="col-sm-1" style="<?php echo $category['css_style']; ?>">&nbsp;</div>
<div class="col-sm-11 hide-on-overflow no-wrap">
<?php echo $category['name']; ?>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>

+ 9
- 0
css/mods-for-hesk.css View File

@@ -342,4 +342,13 @@ div.setupButtons {
.file-row p.name {
overflow: hidden;
text-overflow: ellipsis;
}

.no-wrap {
white-space: nowrap;
}

.hide-on-overflow {
overflow: hidden;
text-overflow: ellipsis;
}

Loading…
Cancel
Save