got rid of removedpost, restore classic is_deleted mechanics

This commit is contained in:
albert
2011-02-12 17:37:48 -05:00
parent 33f5350677
commit f48000a8b5
21 changed files with 204 additions and 371 deletions

View File

@@ -5,6 +5,9 @@
this.initialize_approve_link();
this.initialize_disapprove_link();
this.hide_or_show_approve_and_disapprove_links();
this.hide_or_show_delete_and_undelete_links();
this.initialize_delete_link();
this.initialize_undelete_link();
}
Danbooru.PostModeration.hide_or_show_approve_and_disapprove_links = function() {
@@ -14,6 +17,44 @@
}
}
Danbooru.PostModeration.hide_or_show_delete_and_undelete_links = function() {
if ($("meta[name=post-is-deleted]").attr("content") == "true") {
$("a#delete").hide();
} else {
$("a#undelete").hide();
}
}
Danbooru.PostModeration.initialize_delete_link = function() {
$("a#delete").click(function() {
$.ajax({
url: "/post_moderation/delete.js",
type: "post",
data: {
post_id: $("meta[name=post-id]").attr("content")
},
beforeSend: function() {
$("img#delete-wait").show();
}
});
});
}
Danbooru.PostModeration.initialize_undelete_link = function() {
$("a#undelete").click(function() {
$.ajax({
url: "/post_moderation/undelete.js",
type: "post",
data: {
post_id: $("meta[name=post-id]").attr("content")
},
beforeSend: function() {
$("img#undelete-wait").show();
}
});
});
}
Danbooru.PostModeration.initialize_disapprove_link = function() {
$("a#disapprove").click(function() {
$.ajax({