mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 01:08:50 +01:00
migrate deleting a note from notes page to jqeury
This commit is contained in:
parent
7b3c07a754
commit
145c9105dd
13 changed files with 145 additions and 84 deletions
|
|
@ -122,6 +122,12 @@ module ApplicationHelper
|
|||
url_for({:controller => 'contexts', :action => 'edit', :id => context.id}),
|
||||
{:id => "link_edit_#{dom_id(context)}", :class => "context_edit_settings"})
|
||||
end
|
||||
|
||||
def link_to_edit_note (note, descriptor = sanitize(note.id.to_s))
|
||||
link_to(descriptor,
|
||||
url_for({:controller => 'notes', :action => 'edit', :id => note.id}),
|
||||
{:id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings"})
|
||||
end
|
||||
|
||||
def link_to_delete_project(project, descriptor = sanitize(project.name))
|
||||
link_to(
|
||||
|
|
@ -139,6 +145,14 @@ module ApplicationHelper
|
|||
)
|
||||
end
|
||||
|
||||
def link_to_delete_note(note, descriptor = sanitize(note.id.to_s))
|
||||
link_to(
|
||||
descriptor,
|
||||
note_path(note, :format => 'js'),
|
||||
{:id => "delete_note_#{note.id}", :class => "delete_note_button", :title => "delete the note '#{note.id}'"}
|
||||
)
|
||||
end
|
||||
|
||||
def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, project_path(project, :format => 'm'), {:title => "View project: #{project.name}", :accesskey => accesskey} )
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue