Client: Improved panel sizing
authorDarren <darren@darrenwhitlen.com>
Wed, 31 Oct 2012 00:17:20 +0000 (00:17 +0000)
committerDarren <darren@darrenwhitlen.com>
Wed, 31 Oct 2012 00:17:20 +0000 (00:17 +0000)
Gaps at the top + bottom on the server select screen removed

client/assets/dev/view.js

index 0b3eed20362b2c8fb1868508a8ce8d604fdcd7a8..d15e69184bc6ce0a53797c5e56d6ad02689d4884 100644 (file)
@@ -949,10 +949,22 @@ kiwi.view.Application = Backbone.View.extend({
             bottom: el_controlbox.outerHeight(true)\r
         };\r
 \r
+\r
+        // If any elements are not visible, full size the panals instead\r
+        if (!el_toolbar.is(':visible')) {\r
+            css_heights.top = 0;\r
+        }\r
+\r
+        if (!el_controlbox.is(':visible')) {\r
+            css_heights.bottom = 0;\r
+        }\r
+\r
+        // Apply the CSS sizes\r
         el_panels.css(css_heights);\r
         el_memberlists.css(css_heights);\r
         el_resize_handle.css(css_heights);\r
 \r
+        // Set the panels width depending on the memberlist visibility\r
         if (el_memberlists.css('display') != 'none') {\r
             // Handle + panels to the side of the memberlist\r
             el_panels.css('right', el_memberlists.outerWidth(true) + el_resize_handle.outerWidth(true));\r