SAAS-985 - Port sandwich menu to showbuilder branch

This commit is contained in:
Duncan Sommerville 2015-08-04 16:37:45 -04:00
parent 4200f56265
commit 57c1d74286
5 changed files with 72 additions and 19 deletions

View file

@ -186,3 +186,11 @@ function getUsabilityHint() {
}
});
}
$(document).mouseup(function (e) {
var mb = $("#menu-btn"),
w = $(window).width();
if (!mb.is(e.target) && mb.has(e.target).length === 0 && w <= 970) {
$('#nav .responsive-menu').slideUp();
}
});

View file

@ -480,6 +480,13 @@ function setCurrentUserPseudoPassword() {
$('#cu_passwordVerify').val("xxxxxx");
}
$(window).resize(function() {
/* If we don't do this, the menu can stay hidden after resizing */
if ($(this).width() > 970) {
$("#nav .responsive-menu").show();
}
});
$(document).ready(function() {
if ($('#master-panel').length > 0)
init();
@ -502,4 +509,7 @@ $(document).ready(function() {
// text. This differs depending on the language setting
$('#popup-link').css('width', $('.jp-container h1').css('width'));
$('#menu-btn').click(function() {
$('#nav .responsive-menu').slideToggle();
});
});