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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
460
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     1
{% extends "site/layout/base_workspace.html" %}
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     2
{% load i18n %}
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     3
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     4
{% block title %}{% blocktrans %}Import a co-mented text{% endblocktrans %}{% endblock %}
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     5
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     6
{% block main %}
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     7
<script type="text/javascript">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     8
<!--
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
     9
tb_conf['current_tab'] = 'text';
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    10
-->
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    11
</script>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    12
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    13
<script type="text/javascript">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    14
<!--
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    15
$(function() {
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    16
    $(".hidden-text-actions").css('visibility','hidden');   
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    17
}) ;
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    18
-->
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    19
</script>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    20
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    21
<div id="text" class="tab-meta">   
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    22
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    23
<ul class="sub_list">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    24
    <li><a href="{% url text %}">{% blocktrans %}Text list{% endblocktrans %}</a></li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    25
    <li> / </li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    26
    <li><a href="{% url text-create-content %}">{% blocktrans %}Create a text{% endblocktrans %}</a></li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    27
    <li> / </li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    28
    <li><a href="{% url text-create-upload %}">{% blocktrans %}Upload a text{% endblocktrans %}</a></li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    29
    <li> / </li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    30
    <li class="active_sub">{% blocktrans %}Import a co-mented text{% endblocktrans %}</li>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    31
</ul>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    32
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    33
<form id="text_create_import" enctype="multipart/form-data" class="wizard-form" action="." method="post">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    34
<table class="wide_form">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    35
    <tbody>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    36
    {% with 'import_content' as form_type %}     
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    37
	    {% include "site/macros/form_fields.html" %}
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    38
    {% endwith %}    	        
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    39
    <tr>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    40
        <td style="vertical-align: top; width: 20%; text-align:right;">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    41
        </td>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    42
        <td>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    43
            <label></label>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    44
            <input name="save" type="submit" value="{% blocktrans %}Save{% endblocktrans %}"/>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    45
            &nbsp;
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    46
            <input id="cancel_button" type="button" value="{% blocktrans %}Cancel{% endblocktrans %}"/>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    47
            
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    48
            <script type="text/javascript">
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    49
            <!--
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    50
            $(document).ready(function(){
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    51
                $("#cancel_button").click(function () { 
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    52
                    window.location = "{% url index %}"; 
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    53
                  });                
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    54
            }) ;
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    55
            -->
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    56
            </script>                 
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    57
        </td>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    58
    </tr>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    59
    </tbody>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    60
</table>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    61
</form>
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents:
diff changeset
    62
{% endblock %}