mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
acp - if bs env < lg + content is long (ex plugins list) then duplicate sidebar menu on header + footer; closes #2510
This commit is contained in:
@@ -39,7 +39,10 @@ var admin = {};
|
||||
var url = data.url;
|
||||
|
||||
selectMenuItem(data.url);
|
||||
setupHeaderMenu();
|
||||
});
|
||||
|
||||
$(window).resize(setupHeaderMenu);
|
||||
});
|
||||
|
||||
socket.emit('admin.config.get', function(err, config) {
|
||||
@@ -151,4 +154,19 @@ var admin = {};
|
||||
|
||||
$('#breadcrumbs').html(caret + Array.prototype.slice.call(arguments).join(caret));
|
||||
}
|
||||
|
||||
function setupHeaderMenu() {
|
||||
var env = utils.findBootstrapEnvironment();
|
||||
|
||||
if (env !== 'lg') {
|
||||
if ($('.mobile-header').length || $('#content .col-lg-9').first().height() < 2000) {
|
||||
return;
|
||||
}
|
||||
|
||||
($('#content .col-lg-3').first().clone().addClass('mobile-header'))
|
||||
.insertBefore($('#content .col-lg-9').first());
|
||||
} else {
|
||||
$('.mobile-header').remove();
|
||||
}
|
||||
}
|
||||
}());
|
||||
Reference in New Issue
Block a user