b906512cc1a66949873374d3b24913a121702683
[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() - $('#right-panel-wrap').position().left);
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>
118             </div>
119             <div id="right-panel-wrap" class="panel-wrap">
120                 <div id="right-panel" class="panel">
121                     {# <textarea id="id_text" name="text" width="480px">{{ form.text.field.initial }}</textarea> #}
122                 </div>
123             </div>
124                         {#  #}
125                         {#     <div id="toggle-sidebar" style="float: right"></div> #}
126                         {#     <div id="whatever"> #}
127                         {#         <div id="sidebar-toolbar"> #}
128                         {#             <ol id="sidebar-tabs"> #}
129                         {#                 <li>Tab</li> #}
130                         {#                 <li>Tab 2</li> #}
131                         {#             </ol> #}
132                         {#         </div> #}
133                         {#         <div id="images-wrap"> #}
134                         {#  #}
135                         {#             <div style="clear: both; height: 0; width: 0">&nbsp;</div> #}
136                         {#             <div id="images"> #}
137                         {#                 <p>Aby zobaczyć obrazki wybierz folder poniżej:</p> #}
138                         {#                 <p>{{ image_folders_form.folders }}</p> #}
139                         {#             </div> #}
140                         {#         </div> #}
141                         {#     </div> #}
142                         {# </div> #}
143                         {# {% toolbar %} #}
144         </div>
145 {% endblock maincontent %}