Commit 44f3454f authored by Gil Forcada's avatar Gil Forcada

Use overlays, if JS is enabled, to show helper data (bug #666968)

parent 88dd48f1
......@@ -150,7 +150,7 @@ def as_tr(field):
help_link = u''
# This is a custom attribute possibly set in forms.py
if hasattr(field.field, 'help_link'):
help_link = '<span class="help_link"><a href="%s"><img src="%simg/help.png" alt="help icon" width="26"></a></span>' % (
help_link = '<span class="help_link"><a class="show-overlay" href="%s"><img src="%simg/help.png" alt="help icon"></a></span>' % (
field.field.help_link, settings.MEDIA_URL)
errors_html = u''
if field.errors:
......
......@@ -8,11 +8,24 @@
<title>{% block title %}page title{% endblock %}</title>
<link rel="icon" type="image/png" href="/media/img/foot-16.png">
<link rel="stylesheet" type="text/css" href="/media/css/template.css">
<link rel="stylesheet" href="/media/css/overlays.css">
{% if LANGUAGE_BIDI %}
<link rel="stylesheet" href="/media/css/rtl.css">
{% endif %}
<script type="text/javascript" src="/media/js/main.js"></script>
<script type="text/javascript" src="/media/js/jquery.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.tools.min.js"></script>
<script type="text/javascript" src="/media/js/overlayhelpers.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.show-overlay').prepOverlay({subtype:'ajax',
filter: '#content > *',
config: {expose:{color:'#ccc' }}
});
});
</script>
{% block extrahead %}
{% endblock %}
</head>
......
......@@ -12,7 +12,7 @@ Following variables should be set:
<th>{% trans "User Interface" %}</th>
<th>{% trans "Graph" %}</th>
<th>{% trans "User Interface (red.)" %}
<a href="{% url 'help' 'reduced_po' %}"><img src="/media/img/help.png" alt="help icon"></a>
<a href="{% url 'help' 'reduced_po' %}" class="show-overlay"><img src="/media/img/help.png" alt="help icon"></a>
</th>
<th>{% trans "Documentation" %}</th>
<th>{% trans "Graph" %}</th>
......
......@@ -95,7 +95,7 @@ $(document).ready(function() {
<a href="{{ po_url_reduced }}"><img src="/media/img/download.png" alt="{% trans "Download PO file" %}" /></a>
{% trans "PO file statistics (reduced):" %}
<div style="display: inline-block;">
<span class="help_link"><a href="{% url 'help' 'reduced_po' %}">
<span class="help_link"><a href="{% url 'help' 'reduced_po' %}" class="show-overlay">
<img src="/media/img/help.png" alt="help icon" />
</a></span>
</div>
......
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