Changeset 22eb5de in OpenWorkouts-current for ow/templates


Ignore:
Timestamp:
Jan 29, 2019, 12:58:08 PM (5 years ago)
Author:
Segundo Fdez <segun.2@…>
Branches:
current, feature/docs, master
Children:
594fbe8
Parents:
3e48af6 (diff), ed7e9d7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/ui

# Conflicts:
# ow/static/js/ow.js

Location:
ow/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/dashboard.pt

    r3e48af6 r22eb5de  
    204204    <script type="text/javascript">
    205205     var week_chart = owjs.week_chart({
    206          chart_selector: 'div.js-week-stats',
     206         chart_selector: 'div.js-week-stats svg',
    207207         url: "${request.resource_url(context, 'week')}",
    208208         current_day_name: "${current_day_name}"
  • ow/templates/profile.pt

    r3e48af6 r22eb5de  
    8181      </div>
    8282
     83      <div class="month-stats js-month-stats">
     84        <svg width="600" height="300"></svg>
     85        <div class="filters js-filters">
     86          <a href="#" class="js-distance" i18n:translate="">distance</a>
     87          <a href="#" class="js-time" i18n:translate="">time</a>
     88          <a href="#" class="js-elevation" i18n:translate="">elevation</a>
     89        </div>
     90      </div>
     91
    8392    </div>
    8493
    8594  </metal:content>
    8695
     96  <metal:body-js metal:fill-slot="body-js">
     97
     98    <script src="${request.static_url('ow:static/components/d3/d3.min.js')}"></script>
     99    <script src="${request.static_url('ow:static/js/ow.js')}"></script>
     100
     101    <script type="text/javascript">
     102     var y_axis_labels = {
     103         "distance": "Kilometers",
     104         "time": "Hours",
     105         "elevation": "Meters"
     106     };
     107
     108     var year_chart = owjs.year_chart({
     109         chart_selector: 'div.js-month-stats svg',
     110         filters_selector: 'div.js-month-stats div.js-filters a',
     111         url: "${request.resource_url(context, 'yearly')}",
     112         current_month: "${current_month}",
     113         y_axis_labels: y_axis_labels,
     114     });
     115     year_chart.render("distance");
     116     year_chart.filters_setup();
     117    </script>
     118
     119  </metal:body-js>
     120
    87121</html>
Note: See TracChangeset for help on using the changeset viewer.