Commits

Anonymous committed f4e3253

Make the milestone progress bar fill its bounding box (#2430). Thanks to Markus Fuchs for the initial patch.

  • Participants
  • Parent commits c34a810
  • Branches trunk

Comments (0)

Files changed (4)

  * Christian Boos                 cboos@bct-technology.com
  * Rocky Burt                     rocky.burt@myrealbox.com
  * Toni Brkic                     toni.brkic@switchcore.com
+ * Felix Colins                   felix@keyghost.com
  * Wesley Crucius                 wcrucius@sandc.com
+ * dju'                           
  * Daragh Fitzpatrick             Daragh@i2i-Tech.com
- * dju'                           
- * Felix Colins                   felix@keyghost.com
+ * Markus Fuchs                   
  * Eric Gillespie                 epg@netbsd.org
  * Matthew Good                   trac@matt-good.net
  * Shun-ichi Goto                 gotoh@taiyo.co.jp

File htdocs/css/roadmap.css

 /* General styles for the progress bars */
-div.progress { border: 1px solid #d7d7d7; float: left }
-div.progress :link, div.progress :visited {
- background: #fff;
+table.progress {
+ border: 1px solid #d7d7d7;
+ border-collapse: collapse;
+ border-spacing: 0;
+ float: left;
+ margin: 0;
+ padding: 0;
+ empty-cells: show;
+}
+table.progress a, table.progress :link, table.progress :visited,
+table.progress :link:hover, table.progress :visited:hover {
  border: none;
  display: block;
- float: left;
+ width: 100%;
  height: 1.2em;
+ padding: 0;
+ margin: 0;
+ text-decoration: none
 }
-div.progress :link:hover, div.progress :visited:hover { background: #fff }
-div.progress .closed:link, div.progress .closed:visited { background: #bae0ba }
+table.progress td { background: #fff; padding: 0 }
+table.progress td.closed { background: #bae0ba }
+table.progress td :hover { background: none }
 p.percent { font-size: 10px; line-height: 2.4em; margin: 0.9em 0 0 }
 
 /* Styles for the roadmap view */
 #stats th { text-align: right; text-transform: capitalize }
 #stats th :link, #stats th :visited { border: none }
 #stats td { padding-left: 0.5em; width: 100% }
-#stats td div.progress { margin: 3px 4px 3px 0 }
-#stats td p.percent { line-height: 1.2em; margin-top: .4em }
+#stats td table.progress { margin: 3px 4px 3px 0 }
+#stats td table.progress td { padding: 0 }
+#stats td p.percent { line-height: 1.2em; margin-top: 3px }
 
 /* Styles for the milestone edit form */
 #edit fieldset { margin: 1em 0 }

File templates/milestone.cs

    </p><?cs
    with:stats = milestone.stats ?><?cs
     if:#stats.total_tickets > #0 ?>
-     <div class="progress">
-      <a class="closed" href="<?cs
-        var:milestone.queries.closed_tickets ?>" style="width: <?cs
-        var:#stats.percent_closed ?>%" title="<?cs
+     <table class="progress">
+      <tr>
+      <td class="closed" style="width: <?cs
+        var:#stats.percent_closed ?>%">
+        <a href="<?cs
+        var:milestone.queries.closed_tickets ?>" title="<?cs
         var:#stats.closed_tickets ?> of <?cs
         var:#stats.total_tickets ?> ticket<?cs
-        if:#stats.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
-      <a class="open" href="<?cs
-        var:milestone.queries.active_tickets ?>" style="width: <?cs
-        var:#stats.percent_active - 1 ?>%" title="<?cs
+        if:#stats.total_tickets != #1 ?>s<?cs /if ?> closed"></a></td>
+      <td class="open" style="width: <?cs
+        var:#stats.percent_active ?>%">
+        <a href="<?cs
+        var:milestone.queries.active_tickets ?>" title="<?cs
         var:#stats.active_tickets ?> of <?cs
         var:#stats.total_tickets ?> ticket<?cs
         if:#stats.total_tickets != #1 ?>s<?cs /if ?> active"></a>
-     </div>
+      </tr>
+     </table>
      <p class="percent"><?cs var:#stats.percent_closed ?>%</p>
      <dl>
       <dt>Closed tickets:</dt>
        <th scope="row"><a href="<?cs
          var:group.queries.all_tickets ?>"><?cs var:group.name ?></a></th>
        <td style="white-space: nowrap"><?cs if:#group.total_tickets ?>
-        <div class="progress" style="width: <?cs
+        <table class="progress" style="width: <?cs
           var:#group.percent_total * #80 / #milestone.stats.max_percent_total ?>%">
-         <a class="closed" href="<?cs
-           var:group.queries.closed_tickets ?>" style="width: <?cs
-           var:#group.percent_closed ?>%" title="<?cs
-          var:group.closed_tickets ?> of <?cs
-          var:group.total_tickets ?> ticket<?cs
-          if:group.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
-         <a class="open" href="<?cs
-           var:group.queries.active_tickets ?>" style="width: <?cs
-           var:#group.percent_active - 1 ?>%" title="<?cs
-          var:group.active_tickets ?> of <?cs
-          var:group.total_tickets ?> ticket<?cs
-          if:group.total_tickets != 1 ?>s<?cs /if ?> active"></a>
-        </div>
+         <tr>
+          <td class="closed" style="width: <?cs
+            var:#group.percent_closed ?>%"><a href="<?cs
+            var:group.queries.closed_tickets ?>" title="<?cs
+           var:group.closed_tickets ?> of <?cs
+           var:group.total_tickets ?> ticket<?cs
+           if:group.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
+          </td>
+          <td class="open" style="width: <?cs
+            var:#group.percent_active ?>%"><a href="<?cs
+            var:group.queries.active_tickets ?>" title="<?cs
+           var:group.active_tickets ?> of <?cs
+           var:group.total_tickets ?> ticket<?cs
+           if:group.total_tickets != 1 ?>s<?cs /if ?> active"></a>
+          </td>
+         </tr>
+        </table>
         <p class="percent"><?cs var:group.closed_tickets ?>/<?cs
          var:group.total_tickets ?></p>
        <?cs /if ?></td>

File templates/roadmap.cs

     </p><?cs
     with:stats = milestone.stats ?><?cs
      if:#stats.total_tickets > #0 ?>
-      <div class="progress">
-       <a class="closed" href="<?cs
-         var:milestone.queries.closed_tickets ?>" style="width: <?cs
-         var:#stats.percent_closed ?>%" title="<?cs
-         var:#stats.closed_tickets ?> of <?cs
-         var:#stats.total_tickets ?> ticket<?cs
-         if:#stats.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
-       <a class="open" href="<?cs
-         var:milestone.queries.active_tickets ?>" style="width: <?cs
-         var:#stats.percent_active - 1 ?>%" title="<?cs
-         var:#stats.active_tickets ?> of <?cs
-         var:#stats.total_tickets ?> ticket<?cs
-         if:#stats.total_tickets != #1 ?>s<?cs /if ?> active"></a>
-      </div>
+      <table class="progress">
+       <tr>
+        <td class="closed" style="width: <?cs
+          var:#stats.percent_closed ?>%"><a href="<?cs
+          var:milestone.queries.closed_tickets ?>" title="<?cs
+          var:#stats.closed_tickets ?> of <?cs
+          var:#stats.total_tickets ?> ticket<?cs
+          if:#stats.total_tickets != #1 ?>s<?cs /if ?> closed"></a></td>
+        <td class="open" style="width: <?cs
+          var:#stats.percent_active ?>%"><a href="<?cs
+          var:milestone.queries.active_tickets ?>" title="<?cs
+          var:#stats.active_tickets ?> of <?cs
+          var:#stats.total_tickets ?> ticket<?cs
+          if:#stats.total_tickets != #1 ?>s<?cs /if ?> active"></a></td>
+       </tr>
+      </table>
       <p class="percent"><?cs var:#stats.percent_closed ?>%</p>
       <dl>
        <dt>Closed tickets:</dt>