mirror of
https://github.com/TangentFoxy/memex.git
synced 2024-11-22 04:54:23 +00:00
Add support tags with spaces by lcb931023.
This commit is contained in:
parent
00745d35ad
commit
8b0c2cc066
@ -1709,7 +1709,7 @@ RANGITOTO
|
||||
FILE : 12018-07-19_wide.jpg
|
||||
TYPE : image
|
||||
WIDE : true
|
||||
TAGS : log
|
||||
TAGS : log, test test
|
||||
|
||||
MQTT
|
||||
PERS : autophagy
|
||||
|
@ -231,7 +231,7 @@ function View()
|
||||
entry += `<div class="tags"><i class="fas fa-tag textIcon"></i>`;
|
||||
for (var i = 0; i < value.TAGS.length; i++)
|
||||
{
|
||||
entry += `<a href=#tag-${value.TAGS[i]}>${value.TAGS[i]}</a>`;
|
||||
entry += `<a href="#tag-${value.TAGS[i]}">${value.TAGS[i]}</a>`;
|
||||
if (i+1 != value.TAGS.length)
|
||||
{
|
||||
entry += `, `;
|
||||
|
@ -76,6 +76,7 @@ function Wrap()
|
||||
if (splitTarget[0] == 'tag')
|
||||
{
|
||||
// TAG
|
||||
var tagDecoded = decodeURI(splitTarget[1]);
|
||||
for (i = 0; i < this.keys.length; i++)
|
||||
{
|
||||
let value = this.database[this.keys[i]];
|
||||
@ -83,7 +84,7 @@ function Wrap()
|
||||
{
|
||||
for (var t = 0; t < value.TAGS.length; t++)
|
||||
{
|
||||
if (value.TAGS[t] == splitTarget[1])
|
||||
if (value.TAGS[t] == tagDecoded)
|
||||
{
|
||||
tempDatabase[this.keys[i]] = this.database[this.keys[i]];
|
||||
}
|
||||
@ -94,13 +95,14 @@ function Wrap()
|
||||
else if (splitTarget[0] == 'type')
|
||||
{
|
||||
// TYPE
|
||||
var tagDecoded = decodeURI(splitTarget[1]);
|
||||
var tempDatabase = {}
|
||||
for (i = 0; i < this.keys.length; i++)
|
||||
{
|
||||
let value = this.database[this.keys[i]];
|
||||
if (typeof value.TYPE !== 'undefined')
|
||||
{
|
||||
if (value.TYPE == splitTarget[1])
|
||||
if (value.TYPE == tagDecoded)
|
||||
{
|
||||
tempDatabase[this.keys[i]] = this.database[this.keys[i]];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user