mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-27 11:16:10 +01:00
major restructuring/refactoring of application.js. finally scratched that itch. Some tests are failing to be fixed later.
This commit is contained in:
parent
88a524a8d6
commit
879fbc99e2
12 changed files with 606 additions and 642 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<% form_for(note_edit_form, :html => {
|
||||
:id => dom_id(note_edit_form, 'edit_form'),
|
||||
:class => "inline-form edit-note-form",
|
||||
:method => :post }) do |f|
|
||||
:method => :put }) do |f|
|
||||
-%>
|
||||
|
||||
<div id="error_status"><%= error_messages_for("note") %></div>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<% if @saved -%>
|
||||
TracksForm.hide_errors();
|
||||
TracksPages.hide_errors();
|
||||
add_note();
|
||||
clear_form();
|
||||
<% else -%>
|
||||
TracksForm.show_errors(html_for_error_messages());
|
||||
TracksPages.show_errors(html_for_error_messages());
|
||||
<% end -%>
|
||||
|
||||
function add_note() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
<div id="display_box_projects">
|
||||
<div class="container" id="note-<%= @note.id %>-wrapper">
|
||||
<%= render :partial => 'note', :object => @note %>
|
||||
</div>
|
||||
<%= render :partial => 'note', :object => @note %>
|
||||
</div>
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
<% if @saved -%>
|
||||
|
||||
TracksPages.hide_errors();
|
||||
page_notify('notice', 'Note <%=@note.id %> saved', 5);
|
||||
replace_note_form_with_updated_note();
|
||||
|
||||
<% else -%>
|
||||
TracksForm.show_errors(html_for_error_messages());
|
||||
TracksPages.show_errors(html_for_error_messages());
|
||||
<% end %>
|
||||
|
||||
function replace_note_form_with_updated_note() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue