Source

eurostat / eurostat / templates / index.html

Full commit
<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/index.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" />

    <div id="flot-chart" class="flot">
      <div class="flot-chart"></div>
      <div class="flot-chart-controls">
        <div class="flot-chart-type">
          Chart type:
          <input type="checkbox" value="lines" name="lines" /> Lines
          <input type="checkbox" value="points" name="points" /> Points
        </div>
        <div class="flot-select-series">
            Series:
        </div>
      </div>
    </div>

    <textarea id="embed-code">
<!-- Eurostat PEEE -->
<iframe style="padding:0;margin:0;" height="100px" frameborder="0" width="100%" scrolling="no" src="http://eurostat.dev.okfn.org/embed?id=${dataset_id}"></iframe>
<!-- /Eurostat PEEE -->
    </textarea>
  </div>

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