2013-10-01 07:10:10 +03:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% block js %}
|
2014-09-05 00:35:28 +03:00
|
|
|
<script>
|
|
|
|
$(function(){
|
2014-09-07 19:54:51 +03:00
|
|
|
{% if partials %}
|
|
|
|
{% for name, value in partials.items() %}
|
2014-09-10 19:09:29 +03:00
|
|
|
{% if name and value %}
|
|
|
|
try {
|
|
|
|
Handlebars.registerPartial({{ name|tojson|safe }}, {{ value.data|tojson|safe }});
|
|
|
|
} catch(e) {
|
|
|
|
// no data?
|
|
|
|
}
|
|
|
|
{% endif %}
|
2014-09-07 19:54:51 +03:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2014-09-05 00:35:28 +03:00
|
|
|
$("#start-togetherjs").click(function(){
|
|
|
|
$(this).prop('disabled', true).html("Loading");
|
2013-10-10 18:38:30 +03:00
|
|
|
});
|
2014-09-05 00:35:28 +03:00
|
|
|
});
|
|
|
|
TogetherJSConfig_toolName = "Collaboration";
|
|
|
|
TogetherJSConfig_suppressJoinConfirmation = true;
|
|
|
|
{% if current_user.is_authenticated() %}
|
|
|
|
TogetherJSConfig_getUserName = function () {
|
|
|
|
return {{ current_user.username|tojson }};
|
|
|
|
};
|
2013-10-10 05:11:24 +03:00
|
|
|
|
2014-09-05 00:35:28 +03:00
|
|
|
TogetherJSConfig_getUserAvatar = function () {
|
|
|
|
return {{ current_user.avatar|tojson }};
|
|
|
|
};
|
|
|
|
{% endif %}
|
2013-10-10 05:11:24 +03:00
|
|
|
|
2014-09-05 00:35:28 +03:00
|
|
|
TogetherJSConfig_on_ready = function () {
|
|
|
|
MDR.sanitize = true;
|
|
|
|
$("#preview").html('');
|
|
|
|
$("#start-togetherjs").addClass('btn-danger').html('End Collaboration').prop('disabled', false);
|
|
|
|
};
|
|
|
|
TogetherJSConfig_on_close = function () {
|
|
|
|
MDR.sanitize = false;
|
|
|
|
$("#start-togetherjs").removeClass('btn-danger').html('Collaborate').prop('disabled', false);
|
|
|
|
};
|
|
|
|
</script>
|
2014-09-16 00:45:47 +03:00
|
|
|
<script src="https://togetherjs.com/togetherjs-min.js"></script>
|
2013-10-01 07:10:10 +03:00
|
|
|
{% endblock %}
|
2014-09-10 17:58:35 +03:00
|
|
|
|
2013-10-01 07:10:10 +03:00
|
|
|
{% block body %}
|
2014-09-05 00:35:28 +03:00
|
|
|
<div id="app-wrap">
|
|
|
|
<div id="app-controls" class="row">
|
2014-09-26 02:17:38 +03:00
|
|
|
<div class="col-xs-4 col-md-3">
|
2014-09-05 00:35:28 +03:00
|
|
|
<input id="page-name" type="text" class="form-control input-sm" name="name" placeholder="Name" value="{{- name -}}" />
|
|
|
|
</div>
|
2014-09-26 02:17:38 +03:00
|
|
|
<div class="col-xs-4 col-md-3">
|
2014-09-05 00:35:28 +03:00
|
|
|
<input id="page-message" type="text" class="form-control input-sm" name="page-message" placeholder="Comment" value="" />
|
|
|
|
</div>
|
2013-10-01 07:10:10 +03:00
|
|
|
|
2014-09-26 19:58:06 +03:00
|
|
|
<div class="col-md-6 col-xs-4">
|
2014-09-05 00:35:28 +03:00
|
|
|
<div class="pull-right">
|
2013-10-01 07:10:10 +03:00
|
|
|
|
2014-09-26 02:17:38 +03:00
|
|
|
<button class="btn btn-default btn-sm" id="start-togetherjs" type="button"
|
2014-09-05 00:35:28 +03:00
|
|
|
onclick="TogetherJS(this); return false">
|
2014-09-26 02:17:38 +03:00
|
|
|
|
|
|
|
<i class="fa fa-comments-o visible-xs"></i>
|
|
|
|
<span class="hidden-xs">Collaborate</span>
|
2014-09-05 00:35:28 +03:00
|
|
|
</button>
|
2013-10-10 01:32:43 +03:00
|
|
|
|
2014-09-26 02:17:38 +03:00
|
|
|
<a href="#" id="drop6" role="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
|
|
|
|
<i class="fa fa-paint-brush visible-xs"></i>
|
|
|
|
<span class="hidden-xs">Theme <i class="fa fa-caret-down"></i></span>
|
|
|
|
</a>
|
2014-09-05 00:35:28 +03:00
|
|
|
<ul id="theme-list" class="dropdown-menu" role="menu" aria-labelledby="drop6">
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/chrome" >Chrome</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/clouds" >Clouds</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/clouds_midnight" >Clouds Midnight</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/cobalt" >Cobalt</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/crimson_editor" >Crimson Editor</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/dawn" class="selected">Dawn</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/dreamweaver" >Dreamweaver</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/eclipse" >Eclipse</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/idle_fingers" >idleFingers</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/kr_theme" >krTheme</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/merbivore" >Merbivore</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/merbivore_soft" >Merbivore Soft</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/mono_industrial" >Mono Industrial</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/monokai" >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" >Solarized Dark</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/solarized_light" >Solarized Light</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/textmate" >TextMate</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow" >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" >Tomorrow Night Blue</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night_bright" >Tomorrow Night Bright</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night_eighties" >Tomorrow Night 80s</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/twilight" >Twilight</a></li>
|
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/vibrant_ink" >Vibrant Ink</a></li>
|
|
|
|
</ul>
|
2014-09-10 21:58:47 +03:00
|
|
|
{% if name in config.LOCKED %}
|
2014-09-26 19:58:06 +03:00
|
|
|
<a class="btn btn-danger btn-sm">
|
|
|
|
<i class="fa fa-lock"></i>
|
|
|
|
<span class="hidden-xs">Locked</span>
|
|
|
|
</a>
|
2014-09-10 21:58:47 +03:00
|
|
|
{% else %}
|
2014-09-26 19:58:06 +03:00
|
|
|
<a id="save-native" class="btn btn-primary btn-sm">
|
|
|
|
<i class="fa fa-save"></i>
|
|
|
|
<span class="hidden-xs">Save</span>
|
|
|
|
</a>
|
2014-09-10 21:58:47 +03:00
|
|
|
{% endif %}
|
2013-10-01 07:10:10 +03:00
|
|
|
</div>
|
2014-09-05 00:35:28 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-08-20 18:28:25 +03:00
|
|
|
|
2014-09-26 02:17:38 +03:00
|
|
|
<section class="entry-markdown active">
|
|
|
|
<header class="floatingheader" id="entry-markdown-header">
|
|
|
|
<small>Markdown</small>
|
|
|
|
<a class="markdown-help" href=""><span class="hidden">What is Markdown?</span></a>
|
|
|
|
</header>
|
|
|
|
<section id="entry-markdown-content" class="entry-markdown-content">
|
|
|
|
<div id="editor" class="ace-editor">{{ content }}</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="entry-preview">
|
|
|
|
<header class="floatingheader" id="entry-preview-header">
|
|
|
|
<small>Preview</small>
|
|
|
|
</header>
|
|
|
|
<section class="entry-preview-content">
|
|
|
|
<div id="preview"></div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
2014-09-30 04:33:09 +03:00
|
|
|
<input id="sha" type="hidden" name="sha" value="{{ sha }}" />
|
|
|
|
|
2014-09-05 00:35:28 +03:00
|
|
|
</div>
|
2013-10-01 07:10:10 +03:00
|
|
|
|
|
|
|
{% endblock %}
|