<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ class RemoteProjectRenderer &lt; RemoteSiteRenderer
   constructor :page, :project
   
   def draw_current_iteration_velocity_marker
-    @page.call &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
+    @page.call &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;
   end
   
   def update_project_summary</diff>
      <filename>app/renderers/remote_project_renderer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
-&lt;div class=&quot;section&quot;&gt;
-
+&lt;div class=&quot;section workspace&quot;&gt;
   &lt;table width=&quot;100%&quot;&gt;
     &lt;tr&gt;
       &lt;td&gt;&lt;b&gt;Workspace&lt;/b&gt;&lt;/td&gt;
@@ -10,14 +9,10 @@
   &lt;div id=&quot;iteration_nil&quot; class=&quot;story_list&quot;&gt;
   	&lt;%= render :partial  =&gt; 'stories/list', :locals =&gt; { :stories =&gt; @stories } %&gt;
   &lt;/div&gt;
-  &lt;% javascript_tag do %&gt;
-    Strac.Iteration.drawCurrentIterationVelocityMarker();
-  &lt;% end %&gt;
-
 
   &lt;%= sortable_element &quot;iteration_nil&quot;,
                        :url =&gt; reorder_stories_path(@project), :method =&gt; :put,
                        :tag =&gt; 'div', :handle =&gt; 'draggable', :dropOnEmpty =&gt; true, 
-                       :onChange =&gt;  &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
+                       :onChange =&gt;  &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;
                         -%&gt;
 &lt;/div&gt;
