mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-25 18:26:10 +01:00
parent
2a6b8f1cd9
commit
b2e82ea6b6
9 changed files with 38 additions and 3 deletions
|
|
@ -83,10 +83,14 @@ class ContextsController < ApplicationController
|
|||
end
|
||||
@context.attributes = params["context"]
|
||||
if @context.save
|
||||
if params['wants_render']
|
||||
if boolean_param('wants_render')
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
elsif boolean_param('update_context_name')
|
||||
@contexts = current_user.projects
|
||||
render :template => 'contexts/update_context_name.js.rjs'
|
||||
return
|
||||
else
|
||||
render :text => success_text || 'Success'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -136,6 +136,10 @@ class ProjectsController < ApplicationController
|
|||
@initial_context_name = @project.default_context.name
|
||||
render :template => 'projects/update_default_context.js.rjs'
|
||||
return
|
||||
elsif boolean_param('update_project_name')
|
||||
@projects = current_user.projects
|
||||
render :template => 'projects/update_project_name.js.rjs'
|
||||
return
|
||||
else
|
||||
render :text => success_text || 'Success'
|
||||
return
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ class TodosController < ApplicationController
|
|||
@contexts = current_user.contexts.find(:all) if @new_context_created
|
||||
@projects = current_user.projects.find(:all) if @new_project_created
|
||||
@initial_context_name = params['default_context_name']
|
||||
@initial_project_name = params['default_project_name']
|
||||
render :action => 'create'
|
||||
end
|
||||
format.xml do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue