From 1dc0c509988952e2ce85f51b22e14b0d5145fd56 Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Sat, 21 May 2016 20:10:30 -0300 Subject: [PATCH] Not refilter anything when cancel edit. \nShow animation when remove a note insted redraw everything --- js/script.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/script.js b/js/script.js index 095c4a7..bda001e 100644 --- a/js/script.js +++ b/js/script.js @@ -194,7 +194,6 @@ View.prototype = { var modalnote = $("#modal-note-div .quicknote"); this._notes.unsetActive(); - this.showAll(); modal.removeClass("show-modal-note"); modal.addClass("hide-modal-note"); @@ -261,11 +260,16 @@ View.prototype = { // Remove note icon var self = this; $('#app-content .icon-delete-note').click(function (event) { + var note = $(this).parent(); + var id = parseInt(note.data('id'), 10); + event.stopPropagation(); - var id = parseInt($(this).parent().data('id'), 10); + self._notes.load(id); self._notes.removeActive().done(function () { - self.render(); + $(".notes-grid").isotope('remove', note.parent()) + .isotope('layout'); + self.renderNavigation(); }).fail(function () { alert('Could not delete note, not found'); });