refactor application.rb further and migrate recurring todos

next: get tests for recurring todos
This commit is contained in:
Reinier Balt 2010-12-03 17:52:24 +01:00
parent 484356fe07
commit cafa774b4c
33 changed files with 688 additions and 571 deletions

View file

@ -1,6 +1,6 @@
<% if @saved -%>
page_notify('notice', '<%= t('contexts.save_status_message') %>', 5);
TracksPages.page_notify('notice', '<%= t('contexts.save_status_message') %>', 5);
<% if @state_changed -%>
remove_and_re_add_context();
@ -9,7 +9,7 @@
<% end -%>
<% else -%>
show_errors();
TracksPages.show_edit_errors(html_for_error_messages());
<% end -%>
function remove_and_re_add_context() {
@ -33,11 +33,6 @@ function replace_context_form_with_updated_context() {
});
}
function show_errors() {
$('div#edit_error_status').html(html_for_error_messages());
$('div#edit_error_status').show();
}
function html_for_error_messages() {
return "<%= escape_javascript(error_messages_for('context')) %>";
}