diff options
author | Shawn O. Pearce <sop@google.com> | 2008-12-08 16:27:48 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2008-12-08 18:30:51 -0800 |
commit | 4fe765388eb91d43c66a8399184a1f9f04c11e14 (patch) | |
tree | d6ee813c01510bac7f9c66b7e30978006cbdfd2d /webapp | |
parent | 1b260c47bc8638d39cd8cd567851c131ccf49cc1 (diff) |
Request that overflowing change subjects use "..." when possible
If a subject line overflows what the browser can accept for the
field we want it to clip the value and optionally insert "..."
at the end of the text, if the browser supports that CSS mode
(IE does).
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/src/com/google/gerrit/client/changes/ChangeTable.java | 2 | ||||
-rw-r--r-- | webapp/src/com/google/gerrit/public/Gerrit.css | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/webapp/src/com/google/gerrit/client/changes/ChangeTable.java b/webapp/src/com/google/gerrit/client/changes/ChangeTable.java index 8a95608642..1a4240d3b0 100644 --- a/webapp/src/com/google/gerrit/client/changes/ChangeTable.java +++ b/webapp/src/com/google/gerrit/client/changes/ChangeTable.java @@ -41,6 +41,7 @@ import java.util.Set; public class ChangeTable extends FancyFlexTable<ChangeInfo> { private static final String S_C_ID = "C_ID"; + private static final String S_C_SUBJECT = "C_SUBJECT"; private static final String S_SECTION_HEADER = "SectionHeader"; private static final String S_EMPTY_SECTION = "EmptySection"; @@ -201,6 +202,7 @@ public class ChangeTable extends FancyFlexTable<ChangeInfo> { fmt.addStyleName(row, i, S_DATA_CELL); } fmt.addStyleName(row, C_ID, S_C_ID); + fmt.addStyleName(row, C_SUBJECT, S_C_SUBJECT); } private void populateChangeRow(final int row, final ChangeInfo c) { diff --git a/webapp/src/com/google/gerrit/public/Gerrit.css b/webapp/src/com/google/gerrit/public/Gerrit.css index 6786250763..a2a033fd83 100644 --- a/webapp/src/com/google/gerrit/public/Gerrit.css +++ b/webapp/src/com/google/gerrit/public/Gerrit.css @@ -108,6 +108,8 @@ white-space: nowrap; font-size: 16pt; margin: 3px 0 8px; + text-overflow: ellipsis; + overflow: hidden; } @@ -159,6 +161,12 @@ text-align: right; } +.gerrit-ChangeTable .C_SUBJECT { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + .gerrit-ChangeTable .IconHeader { border-top: 1px solid white; border-bottom: 1px solid white; |