mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +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
|
|
@ -104,6 +104,19 @@ var IntegrationsPage = {
|
|||
}
|
||||
}
|
||||
|
||||
var NotesPage = {
|
||||
setup_behavior: function() {
|
||||
$('a.delete_note_button').live('click', function(evt){
|
||||
evt.preventDefault();
|
||||
if(confirm("Are you sure that you want to "+this.title+"?")){
|
||||
$(this).parents('.project').block({message: null});
|
||||
params = {_method: 'delete'};
|
||||
$.post(this.href, params, null, 'script');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.clearForm = function() {
|
||||
return this.each(function() {
|
||||
var type = this.type, tag = this.tagName.toLowerCase();
|
||||
|
|
@ -740,6 +753,7 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
IntegrationsPage.setup_behavior();
|
||||
NotesPage.setup_behavior();
|
||||
|
||||
/* Gets called from some AJAX callbacks, too */
|
||||
enable_rich_interaction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue