mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Removed flash, renamed file, unbroken logout / login request notifications
Closes #354 * Reintroduced the redirect functionality (not logged in, tries to go to `/settings/user/`, is sent to `/login/` with info notification, after login user is taken to `/settings/user/) * Reintroduced the "Successfully logged out" message * Added middleware to scrub passive notifications from `ghost.notifications` after one use basically mimicing client side passive notifications * Removed flash from everywhere. Even from package.json. * Renamed flashed.hbs to notifications.hbs, modified default.hbs accordingly * Added function to parse GET variables on client side
This commit is contained in:
parent
d39d43bc47
commit
2f6098d653
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -45,14 +45,16 @@
|
||||
submitHandler: function (event) {
|
||||
event.preventDefault();
|
||||
var email = this.$el.find('.email').val(),
|
||||
password = this.$el.find('.password').val();
|
||||
password = this.$el.find('.password').val(),
|
||||
redirect = this.getUrlVariables().r;
|
||||
|
||||
$.ajax({
|
||||
url: '/ghost/login/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
email: email,
|
||||
password: password
|
||||
password: password,
|
||||
redirect: redirect
|
||||
},
|
||||
success: function (msg) {
|
||||
window.location.href = msg.redirect;
|
||||
|
Loading…
Reference in New Issue
Block a user