Fix context state change

This commit is contained in:
Eric Allen 2009-10-07 11:33:48 -04:00
parent acad0596be
commit 550a0e4955
2 changed files with 3 additions and 4 deletions

View file

@ -1,9 +1,9 @@
status_message = 'Context saved'
page.notify :notice, status_message, 5.0
if @context_state_changed
page << "jQuery('##{dom_id(@context, 'edit')}').hide();"
page.remove dom_id(@context, 'container')
page.insert_html :bottom, "list-contexts-#{@new_state}", :partial => 'context_listing', :object => @context
else
page.replace_html dom_id(@context, 'container'), :partial => 'context_listing', :object => @context
end
page[dom_id(@context)].show
page.visual_effect :highlight, dom_id(@context), :duration => 3