CodeMirror i splitter w widoku edycji.
[redakcja.git] / platforma / templates / wiki / document_details.html
1 {% extends "base.html" %}
2
3 {% block extrahead %}
4     <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
5     <script src="{{STATIC_URL}}js/lib/jquery.splitter.js" type="text/javascript" charset="utf-8"></script>
6     <script type="text/javascript" charset="utf-8">
7         $(function() {
8             var editor = CodeMirror.fromTextArea('id_text', {
9                 parserfile: 'parsexml.js',
10                 path: "{{ STATIC_URL }}js/lib/codemirror/",
11                 stylesheet: "{{ STATIC_URL }}css/xmlcolors.css",
12                 parserConfig: {
13                     useHTMLKludges: false
14                 },
15                 textWrapping: true,
16                 tabMode: 'spaces',
17                 indentUnit: 0,
18             });
19             
20             $('#splitter').splitter({
21                 type: "v",
22                 outline: true,
23                 minLeft: 480,
24                 sizeRight: 0,
25                 anchorToWindow: true,
26                 resizeToWidth: true,
27             });
28             
29             $(window).resize(function() {
30                 $('iframe').height($(window).height() - $('#tabs').outerHeight());
31             });
32             
33             $(window).resize();
34         });
35     </script>
36     
37     <style type="text/css" media="screen">
38     
39         body {
40             margin: 0;
41         }
42         .vsplitbar {
43             width: 15px;
44             background: #C1C1C1 url(/static/img/gallery.png) no-repeat scroll 2px 2px;
45             border-left: 1px solid #777;
46         }
47         
48         .active {
49             background-color: #DDD;
50         }
51         
52         #splitter {
53 /*          height: 200px;*/
54 /*          width: 500px;*/
55 /*          border: 2px solid #B3B3B3;*/
56         }
57         
58         #sidebar {
59             overflow: auto;
60         }
61         
62         #sidebar {
63             background: #989944;
64         }
65         
66         #tabs {
67             margin: 0;
68             padding: 0;
69             background-color: #C1C1C1;
70             width: 100%;
71             height: 22px;
72             padding-top: 2px;
73             border-bottom: 1px solid #777;
74         }
75         
76         #tabs li {
77             display: block;
78             float: left;
79 /*            width: 140px;*/
80             padding: 5px 12px 3px 12px;
81             border: 1px solid #999;
82             -webkit-border-radius: 4px;
83             -webkit-border-bottom-left-radius: 0;
84             -webkit-border-bottom-right-radius: 0;
85             font: 11px Helvetica, Verdana, sans-serif;
86             font-weight: bold;
87             color: #222;
88 /*            text-shadow: #CCC 1px 1px 1px;*/
89             height: 13px;
90             background-color: #A2A2A2;
91             background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #A2A2A2), to(#C1C1C1));
92 /*            -webkit-box-shadow: 2px 0px 2px #888;*/
93             margin-left: 4px;
94             margin-bottom: -1px;
95         }
96         
97         #tabs li.active {
98             background-color: #FFF;
99             background-image: none;
100 /*            background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #C1C1C1), to(#FFFFFF));            */
101             border-bottom: 1px solid #FFF;
102         }
103     </style>
104 {% endblock %}
105
106 {% block maincontent %}
107     <div id="header">
108         <ol id="tabs">
109             <li>Widok prosty</li>
110             <li class="active">Widok zaawansowany</li>
111         </ol>
112         <div style="clear: both"></div>
113     </div>
114     <div id="splitter">
115         <div id="editor">
116             <form action="{% url wiki.views.document_detail document.name|urlencode %}" method="post" accept-charset="utf-8">
117                 {{ form.text }}
118                 {#  #}
119                 {# <p>Autor: {{ form.author }}</p> #}
120                 {# <p>Komentarz: {{ form.comment }}</p> #}
121                 {# <p><input type="submit" value="Continue &rarr;"></p> #}
122             </form>
123         </div>
124
125         <div id="sidebar" style="width: 200px">
126             <p>Cokolwiek tutaj :-)</p>
127         </div>
128     </div>
129 {% endblock %}