Changeset 30

Show
Ignore:
Timestamp:
02/12/07 20:57:14 (2 years ago)
Author:
simon
Message:

Ajaxify the calendar. Closes #5.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/templates/calendar

    r2 r30  
     1<div id="calendar"> 
    12<div align="center" style="border: 1px solid black; background: #eee"> 
     3<script> 
     4  function redo_self(arg) { 
     5    new Ajax.Updater("calendar","[%base%]/calendar?view_cal="+arg, { method: "get" }) 
     6  } 
     7</script> 
    28[% IF request.action == "view" %] 
    39    [% SET shot = photo.shot %] 
     
    1016<table class="calendar"> 
    1117    <tr> 
    12         <th> <a href="[%base%]/[%request.path%]?view_cal=[%prev.ymd%]">&laquo; </a></th> 
     18        <th> <a href="javascript:redo_self('[%prev.ymd%]')">&laquo; </a></th> 
    1319        <th colspan="5">  
    1420            [% date.strftime("%Y-%m") %]  
    1521        </th> 
    1622        <th> [% IF next %] 
    17             <a href="[%base%]/[%request.path%]?view_cal=[%next.ymd%]">&raquo; </a> 
     23            <a href="javascript:redo_self('[%next.ymd%]')">&raquo; </a> 
    1824            [% END %] 
    1925        </th> 
     
    4248</table> 
    4349</div> 
     50</div>