Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CERN Components
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Web Team
Drupal
Public Drupal Repositories
Drupal 8
D8 Modules
CERN Components
Commits
6a78533d
Commit
6a78533d
authored
6 years ago
by
Patrick Groeger
Browse files
Options
Downloads
Patches
Plain Diff
Fixed applying 'cds-loading-error' to all thumbnail items instead of only the affected images
parent
70fa11aa
No related branches found
No related tags found
2 merge requests
!13
Increment production version to v2.3.0
,
!6
Fix gallery thumbnail images
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patterns/molecules/gallery/js/gallery_carousel.js
+4
-1
4 additions, 1 deletion
patterns/molecules/gallery/js/gallery_carousel.js
with
4 additions
and
1 deletion
patterns/molecules/gallery/js/gallery_carousel.js
+
4
−
1
View file @
6a78533d
...
@@ -64,10 +64,13 @@
...
@@ -64,10 +64,13 @@
.
on
(
'
error
'
,
function
()
{
.
on
(
'
error
'
,
function
()
{
$
(
this
).
prev
(
'
span
'
).
removeClass
(
'
cds-background-hidden
'
);
$
(
this
).
prev
(
'
span
'
).
removeClass
(
'
cds-background-hidden
'
);
$
(
this
).
closest
(
'
figure
'
).
addClass
(
'
loading-cds-error
'
);
$
(
this
).
closest
(
'
figure
'
).
addClass
(
'
loading-cds-error
'
);
var
errorurl
=
$
(
this
).
attr
(
'
src
'
);
//gets the url which throws the error to find it afterwards in the thumbnail items
$
(
this
).
closest
(
'
.owl-carousel
'
).
find
(
'
.owl-thumb-item
'
).
each
(
function
()
{
$
(
this
).
closest
(
'
.owl-carousel
'
).
find
(
'
.owl-thumb-item
'
).
each
(
function
()
{
var
background
=
$
(
this
).
attr
(
'
style
'
);
var
background
=
$
(
this
).
attr
(
'
style
'
);
if
(
background
.
indexOf
(
"
//cds.cern.ch/
"
)
>=
0
)
{
if
(
background
.
indexOf
(
errorurl
)
>=
0
)
{
$
(
this
).
addClass
(
'
loading-cds-error
'
);
$
(
this
).
addClass
(
'
loading-cds-error
'
);
return
false
;
//returning false to break out of the each() loop as the thumb item was found
}
}
});
});
});
});
...
...
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