forked from expo/troggle
[svn] codemirror
This commit is contained in:
@@ -12,16 +12,16 @@
|
||||
<li><b><a href="{% url caveindex %}">List of Caves</a></b></li>
|
||||
<li><a href="{% url jgtfile aaaa %}">JGT list of files</a> (temporary simple file list and tunnel use)</li>
|
||||
<li><a href="{% url survey %}">Survey files</a></li>
|
||||
<li><a href="{% url survexindex all %}">Survex directory</a></li>
|
||||
<li><a href="{% url svx all %}">Survex directory</a></li>
|
||||
<li><a href="{% url expedition 2008 %}">Expedition 2008</a></li>
|
||||
<li><a href="{% url expedition 2007 %}">Expedition 2007</a></li>
|
||||
<li><a href="{% url expedition 1993 %}">Expedition 1993</a> (earliest parsed)</li>
|
||||
<li><a href="{% url expedition 1992 %}">Expedition 1992</a> (earliest parsed)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Further work</h2>
|
||||
|
||||
<p>Julian's work:
|
||||
<p>parse 1992-1976 logbooks; (esp top 161)</p>
|
||||
<p>parse 1976-1991 logbooks; (esp top 161)</p>
|
||||
<p>detect T/U on log entries; </p>
|
||||
<p>name matching and spelling in survex files; </p>
|
||||
<p>Improve logbook wikihtml text</p>
|
||||
|
||||
@@ -2,18 +2,80 @@
|
||||
{% load survex_markup %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<script src="{{ settings.MEDIA_URL }}js/base.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="{{settings.MEDIA_URL}}js/jquery-1.3.2.js"></script>
|
||||
<script type="text/javascript" src="{{settings.MEDIA_URL}}js/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="{{settings.MEDIA_URL}}CodeMirror-0.62/js/codemirror.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var codeeditor;
|
||||
$(document).ready(function()
|
||||
{
|
||||
codeeditor = CodeMirror.fromTextArea("id_code",
|
||||
{
|
||||
parserfile: ["parsesurvex.js"],
|
||||
stylesheet: "{{settings.MEDIA_URL}}CodeMirror-0.62/css/survexcolors.css",
|
||||
path: "{{settings.MEDIA_URL}}CodeMirror-0.62/js/",
|
||||
textWrapping: false,
|
||||
lineNumbers: true,
|
||||
indentUnit: 4,
|
||||
tabMode: "spaces"
|
||||
});
|
||||
$("#id_outputtype").val("ajax");
|
||||
var options =
|
||||
{
|
||||
target: '#difflistajax',
|
||||
beforeSubmit: function() { $("textarea#id_code").value = codeeditor.getCode().length; },
|
||||
success: function() { codeeditor.focus(); }
|
||||
};
|
||||
$('#codewikiform').ajaxForm(options); // bind form using 'ajaxForm'
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<H1>{{ title }}</H1>
|
||||
<h1>Survex File: {{ title }} .svx</h1>
|
||||
|
||||
<div><a href="{{ settings.SVX_URL }}{{ title }}.svx">Download svx file</a></div>
|
||||
{% if has_3d %}
|
||||
<div><a href="{{ settings.SVX_URL }}{{ title }}.3d">Download 3d file</a></div>
|
||||
<div><a href="{{ settings.SVX_URL }}{{ title }}.err">Download err file</a></div>
|
||||
{% else %}
|
||||
<div>Processing failed</div>
|
||||
{% endif %}
|
||||
<div><a href="{{ settings.SVX_URL }}{{ title }}.log">Download log file</a></div>
|
||||
|
||||
{{ text|survex_to_html }}
|
||||
<form id="codewikiform" action="" method="POST">
|
||||
<div style="display:none">{{form.filename}} {{form.dirname}} {{form.datetime}} {{form.outputtype}}</div>
|
||||
<input type="submit" name="diff" value="Diffy" />
|
||||
<input type="submit" name="save" value="Save"/>
|
||||
<input type="submit" name="revert" value="Revert"/>
|
||||
<input type="submit" name="process" value="Process" title="executes cavern"/>
|
||||
(Not implemented: <input type="submit" name="svncheckin" value="svn check-in"/>)
|
||||
<div class="codeframebit">{{form.code}}</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
<h4>Output</h4>
|
||||
|
||||
<div id="difflistajax">
|
||||
<pre>
|
||||
{% for diffline in difflist %}{{diffline}}
|
||||
{% endfor %}
|
||||
</pre>
|
||||
|
||||
{% if logmessage %}
|
||||
{% if has_3d %}
|
||||
<p><a href="{{ settings.SVX_URL }}{{ title }}.3d">3d file</a></p>
|
||||
{% else %}
|
||||
<p><b>No 3d file</b></p>
|
||||
{% endif %}
|
||||
<pre>
|
||||
LOGMESSAGES
|
||||
{{logmessage}}
|
||||
</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if svxincludes %}
|
||||
<p><b>Included files:</b>
|
||||
{% for svxinclude in svxincludes %}
|
||||
<a href="{{svxinclude}}.svx">{{svxinclude}}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user