Not refilter anything when cancel edit. \nShow animation when remove a note insted redraw everything

This commit is contained in:
Matias De lellis
2016-05-21 20:10:30 -03:00
parent 7bc6069e76
commit 1dc0c50998

View File

@@ -194,7 +194,6 @@ View.prototype = {
var modalnote = $("#modal-note-div .quicknote"); var modalnote = $("#modal-note-div .quicknote");
this._notes.unsetActive(); this._notes.unsetActive();
this.showAll();
modal.removeClass("show-modal-note"); modal.removeClass("show-modal-note");
modal.addClass("hide-modal-note"); modal.addClass("hide-modal-note");
@@ -261,11 +260,16 @@ View.prototype = {
// Remove note icon // Remove note icon
var self = this; var self = this;
$('#app-content .icon-delete-note').click(function (event) { $('#app-content .icon-delete-note').click(function (event) {
var note = $(this).parent();
var id = parseInt(note.data('id'), 10);
event.stopPropagation(); event.stopPropagation();
var id = parseInt($(this).parent().data('id'), 10);
self._notes.load(id); self._notes.load(id);
self._notes.removeActive().done(function () { self._notes.removeActive().done(function () {
self.render(); $(".notes-grid").isotope('remove', note.parent())
.isotope('layout');
self.renderNavigation();
}).fail(function () { }).fail(function () {
alert('Could not delete note, not found'); alert('Could not delete note, not found');
}); });