Commit 5dc4e46f authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Merge branch '187-refactor-javascript-tooltip-code' into 'django'

Resolve "refactor javascript tooltip code"

Closes #187

See merge request !53
parents f17c2795 fe32e554
Pipeline #29648 failed with stage
in 45 seconds
/*
* Tooltip
*
* Activate a function of bootstrap to add a tip to any html tag such as
* links.
*/
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
{% extends "base.html" %}
{% load static converters %}
{% block title %}Job #{{ job.id }} details{% endblock %}
......@@ -116,9 +117,5 @@
{% block javascript %}
{{ block.super }}
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script defer src="{% static 'js/tooltip.js' %}"></script>
{% endblock %}
{% extends "base.html" %}
{% load converters humanize %}
{% load static converters humanize %}
{% block title %}Your job list{% endblock %}
{% block breadcrumb %}
......@@ -115,9 +115,5 @@
{% block javascript %}
{{ block.super }}
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script defer src="{% static 'js/tooltip.js' %}"></script>
{% endblock %}
......@@ -113,6 +113,7 @@
{% block javascript %}
{{ block.super }}
<script defer src="{% static 'js/tooltip.js' %}"></script>
<script>
function copyToClipboard(text, el) {
var copyTest = document.queryCommandSupported('copy');
......@@ -142,8 +143,6 @@
$(document).ready(function() {
// Initialize
// ---------------------------------------------------------------------
$('[data-toggle="tooltip"]').tooltip();
// Copy to clipboard
// Grab any text in the attribute 'data-copy' and pass it to the
// copy function
......
......@@ -69,3 +69,8 @@
{% endfor %}
{% endfor %}
{% endblock %}
{% block javascript %}
{{ block.super }}
<script defer src="{% static 'js/tooltip.js' %}"></script>
{% endblock %}
......@@ -140,6 +140,7 @@
{% block javascript %}
{{ block.super }}
<script defer src="{% static 'js/tooltip.js' %}"></script>
<script>
function copyToClipboard(text, el) {
var copyTest = document.queryCommandSupported('copy');
......@@ -169,8 +170,6 @@
$(document).ready(function() {
// Initialize
// ---------------------------------------------------------------------
$('[data-toggle="tooltip"]').tooltip();
// Copy to clipboard
// Grab any text in the attribute 'data-copy' and pass it to the
// copy function
......
......@@ -68,3 +68,9 @@ curl -H &#39;Authorization: Token token=&lt;your_private_token&gt;&#39; -X POST
</div>
</div>
{% endblock %}
{% block javascript %}
{{ block.super }}
<script defer src="{% static 'js/tooltip.js' %}"></script>
{% endblock %}
......@@ -123,10 +123,5 @@
{% block javascript %}
{{ block.super }}
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<script defer src="{% static 'js/tooltip.js' %}"></script>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment