Ticket 547, gallery sidebar title and styling
authorLukasz Anwajler <lukasz@anwajler.com>
Sun, 19 Sep 2010 22:59:12 +0000 (17:59 -0500)
committerLukasz Anwajler <lukasz@anwajler.com>
Sun, 19 Sep 2010 23:00:21 +0000 (18:00 -0500)
apps/wiki/templates/wiki/document_details.html
redakcja/static/css/master.css
redakcja/static/js/wiki/loader.js
redakcja/static/js/wiki/view_gallery.js
redakcja/static/js/wiki/view_search.js

index 8387a85..71113b1 100644 (file)
@@ -29,6 +29,7 @@
 
 {% block splitter-extra %}
 <div class="vsplitbar" title="{% trans "Click to open/close gallery" %}">
+    <p class="vsplitbar-title"></p>
     </div>
     <div id="sidebar">
         {% include "wiki/tabs/gallery_view.html" %}
@@ -39,4 +40,4 @@
 {% block dialogs %}
        {% include "wiki/save_dialog.html" %}
        {% include "wiki/tag_dialog.html" %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index cbfe66a..f6266df 100644 (file)
@@ -23,15 +23,27 @@ body {
     bottom: 0;
     right: 0;
     width: 26px;
-    background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;
+    /*background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;*/
     border-left: 2px solid #999;
     border-right: 2px solid #999;
-    cursor: pointer;
+    cursor: pointer;  
+    background: #C1C1C1; 
 }
 
 .vsplitbar:hover {
-       background-color: yellow;
-       border-color: orange;
+       background-color: #E6E6E6;
+}
+
+
+.vsplitbar p {
+  -moz-transform: rotate(270deg);
+  -moz-transform-origin: 50% 50%;
+  -webkit-transform: rotate(270deg);
+  -webkit-transform-origin: 50% 50%; 
+  -o-transform: rotate(-270deg);
+  -o-transform-origin:  bottom left;
+  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+  margin: 250px auto;
 }
 
 .editor {
index 4256115..f051511 100644 (file)
@@ -59,6 +59,7 @@ $(function()
                        function() {
                                $.wiki.state.perspectives.ScanGalleryPerspective.show = true;
                                $('#sidebar').show();
+                               $(".vsplitbar-title").html("&darr;&nbsp;GALLERY&nbsp;&darr;");
                                $('.vsplitbar').css('right', 480).addClass('active');
                                $('#editor .editor').css('right', 510);
                                $(window).resize();
@@ -68,15 +69,23 @@ $(function()
                                $.wiki.state.perspectives.ScanGalleryPerspective.show = false;
                                $('#sidebar').hide();
                                $('.vsplitbar').css('right', 0).removeClass('active');
+                               if($(".vsplitbar-title").html() == "↓&nbsp;SEARCH&nbsp;AND&nbsp;REPLACE&nbsp;↓"){
+                                       $(".vsplitbar-title").html("&uarr;&nbsp;SEARCH&nbsp;AND&nbsp;REPLACE&nbsp;&uarr;");        
+                               } else {
+                                   $(".vsplitbar-title").html("&uarr;&nbsp;GALLERY&nbsp;&uarr;");
+                               }
                                $('#editor .editor').css('right', 30);
                                $(window).resize();
                                $.wiki.perspectiveForTab('#tabs-right .active').onExit();
                        }
                );
 
-               if($.wiki.state.perspectives.ScanGalleryPerspective.show)
-                       $('.vsplitbar').trigger('click');
-
+               if($.wiki.state.perspectives.ScanGalleryPerspective.show){
+            $('.vsplitbar').trigger('click');
+            $(".vsplitbar-title").html("&darr;&nbsp;GALLERY&nbsp;&darr;");
+        } else {
+            $(".vsplitbar-title").html("&uarr;&nbsp;GALLERY&nbsp;&uarr;");
+        }
         window.onbeforeunload = function(e) {
             if($.wiki.isDirty()) {
                                e.returnValue = "Na stronie mogą być nie zapisane zmiany.";
index ec486bc..4f6b8a1 100644 (file)
         $.wiki.Perspective.prototype.onEnter.call(this);
 
         $('.vsplitbar').not('.active').trigger('click');
-
+        $(".vsplitbar-title").html("&darr;&nbsp;GALLERY&nbsp;&darr;");        
+        
         this.doc.refreshGallery({
             success: function(doc, data){
                 self.$image.show();
index 740c913..789a961 100644 (file)
@@ -99,6 +99,8 @@
         self.$searchCursor = null;
 
         $('.vsplitbar').not('.active').trigger('click');
+        $(".vsplitbar-title").html("&darr;&nbsp;SEARCH&nbsp;AND&nbsp;REPLACE&nbsp;&darr;");        
+        
         if ($.wiki.activePerspective() != 'CodeMirrorPerspective')
             $.wiki.switchToTab('#CodeMirrorPerspective');
     };
 
     $.wiki.SearchPerspective = SearchPerspective;
 
-})(jQuery);
\ No newline at end of file
+})(jQuery);