Changeset 103

Show
Ignore:
Timestamp:
04/27/08 19:19:03 (2 months ago)
Author:
rgrp
Message:

[timeline][l]: implement timelines on thread read view using simile timeline widget.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/microfacts/public/app/controllers/thread_controller.js

    r101 r103  
    3838                        new FactletSearchController(this, $('factlet-search')); 
    3939                    } 
     40                    if ($('thread-timeline')) { 
     41                        new ThreadTimelineController(this, $('thread-timeline')); 
     42                    } 
    4043                } 
    4144            } 
     
    5053                } 
    5154                this.deck.focusOn(factletElem); 
     55                console.log('Should update timeline'); 
    5256            } 
    5357        } 
  • trunk/microfacts/public/assets/jsinclude.txt

    r88 r103  
    44lib/model 
    55lib/controller 
     6lib/timeline 
    67models/thread 
    78models/factlet 
     
    1112controllers/factlet_info_controller 
    1213controllers/factlet_search_controller 
     14controllers/thread_timeline_controller 
  • trunk/microfacts/templates/layout.html

    r88 r103  
    1919      <script src="/vendor/mootools-trunk-1516.js" type="text/javascript" charset="utf-8"></script> 
    2020      <script src="/vendor/ejs/ejs.js" type="text/javascript" charset="utf-8"></script> 
     21      <script src="/vendor/simile/timeline/timeline-api.js" type="text/javascript" charset="utf-8"></script> 
    2122 
    2223      <!-- #jsincludeSTART --> 
     
    2728<script type="text/javascript" charset="utf-8" src="/app/lib/model.js"></script> 
    2829<script type="text/javascript" charset="utf-8" src="/app/lib/controller.js"></script> 
     30<script type="text/javascript" charset="utf-8" src="/app/lib/timeline.js"></script> 
    2931<script type="text/javascript" charset="utf-8" src="/app/models/thread.js"></script> 
    3032<script type="text/javascript" charset="utf-8" src="/app/models/factlet.js"></script> 
     
    3436<script type="text/javascript" charset="utf-8" src="/app/controllers/factlet_info_controller.js"></script> 
    3537<script type="text/javascript" charset="utf-8" src="/app/controllers/factlet_search_controller.js"></script> 
     38<script type="text/javascript" charset="utf-8" src="/app/controllers/thread_timeline_controller.js"></script> 
    3639 
    3740      <!-- #jsincludeEND --> 
  • trunk/microfacts/templates/thread/read.html

    r95 r103  
    1414 
    1515  <body> 
    16     <aside id="thread-control-${c.thread.id}" py:if="len(c.thread.factlets) > 0"
     16    <aside id="thread-control-${c.thread.id}"
    1717      <h2>Thread control:</h2> 
    1818      <p>To move between different Factlets in the Thread either use the 
     
    2727      </p> 
    2828    </aside> 
     29 
     30    <aside id="thread-timeline-control-${c.thread.id}"> 
     31      <h2>Timeline control:</h2> 
     32      <p>To scroll the timeline click and drag horizontally (in any band). To resize the timeline click and drag vertically.</p> 
     33      <p><strong>TODO: make these buttons functional (js only)</strong></p> 
     34      <form> 
     35        <input type="button" value="Show Timeline" class="show" /> 
     36        <input type="button" value="Hide Timeline" class="hide" /> 
     37      </form> 
     38      <p><strong>TODO: might want to move to having an explicit thread timeline view in which timeline is vertical and replaces the factlet-info box on the right ...</strong></p> 
     39    </aside> 
    2940     
    3041    <div id="thread-${c.thread.id}" class="thread"> 
     
    3445        (${h.link_to("Edit", h.url_for(controller='thread', action='update'))}) 
    3546        </h2> 
     47      <div id="thread-timeline" style="height: 150px; border: 1px solid #aaa; margin-bottom: 20px;"></div> 
    3648       
    3749      <py:choose>