5a6a443e283105ed31eb2541db5901d358874136
[redakcja.git] / project / templates / explorer / file_xml.html
1 {% extends "base.html" %}
2 {% load toolbar_tags %}
3
4 {% block extrahead %}
5     <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
6     <script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
7     <script src="/static/js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>
8     <script src="/static/js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
9     <script src="/static/js/jquery.resizable.js" type="text/javascript" charset="utf-8"></script>
10     <script type="text/javascript" charset="utf-8">        
11         $(function() {
12             // ========================
13             // = Two resizable panels =
14             // ========================
15             function resizePanels() {
16                 $('.panel').height($(window).height() - $('.panel').position().top);
17                 $('#right-panel-wrap').width($(window).width() - $('#left-panel-wrap').outerWidth());
18             }
19             
20             $(window).resize(function() {
21                 resizePanels();
22             })
23             
24             $('#left-panel-wrap').bind('resizable:resize', resizePanels)
25                 .resizable('#slider', {minWidth: 8});
26             
27             resizePanels();
28             
29             // $('#id_folders').change(function() {
30             //     $('#images').load('{% url folder_image_ajax %}' + $('#id_folders').val() + '/', function() {
31             //         $('#images-wrap').data('lazyload:lastCheckedScrollTop', -10000);
32             //     });
33             // });
34             // 
35             //
36             
37             // var editor = CodeMirror.fromTextArea("id_text", {
38             //     parserfile: 'parsexml.js',
39             //     path: "/static/js/codemirror/",
40             //     stylesheet: "/static/css/xmlcolors.css",
41             //     parserConfig: {useHTMLKludges: false},
42             //     initCallback: function() {
43             //         $('#images').autoscroll('iframe');
44             //         $('.toggleAutoscroll').toggle(function() {
45             //             $(this).html('Synchronizuj przewijanie');
46             //             $('#images').disableAutoscroll();
47             //         }, function() {
48             //             $(this).html('Nie synchronizuj przewijania');
49             //             $('#images').enableAutoscroll();
50             //         })
51             //         
52             //         // Toolbar
53             //         $('#toolbar-tabs li').click(function() {
54             //             var id = $(this).attr('p:button-list');
55             //             $('#toolbar-tabs li').removeClass('active');
56             //             $(this).addClass('active');
57             //             if (!$('#' + id).is(':visible')) {
58             //                 $('#toolbar-buttons ol').not('#' + id).hide();
59             //                 $('#' + id).show();
60             //             }
61             //         })
62             // 
63             //         var keys = {};
64             //         $('#toolbar-buttons li').each(function() {
65             //             var tag = $(this).attr('p:tag');
66             //             var handler = function() {
67             //                 var text = editor.selection();
68             //                 editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
69             //                 if (text.length == 0) {
70             //                     var pos = editor.cursorPosition();
71             //                     editor.selectLines(pos.line, pos.character + tag.length + 2);
72             //                 }
73             //             }
74             //             if ($(this).attr('p:key')) {
75             //                 keys[$(this).attr('p:key')] = handler;
76             //             }
77             //             $(this).click(handler)
78             //         });
79             //         
80             //         editor.grabKeys(function(event) { 
81             //             if (keys[event.keyCode]) {
82             //                 keys[event.keyCode]();
83             //             }
84             //         }, function(event) {
85             //             return event.altKey && keys[event.keyCode];
86             //         });
87             //     }
88             // });
89             
90
91             
92
93             
94             // $('#toolbar-buttons li').wTooltip({
95             //     delay: 1000, 
96             //     style: {
97             //         border: "1px solid #7F7D67",
98             //         opacity: 0.9, 
99             //         background: "#FBFBC6", 
100             //         padding: "1px",
101             //         fontSize: "12px",
102             //     }});
103             
104             // $('#images-wrap').lazyload('.image-box', {threshold: 640 * 10, scrollTreshold: 640 * 5});
105         });
106
107     </script>
108 {% endblock extrahead %}
109
110 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
111
112 {% block maincontent %}
113         <div id="panels">
114             <div id="left-panel-wrap" class="panel-wrap">
115                 <div id="left-panel" class="panel">
116                     <div id="slider" style="float: right"></div>
117                     <div id="left-panel-toolbar" class="panel-toolbar">
118                         <label for="select-left-panel">Lewy panel:</label>
119                         <select name="select-left-panel" id="select-left-panel">
120                             <option value="panel1">Panel 1</option>
121                             <option value="panel2">Panel 2</option>                            
122                         </select>
123                     </div>
124                 </div>
125             </div>
126             <div id="right-panel-wrap" class="panel-wrap">
127                 <div id="right-panel" class="panel">
128                     <div id="right-panel-toolbar" class="panel-toolbar">
129                         <label for="select-right-panel">Prawy panel:</label>
130                         <select name="select-right-panel" id="select-right-panel">
131                             <option value="panel1">Panel 1</option>
132                             <option value="panel2">Panel 2</option>                            
133                         </select>
134                     </div>
135                     {# <textarea id="id_text" name="text" width="480px">{{ form.text.field.initial }}</textarea> #}
136                 </div>
137             </div>
138                         {#  #}
139                         {#     <div id="toggle-sidebar" style="float: right"></div> #}
140                         {#     <div id="whatever"> #}
141                         {#         <div id="sidebar-toolbar"> #}
142                         {#             <ol id="sidebar-tabs"> #}
143                         {#                 <li>Tab</li> #}
144                         {#                 <li>Tab 2</li> #}
145                         {#             </ol> #}
146                         {#         </div> #}
147                         {#         <div id="images-wrap"> #}
148                         {#  #}
149                         {#             <div style="clear: both; height: 0; width: 0">&nbsp;</div> #}
150                         {#             <div id="images"> #}
151                         {#                 <p>Aby zobaczyć obrazki wybierz folder poniżej:</p> #}
152                         {#                 <p>{{ image_folders_form.folders }}</p> #}
153                         {#             </div> #}
154                         {#         </div> #}
155                         {#     </div> #}
156                         {# </div> #}
157                         {# {% toolbar %} #}
158         </div>
159 {% endblock maincontent %}