update checkmark to match current selected color

This commit is contained in:
v1r0x
2016-05-24 14:46:14 +02:00
parent 97568ec82b
commit f1936aa5ce

View File

@@ -198,6 +198,11 @@ View.prototype = {
var modaltitle = $('#modal-note-div #title-editable'); var modaltitle = $('#modal-note-div #title-editable');
var modalcontent = $('#modal-note-dive #content-editable'); var modalcontent = $('#modal-note-dive #content-editable');
var modalnote = $("#modal-note-div .quicknote"); var modalnote = $("#modal-note-div .quicknote");
//remove checkmark icons from temp selected color
var modalcolortools = $("#modal-note-div .circle-toolbar");
$.each(modalcolortools, function(i, colortool) {
$(colortool).removeClass('icon-checkmark');
});
this._notes.unsetActive(); this._notes.unsetActive();
@@ -306,6 +311,11 @@ View.prototype = {
$('#app-content .circle-toolbar').click(function (event) { $('#app-content .circle-toolbar').click(function (event) {
event.stopPropagation(); event.stopPropagation();
var oldColorTool = $('.circle-toolbar.icon-checkmark');
$.each(oldColorTool, function(i, oct) {
$(oct).removeClass('icon-checkmark');
});
$(this).addClass('icon-checkmark');
var color = $(this).css("background-color"); var color = $(this).css("background-color");
modalnote.css("background-color", color); modalnote.css("background-color", color);
}); });