Merge pull request #4373 from BrokenEagle/note-fixes
Various note fixes
This commit is contained in:
@@ -528,7 +528,6 @@ let Note = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set_text: function($note_body, $note_box, text) {
|
set_text: function($note_body, $note_box, text) {
|
||||||
Note.Body.display_text($note_body, text);
|
|
||||||
if (Note.embed) {
|
if (Note.embed) {
|
||||||
const $note_inner_box = $note_box.find("div.note-box-inner-border");
|
const $note_inner_box = $note_box.find("div.note-box-inner-border");
|
||||||
Note.Body.display_text($note_inner_box, text);
|
Note.Body.display_text($note_inner_box, text);
|
||||||
@@ -538,6 +537,8 @@ let Note = {
|
|||||||
// Clear the font size so that the fonts will be scaled to the current value
|
// Clear the font size so that the fonts will be scaled to the current value
|
||||||
$note_inner_box.css("font-size", "");
|
$note_inner_box.css("font-size", "");
|
||||||
Note.Box.copy_style_attributes($note_box);
|
Note.Box.copy_style_attributes($note_box);
|
||||||
|
} else {
|
||||||
|
Note.Body.display_text($note_body, text);
|
||||||
}
|
}
|
||||||
Note.Body.resize($note_body);
|
Note.Body.resize($note_body);
|
||||||
Note.Body.bound_position($note_body);
|
Note.Body.bound_position($note_body);
|
||||||
@@ -680,10 +681,13 @@ let Note = {
|
|||||||
$note_body.data("id", String(data.id)).attr("data-id", data.id);
|
$note_body.data("id", String(data.id)).attr("data-id", data.id);
|
||||||
$note_box.data("id", String(data.id)).attr("data-id", data.id);
|
$note_box.data("id", String(data.id)).attr("data-id", data.id);
|
||||||
$note_box.removeClass("unsaved");
|
$note_box.removeClass("unsaved");
|
||||||
|
$note_box.removeClass("movable");
|
||||||
} else {
|
} else {
|
||||||
$note_box = Note.Box.find(data.id);
|
$note_box = Note.Box.find(data.id);
|
||||||
$note_box.removeClass("unsaved");
|
$note_box.removeClass("unsaved");
|
||||||
|
$note_box.removeClass("movable");
|
||||||
}
|
}
|
||||||
|
Note.move_id = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
save: function() {
|
save: function() {
|
||||||
@@ -949,9 +953,11 @@ let Note = {
|
|||||||
container.appendChild($note_body[0]);
|
container.appendChild($note_body[0]);
|
||||||
$note_body.data("original-body", original_body);
|
$note_body.data("original-body", original_body);
|
||||||
Note.Box.scale($note_box);
|
Note.Box.scale($note_box);
|
||||||
Note.Body.display_text($note_body, sanitized_body);
|
|
||||||
if (Note.embed) {
|
if (Note.embed) {
|
||||||
Note.Body.display_text($note_box.children("div.note-box-inner-border"), sanitized_body);
|
Note.Body.display_text($note_box.children("div.note-box-inner-border"), sanitized_body);
|
||||||
|
Note.Body.display_text($note_body, "Click to edit.");
|
||||||
|
} else {
|
||||||
|
Note.Body.display_text($note_body, sanitized_body);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -343,17 +343,11 @@ body[data-current-user-theme="dark"] {
|
|||||||
--news-updates-background: var(--grey-3);
|
--news-updates-background: var(--grey-3);
|
||||||
--news-updates-border: 2px solid var(--grey-4);
|
--news-updates-border: 2px solid var(--grey-4);
|
||||||
|
|
||||||
--note-body-background: #FFE;
|
|
||||||
--note-body-text-color: var(--grey-1);
|
--note-body-text-color: var(--grey-1);
|
||||||
--note-body-border: 1px solid black;
|
--unsaved-note-box-border: 1px solid var(--red-1);
|
||||||
--note-box-border: 1px solid white;
|
--movable-note-box-border: 1px solid var(--green-1);
|
||||||
--note-box-background: transparent;
|
|
||||||
--note-box-inner-border: 1px solid black;
|
|
||||||
--unsaved-note-box-inner-border: 1px solid var(--red-1);
|
|
||||||
--note-preview-border: 1px solid var(--red-1);
|
--note-preview-border: 1px solid var(--red-1);
|
||||||
--note-preview-background: white;
|
|
||||||
--note-highlight-color: var(--blue-1);
|
--note-highlight-color: var(--blue-1);
|
||||||
--note-tn-color: var(--muted-text-color);
|
|
||||||
|
|
||||||
--notice-error-background: var(--red-0);
|
--notice-error-background: var(--red-0);
|
||||||
--notice-error-border: 1px solid var(--grey-4);
|
--notice-error-border: 1px solid var(--grey-4);
|
||||||
|
|||||||
Reference in New Issue
Block a user