Usunięcie wszystkiego poza dwoma panelami.
authorzuber <marek@stepniowski.com>
Fri, 21 Aug 2009 08:15:26 +0000 (10:15 +0200)
committerzuber <marek@stepniowski.com>
Fri, 21 Aug 2009 08:15:26 +0000 (10:15 +0200)
project/static/css/master.css
project/templates/explorer/file_xml.html

index 1a726a8..c7a6dde 100644 (file)
@@ -74,26 +74,21 @@ label {
     overflow-y: scroll;
 }
 
     overflow-y: scroll;
 }
 
-#whatever {
-    float: left;
-}
-
-#images-wrap {
-/*    width: 0px;*/
-    height: 480px;
-    overflow-y: scroll;
-    overflow-x: hidden;
-    background-color: #fff;
-    float: left;
-}
-
-#sidebar {
+/* ========== */
+/* = Panels = */
+/* ========== */
+#left-panel-wrap {
     float: left;
     width: 8px;
     overflow: hidden;
 }
 
     float: left;
     width: 8px;
     overflow: hidden;
 }
 
-#toggle-sidebar {
+#right-panel-wrap {
+    
+}
+
+/* Slider between panels */
+#slider {
     border-left: 1px solid #999;
     border-right: 1px solid #999;
     background-color: #DDD;
     border-left: 1px solid #999;
     border-right: 1px solid #999;
     background-color: #DDD;
@@ -102,105 +97,7 @@ label {
     float: left;
 }
 
     float: left;
 }
 
-#toggle-sidebar:hover {
+#slider:hover {
     background-color: #999;
     cursor: col-resize;
 }
     background-color: #999;
     cursor: col-resize;
 }
