http://trac.tiddlywiki.org/changeset/12306

MartinBudden
2010-07-28 05:39:15 -0700 (Wed, 28 Jul 2010)
81
Ticket #1224

Tags macro display incorrect if all tags tagged with 'excludeLists'

---------------

U   Trunk/core/js/Macros.js

---------------

Modified: Trunk/core/js/Macros.js
===================================================================
--- Trunk/core/js/Macros.js     2010-07-26 14:02:56 UTC (rev 12305)
+++ Trunk/core/js/Macros.js     2010-07-28 12:39:15 UTC (rev 12306)
@@ -175,16 +175,19 @@
                tiddler = store.getTiddler(title);
        var sep = getParam(params,"sep"," ");
        var lingo = config.views.wikified.tag;
-       var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : 
lingo.labelTags;
-       
createTiddlyElement(ul,"li",null,"listTitle",prompt.format([tiddler.title]));
+       var label = null;
        for(var t=0; t<tiddler.tags.length; t++) {
                var tag = store.getTiddler(tiddler.tags[t]);
                if(!tag || !tag.tags.contains("excludeLists")) {
+                       if(!label)
+                               label = 
createTiddlyElement(ul,"li",null,"listTitle",lingo.labelTags.format([tiddler.title]));
                        
createTagButton(createTiddlyElement(ul,"li"),tiddler.tags[t],tiddler.title);
                        if(t<tiddler.tags.length-1)
                                createTiddlyText(ul,sep);
                }
        }
+       if(!label)
+               
createTiddlyElement(ul,"li",null,"listTitle",lingo.labelNoTags.format([tiddler.title]));
 };
 
 config.macros.tagging.handler = 
function(place,macroName,params,wikifier,paramString,tiddler)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to