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
2fce096e
Commit
2fce096e
authored
Apr 09, 2013
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1834 from MITx/bug/christina/base
Need to be able to access smoothScrollTop.
parents
74104d60
f36494e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
cms/static/js/base.js
+7
-2
cms/static/js/views/settings/advanced_view.js
+1
-1
No files found.
cms/static/js/base.js
View file @
2fce096e
if
(
!
window
.
CmsUtils
)
window
.
CmsUtils
=
{};
var
$body
;
var
$modal
;
var
$modalCover
;
...
...
@@ -91,7 +93,7 @@ $(document).ready(function () {
$
(
'a[rel*="view"][href^="#"]'
).
bind
(
'click'
,
smoothScrollLink
);
// tender feedback window scrolling
$
(
'a.show-tender'
).
bind
(
'click'
,
smoothScrollTop
);
$
(
'a.show-tender'
).
bind
(
'click'
,
window
.
CmsUtils
.
smoothScrollTop
);
// toggling footer additional support
$
(
'.cta-show-sock'
).
bind
(
'click'
,
toggleSock
);
...
...
@@ -172,7 +174,10 @@ function smoothScrollLink(e) {
});
}
function
smoothScrollTop
(
e
)
{
// On AWS instances, this base.js gets wrapped in a separate scope as part of Django static
// pipelining (note, this doesn't happen on local runtimes). So if we set it on window,
// when we can access it from other scopes (namely Course Advanced Settings).
window
.
CmsUtils
.
smoothScrollTop
=
function
(
e
)
{
(
e
).
preventDefault
();
$
.
smoothScroll
({
...
...
cms/static/js/views/settings/advanced_view.js
View file @
2fce096e
...
...
@@ -130,7 +130,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
}
},
saveView
:
function
(
event
)
{
smoothScrollTop
(
event
);
window
.
CmsUtils
.
smoothScrollTop
(
event
);
// TODO one last verification scan:
// call validateKey on each to ensure proper format
// check for dupes
...
...
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