From 97568ec82b2135d6edb9112b35c6217f14f20996 Mon Sep 17 00:00:00 2001 From: Vinzenz Rosenkranz Date: Tue, 24 May 2016 01:18:52 +0200 Subject: [PATCH] highlight current color, only on entering edit mode --- js/script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/script.js b/js/script.js index 8a10fd4..f347217 100644 --- a/js/script.js +++ b/js/script.js @@ -163,6 +163,12 @@ View.prototype = { var title = note.find("#title-editable").html(); var content = note.find("#content-editable").html(); var color = note.children().css("background-color"); + var colors = modal[0].getElementsByClassName("circle-toolbar"); + $.each(colors, function(i, c) { + if(color == c.style.backgroundColor) { + c.className += " icon-checkmark"; + } + }); var modalid = modalnote.data('id');