Ticket #1214 (assigned defect)

Opened 3 years ago

Last modified 3 years ago

Tagging macro does not support 'excludeLists' tag

Reported by: overett1 Owned by: overett1
Priority: minor Milestone: 2.7.1
Component: core Version:
Severity: low Keywords:
Cc:

Attachments

ticket1214.patch Download (0.6 KB) - added by overett1 3 years ago.
Patch to add excludeLists support to tagging macro
ticket1215-2.patch Download (1.1 KB) - added by MartinBudden 3 years ago.
Improved version of patch

Change History

  Changed 3 years ago by FND

  • milestone set to 2.6.1

  Changed 3 years ago by overett1

config.macros.tagging.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
	params = paramString.parseParams("anon",null,true,false,false);
	var ul = createTiddlyElement(place,"ul");
	var title = getParam(params,"anon","");
	if(title == "" && tiddler instanceof Tiddler)
		title = tiddler.title;
	var sep = getParam(params,"sep"," ");
	ul.setAttribute("title",this.tooltip.format([title]));
	var tagged = store.getTaggedTiddlers(title);
	var prompt = tagged.length == 0 ? this.labelNotTag : this.label;
	createTiddlyElement(ul,"li",null,"listTitle",prompt.format([title,tagged.length]));
	for(var t=0; t<tagged.length; t++) {
+		var tag = store.getTiddler(tagged[t].tags);
+		if(!tag || !tag.tags.contains("excludeLists")) {
-		createTiddlyLink(createTiddlyElement(ul,"li"),tagged[t].title,true);
-		if(t<tagged.length-1)
-		createTiddlyText(ul,sep);
+			createTiddlyLink(createTiddlyElement(ul,"li"),tagged[t].title,true);
+			if(t<tagged.length-1)
+			createTiddlyText(ul,sep);
+		}
	}
};

follow-up: ↓ 4   Changed 3 years ago by overett1

  • owner changed from JeremyRuston to overett1
  • status changed from new to assigned

Changed 3 years ago by overett1

Patch to add excludeLists support to tagging macro

in reply to: ↑ 3   Changed 3 years ago by overett1

Patch updated to one that works, including non-display of tagging box if all tags are tagged with 'excludeLists'.

Changed 3 years ago by MartinBudden

Improved version of patch

  Changed 3 years ago by MartinBudden

  • milestone changed from 2.6.1 to 2.6.2

Moved this release 2.6.2 since there seems to be some interaction with the <<allTags excludeLists>> invocation of the allTags macro in the TabTags? shadow tiddler.

  Changed 3 years ago by MartinBudden

  • milestone changed from 2.6.2 to 2.7.1

Milestone 2.6.2 deleted

Note: See TracTickets for help on using tickets.