Commit ea762eab by Victor Shnayder

optimize!

parent a8aced9b
...@@ -46,8 +46,9 @@ ...@@ -46,8 +46,9 @@
(function() { (function() {
$(document).delegate('#login_form', 'ajax:success', function(data, json, xhr) { $(document).delegate('#login_form', 'ajax:success', function(data, json, xhr) {
if(json.success) { if(json.success) {
if(getParameterByName('next')) { next = getParameterByName('next');
location.href = getParameterByName('next'); if(next) {
location.href = next;
} else { } else {
location.href = "${reverse('dashboard')}"; location.href = "${reverse('dashboard')}";
} }
......
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