aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/admin.js
diff options
context:
space:
mode:
authorVjacheslav Trushkin <cyberalien@gmail.com>2013-10-25 21:40:39 +0300
committerVjacheslav Trushkin <cyberalien@gmail.com>2013-10-26 22:00:23 +0300
commit1b3daa1ad876e9b3adf87bca754ee313a0cdaa13 (patch)
tree436563ee8c3c78196b0c9ecc575eb0d6ce2ed2e0 /phpBB/adm/style/admin.js
parent43b9314390db962aaef2411e22642f86730a6eb6 (diff)
downloadforums-1b3daa1ad876e9b3adf87bca754ee313a0cdaa13.tar
forums-1b3daa1ad876e9b3adf87bca754ee313a0cdaa13.tar.gz
forums-1b3daa1ad876e9b3adf87bca754ee313a0cdaa13.tar.bz2
forums-1b3daa1ad876e9b3adf87bca754ee313a0cdaa13.tar.xz
forums-1b3daa1ad876e9b3adf87bca754ee313a0cdaa13.zip
[ticket/11957] Adjustments to ACP layout, menu and some elements
PHPBB3-11957
Diffstat (limited to 'phpBB/adm/style/admin.js')
-rw-r--r--phpBB/adm/style/admin.js24
1 files changed, 20 insertions, 4 deletions
diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js
index 208afedce8..a9e00ab9d7 100644
--- a/phpBB/adm/style/admin.js
+++ b/phpBB/adm/style/admin.js
@@ -15,11 +15,27 @@ function parse_document(container)
/**
* Navigation
*/
- container.find('#menu .menu-block > a.header').click(function() {
- $(this).parent().toggleClass('active');
- });
+ container.find('#menu').each(function() {
+ var menu = $(this),
+ blocks = menu.children('.menu-block');
+
+ if (!blocks.length) {
+ return;
+ }
+
+ // Set onclick event
+ blocks.children('a.header').click(function() {
+ $(this).parent().toggleClass('active');
+ });
+
+ // Set active menu
+ menu.find('#activemenu').parents('.menu-block').addClass('active');
- container.find('#activemenu').parents('.menu-block').addClass('active');
+ // Check if there is active menu
+ if (!blocks.filter('.active').length) {
+ blocks.filter(':first').addClass('active');
+ }
+ });
}
/**