To allow scrolling in Safari mobile, we set the content of text_view_comments frame in a jQuery UI layout.
So the automated scrolling operations in c_sync.js must be adjustable to the right part to scroll.
Also, if a comment have to be shown outside of the current viewport, we scroll the correct part to that viewport
and then set the comment top Y offset to juste what it needs to avoid the "Add comment" button after scrolling
operation.
If not in Safari mobile, we add an offset here to avoid comment to display under the "Add comment" button.
{% load i18n %}
{% load local_perms %}
{% get_local_perm request can_create_text as can_create_text %}
<div id="header_controls">
{% if user.is_authenticated %}<b>{{ user.username }}</b> ·{% endif %}
<a title="{% blocktrans %}Home{% endblocktrans %}" href="{% url index %}">{% blocktrans %}Home{% endblocktrans %}</a>
{% if can_create_text %}
· <a title="{% blocktrans %}Create a text{% endblocktrans %}" href="{% url text-create-content %}">{% blocktrans %}Create a text{% endblocktrans %}</a>
· <a title="{% blocktrans %}Upload a text{% endblocktrans %}" href="{% url text-create-upload %}">{% blocktrans %}Upload a text{% endblocktrans %}</a>
· <a title="{% blocktrans %}Import a co-mented text{% endblocktrans %}" href="{% url text-create-import %}">{% blocktrans %}Import a co-mented text{% endblocktrans %}</a>
{% endif %}
{% if user.is_authenticated %}
· <a title="{% blocktrans %}Profile{% endblocktrans %}" href="{% url profile %}">{% blocktrans %}Profile{% endblocktrans %}</a>
· <a title="{% blocktrans %}Logout{% endblocktrans %}" href="{% url logout %}">{% blocktrans %}Logout{% endblocktrans %}</a>
{% else%}
· <a title="{% blocktrans %}Login{% endblocktrans %}" href="{% url login %}">{% blocktrans %}Login{% endblocktrans %}</a>
{% if CONF.workspace_registration %} · <a title="{% blocktrans %}Register{% endblocktrans %}" href="{% url register %}">{% blocktrans %}Register{% endblocktrans %}</a>{% endif %}
{% endif %}
</div>