lower opacity of note box when editing
This commit is contained in:
@@ -5,7 +5,7 @@ Danbooru.Note = {
|
||||
$inner_border.addClass("note-box-inner-border");
|
||||
|
||||
var opacity = 0;
|
||||
if (Danbooru.meta("post-has-embedded-notes") === "true") {
|
||||
if (Danbooru.Note.embed) {
|
||||
opacity = 0.9
|
||||
} else {
|
||||
opacity = 0.5
|
||||
@@ -276,7 +276,7 @@ Danbooru.Note = {
|
||||
|
||||
set_text: function($note_body, $note_box, text) {
|
||||
Danbooru.Note.Body.display_text($note_body, text);
|
||||
if (Danbooru.meta("post-has-embedded-notes") === "true") {
|
||||
if (Danbooru.Note.embed) {
|
||||
Danbooru.Note.Body.display_text($note_box.children("div"), text);
|
||||
}
|
||||
Danbooru.Note.Body.resize($note_body);
|
||||
@@ -331,6 +331,10 @@ Danbooru.Note = {
|
||||
$(".note-box").resizable("disable");
|
||||
$(".note-box").draggable("disable");
|
||||
|
||||
if (Danbooru.Note.embed) {
|
||||
$(".note-box").css("opacity", "0.5");
|
||||
}
|
||||
|
||||
$textarea = $('<textarea></textarea>');
|
||||
$textarea.css({
|
||||
width: "97%",
|
||||
@@ -372,6 +376,10 @@ Danbooru.Note = {
|
||||
Danbooru.Note.editing = false;
|
||||
$(".note-box").resizable("enable");
|
||||
$(".note-box").draggable("enable");
|
||||
|
||||
if (Danbooru.Note.embed) {
|
||||
$(".note-box").css("opacity", "0.9");
|
||||
}
|
||||
});
|
||||
|
||||
$textarea.selectEnd();
|
||||
@@ -672,7 +680,7 @@ Danbooru.Note = {
|
||||
$note_body.data("original-body", text);
|
||||
Danbooru.Note.Box.scale($note_box);
|
||||
Danbooru.Note.Body.display_text($note_body, text);
|
||||
if (Danbooru.meta("post-has-embedded-notes") === "true") {
|
||||
if (Danbooru.Note.embed) {
|
||||
Danbooru.Note.Body.display_text($note_box.children("div"), text);
|
||||
}
|
||||
},
|
||||
@@ -726,6 +734,7 @@ $(function() {
|
||||
$("#translate").bind("click", Danbooru.Note.TranslationMode.toggle);
|
||||
$(document).bind("keypress", "n", Danbooru.Note.TranslationMode.toggle);
|
||||
}
|
||||
Danbooru.Note.embed = (Danbooru.meta("post-has-embedded-notes") === "true");
|
||||
Danbooru.Note.load_all();
|
||||
$("#image").bind("click", Danbooru.Note.Box.toggle_all);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user