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