0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Manually merging pull request #439 from javorszky/iss354

Conflicts:
	core/client/views/login.js
This commit is contained in:
Hannah Wolfe 2013-08-20 10:11:09 +01:00
commit 4e1b5a8e09
2 changed files with 18 additions and 2 deletions

View file

@ -99,8 +99,22 @@
}
return message;
}
},
// Getting URL vars
getUrlVariables: function () {
var vars = [],
hash,
hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'),
i;
for (i = 0; i < hashes.length; i += 1) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
});
/**

View file

@ -46,6 +46,7 @@
event.preventDefault();
var email = this.$el.find('.email').val(),
password = this.$el.find('.password').val(),
redirect = this.getUrlVariables().r,
self = this;
$.ajax({
@ -53,7 +54,8 @@
type: 'POST',
data: {
email: email,
password: password
password: password,
redirect: redirect
},
success: function (msg) {
window.location.href = msg.redirect;