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