mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Fix checkmark of colors on modal
This commit is contained in:
@@ -444,7 +444,7 @@ View.prototype = {
|
||||
// Handle colors.
|
||||
$('#modal-note-div .circle-toolbar').click(function (event) {
|
||||
event.stopPropagation();
|
||||
var color = $(this).css("background-color");
|
||||
var color = self._colorToHex($(this).css("background-color"));
|
||||
self._editableColor(color);
|
||||
});
|
||||
|
||||
@@ -693,9 +693,13 @@ View.prototype = {
|
||||
if (color === undefined)
|
||||
return this._colorToHex($("#modal-note-div .quicknote").css("background-color"));
|
||||
else {
|
||||
var self = this;
|
||||
var colors = $("#modal-note-div .quicknote")[0].getElementsByClassName("circle-toolbar");
|
||||
$.each(colors, function(i, c) {
|
||||
if (color == c.style.backgroundColor) {
|
||||
$(c).removeClass('icon-checkmark');
|
||||
});
|
||||
$.each(colors, function(i, c) {
|
||||
if (color === self._colorToHex(c.style.backgroundColor)) {
|
||||
c.className += " icon-checkmark";
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user