Commit 6c5f20ef by Marko Jevtić Committed by GitHub

Merge pull request #838 from edx/iivic/SOL-1856

[SOL-1856] User is taken back to coupons home on clicking next button…
parents f4273235 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();
});
});
}
);
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment