Ignore:
Timestamp:
01/03/16 20:55:59 (9 years ago)
Author:
nanardon
Message:

Add timeline view to employment page

Location:
trunk/LATMOS-Accounts-Web
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/root/html/includes/wrapper.tt

    r1546 r1583  
    2626 
    2727<script src="[% c.uri_for('/static', 'js', 'd3', 'd3.v3.js') %]"></script> 
     28<script src="[% c.uri_for('/static', 'js', 'timeline', 'timeframe.js') %]"></script> 
    2829 
    2930<link rel="stylesheet" href="[% c.uri_for('/static/js/jqplot/jquery.jqplot.css') %]" type="text/css"> 
  • trunk/LATMOS-Accounts-Web/root/html/users/employment.tt

    r1515 r1583  
    77 
    88<div id="objectform" class="objectform"> 
     9 
     10 
     11[% IF c.stash.user.listEmployment %] 
     12<div id=timeline style="width: 80%"></div> 
     13 
     14<script> 
     15$(function() { 
     16    $.ajax({ 
     17        url: "[% c.uri_for('/json/timeline', username) %]", 
     18        dataType: "json", 
     19        success: function(data) { 
     20            var t2 = Timeframe("#timeline") 
     21                .start(data.start) 
     22                .end(data.end) 
     23                .majorTicks(5, "years") 
     24                .minorTicks(1, "year"); 
     25            t2.addCategory(data.employments) 
     26            t2.draw(); 
     27        } 
     28    }); 
     29        
     30}); 
     31</script> 
    932 
    1033<div style="height: 150px; overflow-y: auto;"> 
     
    4467[% END %] 
    4568</div> 
     69 
     70[% END %] 
    4671 
    4772[% BLOCK formattr %] 
  • trunk/LATMOS-Accounts-Web/root/static/style.css

    r1500 r1583  
    1616     /* prevent horizontal scrollbar */ 
    1717     overflow-x: hidden; 
     18} 
     19 
     20.container { 
     21    margin: 20px auto; 
     22    max-width: 800px; 
    1823} 
    1924 
Note: See TracChangeset for help on using the changeset viewer.