Moving server dialog side panel loading into View
authorDarren <darren@darrenwhitlen.com>
Tue, 11 Jun 2013 19:19:19 +0000 (20:19 +0100)
committerDarren <darren@darrenwhitlen.com>
Tue, 11 Jun 2013 19:19:19 +0000 (20:19 +0100)
client/assets/src/models/application.js
client/assets/src/views/serverselect.js

index 9aa35f04013c2445f7c54b44b048931ac5f6f231..59b7d262d78a02fa4996b6b22518251e99289af2 100644 (file)
@@ -76,8 +76,7 @@ _kiwi.model.Application = function () {
 \r
             var $info = $($('#tmpl_new_connection_info').html().trim());\r
 \r
-            // Some themes may hide the info box, so check that here also\r
-            if ($info.html() && $info.is(':visible')) {\r
+            if ($info.html()) {\r
                 connection_dialog.view.infoBoxSet($info);\r
                 connection_dialog.view.infoBoxShow();\r
             }\r
index 1fcd278923f1b464dd6690a303299dc09643cd90..eebdd6451f6b1cadec175e38142939dee5e5b2ab 100644 (file)
@@ -160,6 +160,12 @@ _kiwi.view.ServerSelect = function () {
 
         infoBoxShow: function() {
             var $side_panel = this.$el.find('.side_panel');
+
+            // Some theme may hide the info panel so check before we
+            // resize ourselves
+            if (!$side_panel.is(':visible'))
+                return;
+
             this.$el.animate({
                 width: parseInt($side_panel.css('left'), 10) + $side_panel.find('.content:first').outerWidth()
             });