mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Also add an small animation when hide the modal note.
This commit is contained in:
33
js/script.js
33
js/script.js
@@ -335,16 +335,11 @@ View.prototype = {
|
||||
var modal = $('#modal-note-div');
|
||||
var modaltitle = $('#modal-note-div #title-editable');
|
||||
var modalcontent = $('#modal-note-dive #content-editable');
|
||||
var modalcolortools = $("#modal-note-div .circle-toolbar");
|
||||
var modalnote = $("#modal-note-div .quicknote");
|
||||
|
||||
var id = $("#modal-note-div .quicknote").data('id');
|
||||
|
||||
//remove checkmark icons from temp selected color
|
||||
var modalcolortools = $("#modal-note-div .circle-toolbar");
|
||||
$.each(modalcolortools, function(i, colortool) {
|
||||
$(colortool).removeClass('icon-checkmark');
|
||||
});
|
||||
|
||||
/*
|
||||
var shareSelect = $('.note-share-select');
|
||||
shareSelect.val(null).trigger('change');
|
||||
@@ -353,15 +348,25 @@ View.prototype = {
|
||||
|
||||
this._notes.unsetActive();
|
||||
|
||||
modal.removeClass("show-modal-note");
|
||||
modal.addClass("hide-modal-note");
|
||||
|
||||
modalnote.data('id', -1);
|
||||
modaltitle.html("");
|
||||
modalcontent.html("");
|
||||
|
||||
var note = $('.notes-grid [data-id=' + id + ']').parent();
|
||||
note.css({"opacity": ""});
|
||||
modal.fadeOut(
|
||||
250,
|
||||
function() {
|
||||
modal.css({"display": ""});
|
||||
modal.removeClass("show-modal-note");
|
||||
modal.addClass("hide-modal-note");
|
||||
note.css({"opacity": ""});
|
||||
|
||||
// Reset modal
|
||||
modalnote.data('id', -1);
|
||||
modaltitle.html("");
|
||||
modalcontent.html("");
|
||||
|
||||
$.each(modalcolortools, function(i, colortool) {
|
||||
$(colortool).removeClass('icon-checkmark');
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
renderContent: function () {
|
||||
// Remove all event handlers to prevent double events.
|
||||
|
||||
Reference in New Issue
Block a user