mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-30 15:13:00 +00:00
Include tags on shadow tiddlers in tagging filter
Ensures that for system tiddlers the info panel "Tagging" tab correctly shows the tagged tiddlers. Final fix for #478
This commit is contained in:
@@ -490,13 +490,11 @@ Get a hashmap by tag of arrays of tiddler titles
|
|||||||
exports.getTagMap = function() {
|
exports.getTagMap = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
return this.getGlobalCache("tagmap",function() {
|
return this.getGlobalCache("tagmap",function() {
|
||||||
var tags = {};
|
var tags = {},
|
||||||
// Collect up all the tags
|
storeTags = function(tagArray) {
|
||||||
for(var title in self.tiddlers) {
|
if(tagArray) {
|
||||||
var tiddler = self.tiddlers[title];
|
for(var index=0; index<tagArray.length; index++) {
|
||||||
if(tiddler.fields.tags) {
|
var tag = tagArray[index];
|
||||||
for(var index=0; index<tiddler.fields.tags.length; index++) {
|
|
||||||
var tag = tiddler.fields.tags[index];
|
|
||||||
if($tw.utils.hop(tags,tag)) {
|
if($tw.utils.hop(tags,tag)) {
|
||||||
tags[tag].push(title)
|
tags[tag].push(title)
|
||||||
} else {
|
} else {
|
||||||
@@ -504,6 +502,18 @@ exports.getTagMap = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
title, tiddler;
|
||||||
|
// Collect up all the tags
|
||||||
|
for(title in self.shadowTiddlers) {
|
||||||
|
if(!$tw.utils.hop(self.tiddlers,title)) {
|
||||||
|
tiddler = self.shadowTiddlers[title].tiddler;
|
||||||
|
storeTags(tiddler.fields.tags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(title in self.tiddlers) {
|
||||||
|
tiddler = self.tiddlers[title];
|
||||||
|
storeTags(tiddler.fields.tags);
|
||||||
}
|
}
|
||||||
return tags;
|
return tags;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user