mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-01 14:58:50 +01:00
Context create working
This commit is contained in:
parent
f86b6fceb6
commit
d9108abe92
2 changed files with 7 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue