Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_wcms_gesso
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_wcms_gesso
Commits
6ba816d6
Commit
6ba816d6
authored
4 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4199: removing testing code
parent
bcbb7a68
No related branches found
No related tags found
1 merge request
!9
Istwcms 4199 theme menus
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/component_scripts.min.js
+3
-7
3 additions, 7 deletions
js/component_scripts.min.js
source/_patterns/04-components/menu/menu--horizontal/menu--horizontal.js
+3
-7
3 additions, 7 deletions
...s/04-components/menu/menu--horizontal/menu--horizontal.js
with
6 additions
and
14 deletions
js/component_scripts.min.js
+
3
−
7
View file @
6ba816d6
...
...
@@ -274,16 +274,12 @@
function
toggleItem
()
{
console
.
log
(
'
CLICKED
'
);
var
parent
=
this
.
parentNode
.
parentNode
.
parentNode
.
parentNode
;
var
screenWidth
=
$
(
window
).
width
();
if
(
this
.
classList
.
contains
(
'
submenu-active
'
))
{
console
.
log
(
'
IF
'
);
this
.
classList
.
remove
(
'
submenu-active
'
);
if
(
this
.
hasAttribute
(
'
aria-expanded
'
,
'
true
'
))
{
...
...
@@ -298,13 +294,14 @@
}
}
}
else
if
(
$
(
'
.submenu-active
'
))
{
console
.
log
(
'
ELSEIF
'
);
// Get elements with .submnenu-active than close them,
// Get elements with .submnenu-active than close them,
$
(
'
.submenu-active
'
).
removeClass
(
'
submenu-active
'
).
attr
(
'
aria-expanded
'
,
'
false
'
);
// and open this one.
this
.
classList
.
add
(
"
submenu-active
"
);
this
.
setAttribute
(
'
aria-expanded
'
,
'
true
'
);
// If hamburger
if
(
screenWidth
<=
767
)
{
// Look at parents and hide other menus if not secondary and open
...
...
@@ -314,7 +311,6 @@
}
}
}
else
{
console
.
log
(
'
ELSE
'
);
this
.
classList
.
add
(
'
submenu-active
'
);
this
.
setAttribute
(
'
aria-expanded
'
,
'
true
'
);
}
...
...
This diff is collapsed.
Click to expand it.
source/_patterns/04-components/menu/menu--horizontal/menu--horizontal.js
+
3
−
7
View file @
6ba816d6
...
...
@@ -38,16 +38,12 @@
function
toggleItem
()
{
console
.
log
(
'
CLICKED
'
);
var
parent
=
this
.
parentNode
.
parentNode
.
parentNode
.
parentNode
;
var
screenWidth
=
$
(
window
).
width
();
if
(
this
.
classList
.
contains
(
'
submenu-active
'
))
{
console
.
log
(
'
IF
'
);
this
.
classList
.
remove
(
'
submenu-active
'
);
if
(
this
.
hasAttribute
(
'
aria-expanded
'
,
'
true
'
))
{
...
...
@@ -62,13 +58,14 @@
}
}
}
else
if
(
$
(
'
.submenu-active
'
))
{
console
.
log
(
'
ELSEIF
'
);
// Get elements with .submnenu-active than close them,
// Get elements with .submnenu-active than close them,
$
(
'
.submenu-active
'
).
removeClass
(
'
submenu-active
'
).
attr
(
'
aria-expanded
'
,
'
false
'
);
// and open this one.
this
.
classList
.
add
(
"
submenu-active
"
);
this
.
setAttribute
(
'
aria-expanded
'
,
'
true
'
);
// If hamburger
if
(
screenWidth
<=
767
)
{
// Look at parents and hide other menus if not secondary and open
...
...
@@ -78,7 +75,6 @@
}
}
}
else
{
console
.
log
(
'
ELSE
'
);
this
.
classList
.
add
(
'
submenu-active
'
);
this
.
setAttribute
(
'
aria-expanded
'
,
'
true
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment