This commit is contained in:
Albert Yi
2018-04-12 13:36:56 -07:00
parent 883b36ac2e
commit 26a2e60d04

View File

@@ -446,6 +446,7 @@ Danbooru.Note = {
width: $note_box.width() / ratio, width: $note_box.width() / ratio,
height: $note_box.height() / ratio, height: $note_box.height() / ratio,
body: $note_body.data("original-body"), body: $note_body.data("original-body"),
post_id: Danbooru.meta("post-id")
} }
} }
@@ -458,10 +459,11 @@ Danbooru.Note = {
}, },
error_handler: function(xhr, status, exception) { error_handler: function(xhr, status, exception) {
Danbooru.error("Error: " + xhr.responseJSON.reasons.join("; ")); Danbooru.error("Error: " + (xhr.responseJSON.reason || xhr.responseJSON.reasons.join("; ")));
}, },
success_handler: function(data, status, xhr) { success_handler: function(data, status, xhr) {
window.console.log("succes");
if (data.html_id) { // new note if (data.html_id) { // new note
var $note_body = Danbooru.Note.Body.find(data.html_id); var $note_body = Danbooru.Note.Body.find(data.html_id);
var $note_box = Danbooru.Note.Box.find(data.html_id); var $note_box = Danbooru.Note.Box.find(data.html_id);