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
95da57cc
Commit
95da57cc
authored
Sep 20, 2015
by
Matt Drayer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9783 from edx/ziafazal/SOL-1226
SOL-1226: scroll to top after saving
parents
ffb7f9b9
5effbf14
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
cms/static/js/certificates/spec/views/certificate_details_spec.js
+6
-0
cms/static/js/certificates/views/certificate_details.js
+7
-2
common/test/acceptance/pages/studio/settings_certificates.py
+2
-0
No files found.
cms/static/js/certificates/spec/views/certificate_details_spec.js
View file @
95da57cc
...
...
@@ -174,6 +174,12 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
this
.
view
.
$
(
'.action-delete .delete'
).
click
();
});
it
(
'should scroll to top after rendering if necessary'
,
function
()
{
$
.
smoothScroll
=
jasmine
.
createSpy
(
'jQuery.smoothScroll'
);
appendSetFixtures
(
this
.
view
.
render
().
el
);
expect
(
$
.
smoothScroll
).
toHaveBeenCalled
();
});
});
describe
(
'Signatory details'
,
function
(){
...
...
cms/static/js/certificates/views/certificate_details.js
View file @
95da57cc
...
...
@@ -8,7 +8,8 @@ define([ // jshint ignore:line
'js/views/baseview'
,
'js/certificates/models/signatory'
,
'js/certificates/views/signatory_details'
,
'common/js/components/utils/view_utils'
'common/js/components/utils/view_utils'
,
'jquery.smoothScroll'
],
function
(
$
,
_
,
str
,
gettext
,
BaseView
,
SignatoryModel
,
SignatoryDetailsView
,
ViewUtils
)
{
'use strict'
;
...
...
@@ -72,7 +73,11 @@ function($, _, str, gettext, BaseView, SignatoryModel, SignatoryDetailsView, Vie
if
(
this
.
model
.
collection
.
length
>
0
&&
window
.
certWebPreview
)
{
window
.
certWebPreview
.
show
();
}
$
.
smoothScroll
({
offset
:
0
,
easing
:
'swing'
,
speed
:
1000
});
return
this
;
}
});
...
...
common/test/acceptance/pages/studio/settings_certificates.py
View file @
95da57cc
...
...
@@ -11,6 +11,7 @@ The methods in these classes are organized into several conceptual buckets:
import
os
from
bok_choy.promise
import
EmptyPromise
from
...tests.helpers
import
disable_animations
from
.course_page
import
CoursePage
from
common.test.acceptance.tests.helpers
import
disable_animations
...
...
@@ -287,6 +288,7 @@ class Certificate(object):
"""
Create a new certificate.
"""
disable_animations
(
self
.
page
)
self
.
find_css
(
'.action-primary'
)
.
first
.
click
()
self
.
page
.
wait_for_ajax
()
...
...
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