From 7fa3d2f1d896382d250a81102a92d2964068c65c Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Tue, 24 May 2016 11:41:07 -0300 Subject: [PATCH] Use #modal-note-dev id to binding actions instead #app-content --- js/script.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/script.js b/js/script.js index 8ca5c51..0ce1c3b 100644 --- a/js/script.js +++ b/js/script.js @@ -307,8 +307,12 @@ View.prototype = { }); }); + /* + * Modal actions. + */ + // Handle colors. - $('#app-content .circle-toolbar').click(function (event) { + $('#modal-note-div .circle-toolbar').click(function (event) { event.stopPropagation(); var oldColorTool = $('.circle-toolbar.icon-checkmark'); @@ -320,12 +324,13 @@ View.prototype = { modalnote.css("background-color", color); }); - // handle cancel and saves note. - $('#app-content #cancel-button').click(function (event) { + // handle cancel editing notes. + $('#modal-note-div #cancel-button').click(function (event) { self.cancelEdit(); }); - $('#app-content #save-button').click(function (event) { + // Handle save note + $('#modal-note-div #save-button').click(function (event) { event.stopPropagation(); var id = modalnote.data('id');