mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Update modal with tags on dialog.
This commit is contained in:
15
js/script.js
15
js/script.js
@@ -203,12 +203,14 @@ 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-div #content-editable');
|
var modalcontent = $('#modal-note-div #content-editable');
|
||||||
|
var modaltags = $('#modal-note-div .note-tags');
|
||||||
var modalnote = $("#modal-note-div .quicknote");
|
var modalnote = $("#modal-note-div .quicknote");
|
||||||
|
|
||||||
var note = $('.notes-grid [data-id=' + id + ']').parent();
|
var note = $('.notes-grid [data-id=' + id + ']').parent();
|
||||||
|
|
||||||
var title = note.find(".note-title").html();
|
var title = note.find(".note-title").html();
|
||||||
var content = note.find(".note-content").html();
|
var content = note.find(".note-content").html();
|
||||||
|
var tags = note.find(".note-tags").html();
|
||||||
var color = note.children().css("background-color");
|
var color = note.children().css("background-color");
|
||||||
var colors = modal[0].getElementsByClassName("circle-toolbar");
|
var colors = modal[0].getElementsByClassName("circle-toolbar");
|
||||||
$.each(colors, function(i, c) {
|
$.each(colors, function(i, c) {
|
||||||
@@ -225,6 +227,7 @@ View.prototype = {
|
|||||||
modalnote.data('id', id);
|
modalnote.data('id', id);
|
||||||
modaltitle.html(title);
|
modaltitle.html(title);
|
||||||
modalcontent.html(content);
|
modalcontent.html(content);
|
||||||
|
modaltags.html(tags);
|
||||||
modalnote.css("background-color", color);
|
modalnote.css("background-color", color);
|
||||||
|
|
||||||
var autolist = new AutoList();
|
var autolist = new AutoList();
|
||||||
@@ -620,12 +623,14 @@ View.prototype = {
|
|||||||
QnDialogs.tags(
|
QnDialogs.tags(
|
||||||
self._tags.getAll(),
|
self._tags.getAll(),
|
||||||
self._notes.getActive().tags,
|
self._notes.getActive().tags,
|
||||||
function(result, value) {
|
function(result, newTags) {
|
||||||
if (result === true) {
|
if (result === true) {
|
||||||
OC.Notification.showTemporary("TEST TAGS DIALOG OK");
|
var modalTags = $('#modal-note-div .note-tags');
|
||||||
}
|
modalTags.html('');
|
||||||
else {
|
newTags.forEach(function (item, index) {
|
||||||
OC.Notification.showTemporary("TEST TAGS DIALOG CANCEL");
|
var tag = $('<div class="slim-tag" data-id="-1">' + item + '</div>');
|
||||||
|
modalTags.append(tag);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
<div contenteditable="true" id='title-editable' class='note-title'></div>
|
<div contenteditable="true" id='title-editable' class='note-title'></div>
|
||||||
</div>
|
</div>
|
||||||
<div contenteditable="true" id='content-editable' class='note-content'></div>
|
<div contenteditable="true" id='content-editable' class='note-content'></div>
|
||||||
|
<div class='note-tags'></div>
|
||||||
<div class="note-options">
|
<div class="note-options">
|
||||||
<!--
|
<!--
|
||||||
<select class="note-share-select" name="users[]" multiple="multiple"></select>
|
<select class="note-share-select" name="users[]" multiple="multiple"></select>
|
||||||
|
|||||||
Reference in New Issue
Block a user