edit txt files. keyboard shortcut for share tools
This commit is contained in:
21
code/templates/editor.html
Normal file
21
code/templates/editor.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<div id=index_menu>
|
||||
Add text file to {{ name|safe }}
|
||||
<div id=editor_form>
|
||||
<form action={{ url_for('paste',name=name) }} method=post enctype=multipart/form-data>
|
||||
<input type=hidden name=from_gui value="true" />
|
||||
<input id="paste_filename" type=text name=filename
|
||||
title="File name to write"
|
||||
value="{{ filename | safe }}" onclick="clear_text(this.id,'paste.txt')">
|
||||
<br>
|
||||
<input type=submit value=Submit>
|
||||
<input type=submit value=Cancel onclick="back()">
|
||||
<br>
|
||||
<textarea rows="25" cols="80" name="paste" id="paste_paste" autofocus>{{ content | safe }}</textarea>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">changeTitle("{{ name | safe }}");</script>
|
||||
{% endblock %}
|
||||
@@ -18,7 +18,7 @@
|
||||
<input type=submit value=Upload disabled>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id=list_info_toggle_container><span id=list_info_toggle onclick="infoToggle()">Share tools</span></div>
|
||||
<div id=list_info_toggle_container><span id=list_info_toggle onclick="infoToggle()" title="Open menu, keyboard: t">Share tools</span></div>
|
||||
<div id=list_info>
|
||||
<div id=list_url_upload>
|
||||
<form id="url_upload_form" action={{ url_for('upload_url') }} method=post>
|
||||
@@ -54,6 +54,7 @@
|
||||
{% endif %}
|
||||
<li><a href="{{ url_for('download_zip',name=name) }}" title="Download all the files as one ZIP file. Total size of files must be less than {{ g.max_zip_size }} Mb">Download as zip</a>
|
||||
<li><span id=list_script_toggle onclick="scriptToggle()" title="Show command line usage information">Command line info</span>
|
||||
<li><a href="{{ url_for('editor', name = name) }}">Paste or write a file</a>
|
||||
<li><a href="{{ url_for('index') }}">Return to index</a>
|
||||
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
|
||||
</div>
|
||||
@@ -76,7 +77,16 @@
|
||||
{% if direct %}
|
||||
<a href="{{ url_for('download_direct', name = name, token = entry.token, filename = entry.name ) }}" title="Direct share link" class=direct>❖</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('download_gui', name = name, filename = entry.url) }}">{{ entry.name }}</a>
|
||||
<a href="{{ url_for('download_gui', name = name, filename = entry.url) }}">{{ entry.name }}</a>
|
||||
{% if upload %}
|
||||
{% if entry.editable %}
|
||||
<form class="edit_form" action="{{ url_for('editor') }}" method=post>
|
||||
<input class="editor_name" type=hidden name=editor_name value="{{ name | safe }}" />
|
||||
<input class="editor_filename" type=hidden name=editor_filename value="{{ entry.name | safe }}" />
|
||||
<input class="edit_form_submit" type=submit value="✎" title="Edit text file">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class=td_right>{{ entry.size|safe }}
|
||||
<td>{{ entry.mtime|safe }}
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user