fixes #720
This commit is contained in:
@@ -133,6 +133,29 @@
|
||||
$("#post_tag_string").trigger("focus");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#copy-notes").click(function(e) {
|
||||
var current_post_id = $("meta[name=post-id]").attr("content");
|
||||
var other_post_id = prompt("Enter the ID of the post to copy all notes to:");
|
||||
|
||||
if (other_post_id !== null) {
|
||||
$.ajax("/posts/" + current_post_id + "/copy_notes", {
|
||||
type: "PUT",
|
||||
data: {
|
||||
other_post_id: other_post_id
|
||||
},
|
||||
complete: function(data) {
|
||||
if (data.status === 200) {
|
||||
Danbooru.notice("Successfully copied notes to <a href='" + other_post_id + "'>post #" + other_post_id + "</a>");
|
||||
} else {
|
||||
Danbooru.error("There was an error copying notes to <a href='" + other_post_id + "'>post #" + other_post_id + "</a>");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_post_relationship_previews = function() {
|
||||
|
||||
Reference in New Issue
Block a user