tracks/app/views/contexts/create.js.rjs

13 lines
499 B
Text
Raw Normal View History

if @saved
2009-10-09 20:46:48 -04:00
container_name = 'list-contexts-' + (@context.hidden? ? 'hidden' : 'active')
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 }
page.hide 'status'
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();'
else
page.show 'status'
page.replace_html 'status', "#{error_messages_for('context')}"
2009-10-09 20:46:48 -04:00
end