This commit is contained in:
albert
2013-02-28 15:06:22 -08:00
parent 2dbd7b180f
commit e3892e09c9
4 changed files with 26 additions and 3 deletions

View File

@@ -308,16 +308,33 @@
complete: function() {
Danbooru.Post.notice_update("dec");
},
success: function(data, status, xhr) {
success: function(data) {
Danbooru.Post.update_data(data);
},
error: function(data, status, xhr) {
error: function(data) {
Danbooru.notice("Error: " + data.reason);
$("#post_" + data.id).effect("shake", {"distance": 20}, "fast");
}
});
}
Danbooru.Post.approve = function(post_id) {
$.ajax({
type: "POST",
url: "/moderator/post/approval.json",
data: {"post_id": post_id},
dataType: "json",
success: function(data) {
if (!data.success) {
Danbooru.error("Error: " + data.reason);
} else {
var $post = $("#post_" + post_id);
$post.data("flags", $post.data("flags").replace(/pending/, ""));
$post.removeClass("post-status-pending");
}
}
});
}
Danbooru.Post.place_jlist_ads = function() {
var jlist = $("#jlist-rss-ads-for-show");