src/cm/templates/site/text_create_import.html
author Simon Descarpentries <sid@sopinspace.com>
Mon, 21 Oct 2013 16:37:07 +0200
changeset 553 bf26fb47a14c
parent 460 2fdb7d095d5c
permissions -rw-r--r--
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.

{% extends "site/layout/base_workspace.html" %}
{% load i18n %}

{% block title %}{% blocktrans %}Import a co-mented text{% endblocktrans %}{% endblock %}

{% block main %}
<script type="text/javascript">
<!--
tb_conf['current_tab'] = 'text';
-->
</script>

<script type="text/javascript">
<!--
$(function() {
    $(".hidden-text-actions").css('visibility','hidden');   
}) ;
-->
</script>

<div id="text" class="tab-meta">   

<ul class="sub_list">
    <li><a href="{% url text %}">{% blocktrans %}Text list{% endblocktrans %}</a></li>
    <li> / </li>
    <li><a href="{% url text-create-content %}">{% blocktrans %}Create a text{% endblocktrans %}</a></li>
    <li> / </li>
    <li><a href="{% url text-create-upload %}">{% blocktrans %}Upload a text{% endblocktrans %}</a></li>
    <li> / </li>
    <li class="active_sub">{% blocktrans %}Import a co-mented text{% endblocktrans %}</li>
</ul>

<form id="text_create_import" enctype="multipart/form-data" class="wizard-form" action="." method="post">
<table class="wide_form">
    <tbody>
    {% with 'import_content' as form_type %}     
	    {% include "site/macros/form_fields.html" %}
    {% endwith %}    	        
    <tr>
        <td style="vertical-align: top; width: 20%; text-align:right;">
        </td>
        <td>
            <label></label>
            <input name="save" type="submit" value="{% blocktrans %}Save{% endblocktrans %}"/>
            &nbsp;
            <input id="cancel_button" type="button" value="{% blocktrans %}Cancel{% endblocktrans %}"/>
            
            <script type="text/javascript">
            <!--
            $(document).ready(function(){
                $("#cancel_button").click(function () { 
                    window.location = "{% url index %}"; 
                  });                
            }) ;
            -->
            </script>                 
        </td>
    </tr>
    </tbody>
</table>
</form>
{% endblock %}