realms-wiki/realms/templates/wiki/edit.html

110 lines
5.9 KiB
HTML
Raw Normal View History

2013-10-01 07:10:10 +03:00
{% extends 'layout.html' %}
{% block js %}
2013-10-10 00:35:06 +03:00
{% assets "js_editor" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
2013-10-10 05:11:24 +03:00
<script>
$(function(){
$("#start-togetherjs").click(function(){
$(this).prop('disabled', true).html("Loading");
});
MDR.sanitize = false;
});
2013-10-10 05:11:24 +03:00
TogetherJSConfig_toolName = "Collaboration";
TogetherJSConfig_suppressJoinConfirmation = true;
2013-10-15 23:42:06 +03:00
{% if session.get('user') %}
2013-10-10 05:11:24 +03:00
TogetherJSConfig_getUserName = function () {
return {{ session['user'].get('username')|tojson }};
};
TogetherJSConfig_getUserAvatar = function () {
return {{ session['user'].get('avatar')|tojson }};
};
2013-10-15 23:42:06 +03:00
{% endif %}
2013-10-10 05:11:24 +03:00
TogetherJSConfig_on_ready = function () {
MDR.sanitize = true;
$("#preview").html('');
$("#start-togetherjs").addClass('btn-danger').html('End Collaboration').prop('disabled', false);
2013-10-10 05:11:24 +03:00
};
TogetherJSConfig_on_close = function () {
MDR.sanitize = false;
$("#start-togetherjs").removeClass('btn-danger').html('Collaborate').prop('disabled', false);
2013-10-10 05:11:24 +03:00
};
</script>
2013-10-10 01:07:39 +03:00
<script src="https://togetherjs.com/togetherjs-min.js"></script>
2013-10-10 05:11:24 +03:00
2013-10-01 07:10:10 +03:00
{% endblock %}
{% block body %}
2013-10-10 00:35:06 +03:00
{% block css %}
2013-10-03 21:13:10 +03:00
<style>
2013-10-10 00:35:06 +03:00
#main-body {
background: inherit;
border: inherit;
padding: 0;
-webkit-box-shadow: 0;
-moz-box-shadow: 0;
box-shadow: 0;
}
2013-10-03 21:13:10 +03:00
</style>
2013-10-10 00:35:06 +03:00
{% endblock %}
2013-10-01 07:10:10 +03:00
<div id="app-wrap" class="container-fluid">
<div id="app-controls" class="row">
2013-10-02 04:50:48 +03:00
<div class="col-xs-3">
<div class="input-group">
2013-12-04 00:28:16 +02:00
<span class="input-group-addon btn-info input-sm">realms.io/wiki/</span>
<input id="page-name" type="text" class="form-control input-sm" name="name" placeholder="Name" value="{{- name -}}" />
</div>
2013-10-02 04:50:48 +03:00
</div>
<div class="col-xs-3">
2013-10-03 17:58:07 +03:00
<input id="page-message" type="text" class="form-control input-sm" name="page-message" placeholder="Comment" value="" />
2013-10-01 07:10:10 +03:00
</div>
<div class="col-xs-6">
<div class="pull-right">
2013-10-10 01:32:43 +03:00
<button class="btn btn-success btn-sm" id="start-togetherjs" type="button"
2013-10-10 05:11:24 +03:00
onclick="TogetherJS(this); return false">
Collaborate
2013-10-10 01:32:43 +03:00
</button>
2013-10-01 07:10:10 +03:00
2013-10-03 17:58:07 +03:00
<a href="#" id="drop6" role="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">Theme <b class="caret"></b></a>
2013-10-01 07:10:10 +03:00
<ul id="theme-list" class="dropdown-menu" role="menu" aria-labelledby="drop6">
<li><a tabindex="-1" href="#" data-value="ace/theme/chrome" class="">Chrome</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/clouds" class="">Clouds</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/clouds_midnight" class="">Clouds Midnight</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/cobalt" class="">Cobalt</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/crimson_editor" class="">Crimson Editor</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/dawn" class="selected">Dawn</a></li>
2013-10-10 00:35:06 +03:00
<li><a tabindex="-1" href="#" data-value="ace/theme/dreamweaver" class="">Dreamweaver</a></li>
2013-10-01 07:10:10 +03:00
<li><a tabindex="-1" href="#" data-value="ace/theme/eclipse" class="">Eclipse</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/idle_fingers" class="">idleFingers</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/kr_theme" class="">krTheme</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/merbivore" class="">Merbivore</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/merbivore_soft" class="">Merbivore Soft</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/mono_industrial" class="">Mono Industrial</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/monokai" class="">Monokai</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/pastel_on_dark">Pastel on Dark</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/solarized_dark" class="">Solarized Dark</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/solarized_light" class="">Solarized Light</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/textmate" class="">TextMate</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow" class="">Tomorrow</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night">Tomorrow Night</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night_blue" class="">Tomorrow Night Blue</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night_bright" class="">Tomorrow Night Bright</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night_eighties" class="">Tomorrow Night 80s</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/twilight" class="">Twilight</a></li>
<li><a tabindex="-1" href="#" data-value="ace/theme/vibrant_ink" class="">Vibrant Ink</a></li>
</ul>
2013-10-03 17:58:07 +03:00
<a id="save-native" class="btn btn-primary btn-sm"><i class="icon-save"></i> Save</a>
2013-10-01 07:10:10 +03:00
</div>
</div>
</div>
<div id="editor">{{ content }}</div>
<div id="preview"></div>
</div>
{% endblock %}