diff options
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/admin/annotations_by_dataset.html | 4 | ||||
| -rw-r--r-- | app/templates/annotate/index.html | 6 | ||||
| -rw-r--r-- | app/templates/demo/evaluate.html | 37 |
3 files changed, 31 insertions, 16 deletions
diff --git a/app/templates/admin/annotations_by_dataset.html b/app/templates/admin/annotations_by_dataset.html index 3885d7f..fd64673 100644 --- a/app/templates/admin/annotations_by_dataset.html +++ b/app/templates/admin/annotations_by_dataset.html @@ -13,7 +13,11 @@ {% block scripts %} {{ super() }} <script src="//d3js.org/d3.v5.min.js"></script> + {% if is_multi %} + <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script> + {% else %} <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script> + {% endif %} <script>adminViewAnnotations( '#graph', {{ data.chart_data | tojson }}, diff --git a/app/templates/annotate/index.html b/app/templates/annotate/index.html index 61233a8..5360bf8 100644 --- a/app/templates/annotate/index.html +++ b/app/templates/annotate/index.html @@ -52,9 +52,13 @@ {% block scripts %} {{ super() }} <script src="//d3js.org/d3.v5.min.js"></script> - <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script> <script src="{{ url_for('static', filename='js/updateTable.js') }}"></script> <script src="{{ url_for('static', filename='js/buttons.js') }}"></script> + {% if is_multi %} + <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script> + {% else %} + <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script> + {% endif %} <script>annotateChart("#graph", {{ data.chart_data | tojson }});</script> <script> // reset button diff --git a/app/templates/demo/evaluate.html b/app/templates/demo/evaluate.html index 225dade..3f20c94 100644 --- a/app/templates/demo/evaluate.html +++ b/app/templates/demo/evaluate.html @@ -31,20 +31,27 @@ {{ wtf.quick_form(form, button_map={'submit': 'primary'}) }} </div> </div> +{% endblock %} -<script src="//d3js.org/d3.v5.min.js"></script> -<script src="{{ url_for('static', filename='js/makeChart.js') }}"></script> -<script>viewAnnotations( - "#graph_user", - {{ data.chart_data | tojson }}, - {{ annotations_user | tojson }} -); -</script> -<script> - viewAnnotations( - "#graph_true", - {{ data.chart_data | tojson }}, - {{ annotations_true | tojson }} -); -</script> +{% block scripts %} + {{ super() }} + <script src="//d3js.org/d3.v5.min.js"></script> + {% if is_multi %} + <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script> + {% else %} + <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script> + {% endif %} + <script>viewAnnotations( + "#graph_user", + {{ data.chart_data | tojson }}, + {{ annotations_user | tojson }} + ); + </script> + <script> + viewAnnotations( + "#graph_true", + {{ data.chart_data | tojson }}, + {{ annotations_true | tojson }} + ); + </script> {% endblock %} |
