mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-24 16:14:07 +01:00
refactor application.rb further and migrate recurring todos
next: get tests for recurring todos
This commit is contained in:
parent
484356fe07
commit
cafa774b4c
33 changed files with 688 additions and 571 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<% if @saved -%>
|
||||
|
||||
page_notify('notice', '<%=t('projects.project_saved_status')%>', 5);
|
||||
TracksPages.page_notify('notice', '<%=t('projects.project_saved_status')%>', 5);
|
||||
|
||||
<% if source_view_is :project_list -%>
|
||||
|
||||
|
|
@ -27,23 +27,16 @@
|
|||
TracksForm.set_tag_list("<%= escape_javascript(@project.default_tags)%>");
|
||||
<% end %>
|
||||
|
||||
update_sidebar();
|
||||
TracksPages.update_sidebar(html_for_sidebar());
|
||||
|
||||
<% end %>
|
||||
|
||||
TracksForm.set_project_name_and_default_project_name("<%= escape_javascript(@project.name)%>");
|
||||
|
||||
<% else -%>
|
||||
show_errors();
|
||||
TracksPages.show_edit_errors(html_for_error_messages());
|
||||
<% end %>
|
||||
|
||||
enable_rich_interaction();
|
||||
|
||||
function show_errors() {
|
||||
$('div#edit_error_status').html(html_for_error_messages());
|
||||
$('div#edit_error_status').show();
|
||||
}
|
||||
|
||||
function remove_project_edit_form() {
|
||||
$('#<%=dom_id(@project, 'edit')%>').hide(500, function() {$('#<%=dom_id(@project, 'edit')%>').remove();} );
|
||||
}
|
||||
|
|
@ -53,10 +46,6 @@ function update_and_show_project_settings() {
|
|||
$('#<%=dom_id(@project)%>').show();
|
||||
}
|
||||
|
||||
function update_sidebar() {
|
||||
$('#sidebar').html(html_for_sidebar());
|
||||
}
|
||||
|
||||
function replace_project_form_with_updated_project() {
|
||||
$('#<%=dom_id(@project, 'container')%>').fadeOut(250, function() {
|
||||
<%
|
||||
|
|
@ -97,4 +86,4 @@ function html_for_project_settings() {
|
|||
|
||||
function html_for_error_messages() {
|
||||
return "<%= escape_javascript(error_messages_for('project')) %>";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue