notes: clean up note visibility toggling.
This commit is contained in:
@@ -423,14 +423,7 @@ let Note = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toggle_all: function() {
|
toggle_all: function() {
|
||||||
var $note_container = $(".note-container");
|
$(".note-container").toggleClass("hide-notes");
|
||||||
var is_hidden = ($note_container.css('visibility') === 'hidden');
|
|
||||||
|
|
||||||
if (is_hidden) {
|
|
||||||
$note_container.css('visibility', 'visible');
|
|
||||||
} else {
|
|
||||||
$note_container.css('visibility', 'hidden');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -850,7 +843,7 @@ let Note = {
|
|||||||
Note.create(x, y, w, h);
|
Note.create(x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".note-container").css('visibility', 'visible');
|
$(".note-container").removeClass("hide-notes");
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&.hide-notes .note-box {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
div.note-body {
|
div.note-body {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: var(--note-body-border);
|
border: var(--note-body-border);
|
||||||
|
|||||||
Reference in New Issue
Block a user