Skip to content

Node.js based forum software built for the modern web

acp - if bs env < lg + content is long (ex plugins list) then duplicate sidebar menu on header + footer; closes #2510

psychobunnybeaa52fff5e2
diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js
index e9a061bc52..68801eaeae 100644
--- a/public/src/admin/admin.js
+++ b/public/src/admin/admin.js
@@ -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();
+ }
+ }
}());
\ No newline at end of file