-
-#status-bar {
-    border-top: 1px solid #999;
-    background-color: #EEE;
-    padding: 2px 10px;
-}
-
-.errorlist {
-    color: red;
-    margin: 0 20px 0 0;
-    padding: 0;
-    float: left;
-}
-
-.errorlist:before {
-    content: '';
-    clear: both;
-}
-
-p { 
-    margin: 0;
-}
-
-.image-box {
-    border-top: 1px solid #DDD;
-}
-
-#toolbar {
-    height: 48px;
-    overflow: hidden;
-}
-
-#toolbar, #toolbar ol, #sidebar-toolbar, #sidebar-toolbar ol {
-/*    overflow: hidden;*/
-    display: block;
-    margin: 0;
-    padding: 0;
-    background-color: #CCC;
-    border-top: 1px solid #AAA;
-}
-
-#sidebar-toolbar {
-    width: 0;
-}
-
-#sidebar-toolbar, #sidebar-toolbar ol {
-    overflow: hidden;
-}
-
-#sidebar-tabs li, #toolbar-tabs li {
-    font-size: 14px;
-    display: block;
-    float: left;
-    margin: 4px 0 -1px 4px;
-    padding: 2px 10px 0 10px;
-    background-color: #CCC;
-    border: 1px solid #AAA;
-    border-radius-topleft: 8px;
-    border-radius-topright: 8px;
-    -moz-border-radius-topleft: 8px;
-    -moz-border-radius-topright: 8px;
-    -webkit-border-top-left-radius: 8px;
-    -webkit-border-top-right-radius: 8px;
-}
-
-#sidebar-tabs, #toolbar-tabs {
-    height: 21px;
-    z-index: 1000;
-/*    overflow: hidden;*/
-}
-
-#sidebar-tabs li:hover, #sidebar-tabs li.active, #toolbar-tabs li:hover, #toolbar-tabs li.active {
-    cursor: default;
-    background-color: #EEE;
-    border-bottom: 1px solid #EEE;
-}
-
-#toolbar-buttons {
-    background-color: #EEE;
-    border-bottom: 1px solid #AAA;
-}
-
-#toolbar-buttons li {
-    display: block;
-    font-size: 12px;
-    padding: 1px 8px;
-    margin: 4px;
-    border-radius: 10px;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 8px;
-    float: left;
-}
-
-#toolbar-buttons li:hover {
-    background-color: #777;
-    color: #FFF;
-    cursor: default;
-}
index 53d536a..b906512 100644 (file)
@@ -9,93 +9,99 @@
     <script src="/static/js/jquery.resizable.js" type="text/javascript" charset="utf-8"></script>
     <script type="text/javascript" charset="utf-8">        
         $(function() {
     <script src="/static/js/jquery.resizable.js" type="text/javascript" charset="utf-8"></script>
     <script type="text/javascript" charset="utf-8">        
         $(function() {
-            $('#id_folders').change(function() {
-                $('#images').load('{% url folder_image_ajax %}' + $('#id_folders').val() + '/', function() {
-                    $('#images-wrap').data('lazyload:lastCheckedScrollTop', -10000);
-                });
-            });
-            
+            // ========================
+            // = Two resizable panels =
+            // ========================
             function resizePanels() {
             function resizePanels() {
-                $('iframe').width($(window).width() - $('#sidebar').outerWidth());
-                $('iframe').height($(window).height() - $('iframe').position().top);
-                $('#toggle-sidebar').height($(window).height() - $('#toggle-sidebar').position().top);
-                $('#images-wrap').height($(window).height() - $('#images-wrap').position().top);
-                $('#images-wrap, #sidebar-toolbar').width($('#sidebar').width() - 10);
+                $('.panel').height($(window).height() - $('.panel').position().top);
+                $('#right-panel-wrap').width($(window).width() - $('#right-panel-wrap').position().left);
             }
             
             $(window).resize(function() {
                 resizePanels();
             })
             
             }
             
             $(window).resize(function() {
                 resizePanels();
             })
             
-            var editor = CodeMirror.fromTextArea("id_text", {
-                parserfile: 'parsexml.js',
-                path: "/static/js/codemirror/",
-                stylesheet: "/static/css/xmlcolors.css",
-                parserConfig: {useHTMLKludges: false},
-                initCallback: function() {
-                    $('#images').autoscroll('iframe');
-                    $('.toggleAutoscroll').toggle(function() {
-                        $(this).html('Synchronizuj przewijanie');
-                        $('#images').disableAutoscroll();
-                    }, function() {
-                        $(this).html('Nie synchronizuj przewijania');
-                        $('#images').enableAutoscroll();
-                    })
-                    
-                    // Toolbar
-                    $('#toolbar-tabs li').click(function() {
-                        var id = $(this).attr('p:button-list');
-                        $('#toolbar-tabs li').removeClass('active');
-                        $(this).addClass('active');
-                        if (!$('#' + id).is(':visible')) {
-                            $('#toolbar-buttons ol').not('#' + id).hide();
-                            $('#' + id).show();
-                        }
-                    })
+            $('#left-panel-wrap').bind('resizable:resize', resizePanels)
+                .resizable('#slider', {minWidth: 8});
+            
+            resizePanels();
+            
+            // $('#id_folders').change(function() {
+            //     $('#images').load('{% url folder_image_ajax %}' + $('#id_folders').val() + '/', function() {
+            //         $('#images-wrap').data('lazyload:lastCheckedScrollTop', -10000);
+            //     });
+            // });
+            // 
+            //
+            
+            // var editor = CodeMirror.fromTextArea("id_text", {
+            //     parserfile: 'parsexml.js',
+            //     path: "/static/js/codemirror/",
+            //     stylesheet: "/static/css/xmlcolors.css",
+            //     parserConfig: {useHTMLKludges: false},
+            //     initCallback: function() {
+            //         $('#images').autoscroll('iframe');
+            //         $('.toggleAutoscroll').toggle(function() {
+            //             $(this).html('Synchronizuj przewijanie');
+            //             $('#images').disableAutoscroll();
+            //         }, function() {
+            //             $(this).html('Nie synchronizuj przewijania');
+            //             $('#images').enableAutoscroll();
+            //         })
+            //         
+            //         // Toolbar
+            //         $('#toolbar-tabs li').click(function() {
+            //             var id = $(this).attr('p:button-list');
+            //             $('#toolbar-tabs li').removeClass('active');
+            //             $(this).addClass('active');
+            //             if (!$('#' + id).is(':visible')) {
+            //                 $('#toolbar-buttons ol').not('#' + id).hide();
+            //                 $('#' + id).show();
+            //             }
+            //         })
+            // 
+            //         var keys = {};
+            //         $('#toolbar-buttons li').each(function() {
+            //             var tag = $(this).attr('p:tag');
+            //             var handler = function() {
+            //                 var text = editor.selection();
+            //                 editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
+            //                 if (text.length == 0) {
+            //                     var pos = editor.cursorPosition();
+            //                     editor.selectLines(pos.line, pos.character + tag.length + 2);
+            //                 }
+            //             }
+            //             if ($(this).attr('p:key')) {
+            //                 keys[$(this).attr('p:key')] = handler;
+            //             }
+            //             $(this).click(handler)
+            //         });
+            //         
+            //         editor.grabKeys(function(event) { 
+            //             if (keys[event.keyCode]) {
+            //                 keys[event.keyCode]();
+            //             }
+            //         }, function(event) {
+            //             return event.altKey && keys[event.keyCode];
+            //         });
+            //     }
+            // });
+            
 
 
-                    var keys = {};
-                    $('#toolbar-buttons li').each(function() {
-                        var tag = $(this).attr('p:tag');
-                        var handler = function() {
-                            var text = editor.selection();
-                            editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
-                            if (text.length == 0) {
-                                var pos = editor.cursorPosition();
-                                editor.selectLines(pos.line, pos.character + tag.length + 2);
-                            }
-                        }
-                        if ($(this).attr('p:key')) {
-                            keys[$(this).attr('p:key')] = handler;
-                        }
-                        $(this).click(handler)
-                    });
-                    
-                    editor.grabKeys(function(event) { 
-                        if (keys[event.keyCode]) {
-                            keys[event.keyCode]();
-                        }
-                    }, function(event) {
-                        return event.altKey && keys[event.keyCode];
-                    });
+            
 
 
-                    $('#sidebar').bind('resizable:resize', resizePanels)
-                        .resizable('#toggle-sidebar', {minWidth: 8});
-                    
-                    resizePanels();
-                }
-            });
             
             
-            $('#toolbar-buttons li').wTooltip({
-                delay: 1000, 
-                style: {
-                    border: "1px solid #7F7D67",
-                    opacity: 0.9, 
-                    background: "#FBFBC6", 
-                    padding: "1px",
-                    fontSize: "12px",
-                }});
+            // $('#toolbar-buttons li').wTooltip({
+            //     delay: 1000, 
+            //     style: {
+            //         border: "1px solid #7F7D67",
+            //         opacity: 0.9, 
+            //         background: "#FBFBC6", 
+            //         padding: "1px",
+            //         fontSize: "12px",
+            //     }});
             
             
-            $('#images-wrap').lazyload('.image-box', {threshold: 640 * 10, scrollTreshold: 640 * 5});
+            // $('#images-wrap').lazyload('.image-box', {threshold: 640 * 10, scrollTreshold: 640 * 5});
         });
 
     </script>
         });
 
     </script>
 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
 
 {% block maincontent %}
 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
 
 {% block maincontent %}
