From 262fb9b14cd5df0ab1efaef09016ad97dc59d527 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 6 Aug 2013 15:09:01 -0400 Subject: [PATCH] Factor out resizing page components from the resize handler (imported from commit 18410406f6a2401b21a9d5336a8ae14046fc0375) --- static/js/ui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/ui.js b/static/js/ui.js index 6dde7abdfb..4c6ab0b6ed 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -335,7 +335,7 @@ function get_new_heights() { return res; } -function resizehandler(e) { +exports.resize_page_components = function () { var composebox = $("#compose"); var floating_recipient_bar = $("#floating_recipient_bar"); var tab_bar = $("#tab_bar"); @@ -359,6 +359,10 @@ function resizehandler(e) { $("#right-sidebar").height(h.right_sidebar_height); $("#stream_filters").css('max-height', h.stream_filters_max_height); $("#user_presences").css('max-height', h.user_presences_max_height); +}; + +function resizehandler(e) { + exports.resize_page_components(); // This function might run onReady (if we're in a narrow window), // but before we've loaded in the messages; in that case, don't