mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
A more or less big rewrite... Cleaner and more animations...
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* @copyright 2019 Matias De lellis <mati86dl@gmail.com>
|
||||
* @copyright 2019-2020 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
* @author 2019 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
@@ -49,9 +49,10 @@ const QnDialogs = {
|
||||
multiple: false,
|
||||
allowClear: true,
|
||||
toggleSelect: true,
|
||||
tags : function () {
|
||||
tags: function () {
|
||||
var data = [];
|
||||
currentTags.forEach(function (item, index) {
|
||||
// Select2 expect text instead of name
|
||||
data.push({id: item.id, text: item.name});
|
||||
});
|
||||
return data;
|
||||
@@ -94,7 +95,13 @@ const QnDialogs = {
|
||||
click: function () {
|
||||
input.select2('close');
|
||||
if (callback !== undefined) {
|
||||
callback(true, input.select2("data"));
|
||||
// Quicknotes use name instead text of selecd
|
||||
newTags = input.select2("data");
|
||||
newTags.forEach(function (item, index, tArray) {
|
||||
item['name'] = item.text;
|
||||
tArray[index] = item;
|
||||
});
|
||||
callback(true, newTags);
|
||||
}
|
||||
$(dialogId).ocdialog('close');
|
||||
},
|
||||
|
||||
829
js/script.js
829
js/script.js
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,11 @@
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
{{#if ispinned}}
|
||||
<div class="icon-header-note icon-pinned fixed-header-icon" title="{{t "quicknotes" "Unpin note"}}"></div>
|
||||
{{else}}
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
{{/if}}
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
|
||||
<!--
|
||||
{{#if sharedwith}}
|
||||
|
||||
5
js/templates/tags.handlebars
Normal file
5
js/templates/tags.handlebars
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class='note-tags'>
|
||||
{{#each tags}}
|
||||
<div class="icon-tag slim-tag" tag-id="{{ id }}">{{{ name }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user