2013-10-01 07:10:10 +03:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% block js %}
|
2013-10-10 05:11:24 +03:00
|
|
|
<script>
|
2013-10-10 18:38:30 +03:00
|
|
|
$(function(){
|
|
|
|
$("#start-togetherjs").click(function(){
|
|
|
|
$(this).prop('disabled', true).html("Loading");
|
|
|
|
});
|
|
|
|
});
|
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 () {
|
2014-08-20 18:28:25 +03:00
|
|
|
MDR.sanitize = true;
|
|
|
|
$("#preview").html('');
|
2013-10-10 18:38:30 +03:00
|
|
|
$("#start-togetherjs").addClass('btn-danger').html('End Collaboration').prop('disabled', false);
|
2013-10-10 05:11:24 +03:00
|
|
|
};
|
|
|
|
TogetherJSConfig_on_close = function () {
|
2013-10-10 20:26:42 +03:00
|
|
|
MDR.sanitize = false;
|
2013-10-10 18:38:30 +03:00
|
|
|
$("#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
|
|
|
|
2014-08-20 18:28:25 +03:00
|
|
|
<div id="app-wrap">
|
2013-10-01 07:10:10 +03:00
|
|
|
<div id="app-controls" class="row">
|
2013-10-02 04:50:48 +03:00
|
|
|
<div class="col-xs-3">
|
2014-08-20 18:28:25 +03:00
|
|
|
<input id="page-name" type="text" class="form-control input-sm" name="name" placeholder="Name" value="{{- name -}}" />
|
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">
|
2014-08-20 18:28:25 +03:00
|
|
|
<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>
|
2013-10-01 07:10:10 +03:00
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/dawn" class="selected">Dawn</a></li>
|
2014-08-20 18:28:25 +03:00
|
|
|
<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>
|
2013-10-01 07:10:10 +03:00
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/pastel_on_dark">Pastel on Dark</a></li>
|
2014-08-20 18:28:25 +03:00
|
|
|
<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>
|
2013-10-01 07:10:10 +03:00
|
|
|
<li><a tabindex="-1" href="#" data-value="ace/theme/tomorrow_night">Tomorrow Night</a></li>
|
2014-08-20 18:28:25 +03:00
|
|
|
<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>
|
2013-10-01 07:10:10 +03:00
|
|
|
</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>
|
2014-08-20 18:28:25 +03:00
|
|
|
|
|
|
|
<div class="row" style="position: relative; height: 100%; margin-left: 15px; margin-right: 15px;">
|
|
|
|
<div class="col-xs-6" style="position: absolute; bottom: 20px; top: 10px; left:0;border-right: 2px solid transparent;">
|
|
|
|
<div id="editor">{{ content }}</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-6" style="position: absolute; bottom: 20px; top: 10px; right:0; border-left: 2px solid transparent;">
|
|
|
|
<div id="preview"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2013-10-01 07:10:10 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|