Source

eurostat / eurostat / templates / index.html

<html xmlns:py="http://genshi.edgewall.org/"
  xmlns:xi="http://www.w3.org/2001/XInclude">

  <py:def function="page_title">Home</py:def>

  <py:def function="optional_head">
    <xi:include href="_media.html" />
    <script type="text/javascript">
var datasetId = '${dataset_id}';
var cachedir = '${url_for('static', filename='cache')}';
var indexJson = '${url_for('static', filename='cache/peeis.json')}';
jQuery(document).ready(function($) {
  $.getJSON(indexJson, null, function(data) {
    var listingElement = $('#dataset-listing');
    for(thisId in data) {
      var tdataset = data[thisId];
      var link = $('<a></a>');
      link.text(tdataset.title);
      link.attr('href', '#');
      link.attr('id', 'dataset-' + thisId);
      listingElement.append($('<li></li>').append(link));
    }
    listingElement.find('a').live('click', function(e) {
      e.preventDefault();
      // strip off 'dataset-'
      var thisId = e.target.id.slice(8);
      plotDataset(thisId, data[thisId].title, cachedir);
    });
    plotDataset(datasetId, data[datasetId].title, cachedir);
  });
});
    </script>
  </py:def>

  <div py:def="content">
    <h2 id="chart-heading"></h2>

    <ul id="dataset-listing">
    </ul>

    <xi:include href="flot.html" />

    <textarea id="embed-code">
    </textarea>
  </div>

  <xi:include href="layout.html" />
</html>