mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
added link to 'install plugins' page in acp installed plugins menu dropdown
also fixed annoying white background when a menu item other than the one active is focused upon
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
|
||||
.nav-list {
|
||||
background: #232323;
|
||||
|
||||
li {
|
||||
i {
|
||||
margin-right: 6px;
|
||||
@@ -134,6 +135,10 @@
|
||||
padding-left: 11px;
|
||||
outline: 0;
|
||||
|
||||
&:focus {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
span {
|
||||
opacity: 0;
|
||||
margin-right: -8px;
|
||||
|
||||
@@ -117,16 +117,21 @@
|
||||
function selectMenuItem(url) {
|
||||
url = url.replace(/\/\d+$/, '');
|
||||
|
||||
// If index is requested, load the dashboard
|
||||
if (url === 'admin') {
|
||||
url = 'admin/general/dashboard';
|
||||
}
|
||||
|
||||
$('#main-menu .nav-list > li').removeClass('active').each(function() {
|
||||
var menu = $(this),
|
||||
category = menu.parents('.sidebar-nav'),
|
||||
href = menu.children('a').attr('href');
|
||||
href = menu.children('a').attr('href'),
|
||||
isLink = menu.attr('data-link') === '1';
|
||||
|
||||
if (href && href.slice(1).indexOf(url) !== -1) {
|
||||
if (!isLink && href && href.slice(1) === url) {
|
||||
category.addClass('open');
|
||||
menu.addClass('active');
|
||||
modifyBreadcrumb(category.find('.nav-header').text(), menu.text());
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@
|
||||
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
|
||||
</li>
|
||||
<!-- END plugins -->
|
||||
<li data-link="1">
|
||||
<a href="{relative_path}/admin/extend/plugins"><i class="fa fa-plus"></i> Install Plugins</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF plugins.length -->
|
||||
|
||||
Reference in New Issue
Block a user