Context create working

This commit is contained in:
Eric Allen 2009-10-09 20:46:48 -04:00
parent f86b6fceb6
commit d9108abe92
2 changed files with 7 additions and 8 deletions

View file

@ -1,12 +1,12 @@
if @saved
container_name = 'list-contexts-' + (@context.hidden? ? 'hidden' : 'active')
page.hide 'contexts-empty-nd'
page.insert_html :bottom, "list-contexts", :partial => 'context_listing', :locals => { :context_listing => @context }
page.sortable "list-contexts", get_listing_sortable_options
page.insert_html :bottom, container_name, :partial => 'context_listing', :locals => { :context_listing => @context }
page.hide 'status'
page['badge_count'].replace_html @down_count
page.call "Form.reset", "context-form"
page.call "Form.focusFirstElement", "context-form"
page << '$("#context-form").clearForm();'
page << '$("#context-form input:first").focus();'
else
page.show 'status'
page.replace_html 'status', "#{error_messages_for('context')}"
end
end