1 {% extends "base.html" %}
4 <script src="/static/js/jquery.fieldselection.js" type="text/javascript" charset="utf-8"></script>
5 <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
6 <script src="/static/js/edit_area_full.js" type="text/javascript" charset="utf-8"></script>
7 <script type="text/javascript" charset="utf-8">
8 function addEditorButton(label, fn) {
9 $('<button type="button">' + label + '</button>').click(function(event) {
10 var text = $('#id_text').getSelection().text;
11 $('#id_text').replaceSelection(fn(text));
12 event.preventDefault();
13 }).appendTo('#buttons');
17 $('#id_folders').change(function() {
18 $('#images').load('/images/' + $('#id_folders').val() + '/', function() {
19 $('#images').data('lastScroll', -1000);
25 start_highlight: true,
30 // show_line_colors: true
33 addEditorButton('utwór', function(text) { return '<utwor>' + text + '</utwor>'; });
34 addEditorButton('akap', function(text) { return '<akap>' + text + '</akap>'; });
36 $('#images').lazyload('.image-box', {threshold: 600});
39 {% endblock extrahead %}
41 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
43 {% block maincontent %}
44 <div id="tabs"><a href="{% url file_xml hash %}" class="active">Źródło</a><a href="{% url file_html hash %}">HTML</a> <div style="padding: 3px; margin-left: 10px">{{ image_folders_form.folders }}</div><div style="clear: both; height: 0; width: 0"> </div></div>
47 <p>Aby zobaczyć obrazki wybierz folder z obrazkami powyżej.</p>
49 <form action="." method="post" accept-charset="utf-8">
50 <div id="buttons"></div>
51 <textarea id="id_text" name="text" style="height: 500px; width: 500px;">{{ form.text.field.initial }}</textarea>
52 {{ form.user.errors }}
53 <p>Użytkownik: {{ form.user }}</p>
54 {{ form.commit_message.errors }}
55 <p>Opis zmian: {{ form.commit_message }} <input type="submit" value="Zapisz"/></p>
57 {% endblock maincontent %}