diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 34dee7b1d1666819d0a8b6114c0eeb8e25740d1d..148af95c0a384478afa6c9c7d277198967e5e965 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -473,7 +473,15 @@ return false;"> ><?php echo $tid; ?></a></td> <td align="center" nowrap><?php echo Format::datetime($T[$date_col ?: 'lastupdate']) ?: $date_fallback; ?></td> <td><a <?php if ($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?> - style="max-width: 210px;" + style="max-width: <?php + $base = 280; + // Make room for the paperclip and some extra + if ($T['attachment_count']) $base -= 18; + // Assume about 8px per digit character + if ($threadcount > 1) $base -= 20 + ((int) log($threadcount, 10) + 1) * 8; + // Make room for overdue flag and friends + if ($flag) $base -= 20; + echo $base; ?>px;" href="tickets.php?id=<?php echo $T['ticket_id']; ?>"><span class="truncate"><?php echo $subject; ?></span></a> <?php if ($T['attachment_count']) @@ -506,7 +514,8 @@ return false;"> <?php } ?> - <td nowrap> <?php echo Format::htmlchars($lc); ?></td> + <td nowrap><span class="truncate" style="max-width: 150px"><?php + echo Format::htmlchars($lc); ?></span></td> </tr> <?php } //end of foreach diff --git a/scp/css/scp.css b/scp/css/scp.css index e802d1574404d9940cf7af9717daa295a3386ab8..a560fbded538a7314e20b6aa62a69fb9bd6a2eea 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -2404,6 +2404,9 @@ tr i.help-tip.warning { text-overflow: ellipsis; vertical-align: bottom; } +.truncate.bleed { + text-overflow: hidden; +} td.indented { padding-left: 20px; }