Commit 2edda935 by Calen Pennington

Merge pull request #764 from MITx/feature/victor/fix-index-js-caching

Also make the actual ?next redirection work with caching
parents a45fe4a6 a8aced9b
......@@ -430,9 +430,6 @@ def university_profile(request, org_id):
context = dict(courses=courses, org_id=org_id)
template_file = "university_profile/{0}.html".format(org_id).lower()
if request.REQUEST.get('next', False):
context['show_login_immediately'] = True
return render_to_response(template_file, context)
def render_notifications(request, course, notifications):
......
......@@ -525,6 +525,7 @@ PIPELINE_JS = {
'js/my_courses_dropdown.js',
'js/toggle_login_modal.js',
'js/sticky_filter.js',
'js/query-params.js',
],
'output_filename': 'js/lms-application.js'
},
......
......@@ -147,7 +147,6 @@
<%block name="js_extra">
<script type="text/javascript" src="${static.url('js/query-params.js')}"></script>
<script type="text/javascript"">
$(window).load(function() {
if(getParameterByName('next')) {
......
......@@ -46,11 +46,11 @@
(function() {
$(document).delegate('#login_form', 'ajax:success', function(data, json, xhr) {
if(json.success) {
% if request.REQUEST.get('next', False):
location.href="${request.REQUEST.get('next')}";
% else:
location.href="${reverse('dashboard')}";
% endif
if(getParameterByName('next')) {
location.href = getParameterByName('next');
} else {
location.href = "${reverse('dashboard')}";
}
} else {
if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error" class="modal-form-error"></div>');
......
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