]> source.dussan.org Git - gitblit.git/commitdiff
Lower opacity for merge commit short messages in the log panel
authorJames Moger <james.moger@gitblit.com>
Tue, 4 Mar 2014 03:48:43 +0000 (22:48 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 4 Mar 2014 03:48:43 +0000 (22:48 -0500)
src/main/java/com/gitblit/wicket/panels/LogPanel.java
src/main/resources/gitblit.css

index dad25a05281e3d477e10989dd0b16163313c4865..16fc746e40dda8a0e8f7913a307d6db3b1a6b8a0 100644 (file)
@@ -110,6 +110,7 @@ public class LogPanel extends BasePanel {
                        public void populateItem(final Item<RevCommit> item) {\r
                                final RevCommit entry = item.getModelObject();\r
                                final Date date = JGitUtils.getCommitDate(entry);\r
+                               final boolean isMerge = entry.getParentCount() > 1;\r
 \r
                                item.add(WicketUtils.createDateLabel("commitDate", date, getTimeZone(), getTimeUtils()));\r
 \r
@@ -122,7 +123,7 @@ public class LogPanel extends BasePanel {
                                item.add(authorLink);\r
 \r
                                // merge icon\r
-                               if (entry.getParentCount() > 1) {\r
+                               if (isMerge) {\r
                                        item.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));\r
                                } else {\r
                                        item.add(WicketUtils.newBlankImage("commitIcon"));\r
@@ -136,7 +137,7 @@ public class LogPanel extends BasePanel {
                                } else {\r
                                        trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG);\r
                                }\r
-                               LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject",\r
+                               LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject" + (isMerge ? " merge" : ""),\r
                                                trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(\r
                                                                repositoryName, entry.getName()));\r
                                if (!shortMessage.equals(trimmedMessage)) {\r
index 9c763783f7f6ae7496e8f5d1440f16308f704dfe..789477096f9d87f0c20afcef20dc4509f06309aa 100644 (file)
@@ -1712,6 +1712,14 @@ tr.dark:hover a {
        color: white;   \r
 }\r
 \r
+.merge {\r
+       opacity: 0.5;\r
+}\r
+\r
+.merge:hover {\r
+       opacity: 1;\r
+}\r
+\r
 td.author {\r
        font-style: italic !important;\r
        white-space: nowrap;\r
@@ -1768,7 +1776,7 @@ span.metricsTitle {
        font-size: 9px;\r
        font-weight: normal;\r
        border: 1px solid;\r
-       color: black;   \r
+       color: black;\r
 }\r
 \r
 .tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a, .pullRef a {\r