Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
08f1957c
Commit
08f1957c
authored
Mar 24, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding JS hooks for scroll
parent
50b5c932
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
apps/openassessment/xblock/static/js/openassessment.min.js
+0
-0
apps/openassessment/xblock/static/js/src/oa_base.js
+16
-0
No files found.
apps/openassessment/xblock/static/js/openassessment.min.js
View file @
08f1957c
This diff is collapsed.
Click to expand it.
apps/openassessment/xblock/static/js/src/oa_base.js
View file @
08f1957c
...
@@ -25,6 +25,20 @@ OpenAssessment.BaseUI = function(runtime, element, server) {
...
@@ -25,6 +25,20 @@ OpenAssessment.BaseUI = function(runtime, element, server) {
OpenAssessment
.
BaseUI
.
prototype
=
{
OpenAssessment
.
BaseUI
.
prototype
=
{
/**
* Checks to see if the scrollTo function is available, then scrolls to the
* top of the list of steps for this display.
*
* Ideally, we would not need to check if the function exists, and could
* import scrollTo, or other dependencies, into workbench.
*/
scrollToTop
:
function
()
{
if
(
$
.
scrollTo
instanceof
Function
)
{
$
(
window
).
scrollTo
(
$
(
"#openassessment__steps"
),
800
,
{
offset
:
-
50
});
}
},
/**
/**
Install click handlers to expand/collapse a section.
Install click handlers to expand/collapse a section.
...
@@ -346,6 +360,7 @@ OpenAssessment.BaseUI.prototype = {
...
@@ -346,6 +360,7 @@ OpenAssessment.BaseUI.prototype = {
ui
.
renderPeerAssessmentStep
();
ui
.
renderPeerAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderGradeStep
();
ui
.
renderGradeStep
();
ui
.
scrollToTop
();
});
});
},
},
...
@@ -412,6 +427,7 @@ OpenAssessment.BaseUI.prototype = {
...
@@ -412,6 +427,7 @@ OpenAssessment.BaseUI.prototype = {
ui
.
renderPeerAssessmentStep
();
ui
.
renderPeerAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderGradeStep
();
ui
.
renderGradeStep
();
ui
.
scrollToTop
();
}
}
).
fail
(
function
(
errMsg
)
{
).
fail
(
function
(
errMsg
)
{
ui
.
toggleActionError
(
'self'
,
errMsg
);
ui
.
toggleActionError
(
'self'
,
errMsg
);
...
...
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