In other words, I am looking at something like this:
Albion
Cimmeria
Thuringia
Zenda
dragon
manticore
vampire
werewolf
I should be seeing this:
Albion
Cimmeria
dragon
manticore
Thuringia
vampire
werewolf
Zenda
This is incredibly annoying and not okay at all. Is there a plugin
that will fix this?
Keep in mind, I am completely new to this, and am not what one would
call code or tech savvy -- which is why I went with what seems to be
an easily editable wiki program.
Search for this snip of text:
TiddlyWiki.prototype.reverseLookup
There's only one like it in the file.
You should see this block of code shortly beneath that line::
if(!sortField)
sortField = "title";
results.sort(function(a,b) {return a[sortField] <
b[sortField] ? -1 :
(a[sortField] == b[sortField] ? 0 : +1);});
return results;
Replace it with this block of text:
if(!sortField)
sortField = "title";
results.sort(function(a,b) {var x =
String(a[sortField]).toLowerCase(); var y =
String(b[sortField]).toLowerCase(); if (x > y) { return 1; } if (x <
y)
{ return -1; } return 0; });
return results;
And voila, fixed.
-- Naamah
In a tiddler tagged as systemconfig
**beware google wrapping**
// Return an array of the tiddlers that do or do not have a specified
entry in the specified storage array (ie, "links" or "tags")
// lookupMatch == true to match tiddlers, false to exclude tiddlers
TiddlyWiki.prototype.reverseLookup =
function(lookupField,lookupValue,lookupMatch,sortField)
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
var f = !lookupMatch;
for(var lookup=0; lookup<tiddler[lookupField].length; lookup++) {
if(tiddler[lookupField][lookup] == lookupValue)
f = lookupMatch;
}
if(f)
results.push(tiddler);
});
if(!sortField)
sortField = "title";
results.sort(function(a,b) {var x =
String(a[sortField]).toLowerCase(); var y =
String(b[sortField]).toLowerCase(); if (x > y) { return 1; } if (x
<y)
{ return -1; } return 0; });
return results;
};
Haven't tested but should have the same results
:P Mike