mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-05 20:40:14 +01:00
fix #1167
This commit is contained in:
parent
b55725c9cd
commit
3c72148eb1
6 changed files with 14 additions and 3 deletions
|
|
@ -84,6 +84,12 @@ class LoginController < ApplicationController
|
||||||
def expire_session
|
def expire_session
|
||||||
# this is a hack to enable cucumber to expire a session by calling this
|
# this is a hack to enable cucumber to expire a session by calling this
|
||||||
# method. The method will be unavailable for production environment
|
# method. The method will be unavailable for production environment
|
||||||
|
|
||||||
|
@user.forget_me if logged_in?
|
||||||
|
cookies.delete :auth_token
|
||||||
|
session['user_id'] = nil
|
||||||
|
reset_session
|
||||||
|
|
||||||
unless Rails.env.production?
|
unless Rails.env.production?
|
||||||
session['expiry_time'] = Time.now
|
session['expiry_time'] = Time.now
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@
|
||||||
-%>
|
-%>
|
||||||
$('div#navcontainer').hide();
|
$('div#navcontainer').hide();
|
||||||
$('div#content').html('<%=theHtml%>');
|
$('div#content').html('<%=theHtml%>');
|
||||||
|
refresh_page(); // refresh the page. if it fails, the message above remains
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<% unless @due_tickles.empty? -%>
|
<% unless @due_tickles.empty? -%>
|
||||||
TracksPages.page_notify('notice', "<%=t('todos.tickler_items_due', :count => @due_tickles.length)%>", 5);
|
TracksPages.page_notify('notice', "<%=t('todos.tickler_items_due', :count => @due_tickles.length)%>", 8);
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<% if @saved -%>
|
<% if @saved -%>
|
||||||
remove_user_from_page();
|
remove_user_from_page();
|
||||||
TracksPages.set_page_badge(<%= @total_users %>);
|
TracksPages.set_page_badge(<%= @total_users %>);
|
||||||
TracksPages.page_notify('notice', '<%= t('users.destroy_successful', :login => @deleted_user.login) %>', 5);
|
TracksPages.page_notify('notice', '<%= t('users.destroy_successful', :login => @deleted_user.login) %>', 8);
|
||||||
<% else -%>
|
<% else -%>
|
||||||
TracksPages.page_notify('error', '<%= t('users.destroy_error', :login => @deleted_user.login) %>', 8);
|
TracksPages.page_notify('error', '<%= t('users.destroy_error', :login => @deleted_user.login) %>', 8);
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
||||||
|
|
@ -56,4 +56,4 @@ Feature: Existing user logging in
|
||||||
And I submit the login form as user "testuser" with password "secret"
|
And I submit the login form as user "testuser" with password "secret"
|
||||||
Then I should be on the login page
|
Then I should be on the login page
|
||||||
When my session expires
|
When my session expires
|
||||||
Then I should see "Session has timed out"
|
Then I should be on the login page
|
||||||
|
|
@ -999,6 +999,10 @@ function redirect_to(path) {
|
||||||
window.location.href = path;
|
window.location.href = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refresh_page() {
|
||||||
|
location.reload(true);
|
||||||
|
}
|
||||||
|
|
||||||
function setup_auto_refresh(interval){
|
function setup_auto_refresh(interval){
|
||||||
field_touched = false;
|
field_touched = false;
|
||||||
function refresh_page() {
|
function refresh_page() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue