fixes #1426
This commit is contained in:
@@ -281,11 +281,12 @@ Danbooru.Note = {
|
|||||||
$dialog.append($textarea);
|
$dialog.append($textarea);
|
||||||
$dialog.data("id", $note_body.data("id"));
|
$dialog.data("id", $note_body.data("id"));
|
||||||
$dialog.dialog({
|
$dialog.dialog({
|
||||||
width: 350,
|
width: 360,
|
||||||
dialogClass: "note-edit-dialog",
|
dialogClass: "note-edit-dialog",
|
||||||
title: "Edit note",
|
title: "Edit note",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Save": Danbooru.Note.Edit.save,
|
"Save": Danbooru.Note.Edit.save,
|
||||||
|
"Preview": Danbooru.Note.Edit.preview,
|
||||||
"Cancel": Danbooru.Note.Edit.cancel,
|
"Cancel": Danbooru.Note.Edit.cancel,
|
||||||
"Delete": Danbooru.Note.Edit.delete,
|
"Delete": Danbooru.Note.Edit.delete,
|
||||||
"History": Danbooru.Note.Edit.history
|
"History": Danbooru.Note.Edit.history
|
||||||
@@ -364,6 +365,16 @@ Danbooru.Note = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
preview: function() {
|
||||||
|
var $this = $(this);
|
||||||
|
var $textarea = $this.find("textarea");
|
||||||
|
var id = $this.data("id");
|
||||||
|
var $note_body = Danbooru.Note.Body.find(id);
|
||||||
|
var text = $textarea.val();
|
||||||
|
Danbooru.Note.Body.set_text($note_body, text);
|
||||||
|
$this.dialog("close");
|
||||||
|
},
|
||||||
|
|
||||||
cancel: function() {
|
cancel: function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user