[fix] Logout button visible even when already logged out.

This commit is contained in:
opi 2015-11-15 14:00:10 +01:00
parent bc00688f3f
commit c4f000a2cb
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -536,7 +536,7 @@ var app = Sammy('#main', function (sam) {
sam.get('#/login', function (c) { sam.get('#/login', function (c) {
$('#masthead').show(); $('#masthead').show();
$('.logout-button').hide(); $('#masthead .logout-btn').hide();
store.set('path-1', '#/login'); store.set('path-1', '#/login');
if ($('div.loader').length === 0) { if ($('div.loader').length === 0) {
setInterval(function () { setInterval(function () {
@ -599,7 +599,7 @@ var app = Sammy('#main', function (sam) {
c.api('/login', function(data) { c.api('/login', function(data) {
store.set('connected', true); store.set('connected', true);
$('.logout-button').fadeIn(); $('#masthead .logout-btn').fadeIn();
c.flash('success', y18n.t('logged_in')); c.flash('success', y18n.t('logged_in'));
if (store.get('path')) { if (store.get('path')) {
c.redirect(store.get('path')); c.redirect(store.get('path'));