Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
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
ecommerce
Commits
4dbbeb19
Commit
4dbbeb19
authored
Jul 01, 2016
by
Ivan Ivic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SOL-1856] User is taken back to coupons home on clicking next button from courses table.
parent
f4273235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
+23
-1
ecommerce/static/js/test/specs/views/dynamic_catalog_view_spec.js
+17
-0
ecommerce/static/js/views/dynamic_catalog_view.js
+6
-1
No files found.
ecommerce/static/js/test/specs/views/dynamic_catalog_view_spec.js
View file @
4dbbeb19
...
...
@@ -92,6 +92,23 @@ define([
{
title
:
'Seat type'
,
data
:
'type'
}
]);
});
it
(
'should call stopEventPropagation when disabled or active button pressed'
,
function
()
{
var
e
=
$
.
Event
(
'click'
);
view
.
$el
.
append
(
'<div class="pagination">'
+
'<li class="paginate_button previous disabled">'
+
'<a href="#">Previous</a>'
+
'</li></div>'
);
spyOn
(
e
,
'stopPropagation'
);
view
.
stopEventPropagation
(
e
);
expect
(
e
.
stopPropagation
).
toHaveBeenCalled
();
spyOn
(
view
,
'stopEventPropagation'
);
view
.
delegateEvents
();
view
.
$
(
'.pagination .disabled'
).
trigger
(
'click'
);
expect
(
view
.
stopEventPropagation
).
toHaveBeenCalled
();
});
});
}
);
ecommerce/static/js/views/dynamic_catalog_view.js
View file @
4dbbeb19
...
...
@@ -15,7 +15,8 @@ define(['jquery',
template
:
_
.
template
(
DynamicCatalogButtons
),
events
:
{
'click [name=preview_catalog]'
:
'previewCatalog'
'click [name=preview_catalog]'
:
'previewCatalog'
,
'click .pagination .disabled, .pagination .active'
:
'stopEventPropagation'
},
initialize
:
function
(
options
)
{
...
...
@@ -24,6 +25,10 @@ define(['jquery',
this
.
_super
();
},
stopEventPropagation
:
function
(
event
)
{
event
.
stopPropagation
();
},
getRowData
:
function
(
course
)
{
return
{
id
:
course
.
id
,
...
...
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