TiddlyWiki.org

Ticket #637 (new enhancement)

Opened 2 months ago

Last modified 2 weeks ago

add options for TiddlyLink tooltip content

Reported by: EricShulman Assigned to: JeremyRuston
Priority: undefined Milestone: 2.5
Component: core Version:
Severity: undefined Keywords:
Cc:

Description (Last modified by EricShulman)

The current hard-coded format for a TiddlyLink? tooltip is: "%0 - %1, %2"

where: %0=tiddler title, %1=username, and %2=timestamp

The proposal is to:

  • expose this format string as a user option
  • make timestamp format a user option instead of system-defined toLocaleString() format
  • add %3=tiddler size (in bytes)
    config.messages.tiddlerLinkTooltip="%0 - %1, %2 (%3 bytes)";
    config.messages.tiddlerLinkTooltipDate="DDD, MMM DDth YYYY 0hh12:0mm AM";
    
    config.options.txtTiddlerLinkTootip=
    	config.options.txtTiddlerLinkTootip||config.messages.tiddlerLinkTooltip;
    config.options.txtTiddlerLinkTooltipDate=
    	config.options.txtTiddlerLinkTooltipDate||config.messages.tiddlerLinkTooltipDate;
    
    Tiddler.prototype.getSubtitle = function() {
    	var modifier = this.modifier;
    	if(!modifier) modifier = config.messages.subtitleUnknown;
    	var modified = this.modified;
    	if(modified) modified = modified.formatString(config.options.txtTiddlerLinkTooltipDate);
    	else modified = config.messages.subtitleUnknown;
    	return config.options.txtTiddlerLinkTootip.format([this.title,modifier,modified,this.text.length]);
    };
    

Change History

16/05/08 13:52:07 changed by EricShulman

  • description changed.

09/07/08 10:34:09 changed by MartinBudden

  • milestone set to 2.5.