Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
2f9fd675
Commit
2f9fd675
authored
Feb 10, 2010
by
Angie Byron
Browse files
#668104
follow-up by casey and pwolanin: Fixes + revised comments for overlay-exclude class.
parent
a2c946e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/overlay/overlay-parent.js
View file @
2f9fd675
...
...
@@ -680,16 +680,19 @@ Drupal.overlay.clickHandler = function (event) {
return
;
}
// Only continue if clicked target (or one of its parents) is a link and does
// not have class overlay-exclude. The overlay-exclude class allows to prevent
// opening a link in the overlay.
if
(
!
$target
.
is
(
'
a
'
)
||
$target
.
hasClass
(
'
overlay-exclude
'
))
{
// Only continue if clicked target (or one of its parents) is a link.
if
(
!
$target
.
is
(
'
a
'
))
{
$target
=
$target
.
closest
(
'
a
'
);
if
(
!
$target
.
length
)
{
return
;
}
}
// Never open links in the overlay that contain the overlay-exclude class.
if
(
$target
.
hasClass
(
'
overlay-exclude
'
))
{
return
;
}
var
href
=
$target
.
attr
(
'
href
'
);
// Only continue if link has an href attribute and is not just linking to
// an anchor.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment