From: Darren Date: Tue, 11 Jun 2013 19:19:19 +0000 (+0100) Subject: Moving server dialog side panel loading into View X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cdb6781d6935081629306ead11d8e3164bda27da;p=KiwiIRC.git Moving server dialog side panel loading into View --- 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() });