From ea762eabf1fd62ed97a839293ddab188abbda63d Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Mon, 24 Sep 2012 09:22:35 -0400 Subject: [PATCH] optimize! --- lms/templates/login_modal.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/templates/login_modal.html b/lms/templates/login_modal.html index 1383cc0965..1587cca767 100644 --- a/lms/templates/login_modal.html +++ b/lms/templates/login_modal.html @@ -46,8 +46,9 @@ (function() { $(document).delegate('#login_form', 'ajax:success', function(data, json, xhr) { if(json.success) { - if(getParameterByName('next')) { - location.href = getParameterByName('next'); + next = getParameterByName('next'); + if(next) { + location.href = next; } else { location.href = "${reverse('dashboard')}"; }