Dodanie skryptu do przycinania obrazków.
[redakcja.git] / project / templates / explorer / editor.html
1 {% extends "base.html" %}
2
3 {% block extrahead %}
4         <script type="text/javascript" charset="utf-8">
5                 var fileId = '{{ fileid }}';
6         </script>
7     <link rel="stylesheet" href="{{STATIC_URL}}css/toolbar.css" type="text/css" />
8     <link rel="stylesheet" href="{{STATIC_URL}}css/jquery.modal.css" type="text/css" />
9     <script src="{{STATIC_URL}}js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
10     <script src="{{STATIC_URL}}js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
11     <!--<script src="{{STATIC_URL}}js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>-->
12     <script src="{{STATIC_URL}}js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
13     <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
14     <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
15     <script src="{{STATIC_URL}}js/jquery.modal.js" type="text/javascript" charset="utf-8"></script>
16
17     <script src="{{STATIC_URL}}js/editor.js" type="text/javascript" charset="utf-8"></script>
18     <script src="{{STATIC_URL}}js/editor.ui.js" type="text/javascript" charset="utf-8"></script>
19 {% endblock extrahead %}
20
21 {% block extrabody %}
22     <script type="text/javascript" charset="utf-8">
23     $(function() {
24         {% for scriptlet in scriptlets %}
25         editor.registerScriptlet("{{scriptlet.name}}",
26             function(editor, panel, params) {
27                 {{ scriptlet.code|safe }}
28             });
29         {% endfor %}
30      });  
31     </script>
32 {% endblock extrabody %}
33
34  {% load explorer_tags %}
35
36 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> &gt; {{ fileid|bookname }}{% endblock breadcrumbs %}
37
38 {% block header-toolbar %}
39
40
41 <button type="button" class="toolbar-button" id="toolbar-button-commit">Merge</button>
42 <button type="button" class="toolbar-button" id="toolbar-button-update"
43         ui:ajax-action="{% url file_update fileid %}">Update</button>
44 <button type="button" class="toolbar-button" id="toolbar-button-save" disabled="disabled">Save</button>
45 {% endblock %}
46
47 {% block message-box %}
48     <div class="msg-info" id="save-waiting"><p>Zapisuję dane na serwerze.</p><p class="data"></p></div>
49     <div class="msg-success" id="save-successful"><p>Zapisano :)</p><p class="data"></p></div>
50     <div class="msg-warning" id="save-warn"><p>Zapisano. Uwagi: (</p><p class="data"></p></div>
51     <div class="msg-error" id="save-error"><p>Błąd przy zapisie.</p> <p class="data"></p></div>
52
53     <div class="msg-success" id="generic-yes"><p class="data"></p></div>
54     <div class="msg-info" id="generic-info"><p class="data"></p></div>
55     <div class="msg-error" id="generic-error"><p class="data"></p></div>
56     
57     <div class="msg-warning" id="not-implemented"><p>Tej funkcji jeszcze nie ma :(</p><p class="data"></p></div>
58     
59 {% endblock %}
60
61 {% block maincontent %}
62         <div id="panels">
63             {% for n in panel_list %}
64             <div class="panel-wrap{% if forloop.last %} last-panel{% endif %}" id="panel-{{n}}">
65                 <div class="panel-toolbar">
66                     <p><label>{{n|capfirst}} panel:
67                     <select name="select-{{n}}-panel" id="panel-{{n}}-select">
68                         {% for panel_type in availble_panels %}
69                         <option value="{% url panel_view path=fileid,name=panel_type.id  %}" p:panel-name="{{ panel_type.id }}">{{panel_type.display_name}}</option>
70                         {% endfor %}
71                     </select>
72                     </label>
73                     <span class="toolbar-button-groups-container">
74                     <span class="panel-toolbar-extra" > </span>
75                     </span>
76                     <!-- rethink the refresh button - it doesn't work very well -->
77                     <!-- <button type="button" class="refresh-button">Odśwież</button> -->
78                     {# <a href="{% url print_xml fileid %}" target="_new">Wydruk</a> #}
79                     <strong class="change-notification" style="display: none">Widok nieaktualny!</strong>
80                     </p>
81                </div>
82                <div id="panel-{{n}}-content" class="panel-content"></div>
83                <button type="button" class="panel-slider"></button>
84             </div>
85             {% endfor %}
86         </div>
87         <div id="commit-dialog" class="jqmWindow">
88             <form action="{% url file_commit fileid %}" method="POST">
89                 <label for="message">Commit message:</label>
90                 <textarea cols="60" rows="15" name="message" id="commit-dialog-message"></textarea>
91                 <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>
92                 <p>
93                    <input type="submit" value="Save" id="commit-dialog-save-button" />
94                    <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
95                 </p>
96             </form>
97         </div>
98
99         <div id="split-dialog" class="jqmWindow">
100             <div class="container-box"> </div>
101             <div class="loading-box" style="display: none;">
102                 <p>Wczytuję zawartość okna...</p>
103                 <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
104             </div>
105             <div class="fatal-error-box" style="display: none;">
106                 <p>Server error, while loading dialog :(</p>
107                 <p><button type="button" class="dialog-close-button">Close</button></p>
108             </div>
109         </div>
110 {% endblock maincontent %}