Commit 5c9acb81 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-60558 calendar: Adjust URL change

The URL change belongs in the calendar_view, not the view_manager.
The view_manager is responsibe for updating the view, not for the
resultant actions from it.

This also changes to use pushState so as not to overwrite the current
location in history.
parent 8242027d
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -73,6 +73,11 @@ define([
// We need to get the selector again because the content has changed.
return root.find(CalendarSelectors.courseSelector).val(courseId);
})
.then(function() {
window.history.pushState({}, '', '?view=upcoming&course=' + courseId);
return;
})
.fail(Notification.exception);
});
......
......@@ -321,7 +321,6 @@ define([
return Templates.render(root.attr('data-template'), context);
})
.then(function(html, js) {
window.history.replaceState(null, null, '?view=upcoming&course=' + courseId);
return Templates.replaceNode(target, html, js);
})
.then(function() {
......
Supports Markdown
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