2007-03-30 04:36:52 +00:00
|
|
|
if @saved
|
2009-10-09 20:46:48 -04:00
|
|
|
container_name = 'list-contexts-' + (@context.hidden? ? 'hidden' : 'active')
|
2007-03-30 04:36:52 +00:00
|
|
|
page.hide 'contexts-empty-nd'
|
2009-10-09 20:46:48 -04:00
|
|
|
page.insert_html :bottom, container_name, :partial => 'context_listing', :locals => { :context_listing => @context }
|
2007-11-13 21:49:54 +00:00
|
|
|
page.hide 'status'
|
2007-11-16 14:28:52 +00:00
|
|
|
page['badge_count'].replace_html @down_count
|
2009-10-09 20:46:48 -04:00
|
|
|
page << '$("#context-form").clearForm();'
|
|
|
|
|
page << '$("#context-form input:first").focus();'
|
2007-03-30 04:36:52 +00:00
|
|
|
else
|
|
|
|
|
page.show 'status'
|
|
|
|
|
page.replace_html 'status', "#{error_messages_for('context')}"
|
2009-10-09 20:46:48 -04:00
|
|
|
end
|