Skip to content

Commit b001a5a

Browse files
author
Vladimir Kotal
committed
Merge pull request #714 from vladak/git-hist-align
left-align comments even for history view of directories
2 parents 4f2cd85 + ab2f54a commit b001a5a

File tree

5 files changed

+52
-37
lines changed

5 files changed

+52
-37
lines changed

web/default/style.css

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@ table#revisions {
287287
margin-left: 2em;
288288
}
289289

290-
#revisions .filelist { /* "Show modified files" */
291-
display: inline;
292-
}
293-
294290
#revisions .filelist-hidden { /* "Hide modified files" */
295291
display: none;
296292
}
@@ -307,20 +303,28 @@ table#revisions {
307303
display: none;
308304
}
309305

310-
#revisions tbody td:first-child {
306+
#revisions td {
307+
padding: 0.5ex;
308+
text-align: center;
309+
}
310+
311+
#revisions td:first-child {
311312
/* rev number - git/mercurial revs numbers look bad with prop. fonts */
312313
font-family: monospace;
313314
text-align: right;
314315
}
315316

316-
#revisions tbody td:nth-child(2), #revisions tbody td:nth-child(3) {
317-
/* Compare and Date column */
318-
text-align: center;
317+
#revisions td > p {
318+
/* log message in comment column */
319+
margin: 0;
320+
text-align: left;
319321
}
320322

321-
#revisions tbody td:nth-child(4) { /* author column */
322-
padding: 0 1ex;
323-
text-align: center;
323+
#revisions td > div {
324+
/* modified file list in comment column */
325+
font-family: monospace;
326+
text-align: left;
327+
float: left;
324328
}
325329

326330
#revisions tbody td.revtags { /* tags row */

web/history.jsp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ document.domReady.push(function() {domReadyHistory();});
105105
<th>Comments <%
106106
if (hist.hasFileList()) {
107107
%><a href="#" onclick="javascript: toggle_filelist(); return false;">
108-
<span class="filelist-hidden">
109-
(&lt;&lt;&lt; Hide modified files)</span>
110-
<span class="filelist">
111-
(Show modified files &gt;&gt;&gt;)</span></a><%
108+
<div class="filelist-hidden">
109+
(&lt;&lt;&lt; Hide modified files)</div>
110+
<div class="filelist">
111+
(Show modified files &gt;&gt;&gt;)</div></a><%
112112
}
113113
%>
114114
</th>
@@ -189,7 +189,7 @@ document.domReady.push(function() {domReadyHistory();});
189189
%><%= author %><%
190190
}
191191
%></td>
192-
<td><%
192+
<td><p><%
193193
String cout = Util.htmlize(entry.getMessage());
194194
if (bugPage != null && bugPage.length() > 0) {
195195
cout = bugPattern.matcher(cout).replaceAll("<a href=\""
@@ -199,10 +199,10 @@ document.domReady.push(function() {domReadyHistory();});
199199
cout = reviewPattern.matcher(cout).replaceAll("<a href=\""
200200
+ reviewPage + "$1\">$1</a>");
201201
}
202-
%><%= cout %><%
202+
%><%= cout %></p><%
203203
Set<String> files = entry.getFiles();
204204
if (files != null) {
205-
%><span class="filelist-hidden"><br/><%
205+
%><div class="filelist-hidden"><br/><%
206206
for (String ifile : files) {
207207
String jfile = Util.stripPathPrefix(path, ifile);
208208
if (rev == "") {
@@ -213,7 +213,7 @@ document.domReady.push(function() {domReadyHistory();});
213213
<a class="h" href="<%= context + Prefix.XREF_P + ifile %>?r=<%= rev %>"><%= jfile %></a><br/><%
214214
}
215215
}
216-
%></span><%
216+
%></div><%
217217
}
218218
%></td>
219219
</tr><%

web/offwhite/style.css

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ table#revisions {
318318
margin-left: 2em;
319319
}
320320

321-
#revisions .filelist { /* "Show modified files" */
322-
display: inline;
323-
}
324-
325321
#revisions .filelist-hidden { /* "Hide modified files" */
326322
display: none;
327323
}
@@ -338,20 +334,28 @@ table#revisions {
338334
display: none;
339335
}
340336

337+
#revisions td {
338+
padding: 0.5ex;
339+
text-align: center;
340+
}
341+
341342
#revisions tbody td:first-child {
342343
/* rev number - git/mercurial revs numbers look bad with prop. fonts */
343344
font-family: monospace;
344345
text-align: right;
345346
}
346347

347-
#revisions tbody td:nth-child(2), #revisions tbody td:nth-child(3) {
348-
/* Compare and Date column */
349-
text-align: center;
348+
#revisions td > p {
349+
/* log message in comment column */
350+
margin: 0;
351+
text-align: left;
350352
}
351353

352-
#revisions tbody td:nth-child(4) { /* author column */
353-
padding: 0 1ex;
354-
text-align: center;
354+
#revisions td > div {
355+
/* modified file list in comment column */
356+
font-family: monospace;
357+
text-align: left;
358+
float: left;
355359
}
356360

357361
#revisions tbody td.revtags { /* tags row */

web/polished/style.css

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ table#revisions {
371371
}
372372

373373
#revisions .filelist { /* "Show modified files" */
374-
display: inline;
375374
color: #ffdd80;
376375
}
377376

@@ -391,20 +390,28 @@ table#revisions {
391390
display: none;
392391
}
393392

393+
#revisions td {
394+
padding: 0.5ex;
395+
text-align: center;
396+
}
397+
394398
#revisions tbody td:first-child {
395399
/* rev number - git/mercurial revs numbers look bad with prop. fonts */
396400
font-family: monospace;
397401
text-align: right;
398402
}
399403

400-
#revisions tbody td:nth-child(2), #revisions tbody td:nth-child(3) {
401-
/* Compare and Date column */
402-
text-align: center;
404+
#revisions td > p {
405+
/* log message in comment column */
406+
margin: 0;
407+
text-align: left;
403408
}
404409

405-
#revisions tbody td:nth-child(4) { /* author column */
406-
padding: 0 1ex;
407-
text-align: center;
410+
#revisions td > div {
411+
/* modified file list in comment column */
412+
font-family: monospace;
413+
text-align: left;
414+
float: left;
408415
}
409416

410417
#revisions tbody td.revtags { /* tags row */

web/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ function add_highlight() {
325325
}
326326

327327
function toggle_filelist() {
328-
$("span").each(
328+
$("div").each(
329329
function() {
330330
if (this.className == "filelist") {
331331
this.setAttribute("style", "display: none;");

0 commit comments

Comments
 (0)