\ No newline at end of file</diff>
      <filename>app/views/projects/workspace.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -13,4 +13,4 @@ page.sortable bucket_id, :url =&gt; reorder_stories_path(@project), :method =&gt; :put
 
 @story = Story.new :bucket_id =&gt; @story.bucket_id # we want a fresh form
 page[&quot;#{bucket_id}_story_new&quot;].replace_html :partial =&gt; 'stories/new', :locals =&gt; { :story =&gt; @story }
-page.call &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
+page.call &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;</diff>
      <filename>app/views/stories/create.js.rjs</filename>
    </modified>
    <modified>
      <diff>@@ -5,4 +5,4 @@ page.visual_effect :appear, :notice
 page.delay( 5 ) {  page.visual_effect :fade, :notice }
 
 page[&quot;story_#{@story.id}&quot;].remove
-page.call &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
\ No newline at end of file
+page.call &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;
\ No newline at end of file</diff>
      <filename>app/views/stories/destroy.js.rjs</filename>
    </modified>
    <modified>
      <diff>@@ -30,4 +30,4 @@ end
 
 page[:project_summary].replace :partial =&gt; &quot;projects/summary&quot;, :locals =&gt; { :project =&gt; @project }
 page[:project_summary].replace :partial =&gt; &quot;projects/summary&quot;, :locals =&gt; { :project =&gt; @project }
-page.call &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
+page.call &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;</diff>
      <filename>app/views/stories/update.js.rjs</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>public/images/arrow_down.png</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>public/images/arrow_up.png</filename>
    </modified>
    <modified>
      <diff>@@ -62,42 +62,57 @@ Object.extend(Strac.ProjectStats, {
 /* Iteration */
 Strac.Iteration = Class.create();
 Object.extend(Strac.Iteration, {
-  drawCurrentIterationVelocityMarker: function(){
-    Strac.Iteration.removeCurrentIterationVelocityMarker();
-    new Strac.Iteration($$(&quot;.section .story_list:first&quot;)[0]).drawEstimatedCompletionLine(Strac.ProjectStats.averageVelocity());    
+  drawWorkspaceVelocityMarkers: function(){
+    Strac.Iteration.removeVelocityMarkers();
+    new Strac.Iteration(
+      $$(&quot;.section .story_list:first&quot;)[0]
+    ).drawEstimatedVelocityMarkers(Strac.ProjectStats.averageVelocity());    
   },
   
-  removeCurrentIterationVelocityMarker: function(){
-    $$('.story_list .velocity_marker').each(function(el){
-      el.remove();
-    });
+  removeVelocityMarkers: function(){
+    $$('.story_list .velocity_marker').invoke(&quot;remove&quot;);
   }
 });
 Strac.Iteration.prototype = {
   initialize: function(story_list_element) {
     this.story_list_element = story_list_element;
   },
-  // Number($$('.average_velocity')[0].textContent)
-  drawEstimatedCompletionLine: function(velocity){
+
+  drawCurrentIterationEstimationLine: function(story){
+    story.element().insert({
+      before: '&lt;div class=&quot;velocity_marker&quot;&gt;' +
+        '&lt;div class=&quot;right&quot;&gt;Next Iteration&lt;/div&gt;&lt;div class=&quot;left&quot;&gt;Expected this iteration&lt;/div&gt;' +
+      '&lt;/div&gt;'
+    });
+  },
+  
+  drawFutureIterationEstimationLine: function(story){
+    story.element().insert({
+      before: '&lt;div class=&quot;future velocity_marker&quot;&gt;' +
+        '&lt;div class=&quot;left&quot;&gt;Future Iteration&lt;/div&gt;&lt;br class=&quot;clearfix&quot;/&gt;&lt;/div&gt;'
+    });    
+  },
+
+  drawEstimatedVelocityMarkers: function(velocity){
     var points = 0;
-    var stories = this.stories();
-    var story;
-    for(var i=0, story=stories[i] ; i&lt;stories.size() ; i++, story=stories[i]){
+    var drawn_current = false;
+    this.stories().each(function(story){
       points += story.points();
-      if(points &gt; velocity){
-        story.element().insert({
-          before: '&lt;div class=&quot;velocity_marker&quot;&gt;' +
-            '&lt;div class=&quot;right&quot;&gt;Backlog&lt;/div&gt;&lt;div class=&quot;left&quot;&gt;Expected this iteration&lt;/div&gt;' +
-          '&lt;/div&gt;'
-        });
-        break;
+      if(points &gt; velocity &amp;&amp; !drawn_current){
+        this.drawCurrentIterationEstimationLine(story);
+        points = story.points();
+        drawn_current = true;
+      } else if(drawn_current &amp;&amp; points &gt; velocity) {
+        this.drawFutureIterationEstimationLine(story);
+        points = story.points();
       }
-    }
+    }.bind(this));
   },
   
   stories: function(){
     return this.story_list_element.select(&quot;.story_card&quot;).map(function(el){
       return new Strac.Story(el);
+      Object.extend(el, Strac.Story);
     });
   }
 };
@@ -125,7 +140,8 @@ Strac.Story.prototype = {
 };
 
 /* Window Load Events */
-Event.observe(window, 'load', function(){
+document.observe('dom:loaded', function(){
   Strac.setupCloseButtonForElement($('notice'));
   Strac.setupCloseButtonForElement($('error'));
+  Strac.Iteration.drawWorkspaceVelocityMarkers();
 });</diff>
      <filename>public/javascripts/strac.js</filename>
    </modified>
    <modified>
      <diff>@@ -675,18 +675,27 @@ span.logged_in a{
 .story_list .velocity_marker .left{
   text-align: left;
   width: 50%;
-  background: url(/images/arrow_up.png) no-repeat;
-  padding-left: 15px;
+  background: url(/images/arrow_up.png) no-repeat center left;
+  padding-left: 13px;
 }
 
 .story_list .velocity_marker .right{
   text-align: right;
   width: 50%;
   float: right;
-  background: url(/images/arrow_down.png) no-repeat right;
+  background: url(/images/arrow_down.png) no-repeat center right;
   padding-right: 15px;
 }
 
+.story_list .future.velocity_marker {
+  background-color: #999;
+  color: #FFF;
+}
+
+.story_list .future.velocity_marker .left{
+  background: url(/images/arrow_down.png) no-repeat center left;
+}
+
 fieldset.search { 
   border: 1px solid #ccc;
   padding: 0 1em;</diff>
      <filename>public/stylesheets/screen.css</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ describe RemoteProjectRenderer do
     end
     
     it &quot;tells the page to draw the current iteration velocity marker&quot; do
-      @page.should_receive(:call).with(&quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;)
+      @page.should_receive(:call).with(&quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;)
       draw_current_iteration_velocity_marker
     end
   end</diff>
      <filename>spec/renderers/remote_project_renderer_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ describe &quot;/projects/workspace.html.erb&quot; do
          :tag =&gt; 'div', 
          :handle =&gt; 'draggable', 
          :dropOnEmpty =&gt; true, 
-         :onChange =&gt;  &quot;Strac.Iteration.drawCurrentIterationVelocityMarker&quot;
+         :onChange =&gt;  &quot;Strac.Iteration.drawWorkspaceVelocityMarkers&quot;
       )
     end
   end</diff>
      <filename>spec/views/projects/workspace.html.erb_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ad2fc5e1f72add91352e8f66bd576aebfc30211e</id>
    </parent>
  </parents>
  <author>
    <name>Zach Dennis</name>
    <email>zach.dennis@gmail.com</email>
  </author>
  <url>http://github.com/zdennis/strac/commit/ed01777aaf731688406cc6258ef35fa894542610</url>
  <id>ed01777aaf731688406cc6258ef35fa894542610</id>
  <committed-date>2008-03-15T20:19:14-07:00</committed-date>
  <authored-date>2008-03-15T20:19:14-07:00</authored-date>
  <message>Starter implementatino for drawing future velocity markers</message>
  <tree>dce9518d2895a2a68d6de3a700809cd9dce124f5</tree>
  <committer>
    <name>Zach Dennis</name>
    <email>zach.dennis@gmail.com</email>
  </committer>
</commit>
