Commits

Roger Haase committed 4f3ea3b

fix for issue 287 item history size column should be aligned right,
move monospaced class styling from main.styl to userstyles

Comments (0)

Files changed (9)

MoinMoin/templates/history.html

                     <th>{{ _("Name") }}</th>
                     <th>{{ _("Rev.") }}</th>
                     <th>{{ _("Timestamp") }}</th>
-                    <th>{{ _("Size") }}</th>
+                    <th class="moin-integer">{{ _("Size") }}</th>
                     <th><input type="submit" value="Diff" /></th>
                     <th>{{ _("Editor") }}</th>
                     <th>{{ _("Content-Type") }}</th>
                 {% for doc in history %}
                 <tr>
                     <td class="moin-wordbreak">{{ doc.name }}</td>
-                    <td class="moin-integer monospaced">{{ doc.revid | shorten_id }}</td>
+                    <td>{{ doc.revid | shorten_id }}</td>
                     <td>{{ doc.mtime|datetimeformat }}</td>
                     <td class="moin-integer">{{ doc.size }}</td>
                     <td>

MoinMoin/templates/utils.html

 <thead>
     <tr>
         {% for heading in headings %}
-        <th>{{ heading }}</th>
+            {% if rows and rows[0][loop.index0] is number %}
+                <th class="moin-integer">{{ heading }}</th>
+            {% else %}
+                <th>{{ heading }}</th>
+            {% endif %}
         {% endfor %}
     </tr>
 </thead>

MoinMoin/themes/foobar/static/css/common.css

 .center { text-align: center; }
 .right { text-align: right; }
 .justify { text-align: justify; }
+.monospaced { font-family: monospace; }
 a.moin-www:before,a.moin-http:before,a.moin-https:before{content:url("../img/moin-www.png");margin:0 .2em;vertical-align:middle}
 a.moin-file:before,a.moin-ftp:before{content:url("../img/moin-ftp.png");margin:0 .2em;vertical-align:middle}
 a.moin-nntp:before,a.moin-news:before{content:url("../img/moin-news.png");margin:0 .2em;vertical-align:middle}
 .moin-history-trash:before{content:url("../img/moin-deleted.png")}
 .moin-history-rename:before{content:url("../img/moin-renamed.png")}
 .moin-history-copy:before{content:url("../img/moin-new.png")}
-.moin-integer{width:2%}
 .moin-inline-label{display:inline}
 .moin-history-links{width:5%;}
 .moin-history-links a{display:block}
 table.zebra tbody tr,table.zebra > tr{background-color:#d9d9d9}
 table.zebra th,table.zebra td{border:none}
 table.zebra td form input{width:100%}
+table.zebra tbody tr:nth-child(odd),table.zebra > tr:nth-child(odd){background-color:#e8e8e8}
 pre{font-family:monospace;white-space:pre-wrap;word-wrap:break-word;border:1px solid #ccc;background-color:#d6d5d0;margin:.5em;padding:5px;clear:both;}
 pre.comment{background-color:#2d2d2d;color:#fff;margin:0;padding:0;border:0;}
 pre.comment:before{content:url("../img/attention.png")}
 sup{vertical-align:super}
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
+.moin-integer{text-align:right;padding-right:1em;width:2%}
 @media print{#moin-global-tray,#moin-local-panel,#moin-footer,#moin-search{display:none}
 }

MoinMoin/themes/foobar/static/css/stylus/color_palette.styl

 shadow_color = #9d9d9b
 table_bg_color = #d9d9d9
 table_header_color = #808080
+table_row_color = #e8e8e8
 link_color = #1E90FF
 hover_color = #007cef
 active_color = #51d443

MoinMoin/themes/foobar/static/css/stylus/main.styl

 .moin-history-copy:before
     content url('../img/moin-new.png')
 
-.moin-integer
-    width 2%
-
 .moin-inline-label
     display inline
 
         form
             input
                 width 100%
+    tbody tr:nth-child(odd),
+    > tr:nth-child(odd)
+        background-color table_row_color
 
 pre
     font-family monospace
     font-size 1.17em
 .moin-small
     font-size .83em
+.moin-integer
+    text-align right
+    padding-right 1em
+    width 2%
 
 /* fix tests -- currently checking <big> and <small> */
 @media print

MoinMoin/themes/foobar/static/css/stylus/userstyles.css

 .center { text-align: center; }
 .right { text-align: right; }
 .justify { text-align: justify; }
+.monospaced { font-family: monospace; }

MoinMoin/themes/modernized/static/css/common.css

 .center { text-align: center; }
 .right { text-align: right; }
 .justify { text-align: justify; }
+.monospaced { font-family: monospace; }
 a.moin-www:before,a.moin-http:before,a.moin-https:before{content:url("../img/moin-www.png");margin:0 .2em;vertical-align:middle}
 a.moin-file:before,a.moin-ftp:before{content:url("../img/moin-ftp.png");margin:0 .2em;vertical-align:middle}
 a.moin-nntp:before,a.moin-news:before{content:url("../img/moin-news.png");margin:0 .2em;vertical-align:middle}
 ins{background-color:#fff;text-decoration:underline}
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
-.moin-integer{text-align:right;padding-right:1em}
+.moin-integer{text-align:right;padding-right:1em;width:2%}
 .moin-inline-label{display:inline}
 h1{font-size:2em;margin:.67em 0;border-bottom:5px solid #4e7da9;padding-bottom:5px}
 h2{font-size:1.5em;margin:.75em 0;padding-bottom:4px}
 pre{border:1px solid #4e7da9;background-color:#dfdfdf;padding:5px;clear:both;font-family:monospace;margin:.33em 0;white-space:pre-wrap}
 pre.comment{background-color:#708090;color:#fff;padding:0;margin:0;border:0}
 pre.comment:before{content:url("../img/attention.png")}
-.monospaced{font-family:monospace}
 table{margin:1%;border-collapse:collapse}
 th,td{padding:.3em .4em;vertical-align:middle;text-align:left}
 th{border:1px solid #4e7da9;background-color:#708090;text-align:center;color:#d8dfe9}
 .moin-history-trash:before{content:url("../img/moin-deleted.png")}
 .moin-history-rename:before{content:url("../img/moin-renamed.png")}
 .moin-history-copy:before{content:url("../img/moin-new.png")}
-.moin-integer{width:2%}
 .moin-history-links{width:5%}
 .moin-history-links a{display:block;margin-bottom:4px}
 .moin-history-editortext,.moin-history-links span,.moin-history-comment span{color:#000;display:block;margin-bottom:5px}

MoinMoin/themes/modernized/static/css/stylus/main.styl

 .moin-integer
     text-align right
     padding-right 1em
+    width 2%
 
 .moin-inline-label
     display inline
 pre.comment:before
     content url(../img/attention.png)
 
-.monospaced
-    font-family monospace
-
 table
     margin 1%
     border-collapse collapse
 .moin-history-copy:before
     content url('../img/moin-new.png')
 
-.moin-integer
-    width 2%
-
 .moin-history-links
     width 5%
 

MoinMoin/themes/modernized/static/css/stylus/userstyles.css

 .center { text-align: center; }
 .right { text-align: right; }
 .justify { text-align: justify; }
+.monospaced { font-family: monospace; }