From cdb6781d6935081629306ead11d8e3164bda27da Mon Sep 17 00:00:00 2001 From: Darren Date: Tue, 11 Jun 2013 20:19:19 +0100 Subject: [PATCH] Moving server dialog side panel loading into View --- client/assets/src/models/application.js | 3 +-- client/assets/src/views/serverselect.js | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/assets/src/models/application.js b/client/assets/src/models/application.js index 9aa35f0..59b7d26 100644 --- a/client/assets/src/models/application.js +++ b/client/assets/src/models/application.js @@ -76,8 +76,7 @@ _kiwi.model.Application = function () { var $info = $($('#tmpl_new_connection_info').html().trim()); - // Some themes may hide the info box, so check that here also - if ($info.html() && $info.is(':visible')) { + if ($info.html()) { connection_dialog.view.infoBoxSet($info); connection_dialog.view.infoBoxShow(); } diff --git a/client/assets/src/views/serverselect.js b/client/assets/src/views/serverselect.js index 1fcd278..eebdd64 100644 --- a/client/assets/src/views/serverselect.js +++ b/client/assets/src/views/serverselect.js @@ -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() }); -- 2.25.1