Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
afe35acf
Commit
afe35acf
authored
Sep 21, 2017
by
Harry Rein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing sock issue on master in safari.
parent
cc150813
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
openedx/features/course_experience/static/course_experience/js/CourseSock.js
+5
-5
No files found.
openedx/features/course_experience/static/course_experience/js/CourseSock.js
View file @
afe35acf
...
...
@@ -5,6 +5,7 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
const
$toggleActionButton
=
$
(
'.action-toggle-verification-sock'
);
const
$verificationSock
=
$
(
'.verification-sock .verification-main-panel'
);
const
$upgradeToVerifiedButton
=
$
(
'.verification-sock .action-upgrade-certificate'
);
const
$miniCert
=
$
(
'.mini-cert'
);
const
pageLocation
=
window
.
location
.
href
.
indexOf
(
'courseware'
)
>
-
1
?
'Course Content Page'
:
'Home Page'
;
...
...
@@ -19,19 +20,18 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
const
startFixed
=
$verificationSock
.
offset
().
top
+
320
;
const
endFixed
=
(
startFixed
+
$verificationSock
.
height
())
-
220
;
// Assure update button stays in sock even when max-width is exceeded
const
distLeft
=
(
$verificationSock
.
offset
().
left
+
$verificationSock
.
width
())
-
(
$upgradeToVerifiedButton
.
width
()
+
22
);
// Ensure update button stays in sock even when max-width is exceeded
const
distRight
=
window
.
outerWidth
-
(
$miniCert
.
offset
().
left
+
$miniCert
.
width
());
// Update positioning when scrolling is in fixed window and screen width is sufficient
if
((
documentBottom
>
startFixed
&&
documentBottom
<
endFixed
)
||
$
(
window
).
width
()
<
960
)
{
$upgradeToVerifiedButton
.
addClass
(
'attached'
);
$upgradeToVerifiedButton
.
css
(
'
left'
,
`
${
distLef
t
}
px`
);
$upgradeToVerifiedButton
.
css
(
'
right'
,
`
${
distRigh
t
}
px`
);
}
else
{
// If outside sliding window, reset to un-attached state
$upgradeToVerifiedButton
.
removeClass
(
'attached'
);
$upgradeToVerifiedButton
.
css
(
'
left'
,
'auto
'
);
$upgradeToVerifiedButton
.
css
(
'
right'
,
'20px
'
);
// Add class to define absolute location
if
(
documentBottom
<
startFixed
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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