From f040c764cd38621774ea20a25f15c985ad041d5f Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 10 Oct 2017 15:29:11 +0200 Subject: [PATCH] DASH: fix js on pv_details - sparklines & copy-to-clipb tooltip --- .../views/pv_details_bootstrap.jinja2 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/python_suite/dashboard/views/pv_details_bootstrap.jinja2 b/python_suite/dashboard/views/pv_details_bootstrap.jinja2 index d350db3..beb90be 100644 --- a/python_suite/dashboard/views/pv_details_bootstrap.jinja2 +++ b/python_suite/dashboard/views/pv_details_bootstrap.jinja2 @@ -67,11 +67,20 @@ {% block js_end_of_page %} -/* $(function() { - // on page load - updateSparklines(); + /* on page load */ + + // create sparklines + updateSparklines(850, 130); + + // Tooltips (requires Bootstrap >3) + $('.js-tooltip').tooltip(); + + // Copy to clipboard + $('.js-copy').click(function() { + var text = $(this).attr('data-copy'); + var el = $(this); + copyToClipboard(text, el); + }); }); -*/ -updateSparklines(); {% endblock %} -- 2.43.0