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
dff0acf5
Commit
dff0acf5
authored
Nov 17, 2014
by
AlasdairSwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECOM-650 updated to add auto scrolling for password reset view
parent
92d10ebd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
lms/static/js/student_account/views/AccessView.js
+10
-6
lms/static/js/student_account/views/FormView.js
+7
-0
lms/static/js/student_account/views/PasswordResetView.js
+6
-4
No files found.
lms/static/js/student_account/views/AccessView.js
View file @
dff0acf5
...
@@ -141,6 +141,7 @@ var edx = edx || {};
...
@@ -141,6 +141,7 @@ var edx = edx || {};
this
.
element
.
hide
(
this
.
$header
);
this
.
element
.
hide
(
this
.
$header
);
this
.
element
.
hide
(
$
(
this
.
el
).
find
(
'.form-type'
)
);
this
.
element
.
hide
(
$
(
this
.
el
).
find
(
'.form-type'
)
);
this
.
loadForm
(
'reset'
);
this
.
loadForm
(
'reset'
);
this
.
element
.
scrollTop
(
$
(
'#password-reset-wrapper'
)
);
},
},
showFormError
:
function
()
{
showFormError
:
function
()
{
...
@@ -162,11 +163,7 @@ var edx = edx || {};
...
@@ -162,11 +163,7 @@ var edx = edx || {};
this
.
element
.
hide
(
$
(
this
.
el
).
find
(
'.form-wrapper'
)
);
this
.
element
.
hide
(
$
(
this
.
el
).
find
(
'.form-wrapper'
)
);
this
.
element
.
show
(
$form
);
this
.
element
.
show
(
$form
);
this
.
element
.
scrollTop
(
$anchor
);
// Scroll to top of selected form
$
(
'html,body'
).
animate
({
scrollTop
:
$anchor
.
offset
().
top
},
'slow'
);
},
},
/**
/**
...
@@ -261,7 +258,7 @@ var edx = edx || {};
...
@@ -261,7 +258,7 @@ var edx = edx || {};
}
}
},
},
/* Helper method
ot
toggle display
/* Helper method
to
toggle display
* including accessibility considerations
* including accessibility considerations
*/
*/
element
:
{
element
:
{
...
@@ -270,6 +267,13 @@ var edx = edx || {};
...
@@ -270,6 +267,13 @@ var edx = edx || {};
.
attr
(
'aria-hidden'
,
true
);
.
attr
(
'aria-hidden'
,
true
);
},
},
scrollTop
:
function
(
$el
)
{
// Scroll to top of selected element
$
(
'html,body'
).
animate
({
scrollTop
:
$el
.
offset
().
top
},
'slow'
);
},
show
:
function
(
$el
)
{
show
:
function
(
$el
)
{
$el
.
removeClass
(
'hidden'
)
$el
.
removeClass
(
'hidden'
)
.
attr
(
'aria-hidden'
,
false
);
.
attr
(
'aria-hidden'
,
false
);
...
...
lms/static/js/student_account/views/FormView.js
View file @
dff0acf5
...
@@ -103,6 +103,13 @@ var edx = edx || {};
...
@@ -103,6 +103,13 @@ var edx = edx || {};
}
}
},
},
scrollTop
:
function
(
$el
)
{
// Scroll to top of selected element
$
(
'html,body'
).
animate
({
scrollTop
:
$el
.
offset
().
top
},
'slow'
);
},
show
:
function
(
$el
)
{
show
:
function
(
$el
)
{
if
(
$el
)
{
if
(
$el
)
{
$el
.
removeClass
(
'hidden'
)
$el
.
removeClass
(
'hidden'
)
...
...
lms/static/js/student_account/views/PasswordResetView.js
View file @
dff0acf5
...
@@ -21,24 +21,26 @@ var edx = edx || {};
...
@@ -21,24 +21,26 @@ var edx = edx || {};
submitButton
:
'.js-reset'
,
submitButton
:
'.js-reset'
,
preRender
:
function
(
data
)
{
preRender
:
function
()
{
this
.
listenTo
(
this
.
model
,
'sync'
,
this
.
saveSuccess
);
this
.
listenTo
(
this
.
model
,
'sync'
,
this
.
saveSuccess
);
},
},
toggleErrorMsg
:
function
(
show
)
{
toggleErrorMsg
:
function
(
show
)
{
if
(
show
)
{
if
(
show
)
{
this
.
setErrors
();
this
.
setErrors
();
this
.
toggleDisableButton
(
false
)
this
.
toggleDisableButton
(
false
)
;
}
else
{
}
else
{
this
.
element
.
hide
(
this
.
$errors
);
this
.
element
.
hide
(
this
.
$errors
);
}
}
},
},
saveSuccess
:
function
()
{
saveSuccess
:
function
()
{
var
$el
=
$
(
this
.
el
);
var
$el
=
$
(
this
.
el
),
$msg
=
$el
.
find
(
'.js-reset-success'
);
this
.
element
.
hide
(
$el
.
find
(
'#password-reset-form'
)
);
this
.
element
.
hide
(
$el
.
find
(
'#password-reset-form'
)
);
this
.
element
.
show
(
$el
.
find
(
'.js-reset-success'
)
);
this
.
element
.
show
(
$msg
);
this
.
element
.
scrollTop
(
$msg
);
}
}
});
});
...
...
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