panels: Make them mobile responsive.

This makes them responsive to resizes and fixes a responsive
issue with the floating recipient being too high when the alerts
were more than one line height.
This commit is contained in:
Brock Whittaker 2017-10-12 15:13:51 -07:00 committed by Tim Abbott
parent 0fae83b301
commit 96c66d4297
2 changed files with 7 additions and 0 deletions

View File

@ -5,8 +5,13 @@ var exports = {};
var resize_app = function () {
var panels_height = $("#panels").height();
$("body > .app").height("calc(100% - " + panels_height + "px)");
// the floating recipient bar is usually positioned 10px below the
// header, so add that to the panels height to get the new `top` value.
$("#floating_recipient_bar").css("top", panels_height + $(".header").height() + 10 + "px");
};
exports.resize_app = resize_app;
var show_step = function (step) {
$("#panels [data-step]").hide().filter("[data-step=" + step + "]").show();
};

View File

@ -264,6 +264,8 @@ exports.resize_page_components = function () {
activity.update_scrollbar.users();
activity.update_scrollbar.group_pms();
desktop_notifications_panel.resize_app();
};
var _old_width = $(window).width();