From: Philipp Klaus Date: Tue, 10 Oct 2017 13:29:11 +0000 (+0200) Subject: DASH: fix js on pv_details - sparklines & copy-to-clipb tooltip X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=f040c764cd38621774ea20a25f15c985ad041d5f;p=mvd_epics.git DASH: fix js on pv_details - sparklines & copy-to-clipb tooltip --- 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 %}