diff options
author | Stephen Finucane <stephen@that.guru> | 2017-06-09 18:18:04 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-06-14 09:38:08 +0100 |
commit | 02f8c2818bfd33bd02e8b6a64809a114f91c5000 (patch) | |
tree | 4a80901f6aef871c5da4d1cdf551a3c0bbbf1b22 /templates/base.html | |
parent | 29e068a7e8f5777dc0486e32738f8a6942bb6e21 (diff) | |
download | patchwork-02f8c2818bfd33bd02e8b6a64809a114f91c5000.tar patchwork-02f8c2818bfd33bd02e8b6a64809a114f91c5000.tar.gz |
htdocs: Add clipboard.js
We provide our own, much smaller implementation of this currently.
However, we want to be able to implement slightly different variants of
this elsewhere and using an existing library helps avoid reinventing the
wheel and lets us use already battle-tested code.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html index d0f59b4..501208f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,6 +20,12 @@ <![endif]--> <script type="text/javascript" src="{% static "js/bootstrap.min.js" %}"></script> <script type="text/javascript" src="{% static "js/selectize.min.js" %}"></script> + <script type="text/javascript" src="{% static "js/clipboard.min.js" %}"></script> + <script type="text/javascript"> + $(document).ready(function() { + new Clipboard(document.querySelectorAll('button.btn-copy')); + }); + </script> {% block headers %}{% endblock %} </head> <body> |