mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-16 12:18:07 +01:00
keep tracks of last url in mobile view to be able to return to last page after edit of action. Fixes #696. Also applies patch to fix selenium test and update them for the navigation with the new return path.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@835 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
b011cbec2b
commit
5d2023d18b
6 changed files with 57 additions and 28 deletions
|
|
@ -127,14 +127,21 @@ class ContextsController < ApplicationController
|
|||
|
||||
def render_contexts_mobile
|
||||
lambda do
|
||||
@page_title = "TRACKS::List Contexts"
|
||||
@active_contexts = @contexts.find(:all, { :conditions => ["hide = ?", false]})
|
||||
@hidden_contexts = @contexts.find(:all, { :conditions => ["hide = ?", true]})
|
||||
@down_count = @active_contexts.size + @hidden_contexts.size
|
||||
cookies[:mobile_url]=request.request_uri
|
||||
render :action => 'index_mobile'
|
||||
end
|
||||
end
|
||||
|
||||
def render_context_mobile
|
||||
lambda do
|
||||
@page_title = "TRACKS::List actions in "+@context.name
|
||||
@not_done = @not_done_todos.select {|t| t.context_id == @context.id }
|
||||
@down_count = @not_done.size
|
||||
cookies[:mobile_url]=request.request_uri
|
||||
render :action => 'mobile_show_context'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue