mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 03:20:02 +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:
parent
2608a323eb
commit
0d7c4ae6c7
@ -490,21 +490,31 @@ 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++) {
|
if($tw.utils.hop(tags,tag)) {
|
||||||
var tag = tiddler.fields.tags[index];
|
tags[tag].push(title)
|
||||||
if($tw.utils.hop(tags,tag)) {
|
} else {
|
||||||
tags[tag].push(title)
|
tags[tag] = [title];
|
||||||
} else {
|
}
|
||||||
tags[tag] = [title];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user