-    <form action="." method="post" accept-charset="utf-8">
         <div id="panels">
         <div id="panels">
-            <div id="sidebar">
-                <div id="toggle-sidebar" style="float: right"></div>
-                <div id="whatever">
-                    <div id="sidebar-toolbar">
-                        <ol id="sidebar-tabs">
-                            <li>Tab</li>
-                            <li>Tab 2</li>
-                        </ol>
-                    </div>
-                    <div id="images-wrap">
-
-                        <div style="clear: both; height: 0; width: 0">&nbsp;</div>
-                        <div id="images">
-                            <p>Aby zobaczyć obrazki wybierz folder poniżej:</p>
-                            <p>{{ image_folders_form.folders }}</p>
-                        </div>
-                    </div>
+            <div id="left-panel-wrap" class="panel-wrap">
+                <div id="left-panel" class="panel">
+                    <div id="slider" style="float: right"></div>
+                </div>
+            </div>
+            <div id="right-panel-wrap" class="panel-wrap">
+                <div id="right-panel" class="panel">
+                    {# <textarea id="id_text" name="text" width="480px">{{ form.text.field.initial }}</textarea> #}
                 </div>
             </div>
                 </div>
             </div>
-            {% toolbar %}
-            <textarea id="id_text" name="text" width="480px">{{ form.text.field.initial }}</textarea>
+                        {#  #}
+                        {#     <div id="toggle-sidebar" style="float: right"></div> #}
+                        {#     <div id="whatever"> #}
+                        {#         <div id="sidebar-toolbar"> #}
+                        {#             <ol id="sidebar-tabs"> #}
+                        {#                 <li>Tab</li> #}
+                        {#                 <li>Tab 2</li> #}
+                        {#             </ol> #}
+                        {#         </div> #}
+                        {#         <div id="images-wrap"> #}
+                        {#  #}
+                        {#             <div style="clear: both; height: 0; width: 0">&nbsp;</div> #}
+                        {#             <div id="images"> #}
+                        {#                 <p>Aby zobaczyć obrazki wybierz folder poniżej:</p> #}
+                        {#                 <p>{{ image_folders_form.folders }}</p> #}
+                        {#             </div> #}
+                        {#         </div> #}
+                        {#     </div> #}
+                        {# </div> #}
+                        {# {% toolbar %} #}
         </div>
         </div>
-        
-        {# <div id="status-bar"> #}
-        {#     {{ form.user.errors }} {{ form.commit_message.errors }} #}
-        {#     <p> #}
-        {#         Użytkownik: {{ form.user }} #}
-        {#         Opis zmian: {{ form.commit_message }} #}
-        {#         <input type="submit" value="Zapisz"/> #}
-        {#         <a href="#" class="toggleAutoscroll" style="float: right">Nie synchronizuj przewijania</a> #}
-        {#     </p> #}
-        {# </div> #}
-    </form>
 {% endblock maincontent %}    
 {% endblock maincontent %}