mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Get current tags from modal dialog...
This commit is contained in:
@@ -58,7 +58,7 @@ const QnDialogs = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
input.val(selectedTags.map(function (value) { return value.id; }));
|
input.val(selectedTags.map(function (value) { return value.id >= 0 ? value.id : value.name; }));
|
||||||
input.trigger("change");
|
input.trigger("change");
|
||||||
|
|
||||||
$('.select2-input').on("keyup", function (event) {
|
$('.select2-input').on("keyup", function (event) {
|
||||||
|
|||||||
10
js/script.js
10
js/script.js
@@ -612,11 +612,15 @@ View.prototype = {
|
|||||||
// handle tags button.
|
// handle tags button.
|
||||||
$('#modal-note-div #tag-button').click(function (event) {
|
$('#modal-note-div #tag-button').click(function (event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
var id = $("#modal-note-div .quicknote").data('id');
|
var noteTags = $("#modal-note-div .slim-tag").toArray().map(function (value) {
|
||||||
self._notes.load(id);
|
return {
|
||||||
|
id: value.getAttribute('tag-id'),
|
||||||
|
name: value.textContent.trim()
|
||||||
|
};
|
||||||
|
});
|
||||||
QnDialogs.tags(
|
QnDialogs.tags(
|
||||||
self._notes.getTags(),
|
self._notes.getTags(),
|
||||||
self._notes.getActive().tags,
|
noteTags,
|
||||||
function(result, newTags) {
|
function(result, newTags) {
|
||||||
if (result === true) {
|
if (result === true) {
|
||||||
var modalTags = $('#modal-note-div .note-tags');
|
var modalTags = $('#modal-note-div .note-tags');
|
||||||
|
|||||||
Reference in New Issue
Block a user