mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-03 03:20:15 +01:00
* After project or context was edited in listing page, it could not be dragged. This is now fixed.
* Added in-place editing of to project and context detail pages git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@356 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
e96d91c5c0
commit
b243e0d393
8 changed files with 32 additions and 11 deletions
|
|
@ -66,10 +66,19 @@ class ContextController < ApplicationController
|
|||
def update
|
||||
self.init
|
||||
check_user_set_context
|
||||
params['context'] ||= {}
|
||||
success_text = if params['field'] == 'name' && params['value']
|
||||
params['context']['id'] = params['id']
|
||||
params['context']['name'] = params['value']
|
||||
end
|
||||
@context.attributes = params["context"]
|
||||
@context.name = deurlize(@context.name)
|
||||
if @context.save
|
||||
render :partial => 'context_listing', :object => @context
|
||||
if params['wants_render']
|
||||
render
|
||||
else
|
||||
render :text => success_text || 'Success'
|
||||
end
|
||||
else
|
||||
notify :warning, "Couldn't update new context"
|
||||
render :text => ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue