With some help from ELS I have replaced all of my fET calls to inline
JS :)
I think you are missing the header (hdr)
i.e.
var hdr="|sortable|k\n| !Brand | !Name | !Wrapper | !Recommended By | !
Purchased ||h"
out.push(hdr);
A Working Example:
<script>
var out=[];
var fmt='| %0 | %1 | %2 | %3 | %4 | {{fine{[[%5|%5]]}}} |';
var tids=store.getMatchingTiddlers("Cigar && ! excludeLists && !
Trash","created");
var hdr="|sortable|k\n| !Brand | !Name | !Wrapper | !Recommended By
| !Purchased ||h"
out.push(hdr);
if (!tids.length) out=["No Cigars found"];
for (var i=0; i<tids.length; i++) {
var val1=tids[i].title;
if (store.getTiddlerSlice(val1,"PersonalRank") != "Not Rated")
continue;
if (store.getTiddlerSlice(val1,"Purchased") != "Yes") continue;
var val2=store.getTiddlerSlice(val1,'Brand')
var val3=store.getTiddlerSlice(val1,'Name')
var val4=store.getTiddlerSlice(val1,'Wrapper')
var val5=store.getTiddlerSlice(val1,'RecommendedBy')
var val6=store.getTiddlerSlice(val1,'Purchased')
out.push(fmt.format([val2,val3,val4,val5,val6,val1]));
}
return out.join('\n');
</script>
On Nov 10, 3:19 pm, Måns <[email protected]> wrote:
> Very neat Morris
>
> On 10 Nov., 14:07, Morris Gray <[email protected]> wrote:
>
> > My last submission ;-) Next....
>
> One question though - Is it necessary to change it into a fET to make
> use of TablesortingPlugin (http://tw.lewcid.org/#TableSortingPlugin)
> or is it possible to make the table sortable within the script?
>
> YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---