mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Not refilter anything when cancel edit. \nShow animation when remove a note insted redraw everything
This commit is contained in:
10
js/script.js
10
js/script.js
@@ -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');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user