Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
*If you prefer not to use tabs you can recover the 'classic' ~TiddlyWiki behaviour by disabling the TiddlersBarPluginMG. Simply disable it through backstage, save and reload. This allows all open tiddlers to be viewed at the same time with newly opened tiddlers opening at the top. See [[Printing]]
*Since the topics are tiddlers you can move them in and out of MainMenu at your pleasure. You can move current Topic with the instructions from MainMenu but don't delete it and it will still be accessible from the TopMenu.
*Change the title of TW ~T-Notes by opening SiteTitle and typing in a new title.
*Change or eliminate the subtitle by opening SiteSubtitle and doing what you wish with it.
*Control what appears when you start up TW ~T-Notes by opening DefaultTiddlers and replacing {{{[[MyChanges]]}}} with a note title in double brackets.
With TW Notes you can create notes that belong to topics and subtopics, and quickly find them using either the search window provided, or an automatically updated topical index.
#''To create a new master topic:'' Click on '''New Master Topic''' on the top horizontal menu and follow the instructions given. You can then insert your new topic into the MainMenu like this: {{{<<tiddler YourOwnTopicName>>}}}
#''If your topic has spaces'' use brackets like this: {{{<<tiddler [[Your Own Topic Name]]>>}}}
##''Then to create subTopics:'' Click ''subTopic'' next to the Master Topic i.e. @@color:#008;subTopic | refresh@@ and follow the instructions provided.
##''Then to create sub-subTopics:'' open the relevant subTopic and __''in its toolbar''__ click 'new here'.
##''Just hit the 'refresh topic index' button'' to see the new additions to the menu. Click on the arrows (►) to open the levels of the index.
People who have used ~TiddlyWiki before may wish to access TW features that I have hidden or changed:
#''Note:'' If you prefer not to use tabs you can recover the 'classic' ~TiddlyWiki behaviour by disabling the TiddlersBarPluginMG. Simply disable it through backstage, save and reload. This allows all open tiddlers to be viewed at the same time with newly opened tiddlers opening at the top. See [[Printing]]
#Use the StyleSheet to adjust colors, font-sizes, page layout tweaks and other design features.
#Use [[zzConfigOptions]] to change the settings for saving options, animations, toggle options, single page mode options (to view multiple tiddlers) and search options.
#Use ViewTemplate to restore tiddler subtitles and tagging boxes. Warning: you will need to carefully add lines of code from the original ViewTemplate at http://www.tiddlywiki.com.
There are four ways to navigate through TW ~T-Notes:
##Search for a note using the search window
##Browse your notes using the topic index to the left
##Consult the tabs across the top to access recently-used notes.
##Open the sidebar to access lists of notes by title, by date modified and by tags
You can download as many copies of TW ~T-Notes as you wish, for free.
##Just click here <html><a href='http://twt-notes.tiddlyspot.com/download' class='button'>''Download TW ~T-Notes''</a></html> and choose 'Save as'. Give your file a new filename and location as desired.
##If you use any other browser than Firefox, you will need to [[click here|http://www.tiddlywiki.com/TiddlySaver.jar]], save the ~TiddlySaver file, and move it //to the same folder// as your ~No-Brainer Notes file. ~TiddlySaver is a Java applet that allows you to save changes in various browsers that don't support saving changes to local files.
<<siteMap [[A sub-topic]] . sliders>>
{{bluey{[[NEWTOPLEVELTOPICHERE-or-AnyNameHere]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("NEWTOPLEVELTOPICHERE")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'getFirstLine(tiddler.text)'
>>
It's my privilege to be able to offer this resource for free. This is possible due to the efforts of various people:
*Jeremy Ruston, the creator of ~TiddlyWiki. ^^ TiddlyWiki <<version>> © 2008 [[UnaMesa|http://www.unamesa.org/]]^^
*The creators of the various piugins used in this adaptation of ~TiddlyWiki. Use the following button to see a list of the plugins used here. Each plugin contains information about its creator. <<tag systemConfig>>
-----
^^<html><a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br />No-Brainer Notes is licensed by Dave Gifford under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a></html>^^
''Button tooltip:'' align text
This button {{makeborder{<<tiddler QuickEdit_align>>}}} allows you to align the selected text.
Simply highlight the text and choose the desired alignment
@@color:#c06;Tiddlers tagged Notes@@
These are Notes attached to every tiddler by TiddlerNotesPlugin
----
<script>
// get all tiddlers tagged with "Notes"
var tids=store.getTaggedTiddlers("Notes");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("Notes")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
These are notes generated by TiddlerNotesPlugin. They are attached to every tiddler. You can hide them selectively by tagging a tiddler __nonotes__.
They are only a 'type of tiddler' and can be changed or deleted without affecting the tiddler they are attached to. To eliminate them form this ~TiddlyWiki disable or delete TiddlerNotesPlugin.
text/plain
.txt .text .js .vbs .asp .cgi .pl
----
text/html
.htm .html .hta .htx .mht
----
text/comma-separated-values
.csv
----
text/javascript
.js
----
text/css
.css
----
text/xml
.xml .xsl .xslt
----
image/gif
.gif
----
image/jpeg
.jpg .jpe .jpeg
----
image/png
.png
----
image/bmp
.bmp
----
image/tiff
.tif .tiff
----
audio/basic
.au .snd
----
audio/wav
.wav
----
audio/x-pn-realaudio
.ra .rm .ram
----
audio/x-midi
.mid .midi
----
audio/mp3
.mp3
----
audio/m3u
.m3u
----
video/x-ms-asf
.asf
----
video/avi
.avi
----
video/mpeg
.mpg .mpeg
----
video/quicktime
.qt .mov .qtvr
----
application/pdf
.pdf
----
application/rtf
.rtf
----
application/postscript
.ai .eps .ps
----
application/wordperfect
.wpd
----
application/mswrite
.wri
----
application/msexcel
.xls .xls3 .xls4 .xls5 .xlw
----
application/msword
.doc
----
application/mspowerpoint
.ppt .pps
----
application/x-director
.swa
----
application/x-shockwave-flash
.swf
----
application/x-zip-compressed
.zip
----
application/x-gzip
.gz
----
application/x-rar-compressed
.rar
----
application/octet-stream
.com .exe .dll .ocx
----
application/java-archive
.jar
/***
|Name|AttachFilePlugin|
|Source|http://www.TiddlyTools.com/#AttachFilePlugin|
|Documentation|http://www.TiddlyTools.com/#AttachFilePluginInfo|
|Version|3.9.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|AttachFilePluginFormatters, AttachFileMIMETypes|
|Overrides||
|Description|Store binary files as base64-encoded tiddlers with fallback links for separate local and/or remote file storage|
Store or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content.
> Important note: As of version 3.6.0, in order to //render// images and other binary attachments created with this plugin, you must also install [[AttachFilePluginFormatters]], which extends the behavior of the TiddlyWiki core formatters for embedded images ({{{[img[tooltip|image]]}}}), linked embedded images ({{{[img[tooltip|image][link]]}}}), and external/"pretty" links ({{{[[label|link]]}}}), so that these formatter will process references to attachment tiddlers as if a normal file reference had been provided. |
!!!!!Documentation
>see [[AttachFilePluginInfo]]
!!!!!Inline interface (live)
>see [[AttachFile]] (shadow tiddler)
><<tiddler AttachFile>>
!!!!!Revisions
<<<
2008.07.21 [3.9.0] Fixup for FireFox 3: use HTML with separate text+button control instead of type='file' control
|please see [[AttachFilePluginInfo]] for additional revision details|
2005.07.20 [1.0.0] Initial Release
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePlugin= {major: 3, minor: 9, revision: 0, date: new Date(2008,7,21)};
// shadow tiddler
config.shadowTiddlers.AttachFile="<<attach inline>>";
// add 'attach' backstage task (insert before built-in 'importTask')
if (config.tasks) { // for TW2.2b or above
config.tasks.attachTask = {
text: "attach",
tooltip: "Attach a binary file as a tiddler",
content: "<<attach inline>>"
}
config.backstageTasks.splice(config.backstageTasks.indexOf("importTask"),0,"attachTask");
}
config.macros.attach = {
// // lingo
//{{{
label: "attach file",
tooltip: "Attach a file to this document",
linkTooltip: "Attachment: ",
typeList: "AttachFileMIMETypes",
titlePrompt: " enter tiddler title...",
MIMEPrompt: "<option value=''>select MIME type...</option><option value='editlist'>[edit list...]</option>",
localPrompt: " enter local path/filename...",
URLPrompt: " enter remote URL...",
tiddlerErr: "Please enter a tiddler title",
sourceErr: "Please enter a source path/filename",
storageErr: "Please select a storage method: embedded, local or remote",
MIMEErr: "Unrecognized file format. Please select a MIME type",
localErr: "Please enter a local path/filename",
URLErr: "Please enter a remote URL",
fileErr: "Invalid path/file or file not found",
sourceReport: "| source file:|{{{%0}}}|\n",
nosourceReport: "| source file:|//none//|\n",
dateReport: "| attached on:|%0 by %1|\n",
notesReport: "| description:|%0|\n",
dataReport: "| embedded:|[[%0|%0]] - {{{type=%1, size=%2 bytes, encoded=%3 bytes}}}|\n",
nodataReport: "| embedded:|//none//|\n",
localReport: "| local file:|/%LOCAL_LINK%/[[%0|%1]]|\n",
nolocalReport: "| local file:|//none//|\n",
URLReport: "| remote link:|/%REMOTE_LINK%/[[%0|%0]]|\n",
noURLReport: "| remote link:|//none//|\n",
imageReport: "image\n<<<\nusage: {{{[img[tooltip|%0]] or [img[tooltip|%0][link]]}}}\n[img[tooltip|%0]]\n<<<\n",
dataBlock: "\n/% DO NOT EDIT BELOW THIS POINT\n---BEGIN_DATA---\n%0;base64,\n%1\n---END_DATA---\n%/",
//}}}
// // macro definition
//{{{
handler:
function(place,macroName,params) {
if (params && !params[0]) { createTiddlyButton(place,this.label,this.tooltip,this.toggleAttachPanel); return; }
var id=params.shift();
this.createAttachPanel(place,id+"_attachPanel",params);
document.getElementById(id+"_attachPanel").style.position="static";
document.getElementById(id+"_attachPanel").style.display="block";
},
//}}}
//{{{
createAttachPanel:
function(place,panel_id,params) {
if (!panel_id || !panel_id.length) var panel_id="_attachPanel";
// remove existing panel (if any)
var panel=document.getElementById(panel_id); if (panel) panel.parentNode.removeChild(panel);
// set styles for this panel
setStylesheet(this.css,"attachPanel");
// create new panel
var title=""; if (params && params[0]) title=params.shift();
var types=this.MIMEPrompt+this.formatListOptions(store.getTiddlerText(this.typeList)); // get MIME types
panel=createTiddlyElement(place,"span",panel_id,"attachPanel",null);
var html=this.html.replace(/%id%/g,panel_id);
html=html.replace(/%title%/g,title);
html=html.replace(/%disabled%/g,title.length?"disabled":"");
html=html.replace(/%IEdisabled%/g,config.browser.isIE?"disabled":"");
html=html.replace(/%types%/g,types);
panel.innerHTML=html;
if (config.browser.isGecko) { // FF3 FIXUP
document.getElementById("attachSource").style.display="none";
document.getElementById("attachFixPanel").style.display="block";
}
return panel;
},
//}}}
//{{{
toggleAttachPanel:
function (e) {
if (!e) var e = window.event;
var parent=resolveTarget(e).parentNode;
var panel = document.getElementById("_attachPanel");
if (panel==undefined || panel.parentNode!=parent)
panel=config.macros.attach.createAttachPanel(parent,"_attachPanel");
var isOpen = panel.style.display=="block";
if(config.options.chkAnimate)
anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
else
panel.style.display = isOpen ? "none" : "block" ;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
},
//}}}
//{{{
formatListOptions:
function(text) {
if (!text || !text.trim().length) return "";
// get MIME list content from text
var parts=text.split("\n----\n");
var out="";
for (var p=0; p<parts.length; p++) {
var lines=parts[p].split("\n");
var label=lines.shift(); // 1st line=display text
var value=lines.shift(); // 2nd line=item value
out +='<option value="%1">%0</option>'.format([label,value]);
}
return out;
},
//}}}
// // interface definition
//{{{
css:
".attachPanel { display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\
background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
padding: 0.5em; margin:0em; -moz-border-radius:1em;-webkit-border-radius:1em; text-align:left }\
.attachPanel form { display:inline;border:0;padding:0;margin:0; }\
.attachPanel select { width:99%;margin:0px;font-size:8pt;line-height:110%;}\
.attachPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
.attachPanel textarea { width:98%;margin:0px;height:2em;font-size:8pt;line-height:110%}\
.attachPanel table { width:100%;border:0;margin:0;padding:0;color:inherit; }\
.attachPanel tbody, .attachPanel tr, .attachPanel td { border:0;margin:0;padding:0;color:#000; }\
.attachPanel .box { border:1px solid black; padding:.3em; margin:.3em 0px; background:#f8f8f8; -moz-border-radius:5px;-webkit-border-radius:5px; }\
.attachPanel .chk { width:auto;border:0; }\
.attachPanel .btn { width:auto; }\
.attachPanel .btn2 { width:49%; }\
",
//}}}
//{{{
html:
'<form>\
attach from source file\
<input type="file" id="attachSource" name="source" size="56"\
onChange="config.macros.attach.onChangeSource(this)">\
<div id="attachFixPanel" style="display:none"><!-- FF3 FIXUP -->\
<input type="text" id="attachFixSource" style="width:90%"\
title="Enter a path/file to attach"\
onChange="config.macros.attach.onChangeSource(this);">\
<input type="button" style="width:7%" value="..."\
title="Enter a path/file to attach"\
onClick="config.macros.attach.askForFilename(document.getElementById(\'attachFixSource\'));">\
</div><!--end FF3 FIXUP-->\
<div class="box">\
<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
embed data <input type=checkbox class=chk name="useData" %IEdisabled% \
onclick="if (!this.form.MIMEType.value.length)\
this.form.MIMEType.selectedIndex=this.checked?1:0; "> \
</td><td style="border:0">\
<select size=1 name="MIMEType" \
onchange="this.title=this.value; if (this.value==\'editlist\')\
{ this.selectedIndex=this.form.useData.checked?1:0; story.displayTiddler(null,config.macros.attach.typeList,2); return; }">\
<option value=""></option>\
%types%\
</select>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
local link <input type=checkbox class=chk name="useLocal"\
onclick="this.form.local.value=this.form.local.defaultValue=this.checked?config.macros.attach.localPrompt:\'\';"> \
</td><td style="border:0">\
<input type=text name="local" size=15 autocomplete=off value=""\
onchange="this.form.useLocal.checked=this.value.length" \
onkeyup="this.form.useLocal.checked=this.value.length" \
onfocus="if (!this.value.length) this.value=config.macros.attach.localPrompt; this.select()">\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
remote link <input type=checkbox class=chk name="useURL"\
onclick="this.form.URL.value=this.form.URL.defaultValue=this.checked?config.macros.attach.URLPrompt:\'\';\"> \
</td><td style="border:0">\
<input type=text name="URL" size=15 autocomplete=off value=""\
onfocus="if (!this.value.length) this.value=config.macros.attach.URLPrompt; this.select()"\
onchange="this.form.useURL.checked=this.value.length;"\
onkeyup="this.form.useURL.checked=this.value.length;">\
</td></tr></table>\
</div>\
<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
attach as \
</td><td style="border:0" colspan=2>\
<input type=text name="tiddlertitle" size=15 autocomplete=off value="%title%"\
onkeyup="if (!this.value.length) { this.value=config.macros.attach.titlePrompt; this.select(); }"\
onfocus="if (!this.value.length) this.value=config.macros.attach.titlePrompt; this.select()" %disabled%>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
description \
</td><td style="border:0" colspan=2>\
<input type=text name="notes" size=15 autocomplete=off>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
add tags \
</td><td style="border:0">\
<input type=text name="tags" size=15 autocomplete=off value="" onfocus="this.select()">\
</td><td style="width:40%;text-align:right;border:0">\
<input type=button class=btn2 value="attach"\
onclick="config.macros.attach.onClickAttach(this)"><!--\
--><input type=button class=btn2 value="close"\
onclick="var panel=document.getElementById(\'%id%\'); if (panel) panel.parentNode.removeChild(panel);">\
</td></tr></table>\
</form>',
//}}}
// // control processing
//{{{
onChangeSource:
function(here) {
var form=here.form;
var list=form.MIMEType;
var theFilename = here.value;
var theExtension = theFilename.substr(theFilename.lastIndexOf('.')).toLowerCase();
// if theFilename is in current document folder, remove path prefix and use relative reference
var h=document.location.href; folder=getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf("/")+1)));
if (theFilename.substr(0,folder.length)==folder) theFilename='./'+theFilename.substr(folder.length);
else theFilename='file:///'+theFilename; // otherwise, use absolute reference
theFilename=theFilename.replace(/\\/g,"/"); // fixup: change \ to /
form.useLocal.checked = true;
form.local.value = theFilename;
form.useData.checked = !form.useData.disabled;
list.selectedIndex=1;
for (var i=0; i<list.options.length; i++) // find matching MIME type
if (list.options[i].value.indexOf(theExtension)!=-1) { list.selectedIndex = i; break; }
if (!form.tiddlertitle.disabled)
form.tiddlertitle.value=theFilename.substr(theFilename.lastIndexOf('/')+1); // get tiddlername from filename
},
//}}}
//{{{
onClickAttach:
function (here) {
clearMessage();
// get input values
var form=here.form;
var src=form.source; if (config.browser.isGecko) src=document.getElementById("attachFixSource");
var theDate=(new Date()).formatString(config.macros.timeline.dateFormat);
var theSource = src.value!=src.defaultValue?src.value:"";
var theTitle=form.tiddlertitle.value;
var theLocal = form.local.value!=form.local.defaultValue?form.local.value:"";
var theURL = form.URL.value!=form.URL.defaultValue?form.URL.value:"";
var theNotes = form.notes.value;
var theTags = "attachment excludeMissing "+form.tags.value;
var useData=form.useData.checked;
var useLocal=form.useLocal.checked;
var useURL=form.useURL.checked;
var theMIMEType = form.MIMEType.value.length?form.MIMEType.options[form.MIMEType.selectedIndex].text:"";
// validate checkboxes and get filename
if (useData) {
if (theSource.length) { if (!theLocation) var theLocation=theSource; }
else { alert(this.sourceErr); src.focus(); return false; }
}
if (useLocal) {
if (theLocal.length) { if (!theLocation) var theLocation = theLocal; }
else { alert(this.localErr); form.local.focus(); return false; }
}
if (useURL) {
if (theURL.length) { if (!theLocation) var theLocation = theURL; }
else { alert(this.URLErr); form.URL.focus(); return false; }
}
if (!(useData||useLocal||useURL))
{ form.useData.focus(); alert(this.storageErr); return false; }
if (!theLocation)
{ src.focus(); alert(this.sourceErr); return false; }
if (!theTitle || !theTitle.trim().length || theTitle==this.titlePrompt)
{ form.tiddlertitle.focus(); alert(this.tiddlerErr); return false; }
// if not already selected, determine MIME type based on filename extension (if any)
if (useData && !theMIMEType.length && theLocation.lastIndexOf('.')!=-1) {
var theExt = theLocation.substr(theLocation.lastIndexOf('.')).toLowerCase();
var theList=form.MIMEType;
for (var i=0; i<theList.options.length; i++)
if (theList.options[i].value.indexOf(theExt)!=-1)
{ var theMIMEType=theList.options[i].text; theList.selectedIndex=i; break; }
}
// attach the file
return this.createAttachmentTiddler(theSource, theDate, theNotes, theTags, theTitle,
useData, useLocal, useURL, theLocal, theURL, theMIMEType);
},
getMIMEType:
function(src,def) {
var ext = src.substr(src.lastIndexOf('.')).toLowerCase();
var list=store.getTiddlerText(this.typeList);
if (!list || !list.trim().length) return def;
// get MIME list content from tiddler
var parts=list.split("\n----\n");
for (var p=0; p<parts.length; p++) {
var lines=parts[p].split("\n");
var mime=lines.shift(); // 1st line=MIME type
var match=lines.shift(); // 2nd line=matching extensions
if (match.indexOf(ext)!=-1) return mime;
}
return def;
},
createAttachmentTiddler:
function (theSource, theDate, theNotes, theTags, theTitle,
useData, useLocal, useURL, theLocal, theURL, theMIMEType, noshow) {
// encode the data
if (useData) {
if (!theMIMEType.length) {
alert(this.MIMEErr);
form.MIMEType.selectedIndex=1; form.MIMEType.focus();
return false;
}
var theData = this.readFile(theSource); if (!theData) { return false; }
displayMessage('encoding '+theSource);
var theEncoded = this.encodeBase64(theData);
displayMessage('file size='+theData.length+' bytes, encoded size='+theEncoded.length+' bytes');
}
// generate tiddler and refresh
var theText = "";
theText +=theSource.length?this.sourceReport.format([theSource]):this.nosourceReport;
theText +=this.dateReport.format([theDate,config.options.txtUserName]);
theText +=theNotes.length?this.notesReport.format([theNotes]):"";
theText +=useData?this.dataReport.format([theTitle,theMIMEType,theData.length,theEncoded.length]):this.nodataReport;
theText +=useLocal?this.localReport.format([theLocal,theLocal.replace(/\\/g,"/")]):this.nolocalReport;
theText +=useURL?this.URLReport.format([theURL]):this.noURLReport;
theText +=(theMIMEType.substr(0,5)=="image")?this.imageReport.format([theTitle]):"";
theText +=useData?this.dataBlock.format([theMIMEType,theEncoded]):"";
store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);
var panel=document.getElementById("attachPanel"); if (panel) panel.style.display="none";
if (!noshow) { story.displayTiddler(null,theTitle); story.refreshTiddler(theTitle,null,true); }
displayMessage('attached "'+theTitle+'"');
return true;
},
//}}}
// // base64 conversion
//{{{
encodeBase64:
function (theData) {
if (!theData) return null;
// encode as base64
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var out="";
var chr1,chr2,chr3="";
var enc1,enc2,enc3,enc4="";
for (var count=0,i=0; i<theData.length; ) {
chr1=theData.charCodeAt(i++);
chr2=theData.charCodeAt(i++);
chr3=theData.charCodeAt(i++);
enc1=chr1 >> 2;
enc2=((chr1 & 3) << 4) | (chr2 >> 4);
enc3=((chr2 & 15) << 2) | (chr3 >> 6);
enc4=chr3 & 63;
if (isNaN(chr2)) enc3=enc4=64;
else if (isNaN(chr3)) enc4=64;
out+=keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);
chr1=chr2=chr3=enc1=enc2=enc3=enc4="";
count+=4; if (count>60) { out+='\n'; count=0; } // add line break every 60 chars for readability
}
return out;
},
decodeBase64: function(input) {
var out="";
var chr1,chr2,chr3;
var enc1,enc2,enc3,enc4;
var i = 0;
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
input=input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
enc1=keyStr.indexOf(input.charAt(i++));
enc2=keyStr.indexOf(input.charAt(i++));
enc3=keyStr.indexOf(input.charAt(i++));
enc4=keyStr.indexOf(input.charAt(i++));
chr1=(enc1 << 2) | (enc2 >> 4);
chr2=((enc2 & 15) << 4) | (enc3 >> 2);
chr3=((enc3 & 3) << 6) | enc4;
out=out+String.fromCharCode(chr1);
if (enc3!=64) out=out+String.fromCharCode(chr2);
if (enc4!=64) out=out+String.fromCharCode(chr3);
} while (i<input.length);
return out;
},
//}}}
// // I/O functions
//{{{
readFile: // read local BINARY file data
function(filePath) {
if(!window.Components) { return null; }
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { alert("access denied: "+filePath); return null; }
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(filePath); } catch(e) { alert("cannot read file - invalid path: "+filePath); return null; }
if (!file.exists()) { alert("cannot read file - not found: "+filePath); return null; }
var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
inputStream.init(file, 0x01, 00004, null);
var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
bInputStream.setInputStream(inputStream);
return(bInputStream.readBytes(inputStream.available()));
},
//}}}
//{{{
writeFile:
function(filepath,data) {
// TBD: decode base64 and write BINARY data to specified local path/filename
return(false);
},
//}}}
//{{{
askForFilename: // for FF3 fixup
function(target) {
var msg=config.messages.selectFile;
if (target && target.title) msg=target.title; // use target field tooltip (if any) as dialog prompt text
// get local path for current document
var path=getLocalPath(document.location.href);
var p=path.lastIndexOf("/"); if (p==-1) p=path.lastIndexOf("\\"); // Unix or Windows
if (p!=-1) path=path.substr(0,p+1); // remove filename, leave trailing slash
var file=""
var result=window.mozAskForFilename(msg,path,file,true); // FF3 FIXUP ONLY
if (target && result.length) // set target field and trigger handling
{ target.value=result; target.onchange(); }
return result;
}
};
//}}}
//{{{
if (window.mozAskForFilename===undefined) { // also defined by CoreTweaks (for ticket #604)
window.mozAskForFilename=function(msg,path,file,mustExist) {
if(!window.Components) return false;
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, mustExist?nsIFilePicker.modeOpen:nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel)
var result=picker.file.persistentDescriptor;
}
catch(ex) { displayMessage(ex.toString()); }
return result;
}
}
//}}}
/***
|Name|AttachFilePluginFormatters|
|Source|http://www.TiddlyTools.com/#AttachFilePluginFormatters|
|Version|3.7.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1.3|
|Type|plugin|
|Requires||
|Overrides|'image' and 'prettyLink' formatters, TiddlyWiki.prototype.getRecursiveTiddlerText|
|Description|run-time library for displaying attachment tiddlers|
This plugin provides "stand-alone" processing for //rendering// attachment tiddlers created by [[AttachFilePlugin]]. Attachment tiddlers are tagged with<<tag attachment>>and contain binary file content (e.g., jpg, gif, pdf, mp3, etc.) that has been stored directly as base64 text-encoded data or can be loaded from external files stored on a local filesystem or remote web server.
NOTE: This plugin does not include the "control panel" and supporting functions needed to //create// new attachment tiddlers. Those features are provided by [[AttachFilePlugin]], which can be installed while building your document, and then safely omitted to reduce the overall file size when you publish your finished document (assuming you don't intend to create any additional attachment tiddlers in that document)
!!!!!Formatters
<<<
This plugin extends the behavior of the following TiddlyWiki core "wikify()" formatters:
* embedded images: {{{[img[tooltip|image]]}}}
* linked embedded images: {{{[img[tooltip|image][link]]}}}
* external/"pretty" links: {{{[[label|link]]}}}
''Please refer to AttachFilePlugin (source: http://www.TiddlyTools.com/#AttachFilePlugin) for additional information.''
<<<
!!!!!Revisions
<<<
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.10.29 [3.7.0] more code reduction: removed upload handling from AttachFilePlugin (saves ~7K!)
2007.10.28 [3.6.0] removed duplicate formatter code from AttachFilePlugin (saves ~10K!) and updated documentation accordingly. This plugin ([[AttachFilePluginFormatters]]) is now //''required''// in order to display attached images/binary files within tiddler content.
2006.05.20 [3.4.0] through 2007.03.01 [3.5.3] sync with AttachFilePlugin
2006.05.13 [3.2.0] created from AttachFilePlugin v3.2.0
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePluginFormatters= {major: 3, minor: 7, revision: 0, date: new Date(2007,10,28)};
//}}}
//{{{
if (config.macros.attach==undefined) config.macros.attach= { };
//}}}
//{{{
if (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {
var tiddler = store.getTiddler(title);
if (tiddler==undefined || tiddler.tags==undefined) return false;
return (tiddler.tags.indexOf("attachment")!=-1);
}
//}}}
//{{{
// test for local file existence
// Returns true/false without visible error display
// Uses Components for FF and ActiveX FSO object for MSIE
if (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(theFile) {
var found=false;
// DEBUG: alert('testing fileExists('+theFile+')...');
if(window.Components) {
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { return false; } // security access denied
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(theFile); }
catch(e) { return false; } // invalid directory
found = file.exists();
}
else { // use ActiveX FSO object for MSIE
var fso = new ActiveXObject("Scripting.FileSystemObject");
found = fso.FileExists(theFile)
}
// DEBUG: alert(theFile+" "+(found?"exists":"not found"));
return found;
}
//}}}
//{{{
if (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {
// extract embedded data, local and remote links (if any)
var startmarker="---BEGIN_DATA---\n";
var endmarker="\n---END_DATA---";
var pos=0; var endpos=0;
var text = store.getTiddlerText(title);
var embedded="";
var locallink="";
var remotelink="";
// look for embedded data, convert to data: URI
if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)
embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\n/g,'');
if (embedded.length && !config.browser.isIE)
return embedded; // use embedded data if any... except for IE, which doesn't support data URI
// no embedded data... fallback to local/remote reference links...
// look for 'attachment link markers'
if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)
locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)
remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
// document is being served remotely... use remote URL (if any) (avoids security alert)
if (remotelink.length && document.location.protocol!="file:")
return remotelink;
// local link only... return link without checking file existence (avoids security alert)
if (locallink.length && !remotelink.length)
return locallink;
// local link, check for file exist... use local link if found
if (locallink.length) {
if (this.fileExists(getLocalPath(locallink))) return locallink;
// maybe local link is relative... add path from current document and try again
var pathPrefix=document.location.href; // get current document path and trim off filename
var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\");
if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;
}
// no embedded data, no local (or not found), fallback to remote URL (if any)
if (remotelink.length)
return remotelink;
return ""; // attachment URL doesn't resolve
}
//}}}
//{{{
if (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {
if (this.initialized) return;
// find the formatter for "image" and replace the handler
for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);
if (i<config.formatters.length) config.formatters[i].handler=function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link
{
var e = w.output;
if(lookaheadMatch[5])
{
var link = lookaheadMatch[5];
// ELS -------------
var external=config.formatterHelpers.isExternalLink(link);
if (external)
{
if (config.macros.attach.isAttachment(link))
{
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
}
else
e = createExternalLink(w.output,link);
}
else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
// ELS -------------
addClass(e,"imageLink");
}
var img = createTiddlyElement(e,"img");
if(lookaheadMatch[1])
img.align = "left";
else if(lookaheadMatch[2])
img.align = "right";
if(lookaheadMatch[3])
img.title = lookaheadMatch[3];
img.src = lookaheadMatch[4];
// ELS -------------
if (config.macros.attach.isAttachment(lookaheadMatch[4]))
img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);
// ELS -------------
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
//}}}
//{{{
// find the formatter for "prettyLink" and replace the handler
for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);
if (i<config.formatters.length) {
config.formatters[i].handler=function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e;
var text = lookaheadMatch[1];
if(lookaheadMatch[3]) {
// Pretty bracketted link
var link = lookaheadMatch[3];
if (config.macros.attach.isAttachment(link)) {
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title=config.macros.attach.linkTooltip+link;
}
else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))
? createExternalLink(w.output,link)
: createTiddlyLink(w.output,link,false,null,w.isStatic);
} else {
e = createTiddlyLink(w.output,text,false,null,w.isStatic);
}
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
} // if "prettyLink" formatter found
this.initialized=true;
}
//}}}
//{{{
config.macros.attach.init_formatters(); // load time init
//}}}
//{{{
if (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {
TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;
TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {
return config.macros.attach.isAttachment(title)?
config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText.apply(this,arguments);
}
}
//}}}
{{overflow small{<<tiddler ToggleRightSidebar with: "Sidebar »">>
<<forEachTiddler
where 'tiddler.tags.contains("systemConfig")'
sortBy 'tiddler.title.toLowerCase()'
write '"|[[" + tiddler.title +"]]" + "|[["+tiddler.text.length+"]]" + "|[[" +tiddler.modified.formatString("YYYY.0MM.0DD") + "]]|"
+ store.getTiddlerSlice(tiddler.title, "Author") + "|"
+ store.getTiddlerSlice(tiddler.title, "Version") + "|"
+ store.getTiddlerSlice(tiddler.title, "CoreVersion")+"|\n"'
begin '"|sortable|k\n"
+"|>|>|>|>|>|!Plugin Information from Headers|h\n"
+ "|!Plugin|!Size|!Modified|!Author|!Version|!CoreVersion|h\n"'
>>
}}}
window.oldDisplayMessage = displayMessage;
displayMessage = function (text,linkText)
{ oldDisplayMessage(text,linkText);
setTimeout( 'clearMessage()', 3000 );}
/%
|Name|AutoRefresh|
|Source|http://www.TiddlyTools.com/#AutoRefresh|
|Version|0.6.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|enable/disable auto-refresh of selected content to force/prevent re-rendering when tiddler changes occur|
usage:
<<tiddler AutoRefresh with: on id>>
where:
mode - (optional) is one of:
off (or disable) - prevent refresh of rendered content (except when PageTemplate is changed!)
on (or enable)- re-render content whenever corresponding tiddler source is changed
force - re-render content whenever ANY tiddler content is changes (or refreshDisplay() is triggered)
id - (optional)
is a unique DOM element identifier on which to operate.
If not specified, the current tiddler (or containing parent if not in a tiddler) is used.
%/<script>
var here=story.findContainingTiddler(place);
if (here) { // in a tiddler, get containing viewer element
var here=place; while (here && here.className!='viewer') here=here.parentNode;
if (!here) return; // no 'viewer' element (perhaps a custom template?)
}
else here=place.parentNode; // not in a tiddler, use immediate parent container
// if DOM id param, get element by ID instead of using container
if ("$2"!="$"+"2") var here=document.getElementById("$2");
if (!here) return; // safety check
var mode="$1"; if (mode=="$"+"1") mode="on";
switch (mode.toLowerCase()) {
case 'on':
case 'enable':
case 'force':
var title=here.getAttribute("tiddler");
if (!title) { // find source tiddler title
var tid=story.findContainingTiddler(place);
if (!tid) return; // can't determine source tiddler
title=tid.getAttribute("tiddler");
}
here.setAttribute("tiddler",title);
here.setAttribute("refresh","content");
here.setAttribute("force",(mode=='force')?"true":"");
break;
case 'off':
case 'disable':
here.setAttribute("refresh","");
here.setAttribute("force","");
break;
}
</script>
''Button'' {{makeborder{<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="''bold''" accesskey="B"
onclick="config.quickEdit.wrapSelection(this,'\x27\x27','\x27\x27'); return false;"
> B </a></html>}}} ''action:'' Puts double single quotes around highlighted text """''bold''""" e.g.''bold''
''Button'' {{makeborder{<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="//italics//" accesskey="I"
onclick="config.quickEdit.wrapSelection(this,'//','//'); return false;"
> I </a></html>}}} ''action:'' Puts double forward slashes around highlighted text """//italic//""" e.g.//italic//
''Button'' {{makeborder{<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="__underline__" accesskey="U"
onclick="config.quickEdit.wrapSelection(this,'__','__'); return false;"
> U </a></html>}}} ''action:'' Puts double underscore around highlighted text """__text__""" e.g. __underline__
''Button'' {{makeborder{<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="--strikethrough--" accesskey="S"
onclick="config.quickEdit.wrapSelection(this,'--','--'); return false;"
> S </a></html>}}} ''action:'' Puts double hyphen around highlighted text """--text--""" e.g. --strikethrough--
<<timeline better:true onlyTag:Instructions sortBy:created>>
<script label="PluginDesc" title="create a list of all installed plugins">
var plugins=window.store.getTaggedTiddlers('systemConfig','title');
var out='|>|>|>|>|>|bgcolor:#abf;color:#006;Plugin Description - Delete this tiddler - recommended\<\<toolbar deleteTiddler>>? |h\n';
out+='|bgcolor:#abf;!Plugin|bgcolor:#abf;!Modified|bgcolor:#abf;!Size|bgcolor:#abf;!Description|bgcolor:#abf;!Version|bgcolor:#abf;!CoreVersion|h\n|sortable|k\n';
out+=plugins.map(function(t) {
return '|'+'[['+t.title+']]'
+'|'+t.modified.formatString('YYYY.0MM.0DD')
+'| '+t.text.length
+'|'+store.getTiddlerSlice(t.title,'Description')
+'|'+store.getTiddlerSlice(t.title,'Version')
+'|'+store.getTiddlerSlice(t.title,'CoreVersion')+'|';
}).join('\n');
config.shadowTiddlers.PluginDesc=out;
story.displayTiddler(null,'PluginDesc');
config.shadowTiddlers.PluginDesc=null;
</script>
Click and drag the ~PluginDesc bookmarklet above to your Firefox Boolmarks Toolbar and you will be able to view the details of all plugins on any ~TiddlyWiki.
--If there are any alphabetical predecessors before a tagged 'closed' folder it doesn't obey the closed tag--
--#A third level bug i.e. System>Plugins>Author--
--##State--
--###System tagged closed--
--###Plugin tagged closed--
--###Author (not tagged closed) somehow obtains an unwanted folder and is closed--
Resolved upon retagging and refreshing. At this point I added the AutoRefresh script
It appears the the behaviour with antisesame is the same whether it is started with collapsed:false or collapsed:true
<<<
''Treeview.23 using persist options breaks Crome and ~IE'' if you try to access
{{{<script src="http://www.dynamicdrive.com/dynamicindex1/treeview/lib/jquery.cookie.js" type="text/javascript"></script>}}} from ~DynamicDrive
Chrome error similar in ~IE7 as well.
Error while executing macro {{{<<treeview2>>}}}
TypeError: Object function (E,F){return new o.fn.init(E,F)} has no method 'cookie'
<<<
''__The solution__'' is to make the script 'as is' a ~TiddlyWiki plugin [[Cookie plugin]]
Put it in a tiddler tagged systemConfig save and reload.
Works fine in Firefox
--Chrome - Top level (+) missing--
~IE7 - Top level (+) and open folders, line missing
merge(config.macros.saveChanges,{
label: "save",
prompt: "Save all tiddlers to create a new TiddlyWiki",
accessKey: "S"});
merge(config.macros.newTiddler,{
label: "tiddler",
prompt: "Create a new tiddler",
title: "New Tiddler",
accessKey: "N"});
merge(config.macros.newJournal,{
label: "journal",
prompt: "Create a new tiddler from the current date and time",
accessKey: "J"});
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{
handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,
handler: function(event,src,title) {
this.handler_mptw_orig_closeUnsaved(event,src,title);
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
story.closeTiddler(title,true);
return false;
}
});
//}}}
''Button tooltip:'' text/background color - """@@color:#RGB;background-color:#RGB;...@@"""
This button {{makeborder{<<tiddler QuickEdit_color>>}}} allows you to choose the color of the text and its background color. Simply highlight the text to change and choose the colors from the dropdown options.
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #eee
PrimaryMid: #107
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
You can build any number of Treeview menus. A Treeview menu can be a stand-alone and/or a subTopic of another Treeview menu
Tags are used to build Treeview menus. Each level has it's own tag or tags.
Following the Topic building +++[instructions]<<tiddler [[2:MainMenuSetup]]>>=== each level is automatically tagged to build a organized hierarchy.
However by choosing the right tag from one menu you can insert another Treeview menu anywhere within its hierarchy. You can view, add or remove tags with the Tags: ▾ button on the tiddlers toolbar. ( Great care must be taken not to create recursive combinations using this method! With automatic saving set you may put your ~TiddlyWiki into an unrecoverable state.)
{{textcenter{
~~<script>var today=new Date();document.write('<font style="color:#666">'+'URL='+window.location+'</font>')</script>~~
@@color:#666;^^<script>
var tiddlers=store.getTiddlers("modified");
var last=tiddlers[tiddlers.length-1];
var when=last.modified.formatString("YYYY/0MM/0DD at 0hh:0mm:0ss");
return "Last Modified: " +when
</script>^^@@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
var path = options.path ? '; path=' + options.path : '';
var domain = options.domain ? '; domain=' + options.domain : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
----
#To create subTopics: Click on the menu item that you want a subTopic under.
#Then __in its toolbar__ click @@color:#008;'make subtopic'@@. (Note: This simply makes new tiddler tagged with title of the original tiddler and a script makes it a subTopic of that tiddler)
#The new subTopic will automatically be added to the menu.
<<newTiddler label:"New Master Topic" title:'MyNewMasterTopic' text:{{store.getTiddlerText('NewMasterTopic')}} tag:''>>
<<newTiddler label:"New Top Level Topic" title:'A-New-Top-Level-Topic' text:{{store.getTiddlerText('NewTopLevelTopic')}} tag:''>>
<<tiddler CreatingANewTopLevelTopic##instructions>>
/%
!instructions
#''To create a'' new top level topic click ''New Top Level Button'' button below.
<<tiddler CreateNewTopLevelTopic>>
## ''Change the name of the tiddler'' ~A-New-Top-Level-Topic to __your own topic name__.
## ''In the body of the tiddler replace'' NEWTOPLEVELTOPICHERE (2 places) with __your own topic name__ as above.
''Using Treeview''
<<<
Add your new topic to MainMenu like this:
{{{<<treeview1 "YourOwnTopicName">>}}}
If your topic has spaces use brackets like this:
{{{<<treeview1 [[Your Own Topic Name]]>>}}}
<<<
''Using standard ~TWT-Notes menus''
<<<
Add your new topic to MainMenu like this:
{{{<<tiddler "YourOwnTopicName">>}}}
If your topic has spaces use brackets like this:
{{{<<tiddler [[Your Own Topic Name]]>>}}}
<<<
----
#To create subTopics: Click on the menu item that you want a subTopic under.
#Then __in its toolbar__ click @@color:#008;'make subtopic'@@. (Note: This simply makes new tiddler tagged with title of the original tiddler and a script makes it a subTopic of that tiddler)
#The new subTopic will automatically added to the menu.
!end
%/
Type the text for 'Other instructions'
/***
|''Name''|DeprecatedFunctionsPlugin|
|''Description''|Provides support for functions removed from the TiddlyWiki core|
|''Version''|1.0.0|
|''Status''|stable|
|''Source''|http://www.tiddlywiki.com/coreplugins.html#DeprecatedFunctionsPlugin|
|''~CodeRepository:''|http://svn.tiddlywiki.org/Trunk/association/plugins/DeprecatedFunctionsPlugin/DeprecatedFunctionsPlugin.js |
|''License''|[[BSD open source license]]|
|''~CoreVersion''|2.3.0|
|''Feedback''|[[TiddlyWiki community|http://groups.google.com/group/TiddlyWiki]] |
|''Keywords''|legacySupport|
!Code
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};
//--
//-- Deprecated code
//--
// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};
// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,"\r");
createTiddlyElement(w.output,"pre",null,null,text);
w.nextMatch = lookaheadRegExp.lastIndex;
}
};
// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
createTiddlyElement(place,"br");
};
// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
var i = this.indexOf(item);
return i == -1 ? null : i;
};
// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
return store.getLoader().internalizeTiddler(store,this,title,divRef);
};
// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
return store.getSaver().externalizeTiddler(store,this);
};
// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
return store.allTiddlersAsHtml();
}
// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
refreshPageTemplate(title);
}
// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
story.displayTiddlers(srcElement,titles,template,animate);
}
// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
story.displayTiddler(srcElement,title,template,animate);
}
// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;
// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");
}
//}}}
{{overflow small{<<tiddler ToggleRightSidebar with: "Sidebar »">>
<<forEachTiddler
where 'tiddler.tags.contains("systemConfig")'
sortBy 'tiddler.title.toLowerCase()'
write '"|[[" + tiddler.title +"]]" + "|[["+tiddler.text.length+"]]" + "|[[" +tiddler.modified.formatString("YYYY.0MM.0DD") + "]]|"
+ store.getTiddlerSlice(tiddler.title, "Description") + "|"
+ store.getTiddlerSlice(tiddler.title, "Version") + "|"
+ store.getTiddlerSlice(tiddler.title, "CoreVersion")+"|\n"'
begin '"|sortable|k\n"
+"|>|>|>|>|>|!Plugin Information from Headers|h\n"
+ "|!Plugin|!Size|!Modified|!Description|!Version|!CoreVersion|h\n"'
>>
}}}
/%
|Name|DigitalClock|
|Source|http://www.TiddlyTools.com/#DigitalClock|
|Version|1.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|display current time with automatic LIVE update|
Usage: <<tiddler DigitalClock with: format tick>>
where 'format' is any TiddlyWiki date/time formatting string
and 'tick' is the time in seconds between display updates (default=1sec)
For example, use:
<< ... "0hh:0mm" 60>>
to show hours and minutes only, updated once per minute
%/<script>
window.DigitalClock_tick=function(id){
var e=document.getElementById(id); if (!e) return;
e.title='click to '+(e.paused?'RESUME':'PAUSE')+' clock display';
if (e.paused) return;
e.innerHTML=new Date().formatString(e.fmt);
setTimeout('window.DigitalClock_tick('+id+')',e.tick*1000);
}
var e=createTiddlyElement(place,'a',new Date().getTime()+Math.random());
e.onclick=function(){this.paused=!this.paused;window.DigitalClock_tick(this.id);}
e.style.cursor='pointer';
e.fmt=('$1'=='$'+'1')?'hh12:0mm:0ss am':'$1';
e.tick=('$2'=='$'+'2')?'1':'$2';
window.DigitalClock_tick(e.id);
</script>
{{textleft{
/%
|Name|ShowLocalDirectory|
|Source|http://www.TiddlyTools.com/#ShowLocalDirectory|
|Version|1.1.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|view local filesystem directory listings|
usage: <<tiddler ShowLocalDirectory>> or <<tiddler ShowLocalDirectory with: localpath format>>
where:
"localpath" is the desired directory to view, using system-specific file naming conventions,
or keyword "here" to view the current document directory.
and
"format" is a keyword that determines the type of output produced, and is one of:
"plain"
show fully-qualified path/filenames AS-IS, without any additional formatting.
"list"
show fully-qualified path/filenames using formatted "PrettyLinks", so that the
local system-specific filename can be *displayed* while linking to a valid
system-independent "file:" URL for browser navigation.
"directory" (default when no parameter)
show header followed by a formatted table, containing PrettyLinks for
filenames, filesizes (in bytes), and modification dates, plus a summary
footer reporting the total file and byte counts.
%/<script>
// FILESYSTEM/FOLDER UTILITY FUNCTIONS
window.getCurrentFolder=function() {
var h=document.location.href;
return getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf("/")+1)));
}
window.getParentFolder=function(cwd) {
var lastchar=cwd.substr(cwd.length-1,1);
if (lastchar=="/" || lastchar=="\\") cwd=cwd.substr(0,cwd.length-1);
var pos=cwd.lastIndexOf("/"); if (pos==-1) pos=cwd.lastIndexOf("\\");
return pos!=-1?cwd.substr(0,pos+1):null;
}
window.askForFolder=function(cwd) {
if (config.browser.isIE) {
try { // XPSP2 IE only -- // TBD: use "browserForFolder" instead of "select a file"
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.InitialDir=cwd.replace(/\//g,"\\");
s.FileName=''; s.Filter='All files|*.*|'; s.FilterIndex=1;
var path=s.showOpen()?s.FileName.substr(0,s.FileName.lastIndexOf("\\")+1):null;
}
catch(e) { var path=prompt("Enter a directory path:",cwd.replace(/\//g,"\\")); }
} else { // FireFox
// get security access
if(!window.Components) return;
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { alert(e.description?e.description:e.toString()); return; }
// prompt to select a different folder
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, "Select a folder", nsIFilePicker.modeGetFolder);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
// if starting directory is not valid, use current document directory
try { thispath.initWithPath(cwd.replace(/\\/g,"/")); }
catch(e) { thispath.initWithPath(getLocalPath(decodeURIComponent(document.location.href.substr(0,document.location.href.lastIndexOf("/")+1)))); }
picker.displayDirectory=thispath;
picker.appendFilters(nsIFilePicker.filterAll); picker.defaultString=''; picker.defaultExtension='';
var path=picker.show()!=nsIFilePicker.returnCancel?picker.file.persistentDescriptor:null;
}
}
window.getFileList=function(cwd) { // return browser-independent array of file info (path,name,size,isFolder,url,modified)
var files=[];
if (config.browser.isIE) {
cwd=cwd.replace(/\//g,"\\");
// IE uses ActiveX to read filesystem info
var fso = new ActiveXObject("Scripting.FileSystemObject");
if(!fso.FolderExists(cwd)) return [];
var dir=fso.GetFolder(cwd);
for(var f=new Enumerator(dir.SubFolders); !f.atEnd(); f.moveNext())
files.push({ path:f.item().path, name:f.item().name, size:f.item().size,
url:"file:///"+f.item().path.replace(/\\/g,"/"), isFolder:fso.FolderExists(f.item().path),
modified:new Date(f.item().DateLastModified).formatString("YYYY.0MM.0DD 0hh:0mm:0ss")});
for(var f=new Enumerator(dir.Files); !f.atEnd(); f.moveNext())
files.push({ path:f.item().path, name:f.item().name, size:f.item().size,
url:"file:///"+f.item().path.replace(/\\/g,"/"), isFolder:fso.FolderExists(f.item().path),
modified:new Date(f.item().DateLastModified).formatString("YYYY.0MM.0DD 0hh:0mm:0ss")});
} else {
// FireFox (mozilla) uses "components" to read filesystem info
// get security access
if(!window.Components) return;
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { alert(e.description?e.description:e.toString()); return null; }
// open/validate directory
var file=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(cwd); } catch(e) { return []; }
if (!file.exists() || !file.isDirectory()) { return []; }
var folder=file.directoryEntries;
while (folder.hasMoreElements()) {
var f=folder.getNext().QueryInterface(Components.interfaces.nsILocalFile);
if (f instanceof Components.interfaces.nsILocalFile)
files.push({path:f.path, name:f.leafName, size:f.fileSize,
isFolder:f.isDirectory(), url:"file:///"+f.path.replace(/\\/g,"/"),
modified:new Date(f.lastModifiedTime).formatString("YYYY.0MM.0DD 0hh:0mm:0ss")});
}
}
return files;
}
</script>{{hidden small{
<script label="select a folder...">
var path=askForFolder(config.options.txtLocalDirectory);
if (path) { // not cancelled by user...
config.options.txtLocalDirectory=path;
story.refreshTiddler(story.findContainingTiddler(place).getAttribute("tiddler"),null,true);
}
return false;
</script> | <script label="use document location...">
config.options.txtLocalDirectory=getCurrentFolder();
story.refreshTiddler(story.findContainingTiddler(place).getAttribute("tiddler"),null,true);
return false;
</script> | <script label="refresh list...">
story.refreshTiddler(story.findContainingTiddler(place).getAttribute("tiddler"),null,true);
return false;
</script>
----
}}}<script>
// default to current location if not already set
if (config.options.txtLocalDirectory==undefined) config.options.txtLocalDirectory=getCurrentFolder();
// get working directory from tiddler params (if specified)
var cwd=config.options.txtLocalDirectory; // use current selected directory
if ("$1"=="$"+"1") place.lastChild.style.display="block"; // show interactive 'select a folder' commands
else if ("$1".toLowerCase()=="here") cwd=getCurrentFolder(); // "here" = use document directory
else cwd="$1"; // use path param as specified
// get file list
var files=getFileList(cwd);
if (!files.length) { // directory could not be read, maybe relative... try again...
var fixup=getCurrentFolder()+cwd;
var files=getFileList(fixup);
if (!files.length) return "{{errorButton{error: can't open "+cwd+"}}}";
else cwd=fixup;
}
// set output formats
var header=""; var item=""; var folderitem=""; var folderscript=""; var footer="";
switch ("$2") {
case "plain": item=folderitem="<nowiki>%0</nowiki>\n"; break;
case "list": item=folderitem="[[%1|file:///%0]]\n"; break;
default:
var header="Index of %0\n^^(as of %1)^^\n|filename | size |modified|h\n";
var item="|[[%1|%2]] | %3 |%4|\n";
// script for opening another directory via embedded link
var folderscript='<'+'script label="%1" title="open %1...">';
folderscript+=' config.options.txtLocalDirectory="%0";';
folderscript+=' story.refreshTiddler(story.findContainingTiddler(place).getAttribute("tiddler"),null,true);';
folderscript+=' return false;';
folderscript+=' </'+'script>';
var folderitem='|'+folderscript+' | |%4|\n';
var footer="|>|>|>| !Total of %0 bytes in %1 files |f\n|borderless sortable|k\n";
var showDirectory=true;
break;
}
// generate header (if any)
var out=header.format([cwd,new Date().toLocaleString()]);
// add "parent folder" (if any) - for directory listings
if (showDirectory) {
var p=getParentFolder(cwd);
if (p) files.unshift({path:p, name:"(parent folder)", size:0, isFolder:true, url:"file:///"+p.replace(/\\/g,"/"),
modified:new Date().formatString("YYYY.0MM.0DD 0hh:0mm:0ss")});
}
// for each file, generate a line item (and add up total size)
var total=0;
for (var i=0; i<files.length; i++) {
var line=(files[i].isFolder?folderitem:item).format([files[i].path,files[i].name,files[i].url,files[i].size,files[i].modified]);
if (showDirectory) line=line.replace(/\\/g,"\\\\"); // fixup for PC-style file paths embedded in 'folderscript'
if (!files[i].isFolder) total+=files[i].size;
out+=line;
}
// generate the summary (if any)
out+=footer.format([total,files.length]);
return out;
</script>
}}}
/***
|''Name:''|DoBackupMacro|
|''Version:''|2.0 (9-Apr-2006)|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
!Description
Creates a button which allows you to backup your TiddlyWiki on demand.
!Usage
Add the following command to your SideBarOptions tiddler:
{{{<<doBackup>>}}}
!Revision History
* Original by [[Jack]] 9-Apr-2006
!To Do
* List non-explicit links (e.g. from tagging macro)
!Code
***/
//{{{
version.extensions.doBackup= {major: 2, minor: 0, revision: 0, date: new Date("Apr 9, 2006")};
config.macros.doBackup={label: "backup", prompt: "Backup this TiddlyWiki"}
config.macros.doBackup.handler = function(place)
{
if(!readOnly)
createTiddlyButton(place,this.label,this.prompt,function ()
{doBackup(); return false;},null,null,this.accessKey);
}
doBackup = function() {
var optSaveBackups = config.options.chkSaveBackups
config.options.chkSaveBackups = true
saveChanges()
config.options.chkSaveBackups = optSaveBackups
}
//}}}
<script label="edit a tiddler">
var title=prompt("Enter the title of a tiddler to edit (case sensitive)");
while (title && title.length && !store.tiddlerExists(title)) {
displayMessage("The tiddler '%0' doesn't exist".format([title]));
var title=prompt("Please enter a tiddler title",title);
}
if (!title||!title.length) return; /* cancelled by user */
story.displayTiddler(null,title,2);
</script>
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div style='align:left;' ><div class='editor' macro='edit tags'></div></div><div macro='tiddler QuickEditToolbar'></div>
<div class='editor' macro='edit text'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div macro='showWhen tiddler.tags.contains("") || tiddler.title =="$MyNewMasterTopic"'>[[TopicNote]]</div>
<div macro='showWhen tiddler.tags.contains("") || tiddler.title =="$New Note"'>[[NoteNote]]</div>
<!--}}}-->
[img[tooltip|file.gif][link]][img[tooltip|folder-closed.gif][link]][img[tooltip|folder.gif][link]]
[img[tooltip|treeview-red.gif][link]]
[img[tooltip|treeview-black.gif][link]]
[img[tooltip|treeview-default.gif][link]]
[img[tooltip|treeview-famfamfam.gif][link]]
[img[tooltip|treeview-gray.gif][link]]
[img[tooltip|treeview-black-line.gif][link]][img[tooltip|treeview-famfamfam-line.gif][link]][img[tooltip|treeview-gray-line.gif][link]][img[tooltip|treeview-red-line.gif][link]]
''Button tooltip:'' embed an equation
This button {{makeborder{<<tiddler QuickEdit_equation>>}}} Opens the ~CodeCogs Equation Editor.
''When a tiddler is in edit mode'' and an equation has been constructed clicking ''Copy to Document'' in the editor will insert the equation into the tiddler at the cursor position.
/***
|Name|EquationEditorPlugin|
|Source|http://twhelp.tiddlywiki.com/#EquationEditorPlugin|
|Version|1.0.0|
|Author|Morris Gray - twhelp.tiddlywiki.com & Will Bateman - CodeCogs.com|
|License|BSD open source license.|
|~CoreVersion|2.2|
|Type|script|
|Requires| http://twhelp.tiddlywiki.com/#QuickEdit_equationButton See below|
|Overrides|config.macros.edit.handler and config.views.editor.defaultText|
|Description|Plugin for toolbar button for equation editing|
----
''Requirements for all usages:''
Put the following in ~MarkupPreHead
{{{
<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
}}}
''Requirement:''
For use with QuickEditPlugin
QuickEdit_equationButton
Usage: Insert this into QuickEditToolbar: {{{%/<<tiddler QuickEdit_equation>>/%}}}
''Requirement:''
For use without QuickEditPlugin
QuickEdit_equationButton
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_equation'></span>
!Code
----
***/
config.views.editor.defaultText = "";
config.macros.edit.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var field = params[0];
var rows = params[1] || 0;
var defVal = params[2] || '';
if((tiddler instanceof Tiddler) && field) {
story.setDirty(tiddler.title,true);
var e,v;
if(field != "text" && !rows) {
e = createTiddlyElement(null,"input");
if(tiddler.isReadOnly())
e.setAttribute("readOnly","readOnly");
e.setAttribute("edit",field);
e.setAttribute("type","text");
e.value = store.getValue(tiddler,field) || defVal;
e.setAttribute("size","40");
e.setAttribute("autocomplete","off");
place.appendChild(e);
} else {
var wrapper1 = createTiddlyElement(null,"fieldset",null,"fieldsetFix");
var wrapper2 = createTiddlyElement(wrapper1,"div");
e = createTiddlyElement(wrapper2,"textarea");
if(tiddler.isReadOnly())
e.setAttribute("readOnly","readOnly");
e.value = v = store.getValue(tiddler,field) || defVal;
rows = rows || 10;
var lines = v.match(/\n/mg);
var maxLines = Math.max(parseInt(config.options.txtMaxEditRows),5);
if(lines != null && lines.length > rows)
rows = lines.length + 5;
rows = Math.min(rows,maxLines);
e.setAttribute("rows",rows);
e.setAttribute("edit",field);
e.id="eqntarget";
place.appendChild(wrapper1);
}
return e;
}
};
@@color:#C06;''» »'' @@ Tabs excluded From Lists
----
<script>
// get all tiddlers tagged with "excludeLists"
var tids=store.getTaggedTiddlers("excludeLists");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("excludeLists")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
window.onClickTag_mptw_orig.apply(this,arguments);
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
// Thanks Saq, you're a genius :)
var popup = Popup.stack[Popup.stack.length-1].popup;
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
return false;
}
//}}}
@@color:#C06;''» »'' @@ <<tiddler EditATiddler>>
----
|>|<<search>>|
|<<option chkSearchTitles>> Titles <<option chkSearchText>> Text <<option chkSearchTags>>Tags<<option chkHoldSearches>> Hold |
|borderlessL|k
----
|>|@@color:#04b;font-weight:bold;goto ''» »'' @@<<gotoTiddler>>|
|borderlessL|k
''Button tooltip:'' set font-family CSS attribute - """@@font-family:facename;...@@"""
This button {{makeborder{<<tiddler QuickEdit_font>>}}} allows you to choose the font family from a dropdown. It also allows you to add or delete font families by editing the choices.
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|© 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description
Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.
''Syntax:''
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].
!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features:
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen)
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features:
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs:
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features:
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version
!Code
***/
//{{{
//============================================================================
//============================================================================
// ForEachTiddlerPlugin
//============================================================================
//============================================================================
// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {
if (!window.abego) window.abego = {};
version.extensions.ForEachTiddlerPlugin = {
major: 1, minor: 0, revision: 8,
date: new Date(2007,3,12),
source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};
// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
TiddlyWiki.prototype.forEachTiddler = function(callback) {
for(var t in this.tiddlers) {
callback.call(this,t,this.tiddlers[t]);
}
};
}
//============================================================================
// forEachTiddler Macro
//============================================================================
version.extensions.forEachTiddler = {
major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};
// ---------------------------------------------------------------------------
// Configurations and constants
// ---------------------------------------------------------------------------
config.macros.forEachTiddler = {
// Standard Properties
label: "forEachTiddler",
prompt: "Perform actions on a (sorted) selection of tiddlers",
// actions
actions: {
addToList: {},
write: {}
}
};
// ---------------------------------------------------------------------------
// The forEachTiddler Macro Handler
// ---------------------------------------------------------------------------
config.macros.forEachTiddler.getContainingTiddler = function(e) {
while(e && !hasClass(e,"tiddler"))
e = e.parentNode;
var title = e ? e.getAttribute("tiddler") : null;
return title ? store.getTiddler(title) : null;
};
config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);
if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
// --- Parsing ------------------------------------------
var i = 0; // index running over the params
// Parse the "in" clause
var tiddlyWikiPath = undefined;
if ((i < params.length) && params[i] == "in") {
i++;
if (i >= params.length) {
this.handleError(place, "TiddlyWiki path expected behind 'in'.");
return;
}
tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the where clause
var whereClause ="true";
if ((i < params.length) && params[i] == "where") {
i++;
whereClause = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the sort stuff
var sortClause = null;
var sortAscending = true;
if ((i < params.length) && params[i] == "sortBy") {
i++;
if (i >= params.length) {
this.handleError(place, "sortClause missing behind 'sortBy'.");
return;
}
sortClause = this.paramEncode(params[i]);
i++;
if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
sortAscending = params[i] == "ascending";
i++;
}
}
// Parse the script
var scriptText = null;
if ((i < params.length) && params[i] == "script") {
i++;
scriptText = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the action.
// When we are already at the end use the default action
var actionName = "addToList";
if (i < params.length) {
if (!config.macros.forEachTiddler.actions[params[i]]) {
this.handleError(place, "Unknown action '"+params[i]+"'.");
return;
} else {
actionName = params[i];
i++;
}
}
// Get the action parameter
// (the parsing is done inside the individual action implementation.)
var actionParameter = params.slice(i);
// --- Processing ------------------------------------------
try {
this.performMacro({
place: place,
inTiddler: tiddler,
whereClause: whereClause,
sortClause: sortClause,
sortAscending: sortAscending,
actionName: actionName,
actionParameter: actionParameter,
scriptText: scriptText,
tiddlyWikiPath: tiddlyWikiPath});
} catch (e) {
this.handleError(place, e);
}
};
// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {
var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);
var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
context["tiddlyWiki"] = tiddlyWiki;
// Get the tiddlers, as defined by the whereClause
var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
context["tiddlers"] = tiddlers;
// Sort the tiddlers, when sorting is required.
if (parameter.sortClause) {
this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
}
return {tiddlers: tiddlers, context: context};
};
// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
return this.getTiddlersAndContext(parameter).tiddlers;
};
// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
// The following properties are supported:
//
// place
// whereClause
// sortClause
// sortAscending
// actionName
// actionParameter
// scriptText
// tiddlyWikiPath
//
// All properties are optional.
// For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
var tiddlersAndContext = this.getTiddlersAndContext(parameter);
// Perform the action
var actionName = parameter.actionName ? parameter.actionName : "addToList";
var action = config.macros.forEachTiddler.actions[actionName];
if (!action) {
this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
return;
}
var actionHandler = action.handler;
actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};
// ---------------------------------------------------------------------------
// The actions
// ---------------------------------------------------------------------------
// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
return;
}
// Perform the action.
var list = document.createElement("ul");
place.appendChild(list);
for (var i = 0; i < tiddlers.length; i++) {
var tiddler = tiddlers[i];
var listItem = document.createElement("li");
list.appendChild(listItem);
createTiddlyLink(listItem, tiddler.title, true);
}
};
abego.parseNamedParameter = function(name, parameter, i) {
var beginExpression = null;
if ((i < parameter.length) && parameter[i] == name) {
i++;
if (i >= parameter.length) {
throw "Missing text behind '%0'".format([name]);
}
return config.macros.forEachTiddler.paramEncode(parameter[i]);
}
return null;
}
// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
if (p >= parameter.length) {
this.handleError(place, "Missing expression behind 'write'.");
return;
}
var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
// Parse the "begin" option
var beginExpression = abego.parseNamedParameter("begin", parameter, p);
if (beginExpression !== null)
p += 2;
var endExpression = abego.parseNamedParameter("end", parameter, p);
if (endExpression !== null)
p += 2;
var noneExpression = abego.parseNamedParameter("none", parameter, p);
if (noneExpression !== null)
p += 2;
// Parse the "toFile" option
var filename = null;
var lineSeparator = undefined;
if ((p < parameter.length) && parameter[p] == "toFile") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
return;
}
filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
p++;
if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
return;
}
lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
}
}
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
return;
}
// Perform the action.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
var count = tiddlers.length;
var text = "";
if (count > 0 && beginExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
for (var i = 0; i < count; i++) {
var tiddler = tiddlers[i];
text += func(tiddler, context, count, i);
}
if (count > 0 && endExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);
if (count == 0 && noneExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
if (filename) {
if (lineSeparator !== undefined) {
lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
text = text.replace(/\n/mg,lineSeparator);
}
saveFile(filename, convertUnicodeToUTF8(text));
} else {
var wrapper = createTiddlyElement(place, "span");
wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
}
};
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------
// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
return {
place : placeParam,
whereClause : whereClauseParam,
sortClause : sortClauseParam,
sortAscending : sortAscendingParam,
script : scriptText,
actionName : actionNameParam,
actionParameter : actionParameterParam,
tiddlyWikiPath : tiddlyWikiPathParam,
inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
};
};
// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
if (!idPrefix) {
idPrefix = "store";
}
var lenPrefix = idPrefix.length;
// Read the content of the given file
var content = loadFile(this.getLocalPath(path));
if(content === null) {
throw "TiddlyWiki '"+path+"' not found.";
}
var tiddlyWiki = new TiddlyWiki();
// Starting with TW 2.2 there is a helper function to import the tiddlers
if (tiddlyWiki.importTiddlyWiki) {
if (!tiddlyWiki.importTiddlyWiki(content))
throw "File '"+path+"' is not a TiddlyWiki.";
tiddlyWiki.dirty = false;
return tiddlyWiki;
}
// The legacy code, for TW < 2.2
// Locate the storeArea div's
var posOpeningDiv = content.indexOf(startSaveArea);
var posClosingDiv = content.lastIndexOf(endSaveArea);
if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
throw "File '"+path+"' is not a TiddlyWiki.";
}
var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
// Create a "div" element that contains the storage text
var myStorageDiv = document.createElement("div");
myStorageDiv.innerHTML = storageText;
myStorageDiv.normalize();
// Create all tiddlers in a new TiddlyWiki
// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
var store = myStorageDiv.childNodes;
for(var t = 0; t < store.length; t++) {
var e = store[t];
var title = null;
if(e.getAttribute)
title = e.getAttribute("tiddler");
if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
title = e.id.substr(lenPrefix);
if(title && title !== "") {
var tiddler = tiddlyWiki.createTiddler(title);
tiddler.loadFromDiv(e,title);
}
}
tiddlyWiki.dirty = false;
return tiddlyWiki;
};
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
//
// (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
var script = context["script"];
var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
var fullText = (script ? script+";" : "")+functionText+";theFunction;";
return eval(fullText);
};
// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
var result = [];
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
tiddlyWiki.forEachTiddler(function(title,tiddler) {
if (func(tiddler, context, undefined, undefined)) {
result.push(tiddler);
}
});
return result;
};
// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
var message = "Extra parameter behind '"+actionName+"':";
for (var i = firstUnusedIndex; i < parameter.length; i++) {
message += " "+parameter[i];
}
this.handleError(place, message);
};
// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? -1
: +1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? +1
: -1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
// To avoid evaluating the sortClause whenever two items are compared
// we pre-calculate the sortValue for every item in the array and store it in a
// temporary property ("forEachTiddlerSortValue") of the tiddlers.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
var count = tiddlers.length;
var i;
for (i = 0; i < count; i++) {
var tiddler = tiddlers[i];
tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
}
// Do the sorting
tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);
// Delete the temporary property that holds the sortValue.
for (i = 0; i < tiddlers.length; i++) {
delete tiddlers[i].forEachTiddlerSortValue;
}
};
// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
displayMessage(message);
};
// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
var message ="<<"+macroName;
for (var i = 0; i < params.length; i++) {
message += " "+params[i];
}
message += ">>";
displayMessage(message);
};
// Internal.
//
// Creates an element that holds an error message
//
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
var message = (exception.description) ? exception.description : exception.toString();
return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};
// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
if (place) {
this.createErrorElement(place, exception);
} else {
throw exception;
}
};
// Internal.
//
// Encodes the given string.
//
// Replaces
// "$))" to ">>"
// "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
var reGTGT = new RegExp("\\$\\)\\)","mg");
var reGT = new RegExp("\\$\\)","mg");
return s.replace(reGTGT, ">>").replace(reGT, ">");
};
// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
//
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
// Remove any location part of the URL
var hashPos = originalPath.indexOf("#");
if(hashPos != -1)
originalPath = originalPath.substr(0,hashPos);
// Convert to a native file format assuming
// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
var localPath;
if(originalPath.charAt(9) == ":") // pc local file
localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(7));
else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(5));
else // pc network file
localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");
return localPath;
};
// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
"forEachTiddler");
//============================================================================
// End of forEachTiddler Macro
//============================================================================
//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
var n = prefix.length;
return (this.length >= n) && (this.slice(0, n) == prefix);
};
//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
var n = suffix.length;
return (this.length >= n) && (this.right(n) == suffix);
};
//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
return this.indexOf(substring) >= 0;
};
//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] == item) {
return i;
}
}
return -1;
};
//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false.
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
return (this.indexOf(item) >= 0);
};
//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
for(var i = 0; i < items.length; i++) {
if (this.contains(items[i])) {
return true;
}
}
return false;
};
//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
//
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null]
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
for(var i = 0; i < items.length; i++) {
if (!this.contains(items[i])) {
return false;
}
}
return true;
};
} // of "install only once"
// Used Globals (for JSLint) ==============
// ... DOM
/*global document */
// ... TiddlyWiki Core
/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink,
displayMessage, endSaveArea, hasClass, loadFile, saveFile,
startSaveArea, store, wikify */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
''Button tooltip:'' format text {{makeborder{<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="format text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select text format...','');
s.onchange=function(){
var parts=this.value.split(',');
config.quickEdit.wrapSelection(this.button,parts[0],parts[1]);
Popup.remove(); return false;
};
s.options[s.length]=new Option('superscript','^^,^^');
s.options[s.length-1].title='^^superscript^^';
s.options[s.length]=new Option('subscript','~~,~~');
s.options[s.length-1].title='~~subcript~~';
s.options[s.length]=new Option('blockquote','\n\<\<\<\n,\n\<\<\<\n');
s.options[s.length-1].title='indented blockquote - \<\<\<';
s.options[s.length]=new Option('monospaced','{{{,}}}');
s.options[s.length-1].title='inline monospaced text - {{{...}}}';
s.options[s.length]=new Option('pre','\n{{{\n,\n}}}\n');
s.options[s.length-1].title='multi-line monospaced text box - {{{...}}}';
s.options[s.length]=new Option('heading 1','\n!,\n');
s.options[s.length-1].title='H1 heading - !';
s.options[s.length]=new Option('heading 2','\n!!,\n');
s.options[s.length-1].title='H2 heading - !';
s.options[s.length]=new Option('heading 3','\n!!!,\n');
s.options[s.length-1].title='H3 heading - !';
s.options[s.length]=new Option('heading 4','\n!!!!,\n');
s.options[s.length-1].title='H4 heading - !';
s.options[s.length]=new Option('heading 5','\n!!!!!,\n');
s.options[s.length-1].title='H5 heading - !';
s.options[s.length]=new Option('comment','/%,%/');
s.options[s.length-1].title='comment (hidden content) - /%...%/';
s.options[s.length]=new Option('HTML','<html>,<\x2fhtml>');
s.options[s.length-1].title='HTML syntax - <html>...<\x2fhtml>';
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>format</a></html>}}}
''Formats highlighted text as shown below .''
----
#''superscript:'' ^^superscript^^
#''subscript:'' ~~subscript~~
#''blockquote:''{{div{
<<<
''Note:'' the vertical line is disabled in TW ~T-Notes
~StyleSheet (see lineless blockquote)
<<<
}}}
#''monospaced:'' """{{{monospaced text}}}""" {{{monospaced text}}}
#''pre:'' {{{<pre> same as html </pre>}}}
#''Headings''{{div{
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
}}}
#''comment:'' """ /%hidden comment in a tiddler%/"""
#''html:'' """<html>html markup</html>"""
----
<html><style>
#tiddlerformat .viewer blockquote {line-height:1.8em; padding-left:0.8em;margin-left:2.5em;border-left: 2px solid #c06;}
#tiddlerformat .viewer{line-height:1.8em;}
#tiddlerformat h1,h2,h3,h4,h5,h6 {padding-bottom:0px; margin-top:0em;margin-bottom:0.0em;line-height:1.2em;}
</style></html>
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Documentation|http://www.TiddlyTools.com/#GotoPluginInfo|
|Version|1.7.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|view any tiddler by entering it's title - displays list of possible matches|
''View a tiddler by typing its title and pressing //enter//.'' As you type, a list of possible matches is displayed. You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press //escape// to close the listbox to resume typing. When the listbox is ''//not//'' being displayed, press //escape// to clear the current text input and start over.
!!!!!Documentation
>see [[GotoPluginInfo]]
!!!!!Revisions
<<<
2008.10.16 [1.7.0] in macro handler(), changed to use //named// params instead of positional params, and added optional "filter:" param for tag filtering. Removed 'insert' handling (now provided by [[QuickEditPlugin]]).
|please see [[GotoPluginInfo]] for additional revision details|
2006.05.05 [0.0.0] started
<<<
!!!!!Code
***/
//{{{
version.extensions.GotoPlugin= {major: 1, minor: 7, revision: 0, date: new Date(2008,10,16)};
// automatically tweak shadow SideBarOptions to add <<gotoTiddler>> macro above <<search>>
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");
config.macros.gotoTiddler= {
listMaxSize: 10,
listHeading: 'Found %0 matching title%1...',
searchItem: "Search for '%0'...",
handler:
function(place,macroName,params,wikifier,paramString,tiddler) {
var quiet =params.contains("quiet");
var search =params.contains("search");
params = paramString.parseParams("anon",null,true,false,false);
var instyle =getParam(params,"inputstyle","");
var liststyle =getParam(params,"liststyle","");
var filter =getParam(params,"filter","");
var html=this.html;
var keyevent=window.event?"onkeydown":"onkeypress"; // IE event fixup for ESC handling
html=html.replace(/%keyevent%/g,keyevent);
html=html.replace(/%search%/g,search);
html=html.replace(/%quiet%/g,quiet);
html=html.replace(/%instyle%/g,instyle);
html=html.replace(/%liststyle%/g,liststyle);
html=html.replace(/%filter%/g,filter);
if (config.browser.isIE) html=this.IEtableFixup.format([html]);
createTiddlyElement(place,"span").innerHTML=html;
},
html:
'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
<input name=gotoTiddler type=text autocomplete="off" accesskey="G" style="%instyle%"\
title="enter a tiddler title"\
onclick="this.form.list.style.display=\'none\';"\
onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list);"\
onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,%quiet%,%search%);">\
<select name=list style="%liststyle%;display:none;position:absolute"\
onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
onblur="this.style.display=\'none\';"\
%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler);"\
onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this);">\
</select><input name="filter" type="hidden" value="%filter%">\
</form>',
IEtableFixup:
"<table style='width:100%;display:inline;padding:0;margin:0;border:0;'>\
<tr style='padding:0;margin:0;border:0;'><td style='padding:0;margin:0;border:0;'>\
%0</td></tr></table>",
getItems:
function(val,filter) {
if (!this.items.length || val.length<2) { // starting new search, refresh cached list of tiddlers/shadows/tags
this.items=new Array();
if (filter.length) {
var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
var tiddlers=store.sortTiddlers(fn.apply(store,[filter]),'title');
} else
var tiddlers=store.getTiddlers("title","excludeLists");
for(var t=0; t<tiddlers.length; t++) this.items.push(tiddlers[t].title);
if (!filter.length) {
for (var t in config.shadowTiddlers) this.items.pushUnique(t);
var tags=store.getTags();
for(var t=0; t<tags.length; t++) this.items.pushUnique(tags[t][0]);
}
}
var found = [];
var match=val.toLowerCase();
for(var i=0; i<this.items.length; i++)
if (this.items[i].toLowerCase().indexOf(match)!=-1) found.push(this.items[i]);
return found;
},
items: [], // cached list of tiddlers/shadows/tags
getItemSuffix:
function(t) {
if (store.tiddlerExists(t)) return ""; // tiddler
if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
return " (tag)"; // tag
},
keyProcessed:
function(ev) { // utility function: exits handler and prevents browser from processing the keystroke
ev.cancelBubble=true; // IE4+
try{event.keyCode=0;}catch(e){}; // IE5
if (window.event) ev.returnValue=false; // IE6
if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
if (ev.stopPropagation) ev.stopPropagation(); // all
return false;
},
inputEscKeyHandler:
function(event,here,list) {
var key=event.keyCode;
// escape... hide list (2nd esc=clears input)
if (key==27) {
if (list.style.display=="none")
here.value=here.defaultValue;
list.style.display="none";
return this.keyProcessed(event);
}
return true; // key bubbles up
},
inputKeyHandler:
function(event,here,quiet,search) {
var key=event.keyCode;
var list=here.form.list;
var filter=here.form.filter;
// non-printing chars... bubble up, except: backspace=8, enter=13, space=32, down=40, delete=46
if (key<48) switch(key) { case 8: case 13: case 32: case 40: case 46: break; default: return true; }
// blank input... if down/enter... fall through (list all)... else, and hide list
if (!here.value.length && !(key==40 || key==13)) { list.style.display="none"; return this.keyProcessed(event); }
// make sure list is shown (unless quiet option)
list.style.display=!quiet?"block":"none";
// non-blank input... enter key... show/create tiddler
if (key==13) return this.processItem(here.value,here,list);
// down key... shows/moves to list...
if (key==40) { list.style.display="block"; list.focus(); }
// if list is showing, fill it with found results...
if (list.style.display!="none") {
var indent='\xa0\xa0\xa0';
var found = this.getItems(here.value,filter.value); // find matching items...
found.sort(); // alpha by title
while (list.length > 0) list.options[0]=null; // clear list
var hdr=this.listHeading.format([found.length,found.length==1?"":"s"]);
list.options[0]=new Option(hdr,"",false,false);
for (var t=0; t<found.length; t++) list.options[list.length]=
new Option(indent+found[t]+this.getItemSuffix(found[t]),found[t],false,false);
if (search)
list.options[list.length]=new Option(this.searchItem.format([here.value]),"*",false,false);
list.size=(list.length<this.listMaxSize?list.length:this.listMaxSize); // resize list...
list.selectedIndex=(key==40 || key==13)?1:0;
}
return true; // key bubbles up
},
selectKeyHandler:
function(event,list,editfield) {
if (event.keyCode==27) // escape... hide list, move to edit field
{ editfield.focus(); list.style.display="none"; return this.keyProcessed(event); }
if (event.keyCode==13 && list.value.length) // enter... view selected item
{ this.processItem(list.value,editfield,list); return this.keyProcessed(event); }
return true; // key bubbles up
},
processItem:
function(title,here,list) {
if (!title.length) return;
list.style.display='none';
if (title=="*") { story.search(here.value); return false; } // do full-text search
here.value=title;
story.displayTiddler(null,title); // show selected tiddler
return false;
}
}
//}}}
@@color:#c06;Tiddlers tagged Guide@@
Guides are tiddlers used in creating the Treeview structure some are similar to templates.
----
<script>
// get all tiddlers tagged with "Guide"
var tids=store.getTaggedTiddlers("Guide");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("Guide")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
Important! These tiddlers must not be deleted.
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|'HTML' formatter|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2008.09.19 [2.2.0] in wikifyTextNodes(), don't wikify the contents of STYLE nodes (thanks to MorrisGray for bug report)
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 2, revision: 0, date: new Date(2008,9,19)};
// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);
if (i<config.formatters.length) config.formatters[i].handler=function(w) {
if (!this.lookaheadRegExp) // fixup for TW2.0.x
this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var html=lookaheadMatch[1];
// if <hide linebreaks> is present, suppress wiki-style literal handling of newlines
if (html.indexOf('<hide linebreaks>')!=-1) html=html.replace(/\n/g,' ');
// remove all \r's added by IE textarea and mask newlines and macro brackets
html=html.replace(/\r/g,'').replace(/\n/g,'\\n').replace(/<</g,'%%(').replace(/>>/g,')%%');
// create span, let browser parse HTML
var e=createTiddlyElement(w.output,"span"); e.innerHTML=html;
// re-render text nodes as wiki-formatted content
wikifyTextNodes(e);
// continue parsing
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
}
// wikify text nodes remaining after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode)
{
function unmask(s) { return s.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n'); }
switch (theNode.nodeName.toLowerCase()) {
case 'style': case 'option': case 'select':
theNode.innerHTML=unmask(theNode.innerHTML);
break;
case 'textarea':
theNode.value=unmask(theNode.value);
break;
case '#text':
var txt=unmask(theNode.nodeValue);
var newNode=createTiddlyElement(null,"span");
theNode.parentNode.replaceChild(newNode,theNode);
wikify(txt,newNode);
break;
default:
for (var i=0;i<theNode.childNodes.length;i++)
wikifyTextNodes(theNode.childNodes.item(i)); // recursion
break;
}
}
//}}}
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{
window.hideWhenLastTest = false;
window.removeElementWhen = function(test,place) {
window.hideWhenLastTest = test;
if (test) {
removeChildren(place);
place.parentNode.removeChild(place);
}
};
merge(config.macros,{
hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( eval(paramString), place);
}},
showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !eval(paramString), place);
}},
hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAny(params), place);
}},
showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAny(params), place);
}},
hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
}},
showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
}},
hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title == params[0], place);
}},
showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title != params[0], place);
}},
'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !window.hideWhenLastTest, place);
}}
});
//}}}
Do you like ''~No-Brainer Notes''? If so, here's how you can help us:
* [[Visit our site|http://www.giffmex.org]]
* [[Learn about the missions agency we belong to, CRWM|http://www.crcna.org/pages/crwm.cfm]]
* [[Donate to CRWM|http://www.crcna.org/pages/crwm_donate_online.cfm]]
* [[Our Amazon wishlist|https://www.amazon.com/gp/registry/wishlist/1OTJM9IE7SPVS/ref=wl_web/]]
* PayPal for our site:<html><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" type="image" /><img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCDOphPrfxixGLSFLAVYRgOAIIMNkhG/fVpBpfPkFZ+/otUKEu2UHrY0szrTCsf73EmPs1hEqXAevosf4f3wmMQGaQ/+dxpooMXJJjv4Y2b74SuehERvjBeBrIOJ6eVVJyTRqTYVACX48cdtp9K8u/qFPEf389dSFw79O0qSSw2YDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIvazyO9DMtDGAgaCV7RZqlbC45beBnYKwrZ/t12EFK0DQViCLvSD1OMX0VNiCuXK2lxtlpTzi0ZujHXrRjPZg6zZc5dMsL//Ervy+zUBl6jpsQg5UxqponKYcNnWXjErastgJdYP3Yy5l95L1MwsHnxzhvANg3cIuYhVOsvDNxc933cEdwMSBKI2Q9Kg6oixC49A6FTYW/Xgp2xfdINr7ema6Vgk9V3pge1xjoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwMzIzMTU0MDU4WjAjBgkqhkiG9w0BCQQxFgQUN7zDTYDrAL6cj3fOJ2lKbzKgmcIwDQYJKoZIhvcNAQEBBQAEgYAsUnYV6vvQecisJkhmmfNmG2xemtFm7FfXCJZe+5sNDBiIgy/By44dLPor/j3KAmFsH27u4ORRVGgaYkG0/0Ga7ch1AZaMNCnrXQ8Yw6//ltBN+DPl7RWQ3hbgcPwbVarqkNM67LQ/Scfb22CKMAnKt4vjIeaWAnPySHVsYcqcpg==-----END PKCS7-----" /></form></html>
''Button tooltip:'' """embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img[tooltip|path/to/file.ext]]"""
This button {{makeborder{<<tiddler QuickEdit_image>>}}} opens the file chooser to choose an image to insert into the tiddler at the cursor position.
Note: You can also use an external link to a remote image like this:
@@"""[img[external link to an image|http://img291.imageshack.us/img291/1926/45766563xi6.jpg]]"""@@
[img[external link to an image|http://img291.imageshack.us/img291/1926/45766563xi6.jpg]]
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin,formatter|
|Requires||
|Overrides|'image' formatter|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img( 1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img( 1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 1, date: new Date(2009,2,24)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var floatLeft=lookaheadMatch[1];
var floatRight=lookaheadMatch[2];
var width=lookaheadMatch[3];
var height=lookaheadMatch[4];
var tooltip=lookaheadMatch[5];
var src=lookaheadMatch[6];
var link=lookaheadMatch[7];
// Simple bracketted link
var e = w.output;
if(link) { // LINKED IMAGE
if (config.formatterHelpers.isExternalLink(link)) {
if (config.macros.attach && config.macros.attach.isAttachment(link)) {
// see [[AttachFilePluginFormatters]]
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
} else
e = createExternalLink(w.output,link);
} else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
addClass(e,"imageLink");
}
var img = createTiddlyElement(e,"img");
if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
if(width||height) {
var x=width.trim(); var y=height.trim();
var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
if (x.substr(0,2)=="{{")
{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
if (y.substr(0,2)=="{{")
{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
img.style.width=x.trim(); img.style.height=y.trim();
config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
}
if(tooltip) img.title = tooltip;
// GET IMAGE SOURCE
if (config.macros.attach && config.macros.attach.isAttachment(src))
src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
if (config.browser.isIE || config.browser.isSafari) {
img.onerror=(function(){
this.src=config.formatterHelpers.resolvePath(this.src,false);
return false;
});
} else
src=config.formatterHelpers.resolvePath(src,true);
}
img.src=src;
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
e.title=((stretchW||stretchH)?'DRAG=stretch/shrink, ':'')
+'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size';
e.statusMsg='width=%0, height=%1';
e.style.cursor='move';
e.originalW=e.style.width;
e.originalH=e.style.height;
e.minW=Math.max(e.offsetWidth/20,10);
e.minH=Math.max(e.offsetHeight/20,10);
e.stretchW=stretchW;
e.stretchH=stretchH;
e.onmousedown=function(ev) { var ev=ev||window.event;
this.sizing=true;
this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
this.startW=this.offsetWidth;
this.startH=this.offsetHeight;
return false;
};
e.onmousemove=function(ev) { var ev=ev||window.event;
if (this.sizing) {
var s=this.style;
var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
}
return false;
};
e.onmouseup=function(ev) { var ev=ev||window.event;
if (ev.shiftKey) { this.style.width=this.style.height=''; }
if (ev.ctrlKey) { this.style.width=this.originalW; this.style.height=this.originalH; }
this.sizing=false;
clearMessage();
return false;
};
e.onmouseout=function(ev) { var ev=ev||window.event;
this.sizing=false;
clearMessage();
return false;
};
}
//}}}
On Thursday, 28 May 2009 10:06:42 AM, YourName imported 247 tiddlers from
[[F:\TiddlyWiki\TW-NET\TW-NET-Test\tw-net-test.html|F:\TiddlyWiki\TW-NET\TW-NET-Test\tw-net-test.html]]:
<<<
#[[1:Basic]] - added
#[[1:New]] - added
#[[1:Note-taking]] - added
#[[2:Advanced]] - added
#[[2:Navigating]] - added
#[[2:new]] - added
#[[3:How to download]] - added
#[[A sub-sub topic]] - added
#[[A sub-topic]] - added
#[[A-New-Top-Level-Topic]] - added
#[[Acknowledgements & license]] - added
#[[Align]] - added
#[[AllTiddlerNotes]] - added
#[[AllTiddlerNotes-Notes]] - added
#[[AttachFileMIMETypes]] - added
#[[AttachFilePlugin]] - added
#[[AttachFilePluginFormatters]] - added
#[[Author]] - added
#[[AutoClearMessage]] - added
#[[AutoRefresh]] - added
#[[BIUS]] - added
#[[BetterTimeline]] - added
#[[Bookmarklet]] - added
#[[Bookmarklet-Notes]] - added
#[[Bugs1]] - added
#[[Bugs1-Notes]] - added
#[[Bugs2]] - added
#[[Bugs3]] - added
#[[Bugs4]] - added
#[[ChangeSaveLabelMacro]] - added
#[[CloseOnCancelPlugin]] - added
#[[Color]] - added
#[[ColorPalette]] - added
#[[CombineTrees]] - added
#[[ContentFooter]] - added
#[[Cookie plugin]] - added
#[[Create subTopics]] - added
#[[CreateNewMasterTopic]] - added
#[[CreateNewTopLevelTopic]] - added
#[[CreatingANewTopLevelTopic]] - added
#[[Customization]] - added
#[[DefaultTiddlers]] - added
#[[DeprecatedFunctionsPlugin]] - added
#[[Description]] - added
#[[DigitalClock]] - added
#[[Directory]] - added
#[[DoBackupMacro]] - added
#[[EditATiddler]] - added
#[[EditTemplate]] - added
#[[EmbeddedImagesDisplay]] - added
#[[Equation]] - added
#[[EquationEditorPlugin]] - added
#[[ExcludedFromLists]] - added
#[[ExtendTagButtonPlugin]] - added
#[[Find]] - added
#[[Font]] - added
#[[ForEachTiddlerPlugin]] - added
#[[Format]] - added
#[[GotoPlugin]] - added
#[[Guides]] - added
#[[Guides-Notes]] - added
#[[HTMLFormattingPlugin]] - added
#[[HideWhenPlugin]] - added
#[[How you can help]] - added
#[[Image]] - added
#[[ImageSizePlugin]] - added
#[[InlineJavascriptPlugin]] - added
#[[Instructions]] - added
#[[Introduction]] - added
#[[JqueryTreeviewCSS]] - added
#[[JqueryTreeviewCSSOnline]] - added
#[[LastModified]] - added
#[[LaunchApplication]] - added
#[[Link]] - added
#[[LoadRemoteFileThroughProxy]] - replaces LoadRemoteFileThroughProxy - 5/28/2009 10:01:00 by YourName
#[[Macro]] - added
#[[MainMenu]] - added
#[[MarkupPostBody]] - added
#[[MarkupPostBody_bak]] - added
#[[MarkupPreBody]] - added
#[[MarkupPreHead]] - added
#[[MathEquations]] - added
#[[May 21, 4:24 am]] - added
#[[May 22, 4:55 am]] - added
#[[Menus]] - added
#[[MultipleDisplays]] - added
#[[My Notes]] - added
#[[My sub-subTopic]] - added
#[[MyChanges]] - added
#[[MyTopic]] - added
#[[NET]] - added
#[[NETTimeOnly]] - added
#[[NestedSlidersPlugin(withGiffmexTweak)]] - added
#[[NetTimeOnline]] - added
#[[NetTimePlugin]] - added
#[[NewHerePlugin(Giffmex version)]] - added
#[[NewMasterTopic]] - added
#[[NewTopLevelTopic]] - added
#[[NewTopLevelTopic-Notes]] - added
#[[NonAlpha]] - added
#[[NoteNote]] - added
#[[OptionsPanel]] - added
#[[Overview]] - added
#[[PageTemplate]] - added
#[[PasswordOptionsPlugin]] - replaces PasswordOptionsPlugin - 5/28/2009 10:01:00 by YourName
#[[PluginIdentifier]] - added
#[[Plugins]] - added
#[[Printing]] - added
#[[PublishTemplateBodySingle]] - added
#[[QuickEdit=true]] - added
#[[QuickEditPackage]] - added
#[[QuickEditPlugin]] - added
#[[QuickEditToolbar]] - added
#[[QuickEdit_align]] - added
#[[QuickEdit_color]] - added
#[[QuickEdit_css]] - added
#[[QuickEdit_equation]] - added
#[[QuickEdit_file]] - added
#[[QuickEdit_font]] - added
#[[QuickEdit_fontList]] - added
#[[QuickEdit_format]] - added
#[[QuickEdit_image]] - added
#[[QuickEdit_link]] - added
#[[QuickEdit_macro]] - added
#[[QuickEdit_replace]] - added
#[[QuickEdit_sort]] - added
#[[QuickEdit_split]] - added
#[[QuickEdit_tiddler]] - added
#[[QuickOpenTagPlugin]] - added
#[[QuickOpenTagStyles]] - added
#[[RefreshStyles]] - added
#[[Sample note]] - added
#[[SaveAsPlugin]] - added
#[[SaveCloseTiddlerPlugin]] - added
#[[ScriptIdentifier]] - added
#[[Scriptcss]] - added
#[[SearchIncremental=false]] - added
#[[SearchOptionsPlugin]] - added
#[[SearchResults]] - added
#[[SecondTier Two]] - added
#[[SecondTier Two2]] - added
#[[SecondTier Two3]] - added
#[[SecondTierOne]] - added
#[[SetUp]] - added
#[[SetUpTop]] - added
#[[SetupMainMenu]] - added
#[[SetupTreeview]] - added
#[[ShowSimilarTiddlers]] - added
#[[SideBarOptions]] - added
#[[SideBarTabs]] - added
#[[SideBarTabsSlider]] - added
#[[SiteMapMacro(modified)]] - added
#[[SiteSubtitle]] - added
#[[SiteTitle]] - added
#[[SiteUrl]] - added
#[[SliderFrame]] - added
#[[StyleSheet]] - added
#[[StyleSheetLayout]] - added
#[[StyleSheetShortcuts]] - added
#[[StyleSheetTiddlersBar]] - added
#[[Styling]] - added
#[[SubTopicAdded]] - added
#[[SubtopicOfAnomalies]] - added
#[[System]] - added
#[[TBA]] - added
#[[TW-NET]] - added
#[[TW-NET_blk]] - added
#[[TW-NETe]] - added
#[[TW-NotesTreeview]] - added
#[[TWHelp-SearchResults]] - added
#[[TWT-Notes]] - added
#[[TWT-Notes update news]] - added
#[[TWT-Treeview-Implementation]] - added
#[[TWT-Treeview-Implementation-Notes]] - added
#[[TWTStyleSheet]] - added
#[[TabsCSS]] - added
#[[TaggedTemplateTweak]] - added
#[[TaggerPlugin]] - added
#[[TagglyTaggingPlugin]] - added
#[[TagglyTaggingStyles]] - added
#[[Templates]] - added
#[[TestTiddler]] - added
#[[The QuickEdit Toolbar]] - added
#[[ThirdTierB2]] - added
#[[Tiddler]] - added
#[[TiddlerNotesPlugin]] - added
#[[TiddlerTweaker]] - added
#[[TiddlerTweakerPlugin]] - added
#[[TiddlersBarPluginMG]] - added
#[[ToggleRightSidebar]] - added
#[[ToggleTagPlugin]] - added
#[[ToolbarCommands]] - added
#[[Tools]] - added
#[[TopMenu]] - added
#[[TopMenuStyle]] - added
#[[TopTiddler]] - added
#[[TopicNote]] - added
#[[TopicTest]] - added
#[[TopicTestSub]] - added
#[[TopicTestSub2]] - added
#[[TreeviewPluginPlugin.2]] - added
#[[TreeviewPluginPlugin.21]] - added
#[[TreeviewPluginPlugin.22]] - added
#[[TreeviewPluginPlugin.23]] - added
#[[TreeviewPluginPlugin.24]] - added
#[[TreeviewPluginPlugin1]] - added
#[[TreeviewTest]] - added
#[[TreeviewTestText]] - added
#[[TreeviewTiddlers]] - added
#[[Treeviewsetup]] - added
#[[TspotSetupPlugin]] - skipped after asking
#[[TspotSidebar]] - added
#[[TspotSidebar_bak]] - added
#[[TwHelpSearchPlugin]] - added
#[[TwoColumn]] - added
#[[TypeTiddler]] - added
#[[Undocumented]] - added
#[[UploadLog]] - added
#[[UploadPlugin]] - skipped after asking
#[[Usage]] - added
#[[Version]] - added
#[[ViewTemplate]] - added
#[[ViewTemplate_bak]] - added
#[[WantonBugs]] - added
#[[WebStyleSheetX]] - added
#[[What is a nautical mile?]] - added
#[[WishList]] - added
#[[and on and on]] - added
#[[editA]] - added
#[[file.gif]] - added
#[[folder-closed.gif]] - added
#[[folder.gif]] - added
#[[lastModified]] - added
#[[mainmenugray7ef.gif]] - added
#[[nonotesViewTemplate]] - added
#[[notopicViewTemplate]] - added
#[[subTopTiddler]] - added
#[[subtitleViewTemplate]] - added
#[[systemConfigViewTemplate]] - added
#[[treeview-black-line.gif]] - added
#[[treeview-black.gif]] - added
#[[treeview-default.gif]] - added
#[[treeview-famfamfam-line.gif]] - added
#[[treeview-famfamfam.gif]] - added
#[[treeview-gray-line.gif]] - added
#[[treeview-gray.gif]] - added
#[[treeview-red-line.gif]] - added
#[[treeview-red.gif]] - added
#[[zzConfigOptions]] - added
<<<
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2009.04.11 [1.9.5] pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // external script library
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // inline code
if (show) // display source in tiddler
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create 'onclick' command link
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run script immediately
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
try { var out=eval(c); }
catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
<html><a href="javascript:void(0)" onclick="story.closeAllTiddlers();story.displayTiddlers(null,store.getTiddlerText('NonAlpha').readBracketedList())" title="Open a tab for each Category" style="cursor:pointer">Open a tab for each Category</a></html>
''This is the introduction to using ~QuickEdit''
----
{{twocolumns{<<tiddler QuickEditToolbar>>}}}
----
''~QuickEdit'' places edit buttons in the EditTemplate to effect most edit functions. This topic discusses those buttons and gives a short description of what they do. You can obtain more buttons from [[TiddlyTools|http://www.TiddlyTools.com/#QuickEditPlugin]]
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
background-color: white;
margin-top: 4px;
}
.treeview .hitarea {
background: url([[treeview-default.gif]]) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url([[treeview-red-line.gif]]) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url([[treeview-default.gif]]); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview-red li { background-image: url([[treeview-red-line.gif]]); }
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url([[treeview-red.gif]]); }
.treeview-black li { background-image: url([[treeview-black-line.gif]]); }
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url([[treeview-black.gif]]); }
.treeview-gray li { background-image: url([[treeview-gray-line.gif]]); }
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url([[treeview-gray.gif]]); }
.treeview-famfamfam li { background-image: url([[treeview-famfamfam-line.gif]]); }
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url([[treeview-famfamfam.gif]]); }
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
.filetree span.folder { background: url([[folder.gif]]) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url([[folder-closed.gif]]) 0 0 no-repeat; }
.filetree span.file { background: url([[file.gif]]) 0 0 no-repeat; }
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
background-color:#fff;
margin-top: 4px;
}
.treeview .hitarea {
background: url(http://www.symbex.net.au/Wiki/images/treeview-default.gif) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url(http://www.symbex.net.au/Wiki/images/treeview-red-line.gif) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-default.gif); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview-red li { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-red-line.gif); }
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-red.gif); }
.treeview-black li { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-black-line.gif); }
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-black.gif); }
.treeview-gray li { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-gray-line.gif); }
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-gray.gif); }
.treeview-famfamfam li { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-famfamfam-line.gif); }
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(http://www.symbex.net.au/Wiki/images/treeview-famfamfam.gif); }
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
.filetree span.folder { background: url(http://www.symbex.net.au/Wiki/images/folder.gif) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url(http://www.symbex.net.au/Wiki/images/folder-closed.gif) 0 0 no-repeat; }
.filetree span.file { background: url(http://www.symbex.net.au/Wiki/images/file.gif) 0 0 no-repeat; }
<script>
var tiddlers=store.getTiddlers("modified");
var last=tiddlers[tiddlers.length-1];
var when=last.modified.formatString("YYYY/0MM/0DD at 0hh:0mm:0ss");
return "Last Modified: " +when
</script>
Examples if you want to take advantage of the LaunchApplicationPlugin. See the code here LaunchApplication
#<<LaunchApplicationLink "OpenOffice" "Program relative to Tiddly html file" "C:\Program Files\OpenOffice.org 2.4\program\soffice.exe"">>
#<<LaunchApplicationLink "Create Volume" "Program relative to Tiddly html file" "../TrueCrypt/TrueCrypt Format.exe">>
#<<LaunchApplicationLink "Scientific Calculator" "Windows Calculator" "C:\Windows\System32\calc.exe">>
#<<LaunchApplicationLink "PasswordSafe" "Program relative to Tiddly html file" "../Programs/PasswordSafe/pwsafe-3.11.1-bin/pwsafe.exe">>
#<<LaunchApplicationLink "PSP" "file:///C:\Program Files\Jasc Software Inc\Paint Shop Pro 7\psp.exe" "file:///C:\Users\Morris wa9crd\Pictures\Emily\emilypond.JPG">>
#<<LaunchApplicationLink "PSP" "Program relative to Tiddly html file" "../Pictures/emilypond.JPG">>
C:\Program Files\Paint Shop Pro 6\Psp.exe
<html><style>
#tiddlerLaunchApplication {color:#900;}</style></html>
''Button tooltip:'' add a '~PrettyLink' to another tiddler -"""[[link text|TiddlerName]]"""
''A ~PrettyTiddlyLink simply allows you to use any text'' you desire to create a link to either an internal tiddler, local file, or external URL.
''~PrettyTiddlyLinks take the form of: ''
@@"""[[Your Text|Title of tiddler/FileName/URL]]"""@@
''The ''{{makeborder{ <<tiddler QuickEdit_link>>}}}'' button in TW ~T-Notes gives you a choice of two methods of creating links.''
# Select a tiddler of file then the __text__ you wish to show as the link.
# Select a tag to choose from the list of tiddlers with that __tag__ to be the tiddler to link to, then enter the text to show as the link.
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
''Button tooltip:''definition for toolbar button that inserts macros with guide text
''Clicking the macro button shows a dropdown list of all available macros in TW ~T-Notes.'' You can see an explanation of the built-in ~TiddlyWiki macros [[here|http://twhelp.tiddlyspot.com/#%5B%5BMacros%20Built-in%5D%5D]]
''There is a large variety of macros that allow you to'' create things such as sliders, insert images, insert the date etc.
See the list here: {{makeborder{<<tiddler QuickEdit_macro>>}}}
''When a tiddler is in edit mode'' choosing a macro from the list inserts it in the tiddler at the cursor position.
@@padding-left:2em;font-size:1.1em;~NetTimePlugin trial@@
----
<<treeview2 "TW-NET" "filetree" 'collapsed: false, antisesame: "closed", animated: "normal", persist: "cookie", cookieId: "netid"' >>
<script>
/*
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
*
*/
;(function($) {
$.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
c1Elements.removeClass(c1).addClass(c2);
return this;
},
replaceClass: function(c1, c2) {
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
this.animate({ height: "toggle" }, animated, callback) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
if(callback)
callback.apply(this, arguments);
});
},
heightHide: function(animated, callback) {
if (animated) {
this.animate({ height: "hide" }, animated, callback);
} else {
this.hide();
if (callback)
this.each(callback);
}
},
prepareBranches: function(settings) {
if (!settings.prerendered) {
// mark last tree items
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
// collapse whole tree, or only those marked as closed, anyway except those marked as open
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
}
// return all items with sublists
return this.filter(":has(>ul)");
},
applyClasses: function(settings, toggler) {
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
// handle open ones
this.not(":has(>ul:hidden)")
.addClass(CLASSES.collapsable)
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
// create hitarea
this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
var classes = "";
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
$(this).addClass( classes );
});
}
// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
},
treeview: function(settings) {
settings = $.extend({
cookieId: "treeview"
}, settings);
if (settings.add) {
return this.trigger("add", [settings.add]);
}
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
return callback.apply($(this).parent()[0], arguments);
};
}
// factory for treecontroller
function treeController(tree, control) {
// factory for click handlers
function handler(filter) {
return function() {
// reuse toggle event handler, applying the elements to toggle
// start searching for all hitareas
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
// for plain toggle, no filter is provided, otherwise we need to check the parent element
return filter ? $(this).parent("." + filter).length : true;
}) );
return false;
};
}
// click on first element to collapse tree
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
// click on second to expand tree
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
// click on third to toggle tree
$("a:eq(2)", control).click( handler() );
}
// handle toggle event
function toggler() {
$(this)
.parent()
// swap classes for hitarea
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
// swap classes for parent li
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
// find child lists
.find( ">ul" )
// toggle them
.heightToggle( settings.animated, settings.toggle );
if ( settings.unique ) {
$(this).parent()
.siblings()
// swap classes for hitarea
.find(">.hitarea")
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find( ">ul" )
.heightHide( settings.animated, settings.toggle );
}
}
function serialize() {
function binary(arg) {
return arg ? 1 : 0;
}
var data = [];
branches.each(function(i, e) {
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
});
$.cookie(settings.cookieId, data.join("") );
}
function deserialize() {
var stored = $.cookie(settings.cookieId);
if ( stored ) {
var data = stored.split("");
branches.each(function(i, e) {
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
});
}
}
// add treeview class to activate styles
this.addClass("treeview");
// prepare branches and find all tree items with child lists
var branches = this.find("li").prepareBranches(settings);
switch(settings.persist) {
case "cookie":
var toggleCallback = settings.toggle;
settings.toggle = function() {
serialize();
if (toggleCallback) {
toggleCallback.apply(this, arguments);
}
};
deserialize();
break;
case "location":
var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
if ( current.length ) {
current.addClass("selected").parents("ul, li").add( current.next() ).show();
}
break;
}
branches.applyClasses(settings, toggler);
// if control option is set, create the treecontroller and show it
if ( settings.control ) {
treeController(this, settings.control);
$(settings.control).show();
}
return this.bind("add", function(event, branches) {
$(branches).prev()
.removeClass(CLASSES.last)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable)
.find(">.hitarea")
.removeClass(CLASSES.lastCollapsableHitarea)
.removeClass(CLASSES.lastExpandableHitarea);
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
});
}
});
// classes used by the plugin
// need to be styled via external stylesheet, see first example
var CLASSES = $.fn.treeview.classes = {
open: "open",
closed: "closed",
expandable: "expandable",
expandableHitarea: "expandable-hitarea",
lastExpandableHitarea: "lastExpandable-hitarea",
collapsable: "collapsable",
collapsableHitarea: "collapsable-hitarea",
lastCollapsableHitarea: "lastCollapsable-hitarea",
lastCollapsable: "lastCollapsable",
lastExpandable: "lastExpandable",
last: "last",
hitarea: "hitarea"
};
// provide backwards compability
$.fn.Treeview = $.fn.treeview;
})(jQuery);
</script>
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4320257;
var sc_invisible=1;
var sc_partition=54;
var sc_click_stat=1;
var sc_security="f524f1fe";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="counter customizable" href="http://www.statcounter.com/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/4320257/0/f524f1fe/1/" alt="counter customizable" ></a></div></noscript>
<!-- End of StatCounter Code -->
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
<!--}}}-->
''In TW~T-Notes there is a quick and easy'' way to generate math equations for use in ~TiddlyWikis using the [[CodeCogs Equation Editor|http://www.codecogs.com/components/equationeditor/equation_install.php]]
@@color:#C06;font-size:1.5em;''» »'' @@ ''Click here to <html><a href='http://twtnotes.tiddlyspot.com/download' class='button'>download</a></html>~TWT-Notes.''
''Whenever a tiddler is in edit mode, clicking on'' {{makeborder{equation}}} in the ~QuickEditToolbar will launch an equation editor where you can construct math equations. Once you are done with the equation simply click the {{makeborder{Copy to Document}}} in the Equation Editor to insert the equation into the tiddler at the cursor position.
''While composing'' the supporting text for your equations page you can use the ''wysiwyg'' editor to easily format your page. When you are finished composing the new tiddler with your text and equations simply name the tiddler and click done.
''If you wish'' you can then import it into any number of other ~TiddlyWikis as it will be a stand alone tiddler.
<<<
''If you require an HTML page.''
You can construct your page as a tiddler and convert it to an HTML page. Just click 'publish' located in the tiddlers toolbar. This will publish your HTML page in a folder named 'publish' on your local disk located in the same directory where you've saved TW ~T-Notes.
<<<
''Please make any comments or suggestions at the ~TiddlyWiki'' [[Discussion Group|http://groups.google.com/group/TiddlyWiki/]]
<html><style>
#tiddlerMathEquations .viewer blockquote {border-left: 2px solid #c06;}
</style></html>
I've just updated plugin2 with a new, undocumented feature.
Undocumented, because we'll have to see if its worth it.
Now when you specify the settings, you can specify a "sesame" and an
"antisesame" tag. Like
'collapsed: false, antisesame: "closed" '
"sesame" (case matters) gives the name of the tag to indicate that a
tiddler should be OPEN by default. "antisesame" gives the name of the
tag to indicate that a tiddler should be CLOSED by default.
So far, I haven't found any use for "sesame" -- in fact, I'm not
entirely sure that it works -- it may be that it only works when you
have a rootless tree.
But for your purposes, the 'antisesame' does seem to work. So if you
say that you want a menu to be open (collapsed: false), but specify
'antisesame' as "closed", and then tag each of the tier two menu items
with "closed", then the tree will be open, but each of the branches
will be closed.
I allow you to specify your own tags, in case you're already using
"open" and "closed" for something, or in case you want to have
different menu trees with different defaults.
The extra code to do this may slow things down a bit ... not sure.
Seems fine on FF so far. Oh, code seems to work on IE 6 so far as
well ... if you want to put that on your front page.
Persistence problems ... well, one thing at a time ;-)
Thanks,
Mark
Hi Morris et al,
I've updated the version. Plugin should read .22.
I *think* I've gotten rid of the closed-for-open errors that were
reported. Except for the situation noted in the following.
The "antisesame" option should work better now, and does pretty much
what you expect. You invoke treeview with the "collapsed: false"
option, and it all opens except for those tiddler/folders that you
have marked with the antisesame tag (typically "closed").
The sesame option allows you to mark a tiddler as "open", but it may
not work quite the way you think. If the tree starts as collapsed,
then when you click to open the tree, branches that have been marked
as "open" will already be open -- but only for that level! Not all the
way down the sub-branch. If the tree starts as opened, then the same
behavior applies. The branch is open, but not all the way down AND ...
unfortunately, the crazy bug reappears. I've been trying everything I
can think of ... hopefully this isn't too much a problem at this
stage.
Thanks,
Mark
<<tiddler NET##clock1>>
<<tiddler NET##net>>
<<tiddler NET##clock2>>
<<tiddler NET##clock3>>
----
This is my new note taking ~TiddlyWiki
Type the text for 'New Tiddler'
''With TW ~T-Notes you can create'' notes that belong to topics and subtopics, and quickly find them using the search window provided, or an automatically updated topical index.
+++[Acknowledgements & license]
----
<<tiddler [[Acknowledgements & license]]>>
===
*''Note:'' If you prefer not to use tabs you can recover the 'classic' ~TiddlyWiki behaviour by disabling the TiddlersBarPluginMG. Simply disable it through backstage save and reload. (you may wish is change back for certain applications). This allows all open tiddlers to be viewed at the same time with newly opened tiddlers opening at the top. See [[Printing]]
*See [[Customization]]
''These are the changes made in TW~T-Notes compared to [[TW Notes|http://twnotes.tiddlyspot.com/]] and [[No-Brainer Notes|http://www.giffmex.org/nobrainernotes.html]]''
<<<
#MainMenu now auto-updates when adding subTopics
#''A major addition is that you can now keep notes if you use math equations''. ~TWT-Notes has combined with ~CodeCogs to bring equation rendering to ~TiddlyWiki.
#''Live update notice is now in sidebar.'' It works even if ~TWT-Notes is on your local disk. (you must be online of course.)
#QuickEditPlugin has been added along with instructions how to use it.
#''Major Change:'' @@color:#c06;Replaced History plugin with ~TiddlersBarPlugin with tabs for all open tiddlers.@@
#Added TwHelpSearchPlugin, LaunchApplicationPlugin and macros [[editA (tiddler)|EditATiddler]] and SaveAsPlugin to the backstage for emergencies:-)
#Sidebar tabs are now hidden behind 'indexes »' to hide all tiddlers titles from Firefox page searches
## Tabs have been rearranged to eliminate the 'more' tab in order to have direct access to other tabs and the 'Missing' tab has been removed, you can see it here TabMoreMissing
##Added Plugins tab
##Contents of Sidebar tabs now scroll.
#Dropdown tag mish-mash problem in TaggerPlugin solved with +++[this code in StyleSheet]
@@.popup li .tagger a {display:inline;} @@
Source:http://groups.google.com/group/TiddlyWiki/browse_thread/thread/382005ef4990c40c
===
#Made provisions for multiple master topics. (''Note:'' the meaning of ''Master Topic'' has changed from the //nobrainer version//.){{div{
#Modified 'New Master Topic' procedures [[see here|Creating A New Master Topic]]
#Modified topics in MainMenu to include a new method for creating sub-topics. i.e. @@color:#008;subTopic | refresh@@
}}}
#You can now put your topics in any tiddler +++[like this]
Code: {{{<<tiddler Topic>>}}}
----
''Example:''
----
<<tiddler Topic>>
===
# Added backup button <<doBackup>> to sidebar for manual backups since the default 'AutoSave' does not create backups.
<<<
*''This TW Notes version of [[No-Brainer Notes|http://www.giffmex.org/nobrainernotes.html ]] has several convenient tweaks and plugins.'' It is an ongoing experiment exploring the wonderful attributes of this unfortunately named, but very useful ~TiddlyWiki. If you want to join the experiment, you can <html><a href='http://twnotes.tiddlyspot.com/download' class='button'>download</a></html> it from here.
----
<html><style>
#tiddlerMyChanges .viewer blockquote {border-left: 2px solid #c06;}
</style></html>
{{bluey{MyTopic}}}@@padding-left:0.5em;font-size:7pt;<<newTiddler title: 'Enter the name for your new sub-topic here' tag: 'MyTopic' label: 'subTopic' text: {{store.getTiddlerText("SliderFrame")}} label: 'New Master Topic'>>@@
<<forEachTiddler
where
'tiddler.tags.contains("MyTopic")'
script 'function getFirstLine(s) {var m = s.match(/\s*(.*)/);return m != null && m.length >= 1 ? m[1] : "";}'
write 'getFirstLine(tiddler.text)'>>
/%
!net
{{hgt{<<tiddler DigitalClock with: "NETDEGMINSEC [UTC] 0DD-MMM-YYYY [/UTC] " 0 >>}}}
!end
!clock1
{{hgt{<<tiddler DigitalClock with: "NETDEGMIN [UTC] 0DD-MMM-YYYY [/UTC]" >>}}}
!end
!clock2
{{hgt{@@color:#aaa;TW Ver:<<version>>@@
TW New Earth Time
<<tiddler DigitalClock with: "NETDEGMIN [UTC] 0DD-MMM-YYYY [/UTC]" >>
<<tiddler DigitalClock with: "0hh:0mm:0ss AEST" 0>>}}}
!end
!clock3
{{hgt{@@color:#aaa;TW Ver:<<version>>@@
TW New Earth Time
<<tiddler DigitalClock with: "NETDEGMINSEC [UTC] 0DD-MMM-YYYY [/UTC]" 0>>
<<tiddler DigitalClock with: "0hh:0mm:0ss AEST" 0>>}}}
!end
%/
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman - ELS Design Studios with one tweak by Dave Gifford. MAY BE OUTDATED! FOR A CLEAN, UPDATED COPY, FOLLOW THE SOURCE LINK ABOVE|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class). In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release. Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 9, date: new Date(2008,11,15)};
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE
// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");
// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
window.removeCookie=function(name) {
document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;';
}
}
config.formatters.push( {
name: "nestedSliders",
match: "\\n?\\+{3}",
terminator: "\\s*\\={3}\\n?",
lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
handler: function(w)
{
lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var defopen=lookaheadMatch[1];
var cookiename=lookaheadMatch[2];
var header=lookaheadMatch[3];
var panelwidth=lookaheadMatch[4];
var transient=lookaheadMatch[5];
var hover=lookaheadMatch[6];
var buttonClass=lookaheadMatch[7];
var label=lookaheadMatch[8];
var openlabel=lookaheadMatch[9];
var panelID=lookaheadMatch[10];
var blockquote=lookaheadMatch[11];
var deferred=lookaheadMatch[12];
// location for rendering button and panel
var place=w.output;
// default to closed, no cookie, no accesskey, no alternate text/tip
var show="none"; var cookie=""; var key="";
var closedtext=" ►"; var closedtip="";
var openedtext="►"; var openedtip="";
// extra "+", default to open
if (defopen) show="block";
// cookie, use saved open/closed state
if (cookiename) {
cookie=cookiename.trim().slice(1,-1);
cookie="chkSlider"+cookie;
if (config.options[cookie]==undefined)
{ config.options[cookie] = (show=="block") }
show=config.options[cookie]?"block":"none";
}
// parse label/tooltip/accesskey: [label=X|tooltip]
if (label) {
var parts=label.trim().slice(1,-1).split("|");
closedtext=parts.shift();
if (closedtext.substr(closedtext.length-2,1)=="=")
{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
openedtext=closedtext;
if (parts.length) closedtip=openedtip=parts.join("|");
else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
}
// parse alternate label/tooltip: [label|tooltip]
if (openlabel) {
var parts=openlabel.trim().slice(1,-1).split("|");
openedtext=parts.shift();
if (parts.length) openedtip=parts.join("|");
else openedtip="hide "+openedtext;
}
var title=show=='block'?openedtext:closedtext;
var tooltip=show=='block'?openedtip:closedtip;
// create the button
if (header) { // use "Hn" header format instead of button/link
var lvl=(header.length>5)?5:header.length;
var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
btn.onclick=onClickNestedSlider;
btn.setAttribute("href","javascript:;");
btn.setAttribute("title",tooltip);
}
else
var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
btn.innerHTML=title; // enables use of HTML entities in label
// set extra button attributes
btn.setAttribute("closedtext",closedtext);
btn.setAttribute("closedtip",closedtip);
btn.setAttribute("openedtext",openedtext);
btn.setAttribute("openedtip",openedtip);
btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
btn.defOpen=defopen!=null; // save default open/closed state (boolean)
btn.keyparam=key; // save the access key letter ("" if none)
if (key.length) {
btn.setAttribute("accessKey",key); // init access key
btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
}
btn.setAttribute("hover",hover?"true":"false");
btn.onmouseover=function(ev) {
// optional 'open on hover' handling
if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
document.onclick.call(document,ev); // close transients
onClickNestedSlider(ev); // open this slider
}
// mouseover on button aligns floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
}
// create slider panel
var panelClass=panelwidth?"floatingPanel":"sliderPanel";
if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
panel.button = btn; // so the slider panel know which button it belongs to
btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
panel.setAttribute("transient",transient=="*"?"true":"false");
panel.style.display = show;
panel.style.width=panel.defaultPanelWidth;
panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }
// render slider (or defer until shown)
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
if ((show=="block")||!deferred) {
// render now if panel is supposed to be shown or NOT deferred rendering
w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
// align floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
}
else {
var src = w.source.substr(w.nextMatch);
var endpos=findMatchingDelimiter(src,"+++","===");
panel.setAttribute("raw",src.substr(0,endpos));
panel.setAttribute("blockquote",blockquote?"true":"false");
panel.setAttribute("rendered","false");
w.nextMatch += endpos+3;
if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
}
}
}
}
)
function findMatchingDelimiter(src,starttext,endtext) {
var startpos = 0;
var endpos = src.indexOf(endtext);
// check for nested delimiters
while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
// count number of nested 'starts'
var startcount=0;
var temp = src.substring(startpos,endpos-1);
var pos=temp.indexOf(starttext);
while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
// set up to check for additional 'starts' after adjusting endpos
startpos=endpos+endtext.length;
// find endpos for corresponding number of matching 'ends'
while (startcount && endpos!=-1) {
endpos = src.indexOf(endtext,endpos+endtext.length);
startcount--;
}
}
return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
if (!theTarget) return false;
var theSlider = theTarget.sliderPanel;
var isOpen = theSlider.style.display!="none";
// if SHIFT-CLICK, dock panel first (see [[MoveablePanelPlugin]])
if (e.shiftKey && config.macros.moveablePanel) config.macros.moveablePanel.dock(theSlider,e);
// toggle label
theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
// toggle tooltip
theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));
// deferred rendering (if needed)
if (theSlider.getAttribute("rendered")=="false") {
var place=theSlider;
if (theSlider.getAttribute("blockquote")=="true")
place=createTiddlyElement(place,"blockquote");
wikify(theSlider.getAttribute("raw"),place);
theSlider.setAttribute("rendered","true");
}
// show/hide the slider
if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
else
theSlider.style.display = isOpen ? "none" : "block";
// reset to default width (might have been changed via plugin code)
theSlider.style.width=theSlider.defaultPanelWidth;
// align floater panel position with target button
if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
// if showing panel, set focus to first 'focus-able' element in panel
if (theSlider.style.display!="none") {
var ctrls=theSlider.getElementsByTagName("*");
for (var c=0; c<ctrls.length; c++) {
var t=ctrls[c].tagName.toLowerCase();
if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
{ try{ ctrls[c].focus(); } catch(err){;} break; }
}
}
var cookie=theTarget.sliderCookie;
if (cookie && cookie.length) {
config.options[cookie]=!isOpen;
if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
else window.removeCookie(cookie); // remove cookie if slider is in default display state
}
// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
// prevent clicks *within* a slider button from being processed by browser
// but allow plain click to bubble up to page background (to close transients, if any)
if (e.shiftKey || theTarget!=resolveTarget(e))
{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
Popup.remove(); // close open popup (if any)
return false;
}
//}}}
//{{{
// click in document background closes transient panels
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);
if (document.nestedSliders_savedOnClick)
var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
// if click was inside a popup... leave transient panels alone
var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
if (p) return retval;
// if click was inside transient panel (or something contained by a transient panel), leave it alone
var p=target; while (p) {
if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
p=p.parentNode;
}
if (p) return retval;
// otherwise, find and close all transient panels...
var all=document.all?document.all:document.getElementsByTagName("DIV");
for (var i=0; i<all.length; i++) {
// if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
// otherwise, if the panel is currently visible, close it by clicking it's button
if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
if (!hasClass(all[i],"floatingPanel")&&!hasClass(all[i],"sliderPanel")) all[i].style.display="none";
}
return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
if (hasClass(panel,"floatingPanel") && !hasClass(panel,"undocked")) {
// see [[MoveablePanelPlugin]] for use of 'undocked'
var rightEdge=document.body.offsetWidth-1;
var panelWidth=panel.offsetWidth;
var left=0;
var top=btn.offsetHeight;
if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
}
if (place.style.position!="relative") {
var left=findPosX(btn);
var top=findPosY(btn)+btn.offsetHeight;
var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
if (p) { left-=findPosX(p); top-=findPosY(p); }
if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
if (left<0) left=0;
}
panel.style.left=left+"px"; panel.style.top=top+"px";
}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }
// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
Morpher.prototype.coreStop = Morpher.prototype.stop;
Morpher.prototype.stop = function() {
this.coreStop.apply(this,arguments);
var e=this.element;
if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
// adjust panel overflow and position after animation
e.style.overflow = "visible";
if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
}
};
}
//}}}
<script>document.write(unescape('%3C%68%74%6D%6C%3E%3C%64%69%76%20%61%6C%69%67%6E%3D%22%63%65%6E%74%65%72%22%3E%3C%69%66%72%61%6D%65%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%77%77%77%2E%73%79%6D%62%65%78%2E%6E%65%74%2E%61%75%2F%57%69%6B%69%2F%4E%65%74%54%69%6D%65%57%68%69%74%65%2E%68%74%6D%22%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%30%22%20%77%69%64%74%68%3D%22%31%34%37%22%20%68%65%69%67%68%74%3D%22%35%30%22%20%73%63%72%6F%6C%6C%69%6E%67%3D%22%6E%6F%22%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%31%22%3E%3C%2F%69%66%72%61%6D%65%3E%3C%2F%64%69%76%3E%3C%2F%68%74%6D%6C%3E'));</script>
/***
|Name|NetTimePlugin|
|Source|http://twnet.tiddlyspot.com/#NetTimePlugin|
|Documentation|http://twnet.tiddlyspot.com/#NetTimePlugin|
|Version|1.0.1|
|Author|Robert T. West |
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.5|
|Type|plugin|
|Requires|http://www.TiddlyTools.com/#DigitalClock, HTMLFormattingPlugin, InlineJavascriptPlugin |
|Overrides|N/A|
|Description|Converts UTC to NewEarthTime for clock and journal time stamps|
!!Usage:
***/
// /%
//!BEGIN-PLUGIN-CODE
/***
Robert T. West ("Tim") , May 24, 2009
This version custom crafted for Morris Gray's website only, not intended for distribution.
For progress on the "real" version, incorporating this functionality and more, please visit http://www.rtimwest.com
Usage
{{{<<newJournal "New Earth Time: [UTC]YYYY.0MM.0DD[/UTC] NETDEGMINSEC (local, hh12:0mm AM, MMM DDth, YYYY)" "journal">>>>>
***/
//{{{
if(!version.extensions.NETTimePlugin) { //# ensure that the plugin is only installed once
version.extensions.NETTimePlugin = {installed: true };
Date.prototype.formatString_NETTime_orig=Date.prototype.formatString;
Date.prototype.formatString = function(template) {
function lpad(t,l){
var out='000'+t.toString();
return out.substring(out.length-l,out.length);
}
var refDate = new Date (this.getUTCFullYear()
,this.getUTCMonth()
,this.getUTCDate()
,this.getUTCHours()
,this.getUTCMinutes() // no assumptions
,this.getUTCSeconds()
) ;
refDate.setMilliseconds(this.getUTCMilliseconds());
var refDateTotalSeconds = (refDate.getHours() * 3600)
+ (refDate.getMinutes() * 60)
+ refDate.getSeconds()
+ (refDate.getMilliseconds()/1000); // CHANGE PRECISION HERE
var degrees = lpad(Math.floor(refDateTotalSeconds/240),3);
var minutes = lpad(Math.floor(refDateTotalSeconds%240/4),2);
var remSeconds = refDateTotalSeconds - ((degrees* 240) + (minutes*4)); // seconds in date not already in degrees or NETminutes
var seconds = lpad(Math.floor((remSeconds/86400)*1296000),2); // (unconverted seconds / seconds in day) * NETseconds in day
var NETtime = degrees + '\u00B0' + '' + minutes + '\'' + seconds + "\"";
UPtempl = template.toUpperCase();
while(UPtempl.indexOf('[UTC')>-1&&UPtempl.indexOf(']',UPtempl.indexOf('[UTC'))>-1&& UPtempl.indexOf('[/UTC]',UPtempl.indexOf(']'))>-1 )
{
var d1=UPtempl.indexOf('[UTC');
var d2=UPtempl.indexOf(']',d1);
var d3=UPtempl.indexOf('[/UTC]',d2);
var repStr=template.substring(d1,d3+6);
var nuStr = template.substring(d2+1,d3);
nuStr = refDate.formatString(nuStr);
template=template.replace(repStr, nuStr);
UPtempl = template.toUpperCase();
}
template=template.replace(/NETDEGMINSEC/g, NETtime);
template=template.replace(/NETDEGMIN/g, NETtime.substring(0,7));
template=template.replace(/NETDEG/g, NETtime.substring(0,4));
return this.formatString_NETTime_orig(template);
};
};
//}}}
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>, modified by giffmex|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]] tag:Note>>",place,null,tiddler);
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
}
});
//}}}
{{bluey{[[MYNEWMASTERTOPIC]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("MYNEWMASTERTOPIC")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'getFirstLine(tiddler.text)'
>>
{{bluey{[[NEWTOPLEVELTOPICHERE-or-AnyNameHere]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("NEWTOPLEVELTOPICHERE")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'getFirstLine(tiddler.text)'
>>
Important! do not delete this tiddler it is a master guide used by CreateNewTopLevelTopic
Customization
1:Note-taking
2:Navigating
3:How to download
<!--{{{-->
<a style="color: #5566ff">It looks like you are creating or editing a new note from the bottom up!<br>
1:Add the name for your note in the top (title) box<br>
2:Add the topic that this note belongs to in the second (tags) box above. <br>
Note:Use [[double brackets]] to enclose multiple-word topics in the tags box. <br>
3:Finally add the text of your note below.<br>
Note:Use this drop-down menu:<b><span macro='tagChooser'></span></b> to access your current topics and other tags</a>
<!--}}}-->
<<tiddler TspotOptions>>These InterfaceOptions for customising TiddlyWiki are saved in your browser
Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)
<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations
----
Also see AdvancedOptions
''This is a test-bed for the NetTimePlugin''
It might be handy to install this program. Besides its general usefulness you can observe processor time on opening the tiddlers below.
http://technet.microsoft.com/en-us/sysinternals/default.aspx
''Test''
----
#Clicking and displaying MultipleDisplays consumes over 60% of processor time
#On NETTimeOnly will cause the processor to consume, on average 30%
<!--{{{-->
<div class='header' macro='gradient vert #00c #003'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler=''></span>
<span class='siteSubtitle' refresh='content' tiddler=''></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div id='topMenu'><span class='topMenu' refresh='content' tiddler='TopMenu'></span></div>
</div><div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='mainMenu' refresh='content' force='true' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' force='true' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div id='contentFooter' refresh='content' tiddler='ContentFooter'></div></div>
<!--}}}-->
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
<<forEachTiddler
where 'tiddler.tags.contains("systemConfig")'
sortBy 'tiddler.title.toLowerCase()'
write '"|[[" + tiddler.title +"]]" + "|[["+tiddler.text.length+"]]" + "|[[" +tiddler.modified.formatString("YYYY.0MM.0DD") + "]]|"
+ store.getTiddlerSlice(tiddler.title, "Author") + "|"
+ store.getTiddlerSlice(tiddler.title, "Version") + "|"
+ store.getTiddlerSlice(tiddler.title, "CoreVersion")+"|\n"'
begin '"|sortable|k\n"
+"|>|>|>|>|>|!Plugin Information from Headers|h\n"
+ "|!Plugin|!Size|!Modified|!Author|!Version|!CoreVersion|h\n"'
>>
@@color:#c06;Tiddlers tagged systemConfig@@
<script>
// get all tiddlers tagged with "systemConfig"
var tids=store.getTaggedTiddlers("systemConfig");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("systemConfig")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
Normally only one tiddler shows at a time. In order to print more
than one tiddler at a time do the following.
Go into backstage (button in the upper right corner) click on the
'plugins' tab and scroll down to TiddlersBarPluginMG then tick the
'Disable' checkbox. Save and reload.
Now the tiddlers will all show in the order that they are opened.
Normally the tiddlers will open at the top so if you want them to
print in hierarchical order you will have to open them from the bottom
of the hierarchy up.
However there is a plugin from ~TiddlyTools that will allow you to
change the order which they are opened either at the top or at the
bottom by ticking the appropriate box in the plugin.
http://www.TiddlyTools.com/#SinglePageModePlugin
I have run a brief check and I don't think it will interfere with
normal operation when you enable TiddlersBarPluginMG again. If it
does, disable it when you enable ~TiddlersBar.
<h1>%0</h1>
<h2>%1</h2>
%2
</div>
config.options.chkShowQuickEdit=true;
Provides a secondary toolbar for use when editing a tiddler. This toolbar allows you to quickly insert TiddlyWiki tiddler links, images, macros, etc. or common formatting sequences directly into tiddler content, as well as providing find/replace, sort, and 'split' functions that operate on the tiddler source content displayed in the editor.
{{textleft{<<tiddler QuickEditToolbar with: show>>}}}
+++[installation instructions...]>...
After importing these tiddlers, add the following line to your EditTemplate:
{{{
<div macro='tiddler QuickEditToolbar'></div>
}}}
and add the following line to your StyleSheet:
{{{
[[StyleSheetShortcuts]]
}}}
Note that, after adding the QuickEditToolbar to your EditTemplate, it is //not automatically displayed when editing a tiddler//. To enable display of the toolbar, you can add the following configuration option control to your SideBarOptions (or any other suitable location):
{{{
<<option chkShowQuickEdit>> show QuickEdit toolbar
}}}
When this option is checked and you subsequently edit a tiddler, the QuickEditToolbar will then be displayed. Alternatively, you can 'hard-code' this setting, so that the QuickEditToolbar will //always// be displayed, by creating a tiddler (e.g., ConfigTweaks), tagged with <<tag systemConfig>>, containing:
{{{
config.options.chkShowQuickEdit=true;
}}}
Optionally, to add a tiddler command item that toggles the display of the QuickEditToolbar while editing a tiddler, insert the following line to your EditTemplate:
{{{
<span class='toolbar' macro='toolbar toggleQuickEdit'></span>
}}}
You can also add individual ~QuickEdit toolbar buttons (e.g. [[QuickEdit_replace]], [[QuickEdit_link]], etc) directly to the tiddler editor menu, by inserting one or more lines to your EditTemplate, like this:
{{{
<span class='toolbar' macro='tiddler QuickEdit_replace'></span>
}}}
===
/***
|Name|QuickEditPlugin|
|Source|http://www.TiddlyTools.com/#QuickEditPlugin|
|Documentation|http://www.TiddlyTools.com/#QuickEditPlugin|
|Version|2.4.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Support functions for ~QuickEdit package: styles, utility functions, and 'toggleQuickEdit' command|
!!!!!Revisions
<<<
2009.05.07 [2.4.2] added processed() function to abbreviate event handler code
2008.09.07 [2.4.1] added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.17 [2.4.0] copied code from StickyPopupPlugin to remove dependency
2008.05.12 [2.3.0] added "toggleQuickEdit" command handler (replaces inline script command)
2008.01.11 [2.2.0] converted from inline script
2007.03.29 [1.0.0] initial release (as inline script)
<<<
!!!!!Code
***/
//{{{
version.extensions.QuickEditPlugin= {major: 2, minor: 4, revision: 2, date: new Date(2009,5,7)};
// SET STYLESHEET
setStylesheet("\
.quickEdit a { border:2px outset ButtonFace; padding:0px 3px !important; \
-moz-border-radius:.5em; -webkit-border-radius:.5em; \
-moz-appearance:button !important; -webkit-appearance:push-button !important; \
background-color:ButtonFace; color:ButtonText !important; \
line-height:200%; font-weight:normal; } \
.quickEdit a:hover { border: 2px inset ButtonFace; background-color:ButtonFace; }\
", "quickEditStyles");
// REMOVE COOKIE
if (window.removeCookie===undefined) {
window.removeCookie=function(name) {
document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;';
}
}
// UTILITY FUNCTIONS
config.quickEdit = {
processed: function(ev) {
ev.cancelBubble=true;
if(ev.stopPropagation) ev.stopPropagation();
return false;
},
getField: function(where) {
var here=story.findContainingTiddler(where); if (!here) return null;
var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
if (e&&e.getAttribute("edit")=="text") return e;
return null;
},
setSelection: function(where,newtext) {
var e=this.getField(where); if (!e) return false;
e.focus(); replaceSelection(e,newtext);
return false;
},
wrapSelection: function(where,before,after) {
var e=this.getField(where); if (!e) return false;
e.focus(); replaceSelection(e,before+config.quickEdit.getSelection(e)+after);
return false;
},
getSelection: function(e) {
var seltext="";
if (e&&e.setSelectionRange)
seltext=e.value.substr(e.selectionStart,e.selectionEnd-e.selectionStart);
else if (document.selection) {
var range = document.selection.createRange();
if (range.parentElement()==e) seltext=range.text
}
return seltext;
},
promptForFilename: function(msg,path,file) {
if(window.Components) { // moz
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, nsIFilePicker.modeOpen);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='jpg';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterImages);
if (picker.show()!=nsIFilePicker.returnCancel)
var result="file:///"+picker.file.persistentDescriptor.replace(/\\/g,'/');
}
catch(e) { alert('error during local file access: '+e.toString()) }
}
else { // IE
try { // XP only
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|JPG files|*.jpg|GIF files|*.gif|PNG files|*.png|';
s.FilterIndex=1; // default to JPG
s.InitialDir=path;
s.FileName=file;
if (s.showOpen()) var result=s.FileName;
}
catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
}
return result;
}
}
//}}}
//{{{
if (config.options.chkShowQuickEdit===undefined) config.options.chkShowQuickEdit=false;
config.commands.toggleQuickEdit = {
hideReadOnly: true,
getText: function() { return config.options.chkShowQuickEdit?'\u221Aquickedit':'quickedit'; },
tooltip: 'show QuickEdit toolbar buttons',
handler: function(event,src,title) {
config.options.chkShowQuickEdit=!config.options.chkShowQuickEdit;
config.macros.option.propagateOption("chkShowQuickEdit","checked", config.options.chkShowQuickEdit,"input");
if (config.options.chkShowQuickEdit) saveOptionCookie("chkShowQuickEdit");
else removeCookie("chkShowQuickEdit");
src.innerHTML=config.commands.toggleQuickEdit.getText();
story.forEachTiddler(function(t,e){if (story.isDirty(t)) refreshElements(e);});
return false;
}
};
//}}}
// // COPIED FROM [[StickyPopupPlugin]] TO ELIMINATE PLUGIN DEPENDENCY
//{{{
if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;
Popup.stickyPopup_onDocumentClick = function(ev)
{
// if click is in a sticky popup, ignore it so popup will remain visible
var e = ev ? ev : window.event; var target = resolveTarget(e);
var p=target; while (p) {
if (hasClass(p,"popup") && (hasClass(p,"sticky")||config.options.chkStickyPopups)) break;
else p=p.parentNode;
}
if (!p) // not in sticky popup (or sticky popups disabled)... use normal click handling
Popup.onDocumentClick(ev);
return true;
};
try{removeEvent(document,"click",Popup.onDocumentClick);}catch(e){};
try{addEvent(document,"click",Popup.stickyPopup_onDocumentClick);}catch(e){};
//}}}
/%Simply highlight the text and choose the desired alignment/%
|Name|QuickEditToolbar|
|Source|http://www.TiddlyTools.com/#QuickEditToolbar|
|Version|2.1.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin, InlineJavascriptPlugin|
|Optional|QuickEdit_replace, QuickEdit_split, QuickEdit_link, QuickEdit_macro, QuickEdit_image, QuickEdit_tiddler, QuickEdit_file, QuickEdit_format, QuickEdit_sort|
|Overrides||
|Description|quickly insert TiddlyWiki tiddler links or common formatting sequences directly into tiddler content|
Usage (in EditTemplate): <div macro='tiddler QuickEditToolbar with: show'></div>
where "show" is an OPTIONAL keyword to force the toolbar to be displayed regardless of the current 'toggle' state
%/<<tiddler HideTiddlerTags>>/%
TOOLBAR DEFINITIONS BEGIN HERE...
= = = = = = = = = = = = = = = = =
%/{{hidden fine center quickEdit{
<script>
// note: always show toolbar when directly viewing the tiddler containing the actual toolbar definition!
var here=story.findContainingTiddler(place); if (here) var tid=here.getAttribute("tiddler");
var show="$1"!="$"+"1"||config.options.chkShowQuickEdit||tid=="QuickEditToolbar"
place.style.display=show?"block":"none";
</script>/%
%/<<tiddler QuickEdit_format>>/%
%/<<tiddler QuickEdit_align>>/%
%/<<tiddler QuickEdit_color>>/%
%/<<tiddler QuickEdit_font>>/%
%/ /% (SPACER)
%/<<tiddler QuickEdit_equation>>/%
%/ /% (SPACER)
%/<<tiddler QuickEdit_link>>/%
%/<<tiddler QuickEdit_macro>>/%
%/<<tiddler QuickEdit_image>>/%
%/<<tiddler QuickEdit_tiddler>>/%
%/}}}
/%
|Name|QuickEdit_align|
|Source|http://www.TiddlyTools.com/#QuickEdit_align|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for text alignment|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_align>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_align'></span>
**** ALIGNMENT ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="align text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select text alignment...','');
s.onchange=function(){
config.quickEdit.wrapSelection(this.button,'{{'+this.value+'{','}}}');
Popup.remove(); return false;
};
s.options[s.length]=new Option('left','left');
s.options[s.length-1].title='{{left{...}}}';
s.options[s.length]=new Option('center','center');
s.options[s.length-1].title='{{center{...}}}';
s.options[s.length]=new Option('right','right');
s.options[s.length-1].title='{{right{...}}}';
s.options[s.length]=new Option('justify','justify');
s.options[s.length-1].title='{{justify{...}}}';
s.options[s.length]=new Option('float left','floatleft');
s.options[s.length-1].title='{{floatleft{...}}}';
s.options[s.length]=new Option('float right','floatright');
s.options[s.length-1].title='{{floatright{...}}}';
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>align</a></html>
/%
|Name|QuickEdit_color|
|Source|http://www.TiddlyTools.com/#QuickEdit_color|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition of toolbar button for "color" command|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_color>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_color'></span>
**** COLOR ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="text/background color - @@color:#RGB;background-color:#RGB;...@@"
onclick="var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
p.style.padding='2px';
function hex(d) { return '0123456789ABCDEF'.substr(d,1); }
var fg=createTiddlyElement(p,'select'); fg.button=this;
fg.style.width='12em';
fg.options[0]=new Option('text color...','');
fg.options[1]=new Option('\xa0 or enter a value','_ask');
fg.options[2]=new Option('\xa0 or use default color','');
for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
var label=hex(r)+hex(g)+hex(b);
fg.options[fg.length]=new Option(label,'#'+label);
fg.options[fg.length-1].style.color='#'+label;
}
fg.onchange=function(){ var val=this.value;
if (val=='_ask') { val=prompt('Enter a CSS color value');
if (!val||!val.length) return false; }
this.options[0].value=val; this.options[0].text=val.length?'text: '+val:'text color...';
var bg=this.nextSibling;
for (var i=3;i<bg.options.length;i++) bg.options[i].style.color=val;
var preview=this.nextSibling.nextSibling.nextSibling;
var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
var fg=this.value; if (fg.length) fg='color:'+fg+';';
var bg=this.nextSibling.value; if (bg.length) bg='background-color:'+bg+';';
if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
removeChildren(preview); wikify(t,preview);
this.selectedIndex=0; return false;
};
var bg=createTiddlyElement(p,'select'); bg.button=this;
bg.style.width='12em';
bg.options[0]=new Option('background color...','');
bg.options[1]=new Option('\xa0 or enter a value','_ask');
bg.options[2]=new Option('\xa0 or use default color','');
for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
var label=hex(15-r)+hex(15-g)+hex(15-b);
bg.options[bg.length]=new Option(label,'#'+label);
bg.options[bg.length-1].style.backgroundColor='#'+label;
}
bg.onchange=function(){ var val=this.value;
if (val=='_ask') { val=prompt('Enter a CSS color value');
if (!val||!val.length) return false; }
this.options[0].value=val;
this.options[0].text=val.length?'background: '+val:'background color...';
var fg=this.previousSibling;
for (var i=3;i<fg.options.length;i++) fg.options[i].style.backgroundColor=val;
var preview=this.nextSibling.nextSibling;
var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
var fg=this.previousSibling.value; if (fg.length) fg='color:'+fg+';';
var bg=this.value; if (bg.length) bg='background-color:'+bg+';';
if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
removeChildren(preview); wikify(t,preview);
this.selectedIndex=0; return false;
};
var b=createTiddlyElement(p,'input',null,null,null,{type:'button'}); b.button=this;
b.value='ok'; b.style.width='4em';
b.onclick=function() {
var fg=this.previousSibling.previousSibling.value; if (fg.length) fg='color:'+fg+';';
var bg=this.previousSibling.value; if (bg.length) bg='background-color:'+bg+';';
var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
if (fg.length||bg.length) config.quickEdit.setSelection(this.button,'@@'+fg+bg+t+'@@');
Popup.remove(); return false;
};
var preview=createTiddlyElement(p,'div',null,'viewer'); var s=preview.style;
s.border='1px solid'; s.margin='2px'; s.width='24em'; s.padding='3px'; s.MozBorderRadius='3px';
s.overflow='hidden'; s.textAlign='center'; s.whiteSpace='normal';
var t=config.quickEdit.getSelection(config.quickEdit.getField(this));
wikify(t.length?t:'~AaBbCcDdEeFfGgHhIiJj 1234567890',preview);
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>color</a></html>
/%
|Name|QuickEdit_css|
|Source|http://www.TiddlyTools.com/#QuickEdit_css|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for inline css and css class wrappers|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_css>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_css'></span>
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="inline CSS styles - @@attr:value;attr:value;...@@"
onclick="var css=prompt('Enter CSS attribute/value pairs (attr:val;attr:val;...;)','');
if (!css) return false; /* cancelled by user */
return config.quickEdit.wrapSelection(this,'@@'+css+';','@@');"
>style</a></html>/%
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="CSS class wrapper - {{classname classname etc{...}}}"
onclick="var c=prompt('Enter a CSS classname','');
if (!c) return false; /* cancelled by user */
return config.quickEdit.wrapSelection(this,'{{'+c+'{','}}}');"
>class</a></html>
/%
|Name|QuickEdit_equation|
|Source|http://latex.codecogs.com.com/integration/TiddlyWiki.php|
|Version|1.0.0|
|Author|Will Bateman - CodeCogs.com|
|License|http://www.codecogs.com|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for equation editing|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_equation>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_equation'></span>
**** INSERT EQUATION ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="embed an equation"
onclick="config.quickEdit.id='eqntarget'; OpenLatexEditor('eqntarget','tw',''); "
>equation</a></html>
/%
|Name|QuickEdit_file|
|Source|http://www.TiddlyTools.com/#QuickEdit_file|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar buttons that insert content from external files|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_file>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_file'></span>
**** INSERT FILE ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="insert content from an external text file"
onclick="var fn=config.quickEdit.promptForFilename('Enter/select a text file',getLocalPath(document.location.href),'');
if (!fn) return false; /* cancelled by user */
var text=loadFile(getLocalPath(fn)); if (!text) { alert('Error: unable to read contents from \0027'+fn+'\0027'); return; }
return config.quickEdit.setSelection(place,text);"
>file</a></html>
/%
|Name|QuickEdit_font|
|Source|http://www.TiddlyTools.com/#QuickEdit_font|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button that set font-family CSS attribute|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_font>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_macro'></span>
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="set font-family CSS attribute - @@font-family:facename;...@@"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select a font family...','');
s.onchange=function(){
if (this.value=='_edit')
story.displayTiddler(story.findContainingTiddler(this.button),'QuickEdit_fontList',DEFAULT_EDIT_TEMPLATE);
else
config.quickEdit.wrapSelection(this.button,'@@font-family:\x22'+this.value+'\x22;','@@');
Popup.remove(); return false;
};
var fonts=store.getTiddlerText('QuickEdit_fontList','').split('\n');
for (var i=0; i<fonts.length; i++) {
if (!fonts[i].length) continue;
s.options[s.length]=new Option(fonts[i],fonts[i]);
s.options[s.length-1].style.fontFamily=fonts[i];
}
s.options[s.length]=new Option('[Edit font list...]','_edit');
s.options[s.length-1].title='enter fonts, one per line...';
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>font</a></html>
Arial,helvetica,sans-serif
Times New Roman,times,serif
Courier,monospaced
/%
|Name|QuickEdit_format|
|Source|http://www.TiddlyTools.com/#QuickEdit_format|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for text formatting|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_format>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_format'></span>
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="''bold''" accesskey="B"
onclick="config.quickEdit.wrapSelection(this,'\x27\x27','\x27\x27'); return false;"
> B </a></html>/%
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="//italics//" accesskey="I"
onclick="config.quickEdit.wrapSelection(this,'//','//'); return false;"
> I </a></html>/%
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="__underline__" accesskey="U"
onclick="config.quickEdit.wrapSelection(this,'__','__'); return false;"
> U </a></html>/%
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="--strikethrough--" accesskey="S"
onclick="config.quickEdit.wrapSelection(this,'--','--'); return false;"
> S </a></html>/%
%/ /% SPACER
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="format text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select text format...','');
s.onchange=function(){
var parts=this.value.split(',');
config.quickEdit.wrapSelection(this.button,parts[0],parts[1]);
Popup.remove(); return false;
};
s.options[s.length]=new Option('superscript','^^,^^');
s.options[s.length-1].title='^^superscript^^';
s.options[s.length]=new Option('subscript','~~,~~');
s.options[s.length-1].title='~~subcript~~';
s.options[s.length]=new Option('blockquote','\n\<\<\<\n,\n\<\<\<\n');
s.options[s.length-1].title='indented blockquote - \<\<\<';
s.options[s.length]=new Option('monospaced','{{{,}}}');
s.options[s.length-1].title='inline monospaced text - {{{...}}}';
s.options[s.length]=new Option('pre','\n{{{\n,\n}}}\n');
s.options[s.length-1].title='multi-line monospaced text box - {{{...}}}';
s.options[s.length]=new Option('heading 1','\n!,\n');
s.options[s.length-1].title='H1 heading - !';
s.options[s.length]=new Option('heading 2','\n!!,\n');
s.options[s.length-1].title='H2 heading - !';
s.options[s.length]=new Option('heading 3','\n!!!,\n');
s.options[s.length-1].title='H3 heading - !';
s.options[s.length]=new Option('heading 4','\n!!!!,\n');
s.options[s.length-1].title='H4 heading - !';
s.options[s.length]=new Option('heading 5','\n!!!!!,\n');
s.options[s.length-1].title='H5 heading - !';
s.options[s.length]=new Option('comment','/%,%/');
s.options[s.length-1].title='comment (hidden content) - /%...%/';
s.options[s.length]=new Option('HTML','<html>,<\x2fhtml>');
s.options[s.length-1].title='HTML syntax - <html>...<\x2fhtml>';
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>format</a></html>
/%
|Name|QuickEdit_image|
|Source|http://www.TiddlyTools.com/#QuickEdit_image|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar buttons that insert embedded image references|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_image>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_image'></span>
**** INSERT IMAGE ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img[tooltip|path/to/file.ext]]"
onclick="var fn=config.quickEdit.promptForFilename('Enter/select an image file',getLocalPath(document.location.href),'');
if (!fn) return false; /* cancelled by user */
var tip=prompt('Enter a tooltip for this image',''); if (!tip) tip=''; else tip+='|';
return config.quickEdit.setSelection(this,'[img['+tip+fn+']]');"
>image</a></html>
/%
|Name|QuickEdit_link|
|Source|http://www.TiddlyTools.com/#QuickEdit_link|
|Version|2.2.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|toolbar button that inserts a ~PrettyTiddlyLink to a tiddler or external file|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_link>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_link'></span>
**** INSERT LINK ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="add a 'PrettyLink' to another tiddler - [[link text|TiddlerName]]"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select a tiddler or file...','');
s.onchange=function(){
var title=this.value; var txt=title;
if (title=='_file') {
title=config.quickEdit.promptForFilename('Select a file',
getLocalPath(document.location.href),'');
if (!title) { this.selectedIndex=0; this.focus(); return false; }
var txt=title.substr(title.lastIndexOf('/')+1);
}
var txt=prompt('Enter the text to display for this link',txt);
if (!txt) { this.selectedIndex=0; this.focus(); return false; }
config.quickEdit.setSelection(this.button,'[['+txt+'|'+title+']]');
Popup.remove(); return false;
};
s.options[s.length]=new Option('[browse for file...]','_file');
var tids=store.getTiddlers('title');
for (var t=0; t<tids.length; t++) {
s.options[s.length]=new Option(tids[t].title,tids[t].title);
s.options[s.length-1].title=tids[t].getSubtitle();
}
var s=createTiddlyElement(p,'select');
s.options[0]=new Option('match tag...','');
s.onchange=function(){
var tag=this.value;
var tids=tag.length?store.getTaggedTiddlers(tag,'title'):store.getTiddlers('title');
var list=this.previousSibling;
while (list.length) list.options[0]=null;
var prompt='select a tiddler or file...';
if (tag.length) prompt='select a tagged tiddler ['+tids.length+' matches]...';
list.options[0]=new Option(prompt,'');
if (!tag.length) list.options[list.length]=new Option('[browse for file...]','_file');
for (var t=0; t<tids.length; t++) {
list.options[list.length]=new Option(tids[t].title,tids[t].title);
list.options[list.length-1].title=tids[t].getSubtitle();
}
};
var tags=store.getTags();
for (var t=0; t<tags.length; t++) s.options[s.length]=new Option(tags[t][0],tags[t][0]);
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>link</a></html>
/%
|Name|QuickEdit_macro|
|Source|http://www.TiddlyTools.com/#QuickEdit_macro|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button that inserts macros with guide text|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_macro>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_macro'></span>
**** INSERT MACRO ****
The "macro" command can include optional "guideText" for any given macro, as an aide to entering macro parameters, by embedding placeholders or recommended default values into the macro syntax that is inserted into your tiddler content. For built-in TW core macros, this guideText is defined below. You can add guideText to your own plugin-defined macros by using the following javascript syntax: config.macros.macroName.guideText="guide text goes here";
%/<<tiddler {{
/* SET MACRO GUIDE TEXT (for built-in core macros) (11/17 - TBD - incomplete list) */
config.macros.edit.guideText="fieldname #rows";
config.macros.view.guideText="fieldname (link,wikified,date) format";
config.macros.slider.guideText="cookie TiddlerName label tooltip";
config.macros.option.guideText="(txtCookieName,chkCookieName)";
config.macros.tiddler.guideText="TiddlerName with: params...";
""; /* must return blank to suppress output */ }}>>/%
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="add a macro - \<\<macroName ...\>\>"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select a macro...','');
s.onchange=function(){
config.quickEdit.setSelection(this.button,'\<\<'+this.value+'\>\>');
Popup.remove(); return false;
};
var macros=[]; for (var m in config.macros) if (config.macros[m].handler) macros.push(m); macros.sort();
for (var i=0; i<macros.length; i++) { var m=macros[i];
var help=config.macros[m].guideText; if (!help) help=''; else help=' '+help;
s.options[s.length]=new Option(m,m+help);
s.options[s.length-1].title='\<\<'+m+help+'\>\>';
}
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>macro</a></html>
/%
|Name|QuickEdit_replace|
|Source|http://www.TiddlyTools.com/#QuickEdit_replace|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for find/replace toolbar button|
Usage:find/replace selected text with replacement text
QuickEditToolbar: <<tiddler QuickEdit_replace>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_replace'></span>
**** FIND/REPLACE/NEXT/ALL ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="find/replace selected text with replacement text"
onclick="var here=story.findContainingTiddler(this); if (!here) return false;
var e=config.quickEdit.getField(here);
var s=config.quickEdit.getSelection(e);
var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
var t=createTiddlyElement(p,'input'); t.onfocus=function(){this.select()};
t.value=s.length?s:'enter target text';
var r=createTiddlyElement(p,'input'); r.onfocus=function(){this.select()};
r.value='enter replacement text';
var tid=here.getAttribute('tiddler');
var b=createTiddlyElement(p,'button',null,null,'?',{tid:tid});
b.style.width='2em';
b.title='FIND/FIND NEXT target text';
b.onclick=function(ev) { /* FIND */
var e=story.getTiddlerField(this.getAttribute('tid'),'text');
if (!e||e.getAttribute('edit')!='text') return;
var t=this.previousSibling.previousSibling;
e.focus();
if (e.setSelectionRange) { /* MOZ */
var newstart=e.value.indexOf(t.value,e.selectionStart+1);
if (newstart==-1) newstart=e.value.indexOf(t.value); /* wrap around */
if (newstart==-1) { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); return; }
e.setSelectionRange(newstart,newstart+t.value.length);
var linecount=e.value.split('\n').length;
var thisline=e.value.substr(0,e.selectionStart).split('\n').length;
e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);
} else if (document.selection) { /* IE */
var range=document.selection.createRange();
if(range.parentElement()==e) {
range.collapse(false);
var found=false; try{found=range.findText(t.value,e.value.length,4)}catch(e){}
if (found) range.select();
else { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); }
}
}
};
b=createTiddlyElement(p,'button',null,null,'=',{tid:tid});
b.style.width='2em';
b.title='REPLACE selected text';
b.onclick=function(ev) { /* REPLACE */
var e=story.getTiddlerField(this.getAttribute('tid'),'text');
if (!e||e.getAttribute('edit')!='text') return;
var t=this.previousSibling.previousSibling.previousSibling;
var r=this.previousSibling.previousSibling;
if ( (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
|| (document.selection && document.selection.createRange().text==''))
this.previousSibling.click(); /* no selection... do FIND first */
if ( (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
|| (document.selection && document.selection.createRange().text==''))
{ t.focus(); return; } /* still no selection... goto target input */
e.focus(); replaceSelection(e,r.value);
};
b=createTiddlyElement(p,'button',null,null,'+',{tid:tid});
b.style.width='2em';
b.title='REPLACE selected text AND FIND NEXT target text';
b.onclick=function(ev) { /* REPLACE and FIND NEXT */
this.previousSibling.click();
this.previousSibling.previousSibling.click();
};
b=createTiddlyElement(p,'button',null,null,'!',{tid:tid});
b.style.width='2em';
b.title='REPLACE ALL occurrences of target text';
b.onclick=function(ev) { /* REPLACE ALL */
var e=story.getTiddlerField(this.getAttribute('tid'),'text');
if (!e||e.getAttribute('edit')!='text') return;
var t=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling;
var r=this.previousSibling.previousSibling.previousSibling.previousSibling;
if (!t.value.length) { alert('Please enter the target text'); t.focus(); return; }
var m='This will replace all occurences of:\n\n';
m+='\''+t.value+'\'\n\nwith:\n\n\''+r.value+'\'\n\nAre you sure?';
if (!confirm(m)) { r.focus(); r.select(); return; }
e.value=e.value.replace(new RegExp(t.value.escapeRegExp(),'gm'),r.value);
e.focus(); e.select(); Popup.remove();
};
Popup.show(p,false);
if (!s.length) {t.focus();t.select()} else {r.focus();r.select()}
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>replace</a></html>
/%
|Name|QuickEdit_sort|
|Source|http://www.TiddlyTools.com/#QuickEdit_sort|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar "sort" button|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_sort>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_sort'></span>
**** SORT LINES ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="sort lines of text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select sort order...','');
s.onchange=function(){
var e=config.quickEdit.getField(this.button); if (!e) return false;
var lines=config.quickEdit.getSelection(e).split('\n').sort();
if (this.value=='D') lines=lines.reverse();
replaceSelection(e,lines.join('\n'));
e.focus();
Popup.remove(); return false;
};
s.options[s.length]=new Option('ascending','A');
s.options[s.length-1].title='ascending';
s.options[s.length]=new Option('descending','D');
s.options[s.length-1].title='descending';
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>sort</a></html>
/%
|Name|QuickEdit_split|
|Source|http://www.TiddlyTools.com/#QuickEdit_split|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|toolbar button: split selected content into separate tiddler|
Based on ideas originally developed by YannPerrin
(http://yann.perrin.googlepages.com/twkd.html#easySlicer)
Usage
QuickEditToolbar: <<tiddler QuickEdit_split>>
OR
EditTemplate:
<div class='toolbar'>
<span macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></span>
<span macro='tiddler QuickEdit_split'></span>
</div>
**** SPLIT TIDDLER ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="move selection to new tiddler and insert link, embedded tiddler, or slider"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
p.style.whiteSpace='nowrap';
var i=createTiddlyElement(p,'input');
i.defaultValue='Enter a new tiddler title';
i.onfocus=function(){this.select()};
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select type...','');
s.options[0].title='select split type';
s.options[1]=new Option('link','link');
s.options[1].title='replace with [[TiddlerName]]';
s.options[2]=new Option('embed','embed');
s.options[2].title='replace with \<\<tiddler TiddlerName\>\>';
s.options[3]=new Option('slider','slider');
s.options[3].title='replace with \<\<slider \u0022\u0022 [[TiddlerName]] [[label]] [[tooltip]]\>\>';
s.onchange=function(){
if (s.previousSibling.value==s.previousSibling.defaultValue)
{ alert('A tiddler title is required'); s.selectedIndex=0; s.previousSibling.focus(); return false; }
var tid=s.previousSibling.value;
if (store.tiddlerExists(tid) && !confirm(config.messages.overwriteWarning.format([tid])))
{ s.previousSibling.focus(); return false; }
switch(s.value) {
case 'link':
var newtxt='[['+tid+']]';
break;
case 'embed':
var newtxt='\<\<tiddler [['+tid+']]\>\>';
break;
case 'slider':
var label=prompt('Enter a slider label',tid);
if (!label) { Popup.remove(); return false; }
var tip=prompt('Enter a slider tooltip',label);
if (!tip) { Popup.remove(); return false; }
var newtxt='\<\<slider \u0022\u0022 [['+tid+']] [['+label+']] [['+tip+']]\>\>';
break;
}
var txt=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
store.saveTiddler(tid,tid,txt,config.options.txtUserName,new Date(),[],{});
story.displayTiddler(story.findContainingTiddler(this.button),tid);
config.quickEdit.setSelection(this.button,newtxt);
Popup.remove(); return false;
};
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>split</a></html>
/%
|Name|QuickEdit_tiddler|
|Source|http://www.TiddlyTools.com/#QuickEdit_tiddler|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button that inserts content from another tiddler|
Usage:
QuickEditToolbar: <<tiddler QuickEdit_tiddler>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_tiddler'></span>
**** INSERT TIDDLER ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="copy content from another tiddler"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
var s=createTiddlyElement(p,'select'); s.button=this;
s.options[0]=new Option('select a tiddler...','');
s.onchange=function(){
var txt=store.getTiddlerText(this.value);
if (!txt) { displayMessage(this.value+' not found'); this.selectedIndex=0; this.focus(); return false; }
config.quickEdit.setSelection(this.button,txt);
Popup.remove(); return false;
};
var tids=store.getTiddlers('title');
for (var t=0; t<tids.length; t++) {
s.options[s.length]=new Option(tids[t].title,tids[t].title);
s.options[s.length-1].title=tids[t].getSubtitle();
}
var s=createTiddlyElement(p,'select');
s.options[0]=new Option('match tag...','');
s.onchange=function(){
var tag=this.value;
var tids=tag.length?store.getTaggedTiddlers(tag,'title'):store.getTiddlers('title');
var list=this.previousSibling;
while (list.length) list.options[0]=null;
var prompt='select a '+(tag.length?'tagged ':'')+'tiddler'+(tag.length?(' ['+tids.length+' matches]'):'')+'...';
list.options[0]=new Option(prompt,'');
for (var t=0; t<tids.length; t++) {
list.options[list.length]=new Option(tids[t].title,tids[t].title);
list.options[list.length-1].title=tids[t].getSubtitle();
}
};
var tags=store.getTags();
for (var t=0; t<tags.length; t++) s.options[s.length]=new Option(tags[t][0],tags[t][0]);
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>tiddler</a></html>
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {
dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
createTagButton: function(place,tag,excludeTiddler) {
// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
var splitTag = tag.split("|");
var pretty = tag;
if (splitTag.length == 2) {
tag = splitTag[1];
pretty = splitTag[0];
}
var sp = createTiddlyElement(place,"span",null,"quickopentag");
createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if (excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
},
miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tagged = store.getTaggedTiddlers(tiddler.title);
if (tagged.length > 0) {
var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
theTag.setAttribute("tag",tiddler.title);
theTag.className = "miniTag";
}
},
allTagsHandler: function(place,macroName,params) {
var tags = store.getTags(params[0]);
var filter = params[1]; // new feature
var ul = createTiddlyElement(place,"ul");
if(tags.length == 0)
createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
for(var t=0; t<tags.length; t++) {
var title = tags[t][0];
if (!filter || (title.match(new RegExp('^'+filter)))) {
var info = getTiddlyLinkInfo(title);
var theListItem =createTiddlyElement(ul,"li");
var theLink = createTiddlyLink(theListItem,tags[t][0],true);
var theCount = " (" + tags[t][1] + ")";
theLink.appendChild(document.createTextNode(theCount));
var theDropDownBtn = createTiddlyButton(theListItem," " +
config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
theDropDownBtn.setAttribute("tag",tags[t][0]);
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag ",
" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
" { border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
" { margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
" /* looks better in right justified main menus */",
" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }",
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
""].join("\n"),
init: function() {
// we fully replace these builtins. can't hijack them easily
window.createTagButton = this.createTagButton;
config.macros.allTags.handler = this.allTagsHandler;
config.macros.miniTag = { handler: this.miniTagHandler };
config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
store.addNotification("QuickOpenTagStyles",refreshStyles);
}
}
config.quickOpenTag.init();
//}}}
<html><input type="button" value="Refresh Styles" onClick="javascript:refreshStyles('StyleSheet');" name="button" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'"/></html>
/***
|Name|SaveAsPlugin|
|Source|http://www.TiddlyTools.com/#SaveAsPlugin|
|Documentation|http://www.TiddlyTools.com/#SaveAsPlugin|
|Version|1.0.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Save current document to a different path/filename|
!!!!!Documentation
<<<
Syntax: {{{<<saveAs>>}}}
<<saveAs>>
<<<
!!!!!Revisions
<<<
2008.04.12 [1.0.1] automatically add "saveAs" to backstage commands
2008.04.12 [1.0.0] initial release - derived from [[NewDocumentPlugin]]
<<<
!!!!!Code
***/
//{{{
version.extensions.SaveAsPlugin= {major: 1, minor: 0, revision: 1, date: new Date(2008,4,12)};
config.macros.saveAs = {
label: "save as...",
prompt: "Save current document to a different path/file",
filePrompt: "Please select or enter a target path/filename",
defaultFilename: "new.html",
okmsg: "%0 tiddlers written to %1",
failmsg: "An error occurred while creating %0",
handler: function(place,macroName,params)
{ var btn=createTiddlyButton(place,this.label,this.prompt,this.go); },
go: function() {
// make sure we are local
if (window.location.protocol!="file:") {
alert(config.messages.notFileUrlError);
if (store.tiddlerExists(config.messages.saveInstructions))
story.displayTiddler(null,config.messages.saveInstructions);
return;
}
// get current saved file
var currPath=getLocalPath(window.location.href);
var original=loadFile(currPath);
if (!original) {
alert(config.messages.cantSaveError);
if (store.tiddlerExists(config.messages.saveInstructions))
story.displayTiddler(null,config.messages.saveInstructions);
return;
}
// get new target path/filename
var newPath=currPath;
var slashpos=newPath.lastIndexOf("/"); if (slashpos==-1) slashpos=newPath.lastIndexOf("\\");
if (slashpos!=-1) newPath=newPath.substr(0,slashpos+1); // trim filename
var newFile=currPath.substr(newPath.length); // trim path
if (!newFile.length) newFile=config.macros.saveAs.defaultFilename;
var target=config.macros.saveAs.ask(config.macros.saveAs.filePrompt,newPath,newFile);
if (!target) return; // cancelled by user
// if specified file does not include a path, assemble fully qualified path and filename
var slashpos=target.lastIndexOf("/"); if (slashpos==-1) slashpos=target.lastIndexOf("\\");
if (slashpos==-1) target=target+config.macros.saveAs.defaultFilename;
var link="file:///"+target.replace(/\\/g,'/'); // link for message text
// write target
if (saveFile(target,updateOriginal(original)))
var msg=config.macros.saveAs.okmsg.format([store.getTiddlers("title").length,target]);
else
var msg=config.macros.saveAs.failmsg.format([target]);
clearMessage(); displayMessage(msg,link);
},
ask: function(msg,path,file) {
if(window.Components) { // moz
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='html';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
}
catch(e) { alert('error during local file access: '+e.toString()) }
}
else { // IE
try { // XP/Vista only
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
s.FilterIndex=3; // default to HTML files;
s.InitialDir=path;
s.FileName=file;
if (s.showOpen()) var result=s.FileName;
}
catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
}
return result;
}
};
//}}}
//{{{
// automatically add saveAs to backstage
config.tasks.saveAs = {
text: "saveAs",
tooltip: config.macros.saveAs.prompt,
action: function(){ clearMessage(); config.macros.saveAs.go(); }
}
config.backstageTasks.splice(config.backstageTasks.indexOf("save")+1,0,"saveAs");
//}}}
/***
|Name:|SaveCloseTiddlerPlugin|
|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0 ($Rev: 5502 $)|
|Date:|$Date: 2008-06-10 23:31:39 +1000 (Tue, 10 Jun 2008) $|
|Source:|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{
saveCloseTiddler: {
text: 'done/close',
tooltip: 'Save changes to this tiddler and close it',
handler: function(ev,src,title) {
var closeTitle = title;
var newTitle = story.saveTiddler(title,ev.shiftKey);
if (newTitle)
closeTitle = newTitle;
return config.commands.closeTiddler.handler(ev,src,closeTitle);
}
},
cancelCloseTiddler: {
text: 'cancel/close',
tooltip: 'Undo changes to this tiddler and close it',
handler: function(ev,src,title) {
// the same as closeTiddler now actually
return config.commands.closeTiddler.handler(ev,src,title);
}
}
});
//}}}
<<forEachTiddler
where 'tiddler.tags.contains("script")'
sortBy 'tiddler.title.toLowerCase()'
write '"|[[" + tiddler.title +"]]" + "|[["+tiddler.text.length+"]]" + "|[[" +tiddler.modified.formatString("YYYY.0MM.0DD") + "]]|"
+ store.getTiddlerSlice(tiddler.title, "Author") + "|"
+ store.getTiddlerSlice(tiddler.title, "Version") + "|"
+ store.getTiddlerSlice(tiddler.title, "CoreVersion")+"|\n"'
begin '"|sortable|k\n"
+"|>|>|>|>|>|!Plugin Information from Headers|h\n"
+ "|!Plugin|!Size|!Modified|!Author|!Version|!CoreVersion|h\n"'
>>
@@color:#C06;''» »'' @@ Tabs containing CSS styling code (controls layout and visual style)
----
<script>
// get all tiddlers tagged with "css"
var tids=store.getTaggedTiddlers("css");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("css")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
config.options.chkSearchIncremental=false;
/***
|Name|SearchOptionsPlugin|
|Source|http://www.TiddlyTools.com/#SearchOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#SearchOptionsPluginInfo|
|Version|3.0.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.search, TiddlyWiki.prototype.search, config.macros.search.onKeyPress|
|Options|##Configuration|
|Description|extend core search function with additional user-configurable options|
Adds extra options to core search function including selecting which data items to search, enabling/disabling incremental key-by-key searches, and generating a ''list of matching tiddlers'' instead of immediately displaying all matches. This plugin also adds syntax for rendering 'search links' within tiddler content to embed one-click searches using pre-defined 'hard-coded' search terms.
!!!!!Documentation
>see [[SearchOptionsPluginInfo]]
!!!!!Configuration
<<<
Search in:
<<option chkSearchTitles>> titles <<option chkSearchText>> text <<option chkSearchTags>> tags <<option chkSearchFields>> fields <<option chkSearchShadows>> shadows
<<option chkSearchHighlight>> Highlight matching text in displayed tiddlers
<<option chkSearchList>> Show list of matches
<<option chkSearchListTiddler>> Write list to [[SearchResults]] tiddler
<<option chkSearchTitlesFirst>> Show title matches first
<<option chkSearchByDate>> Sort matching tiddlers by modification date (most recent first)
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters, {{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay
<<option chkSearchOpenTiddlers>> Search only in tiddlers that are currently displayed
<<option chkSearchExcludeTags>> Exclude tiddlers tagged with: <<option txtSearchExcludeTags>>
<<<
!!!!!Revisions
<<<
2009.01.16 [3.0.5] added chkSearchOpenTiddlers option to limit searches to displayed tiddlers only
|please see [[SearchOptionsPluginInfo]] for additional revision details|
2005.10.18 [1.0.0] Initial Release
<<<
!!!!!Code
***/
//{{{
version.extensions.SearchOptionsPlugin= {major: 3, minor: 0, revision: 5, date: new Date(2009,1,16)};
var co=config.options; // abbrev
if (co.chkSearchTitles===undefined) co.chkSearchTitles=true;
if (co.chkSearchText===undefined) co.chkSearchText=true;
if (co.chkSearchTags===undefined) co.chkSearchTags=true;
if (co.chkSearchFields===undefined) co.chkSearchFields=true;
if (co.chkSearchTitlesFirst===undefined) co.chkSearchTitlesFirst=true;
if (co.chkSearchList===undefined) co.chkSearchList=true;
if (co.chkSearchHighlight===undefined) co.chkSearchHighlight=true;
if (co.chkSearchListTiddler===undefined) co.chkSearchListTiddler=false;
if (co.chkSearchByDate===undefined) co.chkSearchByDate=false;
if (co.chkIncrementalSearch===undefined) co.chkIncrementalSearch=true;
if (co.chkSearchShadows===undefined) co.chkSearchShadows=true;
if (co.txtIncrementalSearchDelay===undefined) co.txtIncrementalSearchDelay=500;
if (co.txtIncrementalSearchMin===undefined) co.txtIncrementalSearchMin=3;
if (co.chkSearchOpenTiddlers===undefined) co.chkSearchOpenTiddlers=false;
if (co.chkSearchExcludeTags===undefined) co.chkSearchExcludeTags=true;
if (co.txtSearchExcludeTags===undefined) co.txtSearchExcludeTags="excludeSearch";
if (config.macros.search.reportTitle==undefined)
config.macros.search.reportTitle="SearchResults"; // note: not a cookie!
config.macros.search.label+="\xa0"; // a little bit of space just because it looks better
//}}}
// // searchLink: {{{[search[text to find]] OR [search[text to display|text to find]]}}}
//{{{
config.formatters.push( {
name: "searchLink",
match: "\\[search\\[",
lookaheadRegExp: /\[search\[(.*?)(?:\|(.*?))?\]\]/mg,
prompt: "search for: '%0'",
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var label=lookaheadMatch[1];
var text=lookaheadMatch[2]||label;
var prompt=this.prompt.format([text]);
var btn=createTiddlyButton(w.output,label,prompt,
function(){story.search(this.getAttribute("searchText"))},"searchLink");
btn.setAttribute("searchText",text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
});
//}}}
// // incremental search uses option settings instead of hard-coded delay and minimum input values
//{{{
var fn=config.macros.search.onKeyPress;
fn=fn.toString().replace(/500/g, "config.options.txtIncrementalSearchDelay||500");
fn=fn.toString().replace(/> 2/g, ">=(config.options.txtIncrementalSearchMin||3)");
eval("config.macros.search.onKeyPress="+fn);
//}}}
// // REPLACE story.search() for option to "show search results in a list"
//{{{
Story.prototype.search = function(text,useCaseSensitive,useRegExp)
{
var co=config.options; // abbrev
var re=new RegExp(useRegExp ? text : text.escapeRegExp(),useCaseSensitive ? "mg" : "img");
if (config.options.chkSearchHighlight) highlightHack=re;
var matches = store.search(re,co.chkSearchByDate?"modified":"title","");
if (co.chkSearchByDate) matches=matches.reverse(); // most recent first
var q = useRegExp ? "/" : "'";
clearMessage();
if (!matches.length) {
if (co.chkSearchListTiddler) discardSearchResults();
displayMessage(config.macros.search.failureMsg.format([q+text+q]));
} else {
if (co.chkSearchList||co.chkSearchListTiddler)
reportSearchResults(text,matches);
else {
var titles = []; for(var t=0; t<matches.length; t++) titles.push(matches[t].title);
this.closeAllTiddlers(); story.displayTiddlers(null,titles);
displayMessage(config.macros.search.successMsg.format([matches.length, q+text+q]));
}
}
highlightHack = null;
}
//}}}
// // REPLACE store.search() for enhanced searching/sorting options
//{{{
TiddlyWiki.prototype.search = function(searchRegExp,sortField,excludeTag)
{
var co=config.options; // abbrev
var tids = this.reverseLookup("tags",excludeTag,false,sortField);
var opened=[]; story.forEachTiddler(function(tid,elem){opened.push(tid);});
// eliminate tiddlers tagged with excluded tags
if (co.chkSearchExcludeTags&&co.txtSearchExcludeTags.length) {
var ex=co.txtSearchExcludeTags.readBracketedList();
var temp=[]; for(var t=tids.length-1; t>=0; t--)
if (!tids[t].tags.containsAny(ex)) temp.push(tids[t]);
tids=temp;
}
// scan for matching titles first...
var results = [];
if (co.chkSearchTitles) {
for(var t=0; t<tids.length; t++) {
if (co.chkSearchOpenTiddlers && !opened.contains(tids[t].title)) continue;
if(tids[t].title.search(searchRegExp)!=-1) results.push(tids[t]);
}
if (co.chkSearchShadows)
for (var t in config.shadowTiddlers) {
if (co.chkSearchOpenTiddlers && !opened.contains(t)) continue;
if ((t.search(searchRegExp)!=-1) && !store.tiddlerExists(t))
results.push((new Tiddler()).assign(t,config.shadowTiddlers[t]));
}
}
// then scan for matching text, tags, or field data
for(var t=0; t<tids.length; t++) {
if (co.chkSearchOpenTiddlers && !opened.contains(tids[t].title)) continue;
if (co.chkSearchText && tids[t].text.search(searchRegExp)!=-1)
results.pushUnique(tids[t]);
if (co.chkSearchTags && tids[t].tags.join(" ").search(searchRegExp)!=-1)
results.pushUnique(tids[t]);
if (co.chkSearchFields && store.forEachField!=undefined)
store.forEachField(tids[t],
function(tid,field,val) {
if (val.search(searchRegExp)!=-1) results.pushUnique(tids[t]);
},
true); // extended fields only
}
// then check for matching text in shadows
if (co.chkSearchShadows)
for (var t in config.shadowTiddlers) {
if (co.chkSearchOpenTiddlers && !opened.contains(t)) continue;
if ((config.shadowTiddlers[t].search(searchRegExp)!=-1) && !store.tiddlerExists(t))
results.pushUnique((new Tiddler()).assign(t,config.shadowTiddlers[t]));
}
// if not 'titles first', or sorting by modification date,
// re-sort results to so titles, text, tag and field matches are mixed together
if(!sortField) sortField = "title";
var bySortField=function(a,b){
if(a[sortField]==b[sortField])return(0);else return(a[sortField]<b[sortField])?-1:+1;
}
if (!co.chkSearchTitlesFirst || co.chkSearchByDate) results.sort(bySortField);
return results;
}
//}}}
// // HIJACK core {{{<<search>>}}} macro to add "report" and "simple inline" output
//{{{
config.macros.search.SOP_handler=config.macros.search.handler;
config.macros.search.handler = function(place,macroName,params)
{
// if "report", use SearchOptionsPlugin report generator for inline output
if (params[1]&¶ms[1].substr(0,6)=="report") {
var keyword=params[0];
var options=params[1].split("=")[1]; // split "report=option+option+..."
var heading=params[2]?params[2].unescapeLineBreaks():"";
var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
if (matches.length) wikify(heading+window.formatSearchResults(keyword,matches,options),place);
} else if (params[1]) {
var keyword=params[0];
var heading=params[1]?params[1].unescapeLineBreaks():"";
var seperator=params[2]?params[2].unescapeLineBreaks():", ";
var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
if (matches.length) {
var out=[];
for (var m=0; m<matches.length; m++) out.push("[["+matches[m].title+"]]");
wikify(heading+out.join(seperator),place);
}
} else
config.macros.search.SOP_handler.apply(this,arguments);
};
//}}}
// // SearchResults panel handling
//{{{
setStylesheet(".searchResults { padding:1em 1em 0 1em; }","searchResults"); // matches std tiddler padding
config.macros.search.createPanel=function(text,matches,body) {
function getByClass(e,c) { var d=e.getElementsByTagName("div");
for (var i=0;i<d.length;i++) if (hasClass(d[i],c)) return d[i]; }
var panel=createTiddlyElement(null,"div","searchPanel","searchPanel");
this.renderPanel(panel,text,matches,body);
var oldpanel=document.getElementById("searchPanel");
if (!oldpanel) { // insert new panel just above tiddlers
var da=document.getElementById("displayArea");
da.insertBefore(panel,da.firstChild);
} else { // if panel exists
var oldwrap=getByClass(oldpanel,"searchResults");
var newwrap=getByClass(panel,"searchResults");
// if no prior content, just insert new content
if (!oldwrap) oldpanel.insertBefore(newwrap,null);
else { // swap search results content but leave containing panel intact
oldwrap.style.display='block'; // unfold wrapper if needed
var i=oldwrap.getElementsByTagName("input")[0]; // get input field
if (i) { var pos=this.getCursorPos(i); i.onblur=null; } // get cursor pos, ignore blur
oldpanel.replaceChild(newwrap,oldwrap);
panel=oldpanel; // use existing panel
}
}
this.showPanel(true,pos);
return panel;
}
config.macros.search.renderPanel=function(panel,text,matches,body) {
var wrap=createTiddlyElement(panel,"div",null,"searchResults");
wrap.onmouseover = function(e){ addClass(this,"selected"); }
wrap.onmouseout = function(e){ removeClass(this,"selected"); }
// create toolbar: "open all", "fold/unfold", "close"
var tb=createTiddlyElement(wrap,"div",null,"toolbar");
var b=createTiddlyButton(tb, "open all", "open all matching tiddlers", function() {
story.displayTiddlers(null,this.getAttribute("list").readBracketedList()); return false; },"button");
var list=""; for(var t=0;t<matches.length;t++) list+='[['+matches[t].title+']] ';
b.setAttribute("list",list);
var b=createTiddlyButton(tb, "fold", "toggle display of search results", function() {
config.macros.search.foldPanel(this); return false; },"button");
var b=createTiddlyButton(tb, "close", "dismiss search results", function() {
config.macros.search.showPanel(false); return false; },"button");
createTiddlyText(createTiddlyElement(wrap,"div",null,"title"),"Search for: "+text); // title
wikify(body,createTiddlyElement(wrap,"div",null,"viewer")); // report
return panel;
}
config.macros.search.showPanel=function(show,pos) {
var panel=document.getElementById("searchPanel");
var i=panel.getElementsByTagName("input")[0];
i.onfocus=show?function(){config.macros.search.stayFocused(true);}:null;
i.onblur=show?function(){config.macros.search.stayFocused(false);}:null;
if (show && panel.style.display=="block") { // if shown, grab focus, restore cursor
if (i&&this.stayFocused()) { i.focus(); this.setCursorPos(i,pos); }
return;
}
if(!config.options.chkAnimate) {
panel.style.display=show?"block":"none";
if (!show) { removeChildren(panel); config.macros.search.stayFocused(false); }
} else {
var s=new Slider(panel,show,false,show?"none":"children");
s.callback=function(e,p){e.style.overflow="visible";}
anim.startAnimating(s);
}
return panel;
}
config.macros.search.foldPanel=function(button) {
var d=document.getElementById("searchPanel").getElementsByTagName("div");
for (var i=0;i<d.length;i++) if (hasClass(d[i],"viewer")) var v=d[i]; if (!v) return;
var show=v.style.display=="none";
if(!config.options.chkAnimate)
v.style.display=show?"block":"none";
else {
var s=new Slider(v,show,false,"none");
s.callback=function(e,p){e.style.overflow="visible";}
anim.startAnimating(s);
}
button.innerHTML=show?"fold":"unfold";
return false;
}
config.macros.search.stayFocused=function(keep) { // TRUE/FALSE=set value, no args=get value
if (keep===undefined) return this.keepReportInFocus;
this.keepReportInFocus=keep;
return keep
}
config.macros.search.getCursorPos=function(i) {
var s=0; var e=0; if (!i) return { start:s, end:e };
try {
if (i.setSelectionRange) // FF
{ s=i.selectionStart; e=i.selectionEnd; }
if (document.selection && document.selection.createRange) { // IE
var r=document.selection.createRange().duplicate();
var len=r.text.length; s=0-r.moveStart('character',-100000); e=s+len;
}
}catch(e){};
return { start:s, end:e };
}
config.macros.search.setCursorPos=function(i,pos) {
if (!i||!pos) return; var s=pos.start; var e=pos.end;
if (i.setSelectionRange) //FF
i.setSelectionRange(s,e);
if (i.createTextRange) // IE
{ var r=i.createTextRange(); r.collapse(true); r.moveStart("character",s); r.select(); }
}
//}}}
// // SearchResults report generation
// note: these functions are defined globally, so they can be more easily redefined to customize report formats//
//{{{
if (!window.reportSearchResults) window.reportSearchResults=function(text,matches)
{
var cms=config.macros.search; // abbrev
var body=window.formatSearchResults(text,matches);
if (!config.options.chkSearchListTiddler) // show #searchResults panel
window.scrollTo(0,ensureVisible(cms.createPanel(text,matches,body)));
else { // write [[SearchResults]] tiddler
var title=cms.reportTitle;
var who=config.options.txtUserName;
var when=new Date();
var tags="excludeLists excludeSearch temporary";
var tid=store.getTiddler(title); if (!tid) tid=new Tiddler();
tid.set(title,body,who,when,tags);
store.addTiddler(tid);
story.closeTiddler(title);
story.displayTiddler(null,title);
}
}
if (!window.formatSearchResults) window.formatSearchResults=function(text,matches,opt)
{
var body='';
var title=config.macros.search.reportTitle
var q = config.options.chkRegExpSearch ? "/" : "'";
if (!opt) var opt="all";
var parts=opt.split("+");
for (var i=0; i<parts.length; i++) { var p=parts[i].toLowerCase();
if (p=="again"||p=="all") body+=window.formatSearchResults_again(text,matches);
if (p=="summary"||p=="all") body+=window.formatSearchResults_summary(text,matches);
if (p=="list"||p=="all") body+=window.formatSearchResults_list(text,matches);
if (p=="buttons"||p=="all") body+=window.formatSearchResults_buttons(text,matches);
}
return body;
}
if (!window.formatSearchResults_again) window.formatSearchResults_again=function(text,matches)
{
var title=config.macros.search.reportTitle
var body='';
// search again
body+='{{span{<<search "'+text.replace(/"/g,'"')+'">> /%\n';
body+='%/<html><input type="button" value="search again"';
body+=' onclick="var t=this.parentNode.parentNode.getElementsByTagName(\'input\')[0];';
body+=' config.macros.search.doSearch(t); return false;">';
body+=' <a href="javascript:;" onclick="';
body+=' var e=this.parentNode.nextSibling;';
body+=' var show=e.style.display!=\'block\';';
body+=' if(!config.options.chkAnimate) e.style.display=show?\'block\':\'none\';';
body+=' else anim.startAnimating(new Slider(e,show,false,\'none\'));';
body+=' return false;">options...</a>';
body+='</html>@@display:none;border-left:1px dotted;margin-left:1em;padding:0;padding-left:.5em;font-size:90%;/%\n';
body+=' %/<<option chkSearchTitles>>titles /%\n';
body+=' %/<<option chkSearchText>>text /%\n';
body+=' %/<<option chkSearchTags>>tags /%\n';
body+=' %/<<option chkSearchFields>>fields /%\n';
body+=' %/<<option chkSearchShadows>>shadows\n';
body+=' <<option chkCaseSensitiveSearch>>case-sensitive /%\n';
body+=' %/<<option chkRegExpSearch>>text patterns /%\n';
body+=' %/<<option chkSearchByDate>>sorted by date\n';
body+=' <<option chkSearchHighlight>> highlight matching text in displayed tiddlers\n';
body+=' <<option chkIncrementalSearch>>incremental key-by-key search: /%\n';
body+=' %/{{twochar{<<option txtIncrementalSearchMin>>}}} or more characters, /%\n';
body+=' %/{{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay\n';
body+=' <<option chkSearchOpenTiddlers>> search only in tiddlers that are currently displayed\n';
body+=' <<option chkSearchExcludeTags>>exclude tiddlers tagged with:\n';
body+=' {{editor{<<option txtSearchExcludeTags>>}}}/%\n';
body+='%/@@}}}\n\n';
return body;
}
if (!window.formatSearchResults_summary) window.formatSearchResults_summary=function(text,matches)
{
// summary: nn tiddlers found matching '...', options used
var body='';
var co=config.options; // abbrev
var title=config.macros.search.reportTitle
var q = co.chkRegExpSearch ? "/" : "'";
body+="''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''\n";
var opts=[];
if (co.chkSearchTitles) opts.push("titles");
if (co.chkSearchText) opts.push("text");
if (co.chkSearchTags) opts.push("tags");
if (co.chkSearchFields) opts.push("fields");
if (co.chkSearchShadows) opts.push("shadows");
if (co.chkSearchOpenTiddlers) body+="^^//search limited to displayed tiddlers only//^^\n";
body+="~~ searched in "+opts.join(" + ")+"~~\n";
body+=(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"^^ using ":"")
+(co.chkCaseSensitiveSearch?"case-sensitive ":"")
+(co.chkRegExpSearch?"pattern ":"")
+(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"matching^^\n":"");
return body;
}
if (!window.formatSearchResults_list) window.formatSearchResults_list=function(text,matches)
{
// bullet list of links to matching tiddlers
var body='';
var pattern=co.chkRegExpSearch?text:text.escapeRegExp();
var sensitive=co.chkCaseSensitiveSearch?"mg":"img";
var link='{{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="'
+'if(config.options.chkSearchHighlight)'
+' highlightHack=new RegExp(\x27'+pattern+'\x27,\x27'+sensitive+'\x27);'
+'story.displayTiddler(null,\x27%0\x27);'
+'highlightHack = null; return false;'
+'" title="%2">%1</a></html>}}}';
for(var t=0;t<matches.length;t++) {
body+="* ";
if (config.options.chkSearchByDate)
body+=matches[t].modified.formatString('YYYY.0MM.0DD 0hh:0mm')+" ";
var title=matches[t].title;
var fixup=title.replace(/'/g,"\\x27").replace(/"/g,"\\x22");
var tid=store.getTiddler(title);
var tip=tid?tid.getSubtitle():''; tip=tip.replace(/"/g,""");
body+=link.format([fixup,title,tip])+'\n';
}
return body;
}
if (!window.formatSearchResults_buttons) window.formatSearchResults_buttons=function(text,matches)
{
// embed buttons only if writing SearchResults to tiddler
if (!config.options.chkSearchListTiddler) return "";
// "open all" button
var title=config.macros.search.reportTitle;
var body="";
body+="@@diplay:block;<html><input type=\"button\" href=\"javascript:;\" "
+"onclick=\"story.displayTiddlers(null,[";
for(var t=0;t<matches.length;t++)
body+="'"+matches[t].title.replace(/\'/mg,"\\'")+"'"+((t<matches.length-1)?", ":"");
body+="],1);\" accesskey=\"O\" value=\"open all matching tiddlers\"></html> ";
// "discard SearchResults" button
body+="<html><input type=\"button\" href=\"javascript:;\" "
+"onclick=\"discardSearchResults()\" value=\"discard "+title+"\"></html>";
body+="@@\n";
return body;
}
if (!window.discardSearchResults) window.discardSearchResults=function()
{
// remove the tiddler
story.closeTiddler(config.macros.search.reportTitle);
store.deleteTiddler(config.macros.search.reportTitle);
store.notify(config.macros.search.reportTitle,true);
}
//}}}
<<<
# [[1:Note-taking in NBN]]
# [[1:What is Plagiarism]]
# [[3:Guidelines for Plagiarism Prevention]]
# [[ForEachTiddlerPlugin]]
# [[HTMLFormattingPlugin]]
# [[InlineJavascriptPlugin]]
# [[InstructionsOld]]
# [[MyChanges]]
# [[NestedSlidersPlugin(withGiffmexTweak)]]
# [[NoteNote]]
# [[QuickEditPackage]]
# [[QuickEditPlugin]]
# [[QuickEditToolbar]]
# [[QuickEdit_align]]
# [[QuickEdit_color]]
# [[QuickEdit_css]]
# [[QuickEdit_file]]
# [[QuickEdit_font]]
# [[QuickEdit_format]]
# [[QuickEdit_image]]
# [[QuickEdit_macro]]
# [[QuickEdit_replace]]
# [[QuickEdit_sort]]
# [[QuickEdit_split]]
# [[QuickEdit_tiddler]]
# [[SearchOptionsPlugin]]
# [[SinglePageModePlugin]]
# [[StyleSheetShortcuts]]
# [[TaggerPlugin]]
# [[ToggleRightSidebar]]
# [[ToggleTagPlugin]]
# [[TspotSetupPlugin]]
# [[UploadPlugin]]
# [[a: Explain What "Plagiarism" Means]]
# [[b: Explain What's Wrong About Plagiarism]]
# [[b:Sources Cited (But Still Plagiarized)]]
<<<
I should be below TopTiddler
Type the text for 'New Tiddler'
Type the text for 'New Tiddler'
I should be below TopTiddler
''To create a new Treeview menu you must start a New Master Topic ''
#''To create a'' new master topic click ''New Master Topic'' button on the top menu above.
## ''Change the name of the tiddler'' ~MyNewMasterTopic to __your own topic name__.
## ''In the body of the tiddler replace'' MYNEWMASTERTOPIC (2 places) with __your own topic name__ as above.
2: ''Add your new topic'' to MainMenu like this:
{{{<<treeview1 "YourOwnTopicName">>}}}
If your topic has spaces use brackets like this:
{{{<<treeview1 [[Your Own Topic Name]]>>}}}
----
You will need a version of TW that incorporates the jQuery library. version 2.5.0 or greater.
<<<
You will also need:
# ~TreeviewPluginPlugin from http://treeview.tiddlyspot.com/
# The code in MarkupPostBody
# The tiddler JqueryTreeviewCSS inserted into your ~StyleSheet
# The jQuery cookie plugin [[Cookie plugin]] (see [[Bugs3]])
<<<
/%
|Name|ShowSimilarTiddlers|
|Source|http://www.TiddlyTools.com/#ShowSimilarTiddlers|
|Version|1.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|list tiddlers, ranked by number of shared tags|
Usage: {{{<<tiddler ShowSimilarTiddlers with: TiddlerName>>}}}
where 'TiddlerName' indicates the tiddler whose tags are to be matched, and defaults to the current tiddler if not specified.
%/
<script>
var out=[]; var similar={}; var rank=[];
var here=story.findContainingTiddler(place);
var title='$1'!='$'+'1'?'$1':here?here.getAttribute('tiddler'):'';
var tid=store.getTiddler(title); if (!tid) return;
var tids=store.getTiddlers();
for (var i=0; i<tids.length; i++) { var t=tids[i];
if (t.title==tid.title) continue;
var tags=[]; for (var j=0; j<t.tags.length; j++)
if (tid.tags.contains(t.tags[j])) tags.push(t.tags[j]);
if (tags.length) {
similar[tids[i].title]=tags;
if (!rank[tags.length]) rank[tags.length]=new Array();
rank[tags.length].push(tids[i].title);
}
}
for (var r=rank.length-1; r>=0; r--) { if (!rank[r]) continue;
out.push('*%0 shared tags:'.format([r,rank[r].length]));
for (var t=0; t<rank[r].length; t++)
out.push('##[[%0]] ~~(%1)~~'.format([rank[r][t],similar[rank[r][t]].join(', ')]));
}
return out.join('\n');
</script>
<<tiddler NetTimePlugin##net>>
----
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<doBackup>><<tiddler TspotSidebar>><<attach>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
@@padding:0.6em;<<slider chkSliderSideBarTabs SideBarTabsSlider 'index »' 'tiddlers, timeline, all, tags'>>@@
<<tabs MainTab [[Timeline]] 'Timeline' [[TabTimeline]] [[All]] 'All tiddlers' [[TabAll]] [[Shadowed ]] "Shadowed tiddlers" [[TabMoreShadowed]] [[Tags]] 'All tags' [[TabTags]] [[Orphans]] "Orphaned" [[TabMoreOrphans]] [[Plugins ]] "Plugins" [[Plugins]] >>
/***
| Name:|SiteMapMacro (modified)|
| Author:|Simon Baird|
| Location:|http://simonbaird.com/mptw/#SiteMapMacro|
| Version:|1.0.3, 15-Mar-06|
!!Examples
See SiteMap and SliderSiteMap for example usage.
!!Parameters
* Name of tiddler to start at
* Max depth (a number)
* Format (eg, nested, see formats below)
* Don't show root flag (anything other than null turns it on)
* Tags - a string containing a bracketed list of tags that we are interested in
!!History
* 1.0.3 (modified) (05-Mar-09)
** replaced sliders formatString (done by Morris Gray)
* 1.0.3 (15-Mar-06)
** added tag filtering
* 1.0.2 (15-Mar-06)
** Added json format and dontshowroot option
* 1.0.1 (9-Mar-06)
** Added selectable formats and fixed nested slider format
* 1.0.0 (8-Mar-06)
** first release
***/
//{{{
version.extensions.SiteMapMacro = {
major: 1,
minor: 0,
revision: 3,
date: new Date(2006,3,15),
source: "http://simonbaird.com/mptw/#SiteMapMacro"
};
config.macros.siteMap = {
formats: {
bullets: {
formatString: "%0[[%1]]\n%2",
indentString: "*"
},
// put this in your StyleSheet to make it look good.
// .sliderPanel { margin-left: 2em; }
sliders: {
formatString: "@@display:block;[[%1]]+++\n%2===@@" ,
formatStringLeaf: "[[%1]]\n"
},
openSliders: {
formatString: "[[%1]]++++\n%2===\n\n",
formatStringLeaf: "[[%1]]\n"
},
popups: {
formatString: "[[%1]]+++^\n%2===\n\n",
formatStringLeaf: "[[%1]]\n"
},
// these don't work too well
openPopups: {
formatString: "[[%1]]++++^\n%2===\n\n",
formatStringLeaf: "[[%1]]\n"
},
// this is a little nuts but it works
json: {
formatString: '\n%0{"%1":[%2\n%0]}',
formatStringLeaf: '\n%0"%1"',
indentString: " ",
separatorString: ","
}
},
defaultFormat: "bullets",
treeTraverse: function(title,depth,maxdepth,format,dontshowroot,tags,excludetags) {
var tiddler = store.getTiddler(title);
var tagging = store.getTaggedTiddlers(title);
if (dontshowroot)
depth = 0;
var indent = " ";
if (this.formats[format].indentString)
for (var j=0;j<depth;j++)
indent += this.formats[format].indentString;
var childOutput = "";
if (!maxdepth || depth < parseInt(maxdepth))
for (var i=0;i<tagging.length;i++)
if (tagging[i].title != title) {
if (this.formats[format].separatorString && i != 0)
childOutput += this.formats[format].separatorString;
childOutput += this.treeTraverse(tagging[i].title,depth+1,maxdepth,format,null,tags,excludetags);
}
if (childOutput == "" && (
(tags && tags != "" && !tiddler.tags.containsAll(tags.readBracketedList())) ||
(excludetags && excludetags != "" && tiddler.tags.containsAny(excludetags.readBracketedList()))
)
) {
// so prune it cos it doesn't have the right tags and neither do any of it's children
return "";
}
if (dontshowroot)
return childOutput;
if (this.formats[format].formatStringLeaf && childOutput == "") {
// required for nestedSliders
return this.formats[format].formatStringLeaf.format([indent,title,childOutput]);
}
return this.formats[format].formatString.format([indent,title,childOutput]);
},
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
wikify(this.treeTraverse(
params[0] && params[0] != '.' ? params[0] : tiddler.title, 1,
params[1] && params[1] != '.' ? params[1] : null, // maxdepth
params[2] && params[2] != '.' ? params[2] : this.defaultFormat, // format
params[3] && params[3] != '.' ? params[3] : null, // dontshowroot
params[4] && params[4] != '.' ? params[4] : null, // tags
params[5] && params[5] != '.' ? params[5] : null // excludetags
),place);
}
}
//}}}
Demonstrating New Earth Time plugin
@@font-size:1.8em;color:#fff;font-weight:normal;~TW-NET-Trial@@
http://twt-notes.tiddlyspot.com/
<<siteMap [[Enter the name for your new sub-topic here, too]] . sliders>>
.popup li .tagger a {display:inline;}
/*FONT STUFF*/
.hgt {line-height:9pt;font-size:7pt;display:block;text-align:center;color:#c06;padding-left:0.7em;font-size:9px;}
#tiddlerDescription .viewer {
overflow: auto;
}
#tiddlerAuthor .viewer {
overflow: auto;
}
.doubleborder {
border: 4px double #999;
margin: 8px;
}
body {font-family: arial; font-size: 10pt;}
.uparrow{ font-weight: bold; text-decoration: underline; padding-right: 7px; background: url("http://img408.imageshack.us/img408/5150/daquo3gq1.gif") no-repeat right 56%; }
h1,h2,h3,h4,h5 { color: #8899ff; background: white; font-family: Verdana; border-bottom: none;}
.editor a {color:#800;}
#editor a {color:#dddddd;}
.nowrap { white-space:nowrap;}
.begone{clear:both;}
.toolbar a {color:#5566ff;}
.selected .toolbar a {color:#5566ff;}
.selected .toolbar a:hover {color:#5566ff;}
.popup li {list-style:none;}
.doubleborder {
border: 4px double #a00;
padding:1px;
margin: 8px;
width:132px;
height:99px;
}
#tiddlerTWHelp-SearchResults .viewer {
overflow: auto;
}
/* SHORTENS THE HEIGHT OF THE HEADER */
#displayArea {margin-top:0.0em}
.header {position:relative; height:73px;}
.headerShadow {padding: 1.4em 0em .8em 1em;}
.headerForeground {padding: 1.4em 0em .8em 1em;}
.siteTitle {font-size:1.0em;}
.siteSubtitle {font-size:1em;}
.siteTitle {font-size:1.0em;}
.siteSubtitle {font-size:1em;}
/*MAINMENU*/
#mainMenu {width: 15.5em; text-align: left; font-size: .85em;}
#displayArea {margin: 0em 15em 0em 15.5em;}
#mainMenu .sliderPanel { margin-left: 1.2em; }
#mainMenu .tiddlyLinkExisting {font-weight: bold;}
.bluey a {color: #900;}
.bluey {font-weight: bold; color: #900; font-size: 1.3em;}
.viewer .sliderPanel { margin-left: 1.2em; }
.sliderPanel { margin-left: 0em; }
/*TABLE HEADER*/
.viewer th {color: #000; background-color: #eeeeee;}
/*TIDDLER TOPMARGIN AND BUTTON BORDER*/
/*.viewer .button{border:solid 0px;color:#c06;}
.viewer a {border: solid 1px;}*/
.viewer a.button{color:#04b;border: solid 1px #008;background:url([[mainmenugray7ef.gif]]) repeat-x top left;top left;-moz-border-radius: .2em;}
.button {border: solid 0px;}
.makeborder {border: solid 1px #008;padding-left: 2px;padding-right: 2px; background:url([[mainmenugray7ef.gif]]) repeat-x top left;top left;-moz-border-radius: .2em;}
.viewer { margin-top: .5em; }
.viewer {line-height: 1.4em;}
/*Links*/
a:hover{background:#fff;color:#f00;}
/*TIDDLER TITLE COLOR MATCH BOTTOM OF HEADER*/
.title {color:#a00;}
/*UNORDERED and ORDERED LISTS TWEAK*/
/*.viewer li {padding-top: 0.2em; padding-bottom: 0.2em;} */
/*LINELESS BLOCKQUOTES*/
.viewer blockquote {border-left: 10px; margin-top:0em; margin-bottom:0em; }
.viewer blockquote {border-left: 2px solid #c06;}
/*INVISIBLE TABLE*/
.viewer .invisiblecomm table {border-color: white;}
.viewer .invisiblecomm table td { font-size: 1em; font-family: Verdana; border-color: white; padding: 10px 20px 10px 0px; text-align: left; vertical-align: top; padding: 20px;}
.viewer .invisiblecomm table th { color: #005566; background-color: white; border-color: white; font-family: Verdana; font-size: 1.2em; font-weight: bold; padding: 10px 20px 10px 0px; text-align: left; vertical-align: top;}
.viewer .invisiblecomm table tr.leftColumn { background-color: #bbbbbb; }
/*TOPMENU*/
#topMenu {padding-left: 0em; background-color: #900; color: #110077; font-family: Trebuchet MS, Verdana; font-size: 13pt; line-height: 1.4em;}
#topMenu table td {margin: 10px;}
#topMenu .purple a {color: #0055dd;}
/*ROUNDED CORNERS AND BORDERS*/
.tiddler {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-bottom: 3px solid #ccc;
border-right: 3px solid #ccc;
margin: 0.5em;
background:#fff;
padding: 0.5em;
-moz-border-radius: 1em; }
#messageArea {
background-color: #eee;
border-color: #8ab;
border-width: 4px;
border-style: dotted;
font-size: 90%;
padding: 0.5em;
-moz-border-radius: 1em; }
/*TagglyTag styles*/
.tagglyTagged li.listTitle { display:none;}
.tagglyTagged li { display: inline; font-size:90%; }
.tagglyTagged ul { margin:0px; padding:0px; }
.tagglyTagging { padding-top:0.5em; }
.tagglyTagging li.listTitle { display:none;}
.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:0em; margin-bottom:0px; padding-bottom:0px; }
/* .tagglyTagging .tghide { display:inline; } */
.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }
.tagglyTagging table { margin:0px; padding:0px; }
.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }
.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}
.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }
.selected .tagglyTagging .button { display:inline; }
.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */
.selected .tagglyTagging .hidebutton { color:#aaa }
.tagglyLabel { color:#aaa; font-size:90%; }
.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }
.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}
.tagglyTagging ul ul li {margin-left:0.5em; }
.editLabel { font-size:90%; padding-top:0.5em; }
/* GIFFMEX TWEAKS TO STYLESHEETPRINT (so that nothing but tiddler title and text are printed) */
@media print {#tiddlersBar {display: none ! important;}}
@media print {#mainMenu {display: none ! important;}}
@media print {#topMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}}
@media print {#toolbar {display: none ! important;}}
@media print {.header {display: none ! important;}}
@media print {.tiddler .subtitle {display: none ! important;}}
@media print {.tiddler .toolbar {display; none ! important; }}
@media print {.tiddler .tagging {display; none ! important; }}
@media print {.tiddler .tagged {display; none ! important; }}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}
@media print {.pageBreak {page-break-before: always;}}
/*COLUMNS*/
.twocolumns { display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-column-
width:50%;}
.threecolumns { display:block; -moz-column-count:3; -moz-column-gap:1em; -moz-column-
width:33%}
.fourcolumns { display:block; -moz-column-count:4; -moz-column-gap:1em; -moz-column-
width:25%}
.popup li .tagger a {display:inline;}
/*{{{*/
.popup {
max-height:275px;
min-height:auto;
width: 300;
overflow: auto;
margin:auto;
font-family: arial; font-size: 10pt;
}
.headline{
color:#c06;
font-size:180%;
font-family:times,arial;
line-height:60%;
}
.textleft { display:block;text-align:left; }
.textright { display:block;text-align:right; }
.textcenter { display:block;text-align:center; }
.textjustify { display:block;text-align:justify; }
.textindent { display:block;margin:0;padding:0;border:0;margin-left:2em; }
/%.viewer .popup li { display:block;font-size:90%; white-space:nowrap;}%/
/***
!!!<<gradient horiz #fc3 #fff >><<tiddler RefreshStyles>> ButtonStyle>>/%==================================================%/
***/
input.btn{
color:#008;
font-family:Trebuchet MS,aerial,helvetica,sans-serif;
font-size:100%;
font-weight:normal;
background-color:#eee;
background:url([[mainmenugray7ef.gif]]) repeat-x top left;top left;
border:1px solid;
border-top-color:#009;
border-left-color:#009;
border-right-color:#009;
border-bottom-color:#009;
-moz-border-radius : .25em 0.25em 0.25em 0.25em;
}
input.btnhov{
color:#a00;
background:#fff;
background:url([[mainmenugray7ef.gif]]) repeat-x top left;top left;
border-top-color:#c06;
border-left-color:#c06;
border-right-color:#c06;
border-bottom-color:#c06;
-moz-border-radius : .25em 0.25em 0.25em 0.25em;
}
/*}}}*/
[[TabsCSS]]
[[StyleSheetTiddlersBar]]
[[StyleSheetShortcuts]]
[[TopMenuStyle]]
[[JqueryTreeviewCSSOnline]]
[[WebStyleSheet]]
hr {height:1px;}
hr {border: 0px;border-top: solid 1px #c06;color: #c06;padding:0em;}
.overflow {
overflow: auto;
}
#mainMenu hr {height:1px;color:#c06;}
.viewer hr {border: 0px;border-top: solid 1px #c06;color: #c06;}
#contentFooter {
background: transparent;
padding: 1em 2em;
font-weight:normal;
}
#contentFooter a {
color:#009;
}
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0em 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0em 1em;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|CSS|
|Requires||
|Overrides||
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|
These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.
***/
/*{{{*/
/* text alignments */
.left
{ display:block;text-align:left; }
.center
{ display:block;text-align:center; }
.right
{ display:block;text-align:right; }
.justify
{ display:block;text-align:justify; }
.indent
{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
{ float:left; }
.floatright
{ float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
{ vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
{ vertical-align:bottom; }
.clear
{ clear:both; }
.wrap
{ white-space:normal; }
.nowrap
{ white-space:nowrap; }
.hidden
{ display:none; }
.show
{ display:inline !important; }
.span
{ display:span; }
.block
{ display:block; }
.relative
{ position:relative; }
.absolute
{ position:absolute; }
/* font sizes */
.big
{ font-size:14pt;line-height:120% }
.medium
{ font-size:12pt;line-height:120% }
.normal
{ font-size:9pt;line-height:120% }
.small
{ font-size:8pt;line-height:120% }
.fine
{ font-size:7pt;line-height:120% }
.tiny
{ font-size:6pt;line-height:120% }
.larger
{ font-size:120%; }
.smaller
{ font-size:80%; }
/* font styles */
.bold
{ font-weight:bold; }
.italic
{ font-style:italic; }
.underline
{ text-decoration:underline; }
/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }
/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
-moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
-webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
column-count:2; column-gap:1em; column-width:50%; /* Opera */
}
.threecolumns { display:block;
-moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
-webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
column-count:3; column-gap:1em; column-width:33%; /* Opera */
}
.fourcolumns { display:block;
-moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
-webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
column-count:4; column-gap:1em; column-width:25%; /* Opera */
}
/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
*[class="ieOnly"]
{ display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
{ display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */
/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
{ border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
{ width:100%; }
/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }
/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }
/* grouped content */
.outline
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; }
.menubox
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox code
{ color:#333 !important; }
.borderleft
{ margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
.borderright
{ margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
.borderbottom
{ margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
.bordertop
{ margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }
/* compact form */
.smallform
{ white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
{ font-size:8pt; }
/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }
/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input { width:1em; }
.twochar input { width:2em; }
.threechar input { width:3em; }
.fourchar input { width:4em; }
.fivechar input { width:5em; }
/* text colors */
.green { color:#0c0 !important }
.red { color:#f66 !important }
.blue { color:#99f !important }
.gray { color:#999 !important }
/* rollover highlighting */
.mouseover
{color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
{color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
{color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
{color:[[ColorPalette::PrimaryDark]] !important;}
/* rollover zoom text */
.zoomover
{ font-size:80% !important; }
.selected .zoomover
{ font-size:100% !important; }
/*}}}*/
!!!StyleSheetTiddlersBar
#tiddlersBar .button {border:1px; color:#000;}
#tiddlersBar .tab {white-space:nowrap;}
#tiddlersBar {padding : 0.65em 0.5em 0.0em 1.0em;margin-left:0em;margin-right:0em}
#tiddlersBar {margin-bottom:0px;}
.tabSelected .button:hover {font-size:0.95em;font-weight:bold;color: #f00;background: #fff;padding : 0px 0px 0px 2px;}
.tabUnselected .button:hover {font-size:0.95em;color: #f00;background: #fff; padding : 0px 0px 0px 2px;}
.tabUnselected .button {font-size:0.95em;font-weight:bold;color: #008; padding : 0px 0px 0px 2px;}
.tabSelected .button {font-size:0.95em;font-weight:bold;color: #008;padding : 0px 0px 0px 2px;}
.tabUnselected {
background:url("http://img261.imageshack.us/img261/8603/navbargrayhw1.png") repeat-x top left;top left;
background-color:#eee;
border:0px #eee solid; border-bottom:0px;font-size:0.95em; }
.tabSelected {
background:url("http://img505.imageshack.us/img505/489/navbarredlt5.gif") repeat-x top left;top left;
background-color:#fcb;
color: #a00;border: 0px #c06 solid;border-bottom:0px; font-size:0.95em;}
.tabUnselected .tabButton {font-weight:bold;font-size:0.75em;color:#333;background:transparent; padding : 0px 2px 0px 2px; margin: 0 0 0 1px;}
.tabSelected .tabButton {font-weight:bold;font-size:0.75em;color:#000;background:transparent;padding : 0px 2px 0px 2px; margin: 0 0 0 1px;}
.tabSelected .tabButton:hover {font-weight:bold;color: #f00;background: #fff;}
.tabUnselected .tabButton:hover {font-weight:bold;color: #f00;background: #fff;}
.tiddler, .tabContents {border-top:0px #fa0 solid;margin-left:0.5em;margin-right:0.5em;}
#tiddlersBar .tab {-moz-border-radius : 0.4em 0.4em 0 0;}
#tiddlersBar {background:#abf;line-height: 1.45em;}
#tiddlersBar {background: url("http://img168.imageshack.us/img168/1254/leftbackdo6.gif"); background-repeat: repeat;line-height: 1.45em;}
@@color:#C06;''» »'' @@ Tabs containing CSS styling code (controls layout and visual style)
----
<script>
// get all tiddlers tagged with "css"
var tids=store.getTaggedTiddlers("css");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("css")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
This tiddler was added to the treeview menu via the toolbar 'new subtopic' button
{{bluey{[[System]]}}}
@@color:#C06;''» »'' @@ Tabs containing CSS styling code (controls layout and visual style)
----
<script>
// get all tiddlers tagged with "css"
var tids=store.getTaggedTiddlers("css");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("css")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
More instructions To Be Advised
This is a test of Tim West's New Earth Time Plugin
This display is from the NET official site
----
<html><div align="center"><iframe src="http://www.symbex.net.au/Wiki/TW-NET.htm" frameborder="0" width="147" height="50" scrolling="no" frameborder="1"></iframe></div></html>
<html><div align="center"><iframe src="http://www.symbex.net.au/Wiki/TW-NET_blk.htm" frameborder="0" width="147" height="50" scrolling="no" frameborder="1"></iframe></div></html>
<script>
document.write(unescape('%3C%68%74%6D%6C%3E%3C%64%69%76%20%61%6C%69%67%6E%3D%22%63%65%6E%74%65%72%22%3E%3C%69%66%72%61%6D%65%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%77%77%77%2E%73%79%6D%62%65%78%2E%6E%65%74%2E%61%75%2F%57%69%6B%69%2F%54%57%2D%4E%45%54%2E%68%74%6D%22%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%30%22%20%77%69%64%74%68%3D%22%31%34%37%22%20%68%65%69%67%68%74%3D%22%35%30%22%20%73%63%72%6F%6C%6C%69%6E%67%3D%22%6E%6F%22%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%31%22%3E%3C%2F%69%66%72%61%6D%65%3E%3C%2F%64%69%76%3E%3C%2F%68%74%6D%6C%3E'));
</script>
<<treeview2 "TWT-Notes" "filetree" 'collapsed: false, antisesame: "closed", animated: "normal", persist: "cookie", cookieId: "myid"' >>
|>|bgcolor(#8af):@@color(#000080):''66 tiddlers found matching /{{{button}}}/''@@|bgcolor(#8af): @@color(#A00000): SearchHelp@@ |
|>|>|bgcolor(#E3FFE3):<<search>> <<option chkSearchTitles>> Titles <<option chkSearchText>> Text <<option chkSearchTags>>Tags <<option chkHoldSearches>> Hold |
|bgcolor(#8af): |bgcolor(#8af): @@color(#000080):sort by: ''Titles''@@ |bgcolor(#8af): @@color(#000080): ''Size'' (bytes)@@ |bgcolor(#8af): @@color(#000080): ''Tags''@@ |h
| 1|[[3:How to download]]| 620|@@treeview,Instructions@@|
| 2|[[Acknowledgements & license]]| 839|@@excludeLists@@|
| 3|[[Align]]| 186|@@Introduction@@|
| 4|[[AttachFilePlugin]]| 21436|@@AttachFilePackage,IconPackage,systemConfig@@|
| 5|[[BIUS]]| 1293|@@Introduction@@|
| 6|[[Color]]| 303|@@Introduction@@|
| 7|[[CombineTrees]]| 721|@@@@|
| 8|[[CreatingANewTopLevelTopic]]| 1150|@@Guide@@|
| 9|[[Directory]]| 9001|@@script@@|
| 10|[[DoBackupMacro]]| 941|@@systemConfig@@|
| 11|[[Equation]]| 318|@@Introduction@@|
| 12|[[EquationEditorPlugin]]| 2324|@@systemConfig@@|
| 13|[[ExtendTagButtonPlugin]]| 859|@@excludeLists,systemConfig@@|
| 14|[[Font]]| 274|@@Introduction@@|
| 15|[[Format]]| 2836|@@Introduction@@|
| 16|[[GotoPlugin]]| 7985|@@systemConfig@@|
| 17|[[Image]]| 519|@@Introduction@@|
| 18|[[ImportedTiddlers]]| 10548|@@@@|
| 19|[[Introduction]]| 364|@@Note,Using the QuickEdit Toolbar,The QuickEdit Toolbar@@|
| 20|[[Link]]| 686|@@Introduction@@|
| 21|[[Macro]]| 619|@@Introduction@@|
| 22|[[MathEquations]]| 1640|@@Instructions,Note,A sub-topic,treeview@@|
| 23|[[MyChanges]]| 3181|@@Publish@@|
| 24|[[NestedSlidersPlugin(withGiffmexTweak)]]| 14933|@@systemConfig,excludeLists@@|
| 25|[[Printing]]| 930|@@Instructions,Note,treeview@@|
| 26|[[QuickEditPackage]]| 1855|@@package,story,QuickEditPackage@@|
| 27|[[QuickEditPlugin]]| 5730|@@systemConfig,QuickEditPackage@@|
| 28|[[QuickEdit_align]]| 1760|@@QuickEditPackage@@|
| 29|[[QuickEdit_color]]| 4726|@@QuickEditPackage@@|
| 30|[[QuickEdit_css]]| 1247|@@QuickEditPackage@@|
| 31|[[QuickEdit_equation]]| 683|@@@@|
| 32|[[QuickEdit_file]]| 1092|@@QuickEditPackage@@|
| 33|[[QuickEdit_font]]| 1725|@@QuickEditPackage@@|
| 34|[[QuickEdit_format]]| 3362|@@QuickEditPackage@@|
| 35|[[QuickEdit_image]]| 1119|@@QuickEditPackage@@|
| 36|[[QuickEdit_link]]| 2751|@@QuickEditPackage@@|
| 37|[[QuickEdit_macro]]| 2450|@@QuickEditPackage@@|
| 38|[[QuickEdit_replace]]| 4668|@@QuickEditPackage@@|
| 39|[[QuickEdit_sort]]| 1478|@@QuickEditPackage@@|
| 40|[[QuickEdit_split]]| 2968|@@QuickEditPackage@@|
| 41|[[QuickEdit_tiddler]]| 2265|@@QuickEditPackage@@|
| 42|[[QuickOpenTagPlugin]]| 4272|@@systemConfig,excludeLists@@|
| 43|[[RefreshStyles]]| 210|@@@@|
| 44|[[SaveAsPlugin]]| 4515|@@systemConfig,basic@@|
| 45|[[SearchOptionsPlugin]]| 20950|@@systemConfig,excludeLists@@|
| 46|[[SetupMainMenu]]| 541|@@Note,SetUp,closed,treeview@@|
| 47|[[StyleSheet]]| 8409|@@css@@|
| 48|[[StyleSheetLayout]]| 6872|@@@@|
| 49|[[StyleSheetShortcuts]]| 5934|@@CSS,QuickEditPackage,css@@|
| 50|[[StyleSheetTiddlersBar]]| 1866|@@css@@|
| 51|[[SubTopicAdded]]| 81|@@Note@@|
| 52|[[TWT-Treeview-Implementation]]| 1609|@@nonotes@@|
| 53|[[TWTStyleSheet]]| 7931|@@css@@|
| 54|[[TaggerPlugin]]| 10576|@@systemConfig@@|
| 55|[[TagglyTaggingPlugin]]| 21128|@@systemConfig@@|
| 56|[[TagglyTaggingStyles]]| 1331|@@@@|
| 57|[[Tiddler]]| 545|@@Introduction@@|
| 58|[[TiddlerNotesPlugin]]| 8051|@@systemConfig@@|
| 59|[[TiddlerTweakerPlugin]]| 21791|@@TidIDEPackage,systemConfig,BasicsPackage@@|
| 60|[[TiddlersBarPluginMG]]| 9594|@@systemConfig@@|
| 61|[[TopicNote]]| 446|@@excludeLists@@|
| 62|[[TspotSetupPlugin]]| 4363|@@systemConfig@@|
| 63|[[TspotSidebar]]| 235|@@@@|
| 64|[[TspotSidebar_bak]]| 169|@@@@|
| 65|[[TwHelpSearchPlugin]]| 6442|@@systemConfig@@|
| 66|[[UploadPlugin]]| 19117|@@systemConfig@@|
{{bluey{[[Topic]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("Topic")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'" "'
>>
<<<
<<tiddler LastModified>>
Added @media print {#tiddlersBar {display: none ! important;}} to StyleSheet.
There have been some cosmetic changes and a general tidying up and bug fixing.
A major addition is that you can now keep notes if you use math equations. TW~T-Notes has combined with ~CodeCogs to bring equation rendering to ~TiddlyWiki.
Whenever a tiddler is in edit mode, clicking on equation in the ~QuickEditToolbar will launch an equation editor where you can construct math equations. Once you are done with the equation simply click the "Copy to Document" in the Equation Editor to insert the equation into the tiddler at the cursur position.
''Area of a right triangle is'' [img[http://latex.codecogs.com/gif.latex?c=\sqrt{a^{2}+{b^{2}}}]]
@@font-size:14pt;The derivative of@@ [img[http://latex.codecogs.com/gif.latex?exp(x)/(3*x)]] [img[http://latex.codecogs.com/gif.latex?\inline =\frac{\partial^2 f}{\partial x^2} = {{\left(x^2-2\,x+2\right)\,e^{x}}\over{3\,x^3}}]]
Note that this updates page was constructed as a tiddler and then published within ''TW~T-Notes'' as an HTML page before being uploaded to the server.
<<<
More later...
''Please make any comments or suggestions at the ~TiddlyWiki'' [[Discussion Group|http://groups.google.com/group/TiddlyWiki/]]
@@color:#090;font-size:1.2em;__''Version: 1.0.5''__@@
This has been a proof of concept of integrating @@position:relative;+++^22em^[TreeviewPluginPlugin]
Name :~TreeviewPluginPlugin
Source : http://treeview.tiddlyspot.com/
Version : 0.24
Author : MarkS===@@ into ~TWT-Notes. as discussed in ~TiddlyWiki Google Groups http://bit.ly/qWGWn It is the first fully working jQuery plugin for ~TiddlyWiki found in the wild.
This ~TiddlyWiki allows an organized way of building a hierarchical tree structure, using tags, for use with the Treeview plugin.
This version is is using images from another server and works in FF,IE and Chrome. Embedded images fail in IE so far.
@@color:#C06;''WARNING'':@@ This version seems very stable but test at your own risk , it is still subject to change. Any comments or bugs reports welcomed.
+++[more...]
Now works online in FF (~IE7 and Chrome see Bug4)
@@color:#C06;font-size:1.5em;''» »'' @@Click here to <html><a href="http://twt-notes-treeview-experimental.tiddlyspot.com/download" class='button'>download</a></html>~TWT-Notes-Treeview-Experimental.
Some methods and procedures of ~TWT-Notes have been changed to accommodate Treeview and is now ready to test, keeping in mind it is subject to change.
<<<
@@color:#C06;''» »'' @@''The menu is automatically updated.''
@@color:#C06;''» »'' @@''Delete the tiddler and it is removed from the menu.''
@@color:#C06;''» »'' @@''The menu persists between sessions staying expanded or collapsed where you left it'' (this is an option see the plugin)
<<<
Morris Gray
@@color:#C06; Report: 22-May-2009 105°42' @@
It appears that the behaviour with antisesame is the same whether it is
started with collapsed:false or collapsed:true. I suppose you
shouldn't use antisesame in collapsed true but it may be an indication
of future problems or a clue to known existing bugs.
/*FONT STUFF*/
body {font-family: arial; font-size: 10pt;}
.uparrow{ font-weight: bold; text-decoration: underline; padding-right: 7px; background: url(http://img408.imageshack.us/img408/5150/daquo3gq1.gif) no-repeat right 56%; }
h1,h2,h3,h4,h5 { color: #8899ff; background: white; font-family: Verdana; border-bottom: none;}
.editor a {color:#dddddd;}
#editor a {color:#dddddd;}
.nowrap { white-space:nowrap;}
.begone{clear:both;}
.toolbar a {color:#5566ff;}
.selected .toolbar a {color:#5566ff;}
.selected .toolbar a:hover {color:#5566ff;}
.popup li {list-style:none;}
.doubleborder {
border: 4px double #a00;
padding:1px;
margin: 8px;
width:132px;
height:99px;
}
#tiddlerTWHelp-SearchResults .viewer {
overflow: auto;
}
/* SHORTENS THE HEIGHT OF THE HEADER */
#displayArea {margin-top:0.0em}
.header {position:relative; height:73px;}
.headerShadow {padding: 1.4em 0em .8em 1em;}
.headerForeground {padding: 1.4em 0em .8em 1em;}
.siteTitle {font-size:1.0em;}
.siteSubtitle {font-size:1em;}
.siteTitle {font-size:1.0em;}
.siteSubtitle {font-size:1em;}
/*MAINMENU*/
#mainMenu {width: 15.5em; text-align: left; font-size: .85em;}
#displayArea {margin: 0em 15em 0em 15.5em;}
#mainMenu .sliderPanel { margin-left: 1.2em; }
#mainMenu .tiddlyLinkExisting {font-weight: bold;}
.bluey a {color: #900;}
.bluey {font-weight: bold; color: #900; font-size: 1.3em;}
.viewer .sliderPanel { margin-left: 1.2em; }
.sliderPanel { margin-left: 0em; }
/*TABLE HEADER*/
.viewer th {color: #000; background-color: #eeeeee;}
/*TIDDLER TOPMARGIN AND BUTTON BORDER*/
/*.viewer .button{border:solid 0px;color:#c06;}
.viewer a {border: solid 1px;}*/
.viewer a.button{color:#008;border: solid 1px #008;background:url("http://img520.imageshack.us/img520/8688/mainmenugray7ef.gif") repeat-x top left;top left;-moz-border-radius: .2em;}
.button {border: solid 0px;}
.makeborder {border: solid 1px #008;padding-left: 2px;padding-right: 2px; background:url("http://img520.imageshack.us/img520/8688/mainmenugray7ef.gif") repeat-x top left;top left;-moz-border-radius: .2em;}
.viewer { margin-top: .5em; }
.viewer {line-height: 1.4em;}
.viewer {line-height: 1.4em;}
/*Links*/
a:hover{background:#fff;color:#f00;}
/*TIDDLER TITLE COLOR MATCH BOTTOM OF HEADER*/
.title {color:#a00;}
/*UNORDERED and ORDERED LISTS TWEAK*/
/*.viewer li {padding-top: 0.2em; padding-bottom: 0.2em;} */
/*LINELESS BLOCKQUOTES*/
.viewer blockquote {border-left: 10px; margin-top:0em; margin-bottom:0em; }
/*INVISIBLE TABLE*/
.viewer .invisiblecomm table {border-color: white;}
.viewer .invisiblecomm table td { font-size: 1em; font-family: Verdana; border-color: white; padding: 10px 20px 10px 0px; text-align: left; vertical-align: top; padding: 20px;}
.viewer .invisiblecomm table th { color: #005566; background-color: white; border-color: white; font-family: Verdana; font-size: 1.2em; font-weight: bold; padding: 10px 20px 10px 0px; text-align: left; vertical-align: top;}
.viewer .invisiblecomm table tr.leftColumn { background-color: #bbbbbb; }
/*TOPMENU*/
#topMenu {padding-left: 0em; background-color: #900; color: #110077; font-family: Trebuchet MS, Verdana; font-size: 13pt; line-height: 1.4em;}
#topMenu table td {margin: 10px;}
#topMenu .purple a {color: #0055dd;}
/*ROUNDED CORNERS AND BORDERS*/
.tiddler {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-bottom: 3px solid #ccc;
border-right: 3px solid #ccc;
margin: 0.5em;
background:#fff;
padding: 0.5em;
-moz-border-radius: 1em; }
#messageArea {
background-color: #eee;
border-color: #8ab;
border-width: 4px;
border-style: dotted;
font-size: 90%;
padding: 0.5em;
-moz-border-radius: 1em; }
/*TagglyTag styles*/
.tagglyTagged li.listTitle { display:none;}
.tagglyTagged li { display: inline; font-size:90%; }
.tagglyTagged ul { margin:0px; padding:0px; }
.tagglyTagging { padding-top:0.5em; }
.tagglyTagging li.listTitle { display:none;}
.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:0em; margin-bottom:0px; padding-bottom:0px; }
/* .tagglyTagging .tghide { display:inline; } */
.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }
.tagglyTagging table { margin:0px; padding:0px; }
.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }
.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}
.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }
.selected .tagglyTagging .button { display:inline; }
.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */
.selected .tagglyTagging .hidebutton { color:#aaa }
.tagglyLabel { color:#aaa; font-size:90%; }
.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }
.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}
.tagglyTagging ul ul li {margin-left:0.5em; }
.editLabel { font-size:90%; padding-top:0.5em; }
/* GIFFMEX TWEAKS TO STYLESHEETPRINT (so that nothing but tiddler title and text are printed) */
@media print {#tiddlersBar {display: none ! important;}}
@media print {#mainMenu {display: none ! important;}}
@media print {#topMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}}
@media print {#toolbar {display: none ! important;}}
@media print {.header {display: none ! important;}}
@media print {.tiddler .subtitle {display: none ! important;}}
@media print {.tiddler .toolbar {display; none ! important; }}
@media print {.tiddler .tagging {display; none ! important; }}
@media print {.tiddler .tagged {display; none ! important; }}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}
@media print {.pageBreak {page-break-before: always;}}
/*COLUMNS*/
.twocolumns { display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-column-
width:50%;}
.threecolumns { display:block; -moz-column-count:3; -moz-column-gap:1em; -moz-column-
width:33%}
.fourcolumns { display:block; -moz-column-count:4; -moz-column-gap:1em; -moz-column-
width:25%}
.popup li .tagger a {display:inline;}
/*{{{*/
.popup {
max-height:275px;
min-height:auto;
width: 300;
overflow: auto;
margin:auto;
font-family: arial; font-size: 10pt;
}
.headline{
color:#c06;
font-size:180%;
font-family:times,arial;
line-height:60%;
}
.textleft { display:block;text-align:left; }
.textright { display:block;text-align:right; }
.textcenter { display:block;text-align:center; }
.textjustify { display:block;text-align:justify; }
.textindent { display:block;margin:0;padding:0;border:0;margin-left:2em; }
/%.viewer .popup li { display:block;font-size:90%; white-space:nowrap;}%/
/***
!!!<<gradient horiz #fc3 #fff >><<tiddler RefreshStyles>> ButtonStyle>>/%==================================================%/
***/
input.btn{
color:#008;
font-family:Trebuchet MS,aerial,helvetica,sans-serif;
font-size:100%;
font-weight:normal;
background-color:#eee;
background:url("http://img520.imageshack.us/img520/8688/mainmenugray7ef.gif") repeat-x top left;top left;
border:1px solid;
border-top-color:#009;
border-left-color:#009;
border-right-color:#009;
border-bottom-color:#009;
-moz-border-radius : .25em 0.25em 0.25em 0.25em;
}
input.btnhov{
color:#a00;
background:#fff;
background:url("http://img520.imageshack.us/img520/8688/mainmenugray7ef.gif") repeat-x top left;top left;
border-top-color:#c06;
border-left-color:#c06;
border-right-color:#c06;
border-bottom-color:#c06;
-moz-border-radius : .25em 0.25em 0.25em 0.25em;
}
/*}}}*/
[[TabsCSS]]
[[StyleSheetTiddlersBar]]
[[StyleSheetShortcuts]]
[[TopMenuStyle]]
#contentFooter {
background: transparent;
padding: 1em 2em;
font-weight:normal;
}
#contentFooter a {
color:#009;
}
#sidebarTabs .tabContents {
max-height: 35em; /* not IE6-compatible */
overflow: auto;
width: 90.5%;
}
#sidebarTabs .tabContents .tabContents {
max-height: 30em !important; /* not IE6-compatible */
}
#sidebarTabs .tabSelected {
background:url("http://img505.imageshack.us/img505/489/navbarredlt5.gif") repeat-x top left;top left;
background-color:#fcb;
font-size:0.95em;
font-weight:bold;
color:#a00;
text-decoration:none;
border: 0px solid #999;
}
#sidebarTabs .tabUnselected {
background:url("http://img261.imageshack.us/img261/8603/navbargrayhw1.png") repeat-x top left;top left;
background-color:#eee;
font-size:0.95em;
font-weight:bold;
color:#008;
text-decoration:none;
border: 0px solid #999;
}
/***
|Name|TaggedTemplateTweak|
|Source|http://www.TiddlyTools.com/#TaggedTemplateTweak|
|Documentation|http://www.TiddlyTools.com/#TaggedTemplateTweakInfo|
|Version|1.5.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.chooseTemplateForTiddler()|
|Description|use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values|
This tweak extends story.chooseTemplateForTiddler() so that ''whenever a tiddler is marked with a specific tag value, it can be viewed and/or edited using alternatives to the standard tiddler templates.''
!!!!!Documentation
>see [[TaggedTemplateTweakInfo]]
!!!!!Revisions
<<<
2009.05.04 [1.5.2] check for tiddler exist *after* title-as-prefix (allows shadow tiddlers to use custom templates)
| please see [[TaggedTemplateTweakInfo]] for previous revision details |
2007.06.11 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.TaggedTemplateTweak= {major: 1, minor: 5, revision: 2, date: new Date(2009,5,4)};
Story.prototype.taggedTemplate_chooseTemplateForTiddler = Story.prototype.chooseTemplateForTiddler
Story.prototype.chooseTemplateForTiddler = function(title,template)
{
// get core template and split into theme and template name
var coreTemplate=this.taggedTemplate_chooseTemplateForTiddler.apply(this,arguments);
var theme=""; var template=coreTemplate;
var parts=template.split(config.textPrimitives.sectionSeparator);
if (parts[1]) { theme=parts[0]; template=parts[1]; }
else theme=config.options.txtTheme||""; // fallback if theme is not specified
theme+=config.textPrimitives.sectionSeparator;
// look for template using *title* as prefix
if (!store.getTaggedTiddlers(title).length) { // if tiddler is not a tag
if (store.getTiddlerText(theme+title+template)) { return theme+title+template; } // theme##TitleTemplate
if (store.getTiddlerText(title+template)) { return title+template; } // TitleTemplate
}
// look for templates using *tags* as prefix
var tiddler=store.getTiddler(title);
if (!tiddler) return coreTemplate; // tiddler doesn't exist... use core result
for (i=0; i<tiddler.tags.length; i++) {
var t=tiddler.tags[i]+template; // add tag prefix to template
var c=t.substr(0,1).toUpperCase()+t.substr(1); // capitalized for WikiWord title
if (store.getTiddlerText(theme+t)) { return theme+t; } // theme##tagTemplate
if (store.getTiddlerText(theme+c)) { return theme+c; } // theme##TagTemplate
if (store.getTiddlerText(t)) { return t; } // tagTemplate
if (store.getTiddlerText(c)) { return c; } // TagTemplate
}
// no match... use core result
return coreTemplate;
}
//}}}
/***
|''Name:''|~TaggerPlugin|
|''Version:''|1.0.1 (2006-06-01)|
|''Source:''|http://tw.lewcid.org//#TaggerPlugin|
|''Author:''|SaqImtiaz|
|''Description:''|Provides a drop down listing current tiddler tags, and allowing toggling of tags.|
|''Documentation:''|[[TaggerPluginDocumentation]]|
|''Source Code:''|[[TaggerPluginSource]]|
|''~TiddlyWiki:''|Version 2.0.8 or better|
|''Requires''|[[DeprecatedFunctionsPlugin]]|
|''Stylesheet Changes''|ViewTemplate|
|See Above|<div class='toolbar'><span style="padding-right:2.45em;" macro='tagger source:TagDB exclude:excludeLists'></span></div>|
***/
//{{{
config.tagger={
defaults:{
label: 'Tags: ',
tooltip: 'Manage tiddler tags',
taglist: 'true',
excludeTags: 'excludeLists',
notags: 'tiddler has no tags',
aretags: 'current tiddler tags:',
toggletext: 'add tags:'
}
};
config.macros.tagger={};
config.macros.tagger.arrow = (document.all?"▼":"▾"); // the fat one is the only one that works in IE
config.macros.tagger.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
var defaults = config.tagger.defaults;
var nAV = paramString.parseParams('tagman', null, true);
var label = ((nAV[0].label)&&(nAV[0].label[0])!='.')?nAV[0].label[0]+this.arrow: defaults.label+this.arrow;
var tooltip = ((nAV[0].tooltip)&&(nAV[0].tooltip[0])!='.')?nAV[0].tooltip[0]: defaults.tooltip;
var taglist = ((nAV[0].taglist)&&(nAV[0].taglist[0])!='.')?nAV[0].taglist[0]: defaults.taglist;
var exclude = ((nAV[0].exclude)&&(nAV[0].exclude[0])!='.')?(nAV[0].exclude[0]).readBracketedList(): defaults.excludeTags.readBracketedList();
if ((nAV[0].source)&&(nAV[0].source[0])!='.')var source = nAV[0].source[0];
if (source&&!store.getTiddler(source)) return false;
var onclick = function(e) {
if (!e) var e = window.event;
var popup = Popup.create(this);
var tagsarray = store.getTags();
var tags=new Array();
for (var i=0; i<tagsarray.length; i++){
tags.push(tagsarray[i][0]);}
if (source)
{var sourcetiddler=store.getTiddler(source);
tags=sourcetiddler.tags.sort();}
var currentTags = tiddler.tags.sort();
var createButtons=function(text,theTag,tooltipPrefix){
var sp = createTiddlyElement(createTiddlyElement(popup,"li"),"span",null,"tagger");
var theToggle = createTiddlyButton(sp,text,tooltipPrefix+" '"+theTag+"'",taggerOnToggle,"button","toggleButton");
theToggle.setAttribute("tiddler",tiddler.title);
theToggle.setAttribute("tag",theTag);
insertSpacer(sp);
if (window.createTagButton_orig_mptw)
createTagButton_orig_mptw(sp,theTag);
else
createTagButton(sp,theTag);
}
createTiddlyElement(popup,"li",null,"listTitle",(tiddler.tags.length == 0 ? defaults.notags : defaults.aretags));
for (var t=0; t<currentTags.length; t++){
createButtons("[x]",currentTags[t],"remove tag ");
}
createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
if (taglist!='false')
{ createTiddlyElement(popup,"li",null,"listTitle",defaults.toggletext);
for (var i=0; i<tags.length; i++){
if (!tiddler.tags.contains(tags[i])&&!exclude.contains(tags[i]))
{createButtons("[ ]",tags[i],"add tag ");
}
}
createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
}
var newTagButton = createTiddlyButton(createTiddlyElement(popup,"li"),("Create new tag"),null,taggerOnToggle);
newTagButton.setAttribute("tiddler",tiddler.title);
if (source) newTagButton.setAttribute("source",source);
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
};
createTiddlyButton(place,label,tooltip,onclick,"button","taggerDrpBtn");
};
window.taggerOnToggle = function(e) {
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
var tiddler = store.getTiddler(title);
if (!tag)
{
var newtag=prompt("Enter new tag:","");
if (newtag!=''&&newtag!=null)
{
var tag=newtag;
if (this.getAttribute("source"))
{var sourcetiddler = store.getTiddler(this.getAttribute("source"));
sourcetiddler.tags.pushUnique(newtag);}
}
else
{return false;};
}
if (!tiddler || !tiddler.tags)
{store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);}
else
{if (tiddler.tags.find(tag)==null)
{tiddler.tags.push(tag)}
else if(!newtag)
{tiddler.tags.splice(tiddler.tags.find(tag),1)};
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags);};
story.refreshTiddler(title,null,true);
if(config.options.chkAutoSave)
saveChanges();
return false;
};
setStylesheet(
".tagger a.button {font-weight: bold;display:inline; padding:0px;}\n"+
".tagger #toggleButton {padding-left:2px; padding-right:2px; margin-right:1px; font-size:110%;}\n"+
"#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+
".popup .listTitle {color:#000;}\n"+
"",
"TaggerStyles");
window.lewcidTiddlerSwapTag = function (tiddler, oldTag, newTag){
for (var i = 0; i < tiddler.tags.length; i++)
if (tiddler.tags[i] == oldTag) {
tiddler.tags[i] = newTag;
return true;}
return false;
}
window.lewcidRenameTag = function(e) {
var tag=this.getAttribute("tag");
var newtag=prompt("Rename tag '"+tag+"' to:",tag);
if ((newtag==tag)||(newtag==null)) {return false;}
if(store.tiddlerExists(newtag))
{if(confirm(config.messages.overwriteWarning.format([newtag.toString()])))
story.closeTiddler(newtag,false,false);
else
return null;}
tagged=store.getTaggedTiddlers(tag);
if (tagged.length!=0){
for (var j = 0; j < tagged.length; j++)
lewcidTiddlerSwapTag(tagged[j],tag,newtag);}
if (store.tiddlerExists(tag))
{store.saveTiddler(tag,newtag);}
if (document.getElementById("tiddler"+tag))
{var oldTagTiddler = document.getElementById(story.idPrefix + tag);
var before= story.positionTiddler(oldTagTiddler);
var place = document.getElementById(story.container);
story.closeTiddler(tag,false,false);
story.createTiddler(place,before,newtag,null);
story.saveTiddler(newtag);}
if(config.options.chkAutoSave)
saveChanges();
return false;
}
window.onClickTag=function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
var nested = (!isNested(theTarget));
if ((Popup.stack.length > 1)&&(nested==true)) {Popup.removeFrom(1);}
else if(Popup.stack.length > 0 && nested==false) {Popup.removeFrom(0);};
var theId = (nested==false)? "popup" : "nestedtagger";
var popup = createTiddlyElement(document.body,"ol",theId,"popup",null);
Popup.stack.push({root: this, popup: popup});
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
if(popup && tag)
{
var tagged = store.getTaggedTiddlers(tag);
var titles = [];
var li,r;
for(r=0;r<tagged.length;r++)
if(tagged[r].title != title)
titles.push(tagged[r].title);
var lingo = config.views.wikified.tag;
if(titles.length > 0)
{
var openAll = createTiddlyButton(createTiddlyElement(popup,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
openAll.setAttribute("tag",tag);
createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
for(r=0; r<titles.length; r++)
{
createTiddlyLink(createTiddlyElement(popup,"li"),titles[r],true);
}
}
else
createTiddlyText(createTiddlyElement(popup,"li",null,"disabled"),lingo.popupNone.format([tag]));
createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
var h = createTiddlyLink(createTiddlyElement(popup,"li"),tag,false);
createTiddlyText(h,lingo.openTag.format([tag]));
createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
var renameTagButton = createTiddlyButton(createTiddlyElement(popup,"li"),("Rename tag '"+tag+"'"),null,lewcidRenameTag);
renameTagButton.setAttribute("tag",tag)
}
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
}
if (!window.isNested)
window.isNested = function(e) {
while (e != null) {
var contentWrapper = document.getElementById("contentWrapper");
if (contentWrapper == e) return true;
e = e.parentNode;
}
return false;
};
config.shadowTiddlers.TaggerPluginDocumentation="The documentation is available [[here.|http://tw.lewcid.org/#TaggerPluginDocumentation]]";
config.shadowTiddlers.TaggerPluginSource="The uncompressed source code is available [[here.|http://tw.lewcid.org/#TaggerPluginSource]]";
//}}}
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.3.1 ($Rev: 6100 $)|
|Date:|$Date: 2008-07-27 01:42:07 +1000 (Sun, 27 Jul 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
merge(String.prototype,{
parseTagExpr: function(debug) {
if (this.trim() == "")
return "(true)";
var anyLogicOp = /(!|&&|\|\||\(|\))/g;
var singleLogicOp = /^(!|&&|\|\||\(|\))$/;
var spaced = this.
// because square brackets in templates are no good
// this means you can use [(With Spaces)] instead of [[With Spaces]]
replace(/\[\(/g," [[").
replace(/\)\]/g,"]] ").
// space things out so we can use readBracketedList. tricky eh?
replace(anyLogicOp," $1 ");
var expr = "";
var tokens = spaced.readBracketedList(false); // false means don't uniq the list. nice one JR!
for (var i=0;i<tokens.length;i++)
if (tokens[i].match(singleLogicOp))
expr += tokens[i];
else
expr += "tiddler.tags.contains('%0')".format([tokens[i].replace(/'/,"\\'")]); // fix single quote bug. still have round bracket bug i think
if (debug)
alert(expr);
return '('+expr+')';
}
});
merge(TiddlyWiki.prototype,{
getTiddlersByTagExpr: function(tagExpr,sortField) {
var result = [];
var expr = tagExpr.parseTagExpr();
store.forEachTiddler(function(title,tiddler) {
if (eval(expr))
result.push(tiddler);
});
if(!sortField)
sortField = "title";
result.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});
return result;
}
});
config.taggly = {
// for translations
lingo: {
labels: {
asc: "\u2191", // down arrow
desc: "\u2193", // up arrow
title: "title",
modified: "modified",
created: "created",
show: "+",
hide: "-",
normal: "normal",
group: "group",
commas: "commas",
sitemap: "sitemap",
numCols: "cols\u00b1", // plus minus sign
label: "Tagged as '%0':",
exprLabel: "Matching tag expression '%0':",
excerpts: "excerpts",
descr: "descr",
slices: "slices",
contents: "contents",
sliders: "sliders",
noexcerpts: "title only",
noneFound: "(none)"
},
tooltips: {
title: "Click to sort by title",
modified: "Click to sort by modified date",
created: "Click to sort by created date",
show: "Click to show tagging list",
hide: "Click to hide tagging list",
normal: "Click to show a normal ungrouped list",
group: "Click to show list grouped by tag",
sitemap: "Click to show a sitemap style list",
commas: "Click to show a comma separated list",
numCols: "Click to change number of columns",
excerpts: "Click to show excerpts",
descr: "Click to show the description slice",
slices: "Click to show all slices",
contents: "Click to show entire tiddler contents",
sliders: "Click to show tiddler contents in sliders",
noexcerpts: "Click to show entire title only"
},
tooDeepMessage: "* //sitemap too deep...//"
},
config: {
showTaggingCounts: true,
listOpts: {
// the first one will be the default
sortBy: ["title","modified","created"],
sortOrder: ["asc","desc"],
hideState: ["show","hide"],
listMode: ["normal","group","sitemap","commas"],
numCols: ["1","2","3","4","5","6"],
excerpts: ["noexcerpts","excerpts","descr","slices","contents","sliders"]
},
valuePrefix: "taggly.",
excludeTags: ["excludeLists","excludeTagging"],
excerptSize: 50,
excerptMarker: "/%"+"%/",
siteMapDepthLimit: 25
},
getTagglyOpt: function(title,opt) {
var val = store.getValue(title,this.config.valuePrefix+opt);
return val ? val : this.config.listOpts[opt][0];
},
setTagglyOpt: function(title,opt,value) {
if (!store.tiddlerExists(title))
// create it silently
store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
// if value is default then remove it to save space
return store.setValue(title,
this.config.valuePrefix+opt,
value == this.config.listOpts[opt][0] ? null : value);
},
getNextValue: function(title,opt) {
var current = this.getTagglyOpt(title,opt);
var pos = this.config.listOpts[opt].indexOf(current);
// a little usability enhancement. actually it doesn't work right for grouped or sitemap
var limit = (opt == "numCols" ? store.getTiddlersByTagExpr(title).length : this.config.listOpts[opt].length);
var newPos = (pos + 1) % limit;
return this.config.listOpts[opt][newPos];
},
toggleTagglyOpt: function(title,opt) {
var newVal = this.getNextValue(title,opt);
this.setTagglyOpt(title,opt,newVal);
},
createListControl: function(place,title,type) {
var lingo = config.taggly.lingo;
var label;
var tooltip;
var onclick;
if ((type == "title" || type == "modified" || type == "created")) {
// "special" controls. a little tricky. derived from sortOrder and sortBy
label = lingo.labels[type];
tooltip = lingo.tooltips[type];
if (this.getTagglyOpt(title,"sortBy") == type) {
label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
onclick = function() {
config.taggly.toggleTagglyOpt(title,"sortOrder");
return false;
}
}
else {
onclick = function() {
config.taggly.setTagglyOpt(title,"sortBy",type);
config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
return false;
}
}
}
else {
// "regular" controls, nice and simple
label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
onclick = function() {
config.taggly.toggleTagglyOpt(title,type);
return false;
}
}
// hide button because commas don't have columns
if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
},
makeColumns: function(orig,numCols) {
var listSize = orig.length;
var colSize = listSize/numCols;
var remainder = listSize % numCols;
var upperColsize = colSize;
var lowerColsize = colSize;
if (colSize != Math.floor(colSize)) {
// it's not an exact fit so..
upperColsize = Math.floor(colSize) + 1;
lowerColsize = Math.floor(colSize);
}
var output = [];
var c = 0;
for (var j=0;j<numCols;j++) {
var singleCol = [];
var thisSize = j < remainder ? upperColsize : lowerColsize;
for (var i=0;i<thisSize;i++)
singleCol.push(orig[c++]);
output.push(singleCol);
}
return output;
},
drawTable: function(place,columns,theClass) {
var newTable = createTiddlyElement(place,"table",null,theClass);
var newTbody = createTiddlyElement(newTable,"tbody");
var newTr = createTiddlyElement(newTbody,"tr");
for (var j=0;j<columns.length;j++) {
var colOutput = "";
for (var i=0;i<columns[j].length;i++)
colOutput += columns[j][i];
var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
wikify(colOutput,newTd);
}
return newTable;
},
createTagglyList: function(place,title,isTagExpr) {
switch(this.getTagglyOpt(title,"listMode")) {
case "group": return this.createTagglyListGrouped(place,title,isTagExpr); break;
case "normal": return this.createTagglyListNormal(place,title,false,isTagExpr); break;
case "commas": return this.createTagglyListNormal(place,title,true,isTagExpr); break;
case "sitemap":return this.createTagglyListSiteMap(place,title,isTagExpr); break;
}
},
getTaggingCount: function(title,isTagExpr) {
// thanks to Doug Edmunds
if (this.config.showTaggingCounts) {
var tagCount = config.taggly.getTiddlers(title,'title',isTagExpr).length;
if (tagCount > 0)
return " ("+tagCount+")";
}
return "";
},
getTiddlers: function(titleOrExpr,sortBy,isTagExpr) {
return isTagExpr ? store.getTiddlersByTagExpr(titleOrExpr,sortBy) : store.getTaggedTiddlers(titleOrExpr,sortBy);
},
getExcerpt: function(inTiddlerTitle,title,indent) {
if (!indent)
indent = 1;
var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
var t = store.getTiddler(title);
if (t && displayMode == "excerpts") {
var text = t.text.replace(/\n/," ");
var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}
else if (text.length < this.config.excerptSize) {
return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
}
else {
return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
}
}
else if (t && displayMode == "contents") {
return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
}
else if (t && displayMode == "sliders") {
return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
}
else if (t && displayMode == "descr") {
var descr = store.getTiddlerSlice(title,'Description');
return descr ? " {{excerpt{" + descr + "}}}" : "";
}
else if (t && displayMode == "slices") {
var result = "";
var slices = store.calcAllSlices(title);
for (var s in slices)
result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
return result ? "\n{{excerpt excerptIndent{\n" + result + "}}}" : "";
}
return "";
},
notHidden: function(t,inTiddler) {
if (typeof t == "string")
t = store.getTiddler(t);
return (!t || !t.tags.containsAny(this.config.excludeTags) ||
(inTiddler && this.config.excludeTags.contains(inTiddler)));
},
// this is for normal and commas mode
createTagglyListNormal: function(place,title,useCommas,isTagExpr) {
var list = config.taggly.getTiddlers(title,this.getTagglyOpt(title,"sortBy"),isTagExpr);
if (this.getTagglyOpt(title,"sortOrder") == "desc")
list = list.reverse();
var output = [];
var first = true;
for (var i=0;i<list.length;i++) {
if (this.notHidden(list[i],title)) {
var countString = this.getTaggingCount(list[i].title);
var excerpt = this.getExcerpt(title,list[i].title);
if (useCommas)
output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
else
output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");
first = false;
}
}
return this.drawTable(place,
this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
useCommas ? "commas" : "normal");
},
// this is for the "grouped" mode
createTagglyListGrouped: function(place,title,isTagExpr) {
var sortBy = this.getTagglyOpt(title,"sortBy");
var sortOrder = this.getTagglyOpt(title,"sortOrder");
var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);
if (sortOrder == "desc")
list = list.reverse();
var leftOvers = []
for (var i=0;i<list.length;i++)
leftOvers.push(list[i].title);
var allTagsHolder = {};
for (var i=0;i<list.length;i++) {
for (var j=0;j<list[i].tags.length;j++) {
if (list[i].tags[j] != title) { // not this tiddler
if (this.notHidden(list[i].tags[j],title)) {
if (!allTagsHolder[list[i].tags[j]])
allTagsHolder[list[i].tags[j]] = "";
if (this.notHidden(list[i],title)) {
allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";
leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
}
}
}
}
}
var allTags = [];
for (var t in allTagsHolder)
allTags.push(t);
var sortHelper = function(a,b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
};
allTags.sort(function(a,b) {
var tidA = store.getTiddler(a);
var tidB = store.getTiddler(b);
if (sortBy == "title") return sortHelper(a,b);
else if (!tidA && !tidB) return 0;
else if (!tidA) return -1;
else if (!tidB) return +1;
else return sortHelper(tidA[sortBy],tidB[sortBy]);
});
var leftOverOutput = "";
for (var i=0;i<leftOvers.length;i++)
if (this.notHidden(leftOvers[i],title))
leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";
var output = [];
if (sortOrder == "desc")
allTags.reverse();
else if (leftOverOutput != "")
// leftovers first...
output.push(leftOverOutput);
for (var i=0;i<allTags.length;i++)
if (allTagsHolder[allTags[i]] != "")
output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);
if (sortOrder == "desc" && leftOverOutput != "")
// leftovers last...
output.push(leftOverOutput);
return this.drawTable(place,
this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
"grouped");
},
// used to build site map
treeTraverse: function(title,depth,sortBy,sortOrder,isTagExpr) {
var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);
if (sortOrder == "desc")
list.reverse();
var indent = "";
for (var j=0;j<depth;j++)
indent += "*"
var childOutput = "";
if (depth > this.config.siteMapDepthLimit)
childOutput += indent + this.lingo.tooDeepMessage;
else
for (var i=0;i<list.length;i++)
if (list[i].title != title)
if (this.notHidden(list[i].title,this.config.inTiddler))
childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder,false);
if (depth == 0)
return childOutput;
else
return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
},
// this if for the site map mode
createTagglyListSiteMap: function(place,title,isTagExpr) {
this.config.inTiddler = title; // nasty. should pass it in to traverse probably
var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"),isTagExpr);
return this.drawTable(place,
this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
"sitemap"
);
},
macros: {
tagglyTagging: {
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var parsedParams = paramString.parseParams("tag",null,true);
var refreshContainer = createTiddlyElement(place,"div");
// do some refresh magic to make it keep the list fresh - thanks Saq
refreshContainer.setAttribute("refresh","macro");
refreshContainer.setAttribute("macroName",macroName);
var tag = getParam(parsedParams,"tag");
var expr = getParam(parsedParams,"expr");
if (expr) {
refreshContainer.setAttribute("isTagExpr","true");
refreshContainer.setAttribute("title",expr);
refreshContainer.setAttribute("showEmpty","true");
}
else {
refreshContainer.setAttribute("isTagExpr","false");
if (tag) {
refreshContainer.setAttribute("title",tag);
refreshContainer.setAttribute("showEmpty","true");
}
else {
refreshContainer.setAttribute("title",tiddler.title);
refreshContainer.setAttribute("showEmpty","false");
}
}
this.refresh(refreshContainer);
},
refresh: function(place) {
var title = place.getAttribute("title");
var isTagExpr = place.getAttribute("isTagExpr") == "true";
var showEmpty = place.getAttribute("showEmpty") == "true";
removeChildren(place);
addClass(place,"tagglyTagging");
var countFound = config.taggly.getTiddlers(title,'title',isTagExpr).length
if (countFound > 0 || showEmpty) {
var lingo = config.taggly.lingo;
config.taggly.createListControl(place,title,"hideState");
if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
createTiddlyElement(place,"span",null,"tagglyLabel",
isTagExpr ? lingo.labels.exprLabel.format([title]) : lingo.labels.label.format([title]));
config.taggly.createListControl(place,title,"title");
config.taggly.createListControl(place,title,"modified");
config.taggly.createListControl(place,title,"created");
config.taggly.createListControl(place,title,"listMode");
config.taggly.createListControl(place,title,"excerpts");
config.taggly.createListControl(place,title,"numCols");
config.taggly.createTagglyList(place,title,isTagExpr);
if (countFound == 0 && showEmpty)
createTiddlyElement(place,"div",null,"tagglyNoneFound",lingo.labels.noneFound);
}
}
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
" margin-bottom:0.5em; }",
".tagglyTagging .indent1 { margin-left:3em; }",
".tagglyTagging .indent2 { margin-left:4em; }",
".tagglyTagging .indent3 { margin-left:5em; }",
".tagglyTagging .indent4 { margin-left:6em; }",
".tagglyTagging .indent5 { margin-left:7em; }",
".tagglyTagging .indent6 { margin-left:8em; }",
".tagglyTagging .indent7 { margin-left:9em; }",
".tagglyTagging .indent8 { margin-left:10em; }",
".tagglyTagging .indent9 { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
".tagglyNoneFound { margin-left:2em; color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }",
"/*}}}*/",
""].join("\n"),
init: function() {
merge(config.macros,this.macros);
config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
store.addNotification("TagglyTaggingStyles",refreshStyles);
}
};
config.taggly.init();
//}}}
/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin
// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed
***/
//{{{
config.formatters.unshift( {
name: "inlinesliders",
// match: "\\+\\+\\+\\+|\\<slider",
match: "\\<slider",
// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
handler: function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
wikify(lookaheadMatch[3],panel);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
},
onClickSlider : function(e) {
if(!e) var e = window.event;
var n = this.nextSibling;
n.style.display = (n.style.display=="none") ? "block" : "none";
return false;
}
});
//}}}
/*TagglyTag styles*/
.tagglyTagged li.listTitle { display:none;}
.tagglyTagged li { display: inline; font-size:90%; }
.tagglyTagged ul { margin:0px; padding:0px; }
.tagglyTagging { padding-top:0.5em; }
.tagglyTagging li.listTitle { display:none;}
.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }
/* .tagglyTagging .tghide { display:inline; } */
.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }
.tagglyTagging table { margin:0px; padding:0px; }
.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }
.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}
.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }
.selected .tagglyTagging .button { display:inline; }
.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */
.selected .tagglyTagging .hidebutton { color:#aaa }
.tagglyLabel { color:#aaa; font-size:90%; }
.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }
.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}
.tagglyTagging ul ul li {margin-left:0.5em; }
.editLabel { font-size:90%; padding-top:0.5em; }
@@color:#C06;Tiddlers tagged template.@@
----
<script>
// get all tiddlers tagged with "template"
var tids=store.getTaggedTiddlers("template");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("template")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
<script>
var here = story.findContainingTiddler(place) ;
jQuery(here).append("this is a test") ;
</script>
<<siteMap [[The QuickEdit Toolbar]] . sliders>>
I should be below [[SecondTier Two]]
''Button tooltip:'' copy content from another tiddler
This button {{makeborder{<<tiddler QuickEdit_tiddler>>}}} allows you to copy the complete contents from another tiddler into the current tiddler which is inserted at the cursor position.
''There are two options to find the tiddler you want.''
# An alpha sorted dropdown list of all tiddlers (lower case sorted at the end of the list).
# A dropdown list of tags. The choice of a particular tag will insert the names of those tiddlers in the other dropdown allowing you a choice from them.
/***
|''Name:''|TiddlerNotesPlugin|
|''Description:''|Add notes to tiddlers without modifying the original content|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#TiddlerNotesPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|26/10/07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
!!Concept:
*The TiddlerNotesPlugin allows you to add notes to tiddlers, without needing to edit the original tiddler. This means that your original content will remain unaltered, and if you update it in the future, you won’t lose your notes. Notes are stored in separate tiddlers, but can be viewed and edited from within the original tiddler.
*For a tiddler titled "~MySlide", the notes are by default saved in a tiddler titled "~MySlide-Notes" and is given a tag of "Notes". The suffix and tags of the notes tiddlers are customizable. You can have one or multiple notes per tiddlers. So it is possible to have for example, teacher's notes and student's notes in the same file.
*Notes can be configured to start off blank, or pre-filled with the contents of the original tiddler.
!!Usage:
*{{{<<notes>>}}} is the simplest usage form.
* additional optional parameters include:
**{{{heading:}}} the heading to use for the notes box
**{{{tag:}}} the tag to be given to the notes tiddler
**{{{suffix:}}} the suffix to be used when naming the notes tiddler
* a full macro call could look like: {{{<<notes heading:"My Notes" tag:"NoteTiddlers" suffix:"Comments">>}}}
* To avoid adding {{{<<notes>>}}} to each tiddler you want notes for, you could add the macro call to the ViewTemplate
** below the line {{{<div class='viewer' macro='view text wikified'></div>}}} add the following line: <br> {{{<div class='viewer' macro='notes'></div>}}}
** Used in combination with the ~HideWhenPlugin or ~PublisherPlugin, you could have notes be shown only for tiddlers with specific tags. The ~PublisherPlugin would allow you for instance to only have the ~TeachersNotes visible to the teacher, and the ~StudentsNotes for the same tiddler visible to the Student.
!!Configuration
*<<option chkPrefillNotes>> Enable to pre-fill notes with the original tiddler's contents
!!Demo:
* [[MySlide]]
***/
// /%
//!BEGIN-PLUGIN-CODE
if (!config.options.chkPrefillNotes)
config.options.chkPrefillNotes = false;
function createTiddlyElement(theParent,theElement,theID,theClass,theText,attribs)
{
var e = document.createElement(theElement);
if(theClass != null)
e.className = theClass;
if(theID != null)
e.setAttribute("id",theID);
if(theText != null)
e.appendChild(document.createTextNode(theText));
if(attribs){
for(var n in attribs){
e.setAttribute(n,attribs[n]);
}
}
if(theParent != null)
theParent.appendChild(e);
return e;
}
function createTiddlyButton(theParent,theText,theTooltip,theAction,theClass,theId,theAccessKey,attribs)
{
var theButton = document.createElement("a");
if(theAction) {
theButton.onclick = theAction;
theButton.setAttribute("href","javascript:;");
}
if(theTooltip)
theButton.setAttribute("title",theTooltip);
if(theText)
theButton.appendChild(document.createTextNode(theText));
if(theClass)
theButton.className = theClass;
else
theButton.className = "button";
if(theId)
theButton.id = theId;
if(attribs){
for(var n in attribs){
e.setAttribute(n,attribs[n]);
}
}
if(theParent)
theParent.appendChild(theButton);
if(theAccessKey)
theButton.setAttribute("accessKey",theAccessKey);
return theButton;
}
config.macros.notes={
cancelWarning: "Are you sure you want to abandon changes to your notes for '%0'? This warning is from TiddlerNotesPlugin",
editLabel: "edit notes",
editTitle: "double click to edit",
saveLabel: "save notes",
saveTitle: "double click to save",
cancelLabel: "cancel",
heading: "Notes",
suffix: "Notes",
tag: "Notes",
saveNotes: function(ev){
e = ev? ev : window.event;
var theTarget = resolveTarget(e);
if (theTarget.nodeName.toLowerCase() == "textarea")
return false;
var title = story.findContainingTiddler(theTarget).getAttribute("tiddler");
story.setDirty(title,false);
var box = document.getElementById("notesContainer"+title);
var textarea = document.getElementById("notesTextArea"+title);
if(textarea.getAttribute("oldText")!=textarea.value && !hasClass(theTarget,"cancelNotesButton")){
var suffix = box.getAttribute("suffix");
var t = store.getTiddler(title+"-"+suffix);
store.saveTiddler(title+"-"+suffix,title+"-"+suffix,textarea.value,config.options.txtUserName,new Date(),t?t.tags:box.getAttribute("tag"),t?t.fields:{});
}
story.refreshTiddler(title,1,true);
autoSaveChanges(true);
return false;
},
editNotes: function(box,tiddler){
removeChildren(box);
story.setDirty(tiddler,true);
box.title = this.saveTitle;
box.ondblclick = this.saveNotes;
createTiddlyButton(box,this.cancelLabel,this.cancelLabel,this.saveNotes,"cancelNotesButton");
createTiddlyButton(box,this.saveLabel,this.saveLabel,this.saveNotes,"saveNotesButton");
wikify("!!"+box.getAttribute("heading")+"\n",box);
addClass(box,"editor");
var wrapper1 = createTiddlyElement(null,"fieldset",null,"fieldsetFix");
var wrapper2 = createTiddlyElement(wrapper1,"div");
var e = createTiddlyElement(wrapper2,"textarea","notesTextArea"+tiddler);
var v = store.getValue(tiddler+"-"+box.getAttribute("suffix"),"text");
if(!v)
v = config.options.chkPrefillNotes? store.getValue(tiddler,"text"):'';
e.value = v;
e.setAttribute("oldText",v);
var rows = 10;
var lines = v.match(/\n/mg);
var maxLines = Math.max(parseInt(config.options.txtMaxEditRows),5);
if(lines != null && lines.length > rows)
rows = lines.length + 5;
rows = Math.min(rows,maxLines);
e.setAttribute("rows",rows);
box.appendChild(wrapper1);
},
editNotesButtonOnclick: function(e){
var title = story.findContainingTiddler(this).getAttribute("tiddler");
var box = document.getElementById("notesContainer"+title);
config.macros.notes.editNotes(box,title);
return false;
},
ondblclick : function(ev){
e = ev? ev : window.event;
var theTarget = resolveTarget(e);
var title = story.findContainingTiddler(theTarget).getAttribute("tiddler");
var box = document.getElementById("notesContainer"+title);
config.macros.notes.editNotes(box,title);
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
},
handler : function(place,macroName,params,wikifier,paramString,tiddler){
params = paramString.parseParams("anon",null,true,false,false);
var heading = getParam(params,"heading",this.heading);
var tag = getParam(params,"tag",this.tag);
var suffix = getParam(params,"suffix",this.suffix);
var box = createTiddlyElement(place,"div","notesContainer"+tiddler.title,"TiddlerNotes",null,{"source":tiddler.title,params:paramString,heading:heading,tag:tag,suffix:suffix});
createTiddlyButton(box,this.editLabel,this.editLabel,this.editNotesButtonOnclick,"editNotesButton");
wikify("!!"+heading+"\n",box);
box.title=this.editTitle;
box.ondblclick = this.ondblclick;
wikify("<<tiddler [["+tiddler.title+"-"+suffix+"]]>>",box);
}
};
Story.prototype.old_notes_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,unused){
if(story.isDirty(title)) {
if(!confirm(config.macros.notes.cancelWarning.format([title])))
return false;
}
return this.old_notes_closeTiddler.apply(this,arguments);
}
setStylesheet(".TiddlerNotes {\n"+ " background:#eee;\n"+ " border:1px solid #ccc;\n"+ " padding:10px;\n"+ " margin:15px;\n"+ "}\n"+ "\n"+ ".cancelNotesButton,.editNotesButton, .saveNotesButton {\n"+ " float:right;\n"+ " border:1px solid #ccc;\n"+ " padding:2px 5px;\n"+ "}\n"+ "\n"+ ".saveNotesButton{\n"+ " margin-right:0.5em;\n"+ "}\n"+ "\n"+ ".TiddlerNotes.editor textarea{\n"+ " border:1px solid #ccc;\n"+ "}","NotesPluginStyles");
//!END-PLUGIN-CODE
// %/
<<tiddler ToggleRightSidebar with: "Sidebar »">>
{{overflow{
<<tiddlerTweaker>>
}}}
/***
|Name|TiddlerTweakerPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerTweakerPlugin|
|Version|2.4.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|select multiple tiddlers and modify author, created, modified and/or tag values|
~TiddlerTweaker is a tool for TiddlyWiki authors. It allows you to select multiple tiddlers from a listbox, either by direct interaction or automatically matching specific criteria. You can then modify the creator, author, created, modified and/or tag values of those tiddlers using a compact set of form fields. The values you enter into the fields simultantously overwrite the existing values in all tiddlers you have selected.
!!!!!Usage
<<<
{{{<<tiddlerTweaker>>}}}
{{smallform{<<tiddlerTweaker>>}}}
By default, any tags you enter into the TiddlerTweaker will //replace// the existing tags in all the tiddlers you have selected. However, you can also use TiddlerTweaker to quickly filter specified tags from the selected tiddlers, while leaving any other tags assigned to those tiddlers unchanged:
>Any tag preceded by a "+" (plus) or "-" (minus), will be added or removed from the existing tags //instead of replacing the entire tag definition// of each tiddler (e.g., enter "-excludeLists" to remove that tag from all selected tiddlers. When using this syntax, care should be taken to ensure that //every// tag is preceded by "+" or "-", to avoid inadvertently overwriting any other existing tags on the selected tiddlers. (note: the "+" or "-" prefix on each tag value is NOT part of the tag value, and is only used by TiddlerTweaker to control how that tag value is processed)
Important Notes:
* Inasmuch as TiddlerTweaker is a 'power user' tool that can perform 'batch' functions (operating on many tiddlers at once), you should always have a recent backup of your document (or "save changes" just *before* tweaking the tiddlers), just in case you "shoot yourself in the foot".
* By design, TiddlerTweaker does NOT update the 'modified' date of tiddlers simply by making changes to the tiddler's values. A tiddler's dates are ONLY updated when the corresponding 'created' and/or 'modified' checkboxes are selected and you enter new values for those dates. As a general rule, after using TiddlerTweaker, always ''//remember to save your document//'' when you are done, even though the tiddler timeline tab may not show any recently modified tiddlers.
* Because you may be changing the values on many tiddlers simultaneously, selecting and updating all tiddlers in a document operation may take a while and your browser might warn about an "unresponsive script"... you should give it a whole bunch of time to 'continue'... it should complete the processing... eventually.
<<<
!!!!!Revisions
<<<
2009.03.30 [2.4.0] added 'sort by modifier'
2009.01.22 [2.3.0] added support for text pattern find/replace
2008.10.27 [2.2.3] in setTiddlers(), fixed Safari bug by replacing static Array.concat(...) with new Array().concat(...)
2008.09.07 [2.2.2] added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.12 [2.2.1] replace built-in backstage "tweak" task with tiddler tweaker control panel (moved from BackstageTweaks)
2008.01.13 [2.2.0] added "auto-selection" links: all, changed, tags, title, text
2007.12.26 [2.1.0] added support for managing 'creator' custom field (see [[CoreTweaks]])
2007.11.01 [2.0.3] added config.options.txtTweakerSortBy for cookie-based persistence of list display order preference setting.
2007.09.28 [2.0.2] in settiddlers() and deltiddlers(), added suspend/resume notification handling (improves performance when operating on multiple tiddlers)
2007.08.03 [2.0.1] added shadow definition for [[TiddlerTweaker]] tiddler for use as parameter references with {{{<<tiddler>>, <<slider>> or <<tabs>>}}} macros.
2007.08.03 [2.0.0] converted from inline script
2006.01.01 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.TiddlerTweakerPlugin= {major: 2, minor: 4, revision: 0, date: new Date(2009,1,22)};
// shadow tiddler
config.shadowTiddlers.TiddlerTweaker="<<tiddlerTweaker>>";
/// backstage task
if (config.tasks) { // for TW2.2b3 or above
config.tasks.tweak.tooltip="review/modify tiddler internals: dates, authors, tags, etc.";
config.tasks.tweak.content="{{smallform small groupbox{<<tiddlerTweaker>>}}}";
}
if (config.options.txtTweakerSortBy==undefined) config.options.txtTweakerSortBy="modified";
// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
window.removeCookie=function(name) {
document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;';
}
}
config.macros.tiddlerTweaker = {
html: '<form style="display:inline"><!--\
--><table style="padding:0;margin:0;border:0;width:100%"><tr valign="top" style="padding:0;margin:0;border:0"><!--\
--><td style="text-align:center;white-space:nowrap;width:99%;padding:0;margin:0;border:0"><!--\
--><font size=-2><div style="text-align:left;"><span style="float:right"><!--\
--> <a href="javascript:;" \
title="select all tiddlers"\
onclick="\
var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
for (var t=0; t<f.list.options.length; t++)\
if (f.list.options[t].value.length) f.list.options[t].selected=true;\
config.macros.tiddlerTweaker.selecttiddlers(f.list);\
return false">all</a><!--\
--> <a href="javascript:;" \
title="select tiddlers that are new/changed since the last file save"\
onclick="\
var lastmod=new Date(document.lastModified);\
var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
for (var t=0; t<f.list.options.length; t++) {\
var tid=store.getTiddler(f.list.options[t].value);\
f.list.options[t].selected=tid&&tid.modified>lastmod;\
}\
config.macros.tiddlerTweaker.selecttiddlers(f.list);\
return false">changed</a><!--\
--> <a href="javascript:;" \
title="select tiddlers with at least one matching tag"\
onclick="\
var t=prompt(\'Enter space-separated tags (match ONE)\');\
if (!t||!t.length) return false;\
var tags=t.readBracketedList();\
var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
for (var t=0; t<f.list.options.length; t++) {\
f.list.options[t].selected=false;\
var tid=store.getTiddler(f.list.options[t].value);\
if (tid&&tid.tags.containsAny(tags)) f.list.options[t].selected=true;\
}\
config.macros.tiddlerTweaker.selecttiddlers(f.list);\
return false">tags</a><!--\
--> <a href="javascript:;" \
title="select tiddlers whose titles include matching text"\
onclick="\
var txt=prompt(\'Enter a title (or portion of a title) to match\');\
if (!txt||!txt.length) return false;\
var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
for (var t=0; t<f.list.options.length; t++) {\
f.list.options[t].selected=f.list.options[t].value.indexOf(txt)!=-1;\
}\
config.macros.tiddlerTweaker.selecttiddlers(f.list);\
return false">titles</a><!--\
--> <a href="javascript:;" \
title="select tiddlers containing matching text"\
onclick="\
var txt=prompt(\'Enter tiddler text (content) to match\');\
if (!txt||!txt.length) return false;\
var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
for (var t=0; t<f.list.options.length; t++) {\
var tt=store.getTiddlerText(f.list.options[t].value,\'\');\
f.list.options[t].selected=(tt.indexOf(txt)!=-1);\
}\
config.macros.tiddlerTweaker.selecttiddlers(f.list);\
return false">text</a> <!--\
--></span><span>select tiddlers</span><!--\
--></div><!--\
--></font><select multiple name=list size="11" style="width:99.99%" \
title="use click, shift-click and/or ctrl-click to select multiple tiddler titles" \
onclick="config.macros.tiddlerTweaker.selecttiddlers(this)" \
onchange="config.macros.tiddlerTweaker.setfields(this)"><!--\
--></select><br><!--\
-->show<input type=text size=1 value="11" \
onchange="this.form.list.size=this.value; this.form.list.multiple=(this.value>1);"><!--\
-->by<!--\
--><select name=sortby size=1 \
onchange="config.macros.tiddlerTweaker.init(this.form,this.value)"><!--\
--><option value="title">title</option><!--\
--><option value="size">size</option><!--\
--><option value="modified">modified</option><!--\
--><option value="created">created</option><!--\
--><option value="modifier">modifier</option><!--\
--></select><!--\
--><input type="button" value="refresh" \
onclick="config.macros.tiddlerTweaker.init(this.form,this.form.sortby.value)"<!--\
--> <input type="button" name="stats" disabled value="totals..." \
onclick="config.macros.tiddlerTweaker.stats(this)"><!--\
--></td><td style="white-space:nowrap;padding:0;margin:0;border:0;width:1%"><!--\
--><div style="text-align:left"><font size=-2> modify values</font></div><!--\
--><table border=0 style="width:100%;padding:0;margin:0;border:0;"><tr style="padding:0;border:0;"><!--\
--><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=settitle unchecked \
title="allow changes to tiddler title (rename tiddler)" \
onclick="this.form.title.disabled=!this.checked">title<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=title size=35 style="width:98%" disabled><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=setcreator unchecked \
title="allow changes to tiddler creator" \
onclick="this.form.creator.disabled=!this.checked">created by<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=creator size=35 style="width:98%" disabled><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=setwho unchecked \
title="allow changes to tiddler author" \
onclick="this.form.who.disabled=!this.checked">modified by<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=who size=35 style="width:98%" disabled><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=setcdate unchecked \
title="allow changes to created date" \
onclick="var f=this.form; f.cm.disabled=f.cd.disabled=f.cy.disabled=f.ch.disabled=f.cn.disabled=!this.checked"><!--\
-->created on<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=cm size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> / <input type=text name=cd size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> / <input type=text name=cy size=4 style="width:3em;padding:0;text-align:center" disabled><!--\
--> at <input type=text name=ch size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> : <input type=text name=cn size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=setmdate unchecked \
title="allow changes to modified date" \
onclick="var f=this.form; f.mm.disabled=f.md.disabled=f.my.disabled=f.mh.disabled=f.mn.disabled=!this.checked"><!--\
-->modified on<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=mm size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> / <input type=text name=md size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> / <input type=text name=my size=4 style="width:3em;padding:0;text-align:center" disabled><!--\
--> at <input type=text name=mh size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--> : <input type=text name=mn size=2 style="width:2em;padding:0;text-align:center" disabled><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=replacetext unchecked\
title="find/replace matching text" \
onclick="this.form.pattern.disabled=this.form.replacement.disabled=!this.checked">replace text<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=pattern size=15 value="" style="width:40%" disabled \
title="enter TEXT PATTERN (regular expression)"> with <!--\
--><input type=text name=replacement size=15 value="" style="width:40%" disabled \
title="enter REPLACEMENT TEXT"><!--\
--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=checkbox name=settags checked \
title="allow changes to tiddler tags" \
onclick="this.form.tags.disabled=!this.checked">tags<!--\
--></td><td style="padding:1px;border:0;white-space:nowrap"><!--\
--><input type=text name=tags size=35 value="" style="width:98%" \
title="enter new tags or use \'+tag\' and \'-tag\' to add/remove tags from existing tags"><!--\
--></td></tr></table><!--\
--><div style="text-align:center"><!--\
--><nobr><input type=button name=display disabled style="width:32%" value="display tiddlers" \
onclick="config.macros.tiddlerTweaker.displaytiddlers(this)"><!--\
--> <input type=button name=del disabled style="width:32%" value="delete tiddlers" \
onclick="config.macros.tiddlerTweaker.deltiddlers(this)"><!--\
--> <input type=button name=set disabled style="width:32%" value="update tiddlers" \
onclick="config.macros.tiddlerTweaker.settiddlers(this)"></nobr><!--\
--></div><!--\
--></td></tr></table><!--\
--></form><span style="display:none"><!--content replaced by tiddler "stats"--></span>\
',
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var span=createTiddlyElement(place,"span");
span.innerHTML=this.html;
this.init(span.firstChild,config.options.txtTweakerSortBy);
},
init: function(f,sortby) { // initialize form controls
if (!f) return; // form might not be rendered yet...
while (f.list.options[0]) f.list.options[0]=null; // empty current list content
var tids=store.getTiddlers(sortby);
if (sortby=='size') // descending order
tids.sort(function(a,b) {return a.text.length > b.text.length ? -1 : (a.text.length == b.text.length ? 0 : +1);});
var who='';
for (i=0; i<tids.length; i++) { var t=tids[i];
var label=t.title; var value=t.title;
switch (sortby) {
case 'modified':
case 'created':
var t=tids[tids.length-i-1]; // reverse order
var when=t[sortby].formatString('YY.0MM.0DD 0hh:0mm ');
label=when+t.title;
value=t.title;
break;
case 'size':
label='['+t.text.length+'] '+label;
break;
case 'modifier':
case 'creator':
if (who!=t[sortby]) {
who=t[sortby];
f.list.options[f.list.length]=new Option('by '+who+':','',false,false);
}
label='\xa0\xa0\xa0'+label; // indent
break;
}
f.list.options[f.list.length]=new Option(label,value,false,false);
}
f.title.value=f.who.value=f.creator.value=f.tags.value="";
f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value="";
f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value="";
f.stats.disabled=f.set.disabled=f.del.disabled=f.display.disabled=true;
f.settitle.disabled=false;
config.options.txtTweakerSortBy=sortby; // remember current setting
f.sortby.value=sortby; // sync droplist selection with current setting
if (sortby!="modified") // non-default preference... save cookie
saveOptionCookie("txtTweakerSortBy");
else removeCookie("txtTweakerSortBy"); // default preference... clear cookie
},
selecttiddlers: function(here) { // enable/disable tweaker fields based on number of items selected
// count how many tiddlers are selected
var f=here.form; var list=f.list;
var c=0; for (i=0;i<list.length;i++) if (list.options[i].selected) c++;
if (c>1) f.title.disabled=true;
if (c>1) f.settitle.checked=false;
f.set.disabled=(c==0);
f.del.disabled=(c==0);
f.display.disabled=(c==0);
f.settitle.disabled=(c>1);
f.stats.disabled=(c==0);
var msg=(c==0)?'select tiddlers':(c+' tiddler'+(c!=1?'s':'')+' selected');
here.previousSibling.firstChild.firstChild.nextSibling.innerHTML=msg;
if (c) clearMessage(); else displayMessage("no tiddlers selected");
},
setfields: function(here) { // set tweaker edit fields from first selected tiddler
var f=here.form;
if (!here.value.length) {
f.title.value=f.who.value=f.creator.value=f.tags.value="";
f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value="";
f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value="";
return;
}
var tid=store.getTiddler(here.value); if (!tid) return;
f.title.value=tid.title;
f.who.value=tid.modifier;
f.creator.value=tid.fields['creator']||''; // custom field - might not exist
f.tags.value=tid.tags.join(' ');
var c=tid.created; var m=tid.modified;
f.cm.value=c.getMonth()+1;
f.cd.value=c.getDate();
f.cy.value=c.getFullYear();
f.ch.value=c.getHours();
f.cn.value=c.getMinutes();
f.mm.value=m.getMonth()+1;
f.md.value=m.getDate();
f.my.value=m.getFullYear();
f.mh.value=m.getHours();
f.mn.value=m.getMinutes();
},
settiddlers: function(here) {
var f=here.form; var list=f.list;
var tids=[];
for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
if (!tids.length) { alert("please select at least one tiddler"); return; }
var cdate=new Date(f.cy.value,f.cm.value-1,f.cd.value,f.ch.value,f.cn.value);
var mdate=new Date(f.my.value,f.mm.value-1,f.md.value,f.mh.value,f.mn.value);
if (tids.length>1 && !confirm("Are you sure you want to update these tiddlers:\n\n"+tids.join(', '))) return;
store.suspendNotifications();
for (t=0;t<tids.length;t++) {
var tid=store.getTiddler(tids[t]); if (!tid) continue;
var title=!f.settitle.checked?tid.title:f.title.value;
var who=!f.setwho.checked?tid.modifier:f.who.value;
var text=tid.text;
if (f.replacetext.checked) text=text.replace(new RegExp(f.pattern.value,'mg'),f.replacement.value);
var tags=tid.tags;
if (f.settags.checked) {
var intags=f.tags.value.readBracketedList();
var addtags=[]; var deltags=[]; var reptags=[];
for (i=0;i<intags.length;i++) {
if (intags[i].substr(0,1)=='+')
addtags.push(intags[i].substr(1));
else if (intags[i].substr(0,1)=='-')
deltags.push(intags[i].substr(1));
else
reptags.push(intags[i]);
}
if (reptags.length)
tags=reptags;
if (addtags.length)
tags=new Array().concat(tags,addtags);
if (deltags.length)
for (i=0;i<deltags.length;i++)
{ var pos=tags.indexOf(deltags[i]); if (pos!=-1) tags.splice(pos,1); }
}
if (!f.setcdate.checked) cdate=tid.created;
if (!f.setmdate.checked) mdate=tid.modified;
store.saveTiddler(tid.title,title,text,who,mdate,tags,tid.fields);
if (f.setcreator.checked) store.setValue(tid.title,'creator',f.creator.value); // set creator
if (f.setcdate.checked) tid.assign(null,null,null,null,null,cdate); // set create date
}
store.resumeNotifications();
this.init(f,f.sortby.value);
},
displaytiddlers: function(here) {
var f=here.form; var list=f.list;
var tids=[];
for (i=0; i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
if (!tids.length) { alert("please select at least one tiddler"); return; }
story.displayTiddlers(story.findContainingTiddler(f),tids)
},
deltiddlers: function(here) {
var f=here.form; var list=f.list;
var tids=[];
for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
if (!tids.length) { alert("please select at least one tiddler"); return; }
if (!confirm("Are you sure you want to delete these tiddlers:\n\n"+tids.join(', '))) return;
store.suspendNotifications();
for (t=0;t<tids.length;t++) {
var tid=store.getTiddler(tids[t]); if (!tid) continue;
if (tid.tags.contains("systemConfig"))
if (!confirm("'"+tid.title+"' is tagged with 'systemConfig'.\n\nRemoving this tiddler may cause unexpected results. Are you sure?"))
continue;
store.removeTiddler(tid.title);
story.closeTiddler(tid.title);
}
store.resumeNotifications();
this.init(f,f.sortby.value);
},
stats: function(here) {
var f=here.form; var list=f.list; var tids=[]; var out=''; var tot=0;
var target=f.nextSibling;
for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
if (!tids.length) { alert("please select at least one tiddler"); return; }
for (t=0;t<tids.length;t++) {
var tid=store.getTiddler(tids[t]); if (!tid) continue;
out+='[['+tid.title+']] '+tid.text.length+'\n'; tot+=tid.text.length;
}
var avg=tot/tids.length;
out=tot+' bytes in '+tids.length+' selected tiddlers ('+avg+' bytes/tiddler)\n<<<\n'+out+'<<<\n';
removeChildren(target);
target.innerHTML="<hr><font size=-2><a href='javascript:;' style='float:right' "
+"onclick='this.parentNode.parentNode.style.display=\"none\"'>close</a></font>";
wikify(out,target);
target.style.display="block";
}
};
//}}}
/***
|''Name:''|TiddlersBarPluginMG|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Modification
2008.09.06 - Morris Gray (Added http://tw.lewcid.org/#OpenTopPlugin code to this plugin to overcome jumping to the top when invoking any popup. Deleted the offending code)
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed.
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab = config.options.chkHideTabsBarWhenSingleTab ? config.options.chkHideTabsBarWhenSingleTab : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "do nothing";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
tooltip : "see ",
tooltipClose : "click here to close this tab",
tooltipSave : "click here to save this tab",
promptRename : "Enter tiddler new name",
currentTiddler : "",
previousState : false,
previousKey : config.options.txtPreviousTabKey,
nextKey : config.options.txtNextTabKey,
tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
handler: function(place,macroName,params) {
var previous = null;
if (config.macros.tiddlersBar.isShown())
story.forEachTiddler(function(title,e){
if (title==config.macros.tiddlersBar.currentTiddler){
var d = createTiddlyElement(null,"span",null,"tab tabSelected");
config.macros.tiddlersBar.createActiveTabButton(d,title);
if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
previous = "active";
}
else {
var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
btn.setAttribute("tiddler", title);
if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
previous=btn;
}
var isDirty =story.isDirty(title);
var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
c.setAttribute("tiddler", title);
if (place.childNodes) {
place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
place.insertBefore(d,place.firstChild);
}
else place.appendChild(d);
})
},
refresh: function(place,params){
removeChildren(place);
config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
story.refreshAllTiddlers();
if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
}
},
isShown : function(){
if (config.options.chkDisableTabsBar) return false;
if (!config.options.chkHideTabsBarWhenSingleTab) return true;
var cpt=0;
story.forEachTiddler(function(){cpt++});
return (cpt>1);
},
selectNextTab : function(){ //used when the current tab is closed (to select another tab)
var previous="";
story.forEachTiddler(function(title){
if (!config.macros.tiddlersBar.currentTiddler) {
story.displayTiddler(null,title);
return;
}
if (title==config.macros.tiddlersBar.currentTiddler) {
if (previous) {
story.displayTiddler(null,previous);
return;
}
else config.macros.tiddlersBar.currentTiddler=""; // so next tab will be selected
}
else previous=title;
});
},
onSelectTab : function(e){
var t = this.getAttribute("tiddler");
if (t) story.displayTiddler(null,t);
return false;
},
onTabClose : function(e){
var t = this.getAttribute("tiddler");
if (t) {
if(story.hasChanges(t) && !readOnly) {
if(!confirm(config.commands.cancelTiddler.warning.format([t])))
return false;
}
story.closeTiddler(t);
}
return false;
},
onTabSave : function(e) {
var t = this.getAttribute("tiddler");
if (!e) e=window.event;
if (t) config.commands.saveTiddler.handler(e,null,t);
return false;
},
onSelectedTabButtonClick : function(event,src,title) {
var t = this.getAttribute("tiddler");
if (!event) event=window.event;
if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
return false;
},
onTiddlersBarAction: function(event) {
var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
},
createActiveTabButton : function(place,title) {
if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
btn.setAttribute("tiddler", title);
}
else
createTiddlyText(place,title);
}
}
story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;
story.closeTiddler = function(title,animate,unused) {
if (title==config.macros.tiddlersBar.currentTiddler)
config.macros.tiddlersBar.selectNextTab();
story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;
if (config.macros.tiddlersBar.isShown()) {
story.forEachTiddler(function(t,e){
if (t!=title) e.style.display="none";
else e.style.display="";
})
config.macros.tiddlersBar.currentTiddler=title;
}
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
coreRefreshPageTemplate(title);
if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}
ensureVisible=function (e) {return 0} //disable bottom scrolling (not useful now)
config.shadowTiddlers.StyleSheetTiddlersBar = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .button {border:0}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .tab {white-space:nowrap}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar {padding : 1em 0.5em 2px 0.5em}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tabUnselected .tabButton, .tabSelected .tabButton {padding : 0 2px 0 2px; margin: 0 0 0 4px;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tiddler, .tabContents {border:1px [[ColorPalette::TertiaryPale]] solid;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar +="/*}}}*/";
store.addNotification("StyleSheetTiddlersBar", refreshStyles);
config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
/%
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|2.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|show/hide right sidebar (MainMenu)|
Usage: <<tiddler ToggleRightSidebar with: "label">>
Config settings:
config.options.chkShowRightSidebar (false)
config.options.txtToggleRightSideBarLabelShow (►)
config.options.txtToggleRightSideBarLabelHide (◄)
%/<script label="$1" title="show/hide right sidebar content">
var co=config.options;
if (co.chkShowRightSidebar=='undefined') co.chkShowRightSidebar=true;
co.chkShowRightSidebar=!co.chkShowRightSidebar;
var sb=document.getElementById('sidebar'); if (!sb) return;
sb.style.display=co.chkShowRightSidebar?'block':'none';
document.getElementById('displayArea').style.marginRight=co.chkShowRightSidebar?'':'1em';
saveOptionCookie('chkShowRightSidebar');
var labelShow=co.txtToggleRightSideBarLabelShow||(config.browser.isSafari?'◀':'◄');
var labelHide=co.txtToggleRightSideBarLabelHide||'►';
if (typeof(place)!='undefined' && '$1'=='$'+'1') {
place.innerHTML=co.chkShowRightSidebar?labelHide:labelShow;
place.title=(co.chkShowRightSidebar?'hide':'show')+' right sidebar';
}
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
</script><script>
var co=config.options;
if (co.chkShowRightSidebar=='undefined') co.chkShowRightSidebar=true;
var sb=document.getElementById('sidebar'); if (!sb) return;
sb.style.display=co.chkShowRightSidebar?'block':'none';
document.getElementById('displayArea').style.marginRight=co.chkShowRightSidebar?'':'1em';
if ('$1'=='$'+'1') {
var labelShow=co.txtToggleRightSideBarLabelShow||(config.browser.isSafari?'◀':'◄');
var labelHide=co.txtToggleRightSideBarLabelHide||'►';
place.lastChild.innerHTML=co.chkShowRightSidebar?labelHide:labelShow;
place.lastChild.title=(co.chkShowRightSidebar?'hide':'show')+' right sidebar';
}
</script>
/***
|Name:|ToggleTagPlugin|
|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0 ($Rev: 4907 $)|
|Date:|$Date: 2008-05-13 03:15:46 +1000 (Tue, 13 May 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ToggleTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)
* TouchMod flag - if non empty then touch the tiddlers mod date. Note, can set config.toggleTagAlwaysTouchModDate to always touch mod date
!!Examples
|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
!!Notes
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
* Should convert to use named params
***/
//{{{
if (config.toggleTagAlwaysTouchModDate == undefined) config.toggleTagAlwaysTouchModDate = false;
merge(config.macros,{
toggleTag: {
createIfRequired: true,
shortLabel: "[[%0]]",
longLabel: "[[%0]] [[%1]]",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tiddlerTitle = tiddler ? tiddler.title : '';
var tag = (params[0] && params[0] != '.') ? params[0] : "checked";
var title = (params[1] && params[1] != '.') ? params[1] : tiddlerTitle;
var defaultLabel = (title == tiddlerTitle ? this.shortLabel : this.longLabel);
var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
var touchMod = (params[3] && params[3] != '.') ? params[3] : "";
label = (label == '-' ? '' : label); // dash means no label
var theTiddler = (title == tiddlerTitle ? tiddler : store.getTiddler(title));
var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
if (!store.tiddlerExists(title)) {
if (config.macros.toggleTag.createIfRequired) {
var content = store.getTiddlerText(title); // just in case it's a shadow
store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
}
else
return false;
}
if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
theTiddler.modified = new Date();
store.setTiddlerTag(title,this.checked,tag);
return true;
});
}
}
});
//}}}
|~ViewToolbar|closeTiddler closeOthers closeAll +editTiddler deleteTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler saveCloseTiddler -cancelTiddler cancelCloseTiddler deleteTiddler|
<html><hide linebreaks><div id="slantedmenu" style="font-size:0.75em;"><ul><li> <a href="javascript:void(0)" onclick="story.closeAllTiddlers();story.displayTiddlers(null,store.getTiddlerText('DefaultTiddlers').readBracketedList())"
><span title="Close all tiddlers and open Welcome" style="cursor:pointer">''Home''</span></a></li>|<li>[[Instructions]]</li>|<li>[[New Top Level|CreatingANewTopLevelTopic]]</li>|<li><<newTiddler title: 'New Note' tag: 'Note' label:'New Note'>></li>|<li><<newTiddler>></li>|<li><<saveChanges>></li>|<li>{{nowrap{<<search>>}}}</li><li>[[?|Find]]</li><li><<tiddler ToggleRightSidebar with: "Sidebar »">></li></ul></div></html>
/***
!!!SlantedStyle /%==================================================%/
***/
{{{
http://img261.imageshack.us/img261/8603/navbargrayhw1.png
http://img520.imageshack.us/img520/8688/mainmenugray7ef.gif
background-image: url("http://img264.imageshack.us/img264/4134/headbackbgdc6.png");background-repeat: repeat-x top-left;
}}}
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
{{{
#slantedmenu{
font-size: 90%;
position: fixed !important;
width: 100%;
z-index:1
}
}}}
#slantedmenu{
font-size: 90%;}
#slantedmenu:after{ /*Add margin between menu and rest of content in Firefox*/
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#slantedmenu ul{
text-indent: 10px;
padding: 3px 0;
margin: 0;
background:url("http://img261.imageshack.us/img261/8603/navbargrayhw1.png") repeat-x top left;top left;
background-color: #ccc;
border-top: 0px solid #f6f;
border-bottom: 0px solid #f6f;
text-align: center; /*set value to "center" for example to center items*/
}
#slantedmenu ul li{
display: inline;
}
#slantedmenu ul li a{
font-weight: normal;
color: #00a;
padding: 3px 0;
padding-right: 5px;
padding-left: 5px;
margin: 0;
text-decoration: none;
background: transparent url() top right no-repeat;
}
#slantedmenu ul li a:hover{
color: #f00;
background:#fff;
}
How many tiddlers will follow?
<!--{{{-->
<a style="color: #5566ff">It looks like you are creating or editing a hierarchy of topics from the top down!<br>
1:Add the name of your topic both in the top (title) box, and in the sitemap slider below.<br>
2:Click 'done', then click the 'make subtopic' button (in the toolbar above) to create subtopics and notes within this topic.<br>
Note: If you wish to add text below, do so on the line 'below' the sitemap slider.</a>
<!--}}}-->
{{bluey{[[Topic]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("Topic")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'" "'
>>
/***
|Name|TreeviewPluginPlugin2|
|Source|http://treeview.tiddlyspot.com/|
|Version|0.2|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires|jQuery library, treeview plugin libraries and styles |
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
!!!!!Set up
You will need a version of TW that incorporates the jQuery library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
{{{<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css" /> }}}
into the MarkupPreHead tiddler. However, this won't work if you go off line. It also doesn't work permanently if you are hosting your file on a web server. So you may want to download a copy of the stylesheet and attendant image files and change the MarkupPreHead tiddler to pick up the local copy. Or load the stylesheet and images onto your own server where you will be able to access them.
!!!!!Usage
{{{<<treeview1 }}}
>{{{<root tag> [tree style] [startup parameters]}}}
{{{ >>}}}
Where:
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
''tree style'' indicates which type of tree will be displayed, possibly //treeview//, //filetree//, and //treeview-red//, and //treeview-famfamfam//. There may be other styles too, but those are the ones I know about.
''startup parameters'' are a set of optional parameters given in a comma-separated, key/value string like this:
'collapsed: false, animated: "normal", persist: true'
There's a list of possible options at:
http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm
However, not all settings may actually work under TW. Mainly, you will probably be interested in controlling the presence of animation, and whether the initial state of the tree is opened or closed.
***/
//{{{
config.macros.treeview2 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
var lcClass = params[1] ? params[1] : "treeview" ;
var DEV_MODE = true ; // Make true when developing code or changes won't show up.
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.treeviewSettings = function(obj) {
var defa = {} ;
defa.collapsed= true;
defa.unique = true ;
defa.persist= "location" ;
if( obj !== undefined ) {
try {
obj = eval("({" + obj + "})" ) ;
} catch(ex) {
alert("Unable to use your treeview configuration settings!") ;
return defa ;
}
for (var prop in obj) {
defa[prop] =obj[prop] ;
}
}
return defa ;
} ;
if( DEV_MODE || MAS.getTiddlersPerTagAsHtmlList === undefined ) {
MAS.getTiddlersPerTagAsHtmlList = function(tagname) {
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var prefix = tids.length > 0 ? "<span class='folder'>" : "<span class='file'>" ;
//var rtn ="<li>" + prefix + tagname + "</a></span>" ;
var rtn = "<li>" + prefix + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a></span>" ;
//wikify(rtn,place) ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ; // End of function definition
} // End of checking if function already defined
// The extra set of span tags are needed here because jquery find function ignores
// the outer set of tags. Or at least that's what seems to be happening. So, I give
// it an extra set so it can throw it away without consequence
var a = '<span><ul id="root66" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag) + "</ul></span>" ;
var b = jQuery(a) ;
// A smarter person might have know how to put the onclick function in at the top
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
b.find("#root66").attr("class",lcClass) ;
var setup = MAS.treeviewSettings(params[2]) ;
b.treeview(setup) ;
jQuery(place).append(b) ;
}
};
//}}}
/***
|Name|TreeviewPluginPlugin2|
|Source|http://treeview.tiddlyspot.com/|
|Version|0.21|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires|jQuery library, treeview plugin libraries and styles |
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
!!!!!Set up
You will need a version of TW that incorporates the jQuery library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
{{{<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css" /> }}}
into the MarkupPreHead tiddler. However, this won't work if you go off line. It also doesn't work permanently if you are hosting your file on a web server. So you may want to download a copy of the stylesheet and attendant image files and change the MarkupPreHead tiddler to pick up the local copy. Or load the stylesheet and images onto your own server where you will be able to access them.
!!!!!Usage
{{{<<treeview1 }}}
>{{{<root tag> [tree style] [startup parameters]}}}
{{{ >>}}}
Where:
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
''tree style'' indicates which type of tree will be displayed, possibly //treeview//, //filetree//, and //treeview-red//, and //treeview-famfamfam//. There may be other styles too, but those are the ones I know about.
''startup parameters'' are a set of optional parameters given in a comma-separated, key/value string like this:
'collapsed: false, animated: "normal", persist: true'
There's a list of possible options at:
http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm
However, not all settings may actually work under TW. Mainly, you will probably be interested in controlling the presence of animation, and whether the initial state of the tree is opened or closed.
***/
//{{{
config.macros.treeview2 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
var lcClass = params[1] ? params[1] : "treeview" ;
var DEV_MODE = false ; // Make true when developing code or changes won't show up.
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.treeviewSettings = function(obj) {
var defa = {} ;
defa.collapsed= true;
defa.unique = true ;
defa.persist= "location" ;
if( obj !== undefined ) {
try {
obj = eval("({" + obj + "})" ) ;
} catch(ex) {
alert("Unable to use your treeview configuration settings!") ;
return defa ;
}
for (var prop in obj) {
defa[prop] =obj[prop] ;
}
}
return defa ;
} ;
if( DEV_MODE || MAS.getTiddlersPerTagAsHtmlList === undefined ) {
MAS.getTiddlersPerTagAsHtmlList = function(tagname,setup) {
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var prefix = tids.length > 0 ? "<span class='folder'>" : "<span class='file'>" ;
var statetags = store.getTiddler(tagname).tags ;
var state = "" ;
var lcSesame = setup["sesame"] !== undefined ? setup["sesame"] : "" ;
var lcAntiSesame = setup["antisesame"] !== undefined ? setup["antisesame"] : "" ;
if(statetags.length > 0 ) {
state = lcSesame && statetags.contains(lcSesame) ? ' class="open"' : ' class="closed"' ;
state = lcAntiSesame && statetags.contains(lcAntiSesame) ? ' class="closed"' : ' class="open"' ;
}
//var rtn ="<li>" + prefix + tagname + "</a></span>" ;
var rtn = "<li" + state +">" + prefix + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a></span>" ;
//wikify(rtn,place) ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title, setup) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ; // End of function definition
} // End of checking if function already defined
// The extra set of span tags are needed here because jquery find function ignores
// the outer set of tags. Or at least that's what seems to be happening. So, I give
// it an extra set so it can throw it away without consequence
var loSetup = MAS.treeviewSettings(params[2]) ;
var a = '<span><ul id="root66" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul></span>" ;
var b = jQuery(a) ;
// A smarter person might have know how to put the onclick function in at the top
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
b.find("#root66").attr("class",lcClass) ;
b.treeview(loSetup) ;
jQuery(place).append(b) ;
}
};
//}}}
/***
|Name|TreeviewPluginPlugin2|
|Source|http://treeview.tiddlyspot.com/|
|Version|0.22|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires|jQuery library, treeview plugin libraries and styles |
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
!!!!!Set up
You will need a version of TW that incorporates the jQuery library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
{{{<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css" /> }}}
into the MarkupPreHead tiddler. However, this won't work if you go off line. It also doesn't work permanently if you are hosting your file on a web server. So you may want to download a copy of the stylesheet and attendant image files and change the MarkupPreHead tiddler to pick up the local copy. Or load the stylesheet and images onto your own server where you will be able to access them.
!!!!!Usage
{{{<<treeview2 }}}
>{{{<root tag> [tree style] [startup parameters]}}}
{{{ >>}}}
Where:
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
''tree style'' indicates which type of tree will be displayed, possibly //treeview//, //filetree//, and //treeview-red//, and //treeview-famfamfam//. There may be other styles too, but those are the ones I know about.
''startup parameters'' are a set of optional parameters given in a comma-separated, key/value string like this:
'collapsed: false, animated: "normal", persist: true'
There's a list of possible options at:
http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm
However, not all settings may actually work under TW. Mainly, you will probably be interested in controlling the presence of animation, and whether the initial state of the tree is opened or closed.
***/
//{{{
config.macros.treeview2 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
var lcClass = params[1] ? params[1] : "treeview" ;
var DEV_MODE = false ; // Make true when developing code or changes won't show up.
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.treeviewSettings = function(obj) {
var defa = {} ;
defa.collapsed= true;
defa.unique = true ;
//defa.persist= "location" ;
if( obj !== undefined ) {
try {
obj = eval("({" + obj + "})" ) ;
} catch(ex) {
alert("Unable to use your treeview configuration settings!") ;
return defa ;
}
for (var prop in obj) {
defa[prop] =obj[prop] ;
}
}
return defa ;
} ;
if( DEV_MODE || MAS.getTiddlersPerTagAsHtmlList === undefined ) {
MAS.getTiddlersPerTagAsHtmlList = function(tagname,setup) {
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var prefix = tids.length > 0 ? "<span class='folder'>" : "<span class='file'>" ;
var statetags = store.getTiddler(tagname).tags ;
var state = "" ;
var lcSesame = setup["sesame"] !== undefined ? setup["sesame"] : "" ;
var lcAntiSesame = setup["antisesame"] !== undefined ? setup["antisesame"] : "" ;
if(statetags.length > 0 ) {
if(lcSesame) state = statetags.contains(lcSesame) ? ' class="open"' : ' class="closed"' ;
if(lcAntiSesame) state = statetags.contains(lcAntiSesame) ? ' class="closed"' : ' class="open"' ;
}
// state="" ; // DEBUG
//var rtn ="<li>" + prefix + tagname + "</a></span>" ;
var rtn = "<li" + state +">" + prefix + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a></span>" ;
//wikify(rtn,place) ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title, setup) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ; // End of function definition
} // End of checking if function already defined
// The extra set of span tags are needed here because jquery find function ignores
// the outer set of tags. Or at least that's what seems to be happening. So, I give
// it an extra set so it can throw it away without consequence
var loSetup = MAS.treeviewSettings(params[2]) ;
var lcId = "root" + (new Date()).getTime().toString() ;
var a = '<span id="' + lcId + '"><ul id="' + "root" + '" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul></span>" ;
var b = jQuery(a) ;
// A smarter person might have know how to put the onclick function in at the top
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
b.attr("class",lcClass) ;
jQuery(place).append(b) ;
jQuery(place).find("#" + lcId).treeview(loSetup) ;
}
};
//}}}
/***
|Name|TreeviewPluginPlugin2|
|Source|http://treeview.tiddlyspot.com/|
|Version|0.23|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires|jQuery library, treeview plugin libraries and styles |
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
!!!!Set up
You will need a version of TW that incorporates the jQuery library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
>{{{<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css" /> }}}
into the MarkupPreHead tiddler. However, this won't work if you go off line. It also doesn't work permanently if you are hosting your file on a web server. So you may want to download a copy of the stylesheet and attendant image files and change the MarkupPreHead tiddler to pick up the local copy. Or load the stylesheet and images onto your own server where you will be able to access them.
!!!!Usage
{{{<<treeview2 }}}
>{{{<root tag> [tree style] [startup parameters]}}}
{{{ >>}}}
!!!!!Where:
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
''tree style'' indicates which type of tree will be displayed, possibly //treeview//, //filetree//, and //treeview-red//, and //treeview-famfamfam//. There may be other styles too, but those are the ones I know about.
''startup parameters'' are a set of optional parameters given in a comma-separated, key/value string like this:
>{{{'collapsed: false, animated: "normal", persist: true'}}}
There's a list of possible options at:
http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm
However, not all settings may actually work under TW. Mainly, you will probably be interested in controlling the presence of animation, and whether the initial state of the tree is opened or closed.
!!!!Persistence
To make persistence work, you will need to have the treeview cookie library loaded. The easiest way to do that is to put:
>{{{<script src="http://www.dynamicdrive.com/dynamicindex1/treeview/lib/jquery.cookie.js" type="text/javascript"></script>}}}
into the MarkupPostBody. However, this technique will only work if you have online access. If you will be working offline, then you will either need to download the cookie library to the same directory as your ~TiddlyWiki file and put the following into your MarkupPostBody:
>>{{{<script src="jquery.cookie.js"></script>}}}
or you will need to put the entire contents of the cookie library into script tags inside the MarkupPostBody.
Then, in any macro that wants its tree to be persistently configured, you will need to use configuration parameter:
>>{{{persist: "cookie", cookieId: "myid"}}}
where //myid// should be an identification that will be unique throughout the entire TW file.
***/
//{{{
config.macros.treeview2 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
var lcClass = params[1] ? params[1] : "treeview" ;
var DEV_MODE = false ; // Make true when developing code or changes won't show up.
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.treeviewSettings = function(obj) {
var defa = {} ;
defa.collapsed= true;
defa.unique = true ;
//defa.persist= "location" ;
if( obj !== undefined ) {
try {
obj = eval("({" + obj + "})" ) ;
} catch(ex) {
alert("Unable to use your treeview configuration settings!") ;
return defa ;
}
for (var prop in obj) {
defa[prop] =obj[prop] ;
}
}
return defa ;
} ;
if( DEV_MODE || MAS.getTiddlersPerTagAsHtmlList === undefined ) {
MAS.getTiddlersPerTagAsHtmlList = function(tagname,setup) {
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var prefix = tids.length > 0 ? "<span class='folder'>" : "<span class='file'>" ;
var statetags = store.getTiddler(tagname).tags ;
var state = "" ;
var lcSesame = setup["sesame"] !== undefined ? setup["sesame"] : "" ;
var lcAntiSesame = setup["antisesame"] !== undefined ? setup["antisesame"] : "" ;
if(statetags.length > 0 ) {
if(lcSesame) state = statetags.contains(lcSesame) ? ' class="open"' : ' class="closed"' ;
if(lcAntiSesame) state = statetags.contains(lcAntiSesame) ? ' class="closed"' : ' class="open"' ;
}
// state="" ; // DEBUG
//var rtn ="<li>" + prefix + tagname + "</a></span>" ;
var rtn = "<li" + state +">" + prefix + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a></span>" ;
//wikify(rtn,place) ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title, setup) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ; // End of function definition
} // End of checking if function already defined
// The extra set of span tags are needed here because jquery find function ignores
// the outer set of tags. Or at least that's what seems to be happening. So, I give
// it an extra set so it can throw it away without consequence
var loSetup = MAS.treeviewSettings(params[2]) ;
var lcId = "root" + (new Date()).getTime().toString() ;
if(loSetup.cookieId) {
lcId = "root_" + loSetup.cookieId ;
}
//var a = '<span id="' + lcId + '"><ul id="' + "root" + '" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul></span>" ;
var a = '<ul id="' + lcId + '" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul>" ;
var b = jQuery(a) ;
// A smarter person might have know how to put the onclick function in at the top
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
//b.find(lcId).attr("class",lcClass) ;
//b.find("#root").attr("class",lcClass) ;
jQuery(place).append(b) ;
jQuery(place).find("#" + lcId).attr("class",lcClass).treeview(loSetup) ;
}
};
//}}}
/***
|Name|TreeviewPluginPlugin2|
|Source|http://treeview.tiddlyspot.com/|
|Version|0.24|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires(1) |jQuery library, treeview plugin libraries and styles |
|Requires(2) |AttachFilePackage and sub-libraries from tiddlytools.com if you want to use embedded images to create the tree|
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
!!!!Set up for portability
You will need a version of TW that incorporates the jQuery library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
>{{{<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css" /> }}}
into the MarkupPreHead tiddler. However, this won't work if you go off line. It also doesn't work permanently if you are hosting your file on a web server. So you may want to download a copy of the stylesheet and attendant image files and change the MarkupPreHead tiddler to pick up the local copy. Or load the stylesheet and images onto your own server where you will be able to access them.
!!!!Usage
{{{<<treeview2 }}}
>{{{<root tag> [tree style] [startup parameters]}}}
{{{ >>}}}
!!!!!Where:
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
''tree style'' indicates which type of tree will be displayed, possibly //treeview//, //filetree//, and //treeview-red//, and //treeview-famfamfam//. There may be other styles too, but those are the ones I know about.
''startup parameters'' are a set of optional parameters given in a comma-separated, key/value string like this:
>{{{'collapsed: false, animated: "normal", persist: true'}}}
There's a list of possible options at:
http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm
However, not all settings may actually work under TW. Mainly, you will probably be interested in controlling the presence of animation, and whether the initial state of the tree is opened or closed.
!!!!Images and stylesheet set-up
The tree is constructed from little bits of images. If you don't want to carry these images in a separate directory, nor reference them remotely, you can embed them in your TW file. To do this, you will need the AttachFilePackage and accompanying plugins from
> www.tiddlytools.com
and you will need the AttachFilePluginFormatters plugin from the same site.
Then import all the tiddlers from this file tagged as treeviewimage . These images are referenced in the StyleSheet. If you import JqueryTreeviewCss from this file, and then put the name in your StyleSheet, the images should be imported without having to access them remotely.
!!!!Persistence
To make persistence work, you will need to have the treeview cookie library loaded. The easiest way to do that is to put:
>{{{<script src="http://www.dynamicdrive.com/dynamicindex1/treeview/lib/jquery.cookie.js" type="text/javascript"></script>}}}
into the MarkupPostBody. However, this technique will only work if you have online access. If you will be working offline, then you will either need to download the cookie library to the same directory as your ~TiddlyWiki file and put the following into your MarkupPostBody:
>>{{{<script src="jquery.cookie.js"></script>}}}
or you will need to put the entire contents of the cookie library into script tags inside the MarkupPostBody.
Then, in any macro that wants its tree to be persistently configured, you will need to use configuration parameter:
>>{{{persist: "cookie", cookieId: "myid"}}}
where //myid// should be an identification that will be unique throughout the entire TW file.
***/
//{{{
config.macros.treeview2 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
var lcClass = params[1] ? params[1] : "treeview" ;
var DEV_MODE = false ; // Make true when developing code or changes won't show up.
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.treeviewSettings = function(obj) {
var defa = {} ;
defa.collapsed= true;
defa.unique = true ;
//defa.persist= "location" ;
if( obj !== undefined ) {
try {
obj = eval("({" + obj + "})" ) ;
} catch(ex) {
alert("Unable to use your treeview configuration settings!") ;
return defa ;
}
for (var prop in obj) {
defa[prop] =obj[prop] ;
}
}
return defa ;
} ;
if( DEV_MODE || MAS.getTiddlersPerTagAsHtmlList === undefined ) {
MAS.getTiddlersPerTagAsHtmlList = function(tagname,setup) {
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var prefix = tids.length > 0 ? "<span class='folder'>" : "<span class='file'>" ;
var statetags = store.getTiddler(tagname).tags ;
var state = "" ;
var lcSesame = setup["sesame"] !== undefined ? setup["sesame"] : "" ;
var lcAntiSesame = setup["antisesame"] !== undefined ? setup["antisesame"] : "" ;
if(statetags.length > 0 ) {
if(lcSesame) state = statetags.contains(lcSesame) ? ' class="open"' : ' class="closed"' ;
if(lcAntiSesame) state = statetags.contains(lcAntiSesame) ? ' class="closed"' : ' class="open"' ;
}
// state="" ; // DEBUG
//var rtn ="<li>" + prefix + tagname + "</a></span>" ;
var rtn = "<li" + state +">" + prefix + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a></span>" ;
//wikify(rtn,place) ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title, setup) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ; // End of function definition
} // End of checking if function already defined
// The extra set of span tags are needed here because jquery find function ignores
// the outer set of tags. Or at least that's what seems to be happening. So, I give
// it an extra set so it can throw it away without consequence
var loSetup = MAS.treeviewSettings(params[2]) ;
var lcId = "root" + (new Date()).getTime().toString() ;
if(loSetup.cookieId) {
lcId = "root_" + loSetup.cookieId ;
}
//var a = '<span id="' + lcId + '"><ul id="' + "root" + '" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul></span>" ;
var a = '<ul id="' + lcId + '" >' + MAS.getTiddlersPerTagAsHtmlList(lcTag, loSetup) + "</ul>" ;
var b = jQuery(a) ;
// A smarter person might have know how to put the onclick function in at the top
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
//b.find(lcId).attr("class",lcClass) ;
//b.find("#root").attr("class",lcClass) ;
jQuery(place).append(b) ;
jQuery(place).find("#" + lcId).attr("class",lcClass).treeview(loSetup) ;
}
};
//}}}
/***
|Name|TreeviewPluginPlugin1|
|Source|http://treeview.tiddlyspot.com/|
|Version|0|
|Author|MarkS|
|License|Various. See respective libraries for details|
|Type|plugin|
|Requires|jQuery library, treeview plugin libraries and styles |
|Description|Creates a tag tree, formatted as an actual tree |
|Status|Experimental - ALPHA, but built on fairly solid technologies|
|Warning|When creating tag trees, make sure no tiddler loops back on itself, or its likely the script will hang|
Set up
You will need a version of TW that incorporates the j Query library. That happens automatically with recent editions of TW. You will also need to install or access the treeview libraries from http:www.dynamicdrive.com. The libraries can be carried as local files, inserted in the MarkupPostBody, or referenced from the dynamicdrive site. Each approach will require a different set up.
You will also need to link in the stylesheet for the treeview objects. A quick way to do this is to put:
{{{@import url(http://www.dynamicdrive.com/dynamicindex1/treeview/jquery.treeview.css);}}}
into the StyleSheet tiddler. However, this won't work if you go off line. So you may want to download a copy of the stylesheet and change the StyleSheet to pick up the local copy.
!!!!!Usage
{{{<<treeview1 }}}
>{{{[root tag]}}}
{{{ >>}}}
Where
''root tag'' is the tag at the top of your tagging tree, i.e. the mother of all tiddlers related to it by using its name as one of their tags.
***/
//{{{
config.macros.treeview1 = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{ // Code here
var lcTag = params[0] ;
try {
if( MAS === undefined ) MAS = { } ;
} catch(ex) {
MAS = {} ;
}
MAS.getTiddlersPerTagAsHtmlList = function(tagname) {
//wikify("Seeing tag name: " + tagname + "\n", place) ;
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var rtn = "<li>" + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a>" ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
//wikify("TID: " + tids[i].title,place) ;
// wikify("pre i: " + i,place) ;
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title) ;
//wikify("post i: " + i + "\n",place) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ;
var a = '<ul id="xavigation">' + MAS.getTiddlersPerTagAsHtmlList(lcTag) + "</ul>" ;
var b = jQuery(a) ;
b.treeview({collapsed: true,unique: true, persist: "location"}) ;
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
jQuery(place).append(b) ;
// jQuery(place).append(a).find("#xavigation").treeview({collapsed: true,unique: true, persist: "location"}) ;
}
};
//}}}
TopTiddler
I have something to say:
<script>
var lcTag = "TopTiddler" ;
MAS = { } ;
MAS.getTiddlersPerTagAsHtmlList = function(tagname) {
//wikify("Seeing tag name: " + tagname + "\n", place) ;
var tids = store.getTaggedTiddlers(tagname) ;
var temp = "" ;
var rtn = "<li>" + "<a href=\"javascript:;\" tiddlylink=\"" + tagname + "\" refresh=\"link\" class='tiddlyLink tiddlyLinkExisting' title='Link to " + tagname + "' >" + tagname + "</a>" ;
forever:
while(true) {
if(tids.length == 0 ) break ;
rtn = rtn + "<ul>" ;
for(var i=0;i<tids.length;i++) {
//wikify("TID: " + tids[i].title,place) ;
// wikify("pre i: " + i,place) ;
temp = MAS.getTiddlersPerTagAsHtmlList(tids[i].title) ;
//wikify("post i: " + i + "\n",place) ;
rtn = rtn + temp ;
}
rtn = rtn + "</ul>\n" ;
break ;
} // forever
rtn = rtn + "</li>\n" ;
return rtn ;
} ;
var a = '<ul id="xavigation">' + MAS.getTiddlersPerTagAsHtmlList(lcTag) + "</ul>" ;
// var results = MAS.getTiddlersPerTagAsHtmlList(lcTag) ;
var here = story.findContainingTiddler(place) ;
//wikify("<html>"+a+"</html>",place) ;
//jQuery(place).append(a).find("#xavigation").treeview({collapsed: true,unique: true, persist: "location"}) ;
//jQuery(place).find("#xavigation")
var b = jQuery(a) ; // .treeview({collapsed: true,unique: true, persist: "location"}) ;
b.treeview({collapsed: true,unique: true, persist: "location"}) ;
//b.find("a").each(function(n) {
// var btn = createTiddlyLink(this,this.tiddlylink,this.tiddlylink,'tiddlyLink
// tiddlyLinkExisting',false,null,true) ;
// this.parentNode.replaceChild(this,btn) ;
//}) ;
b.find("a").each(function(n) {
this.onclick = onClickTiddlerLink ;
}) ;
jQuery(place).append(b) ;
//story.displayTiddler(story.findContainingTiddler(place),"TreeviewTest");
//alert( here.text ) ;
</script>
<html>
<ul id="xavigation">
<li><a href="http://www.dynamicdrive.com">Item 1</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 1.0</a>
<ul>
<li><a href="index.html">Item 1.0.0</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 1.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 1.2</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 1.2.0</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 1.2.0.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.0.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.0.2</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.1</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 1.2.1.0</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.2</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 1.2.2.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.2.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 1.2.2.2</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 2</a>
<ul>
<li><span>Item 2.0</span>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.0.0</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.0.0.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 2.0.0.1</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 2.1</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.1.0</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.1.0.0</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.1</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.1.1.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.1.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.1.2</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.2</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 2.1.2.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.2.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 2.1.2.2</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 3</a>
<ul>
<li class="open"><a href="http://www.dynamicdrive.com">Item 3.0</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 3.0.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 3.0.1</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 3.0.1.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 3.0.1.1</a></li>
</ul>
</li>
<li><a href="http://www.dynamicdrive.com">Item 3.0.2</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Item 3.0.2.0</a></li>
<li><a href="http://www.dynamicdrive.com">Item 3.0.2.1</a></li>
<li><a href="http://www.dynamicdrive.com">Item 3.0.2.2</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
{{bluey{[[System]]}}}
@@color:#C06;''» »'' @@ Tiddlers containing tag treeview. Treeview first and second level only
----
<script>
// get all tiddlers tagged with "treeview"
var tids=store.getTaggedTiddlers("treeview");
// keep only tiddlers *also* tagged with New
var list=[];
for (var t=0; t<tids.length; t++)
if (tids[t].isTagged("treeview")) list.push(tids[t]);
// create output list of tiddler titles, one per line
var out="";
for (var t=0; t<list.length; t++) out+="#[["+list[t].title+"]]\n";
return out;
</script>
{{bluey{[[Treeviewsetup]]}}}
<<forEachTiddler
where
'tiddler.tags.contains("Treeviewsetup")'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'getFirstLine(tiddler.text)'
>>
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'tw-net-trial';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
<<upload http://twt-notes.tiddlyspot.com/store.cgi index.html . . twt-notes>><html><a href='http://twt-notes.tiddlyspot.com/download' class='button'>download</a></html>
/***
|Name|TwHelpSearchPlugin|
|Source|http://twhelp.tiddlyspot.com/#TwHelpSearchPlugin|
|Documentation|http://twhelp.tiddlyspot.com/#TWHelpSearchDoc|
|Version|1.0.6|
|Author|Morris Gray|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.0 - 2.4|
|Type|plugin|
|Requires|[[SearchOptionsPlugin|http://www.TiddlyTools.com/#SearchOptionsPlugin]] [[TableSortingPlugin|http://tw.lewcid.org/#TableSortingPlugin]] (only for sorting option)|
|Overrides|SearchOptionsPlugin's search results|
|Description|Extends the search results from SearchOptionsPlugin to a sortable table showing title, size and tags.|
''Demo search:''
|>|>|>|<<search>> |
|>|>| look for in |>|>|>|
| <<option chkSearchTitles>> | <<option chkSearchText>> | <<option chkSearchTags>> | <<option chkHoldSearches>> |
| titles | text | tags | hold |
''A Plugin Tweak for:'' SearchOptionsPlugin
!!!!!Description
<<<
This plugin defines an alternative format for the SearchResults tiddler that is generated by the SearchOptionsPlugin . It presents the search results in tabular form numbering the rows; and showing the tiddler title, the size in bytes, and the tags. It is ready to be used with the [[TableSortingPlugin|http://tw.lewcid.org/#TableSortingPlugin]] (check versions) so any column can be sorted; such as size in ascending or descending order.
<<<
!!!!!Installation
<<<
Import (or copy/paste) the following tiddlers into your ~TiddlyWiki:
* http://twhelp.tiddlyspot.com/#TwHelpSearchPlugin
*SearchOptionsPlugin from http://www.tiddlytools.com/#SearchOptionsPlugin
* Get more documentation here [[TWHelpSearchDoc]] or here:
* http://twhelp.tiddlyspot.com/#TwHelpSearchDoc
<<<
!!!!!Revision History
<<<
''2008.09.14 [1.0.6]''
Cosmetic - Add header.
''2007.09.12 [1.0.6]''
Added overflow scroll to TWHelp-SearchResults for long titles or tags.
''2006.02.03 [1.0.5]''
Added facility for holding the results of multiple searches with tick box on dashboard.
''2006.02.02 [1.0.4]''
Added several options, cleaned up design.Planning one version basic and one with added options this is the added options version.
''2006.01.27 [1.0.3''
Added a column for the size of the text in each tiddler, this does not include the size of the title or tags. Added overall TW statistics button requires TiddlerStatsPlugin.
''2006.01.23 [1.0.2 ]''
''a)''Changed function reportSearchResults(text,matches) to window.reportSearchResults=function(text,matches)
''b)''Added a line so that Incremental Search is automatically disabled config.options.chkSearchIncremental=false; turn off key-by-key searching
''c)''Removed space inside parens. bgcolor(#fe8 )" to "bgcolor(#fe8)". This
is what was causing IE to 'crap out' halfway through drawing the table
headings.
''d)''Added {{{config.options.chkSearchList=true;}}}
''2006.01.20 [1.0.1]''
ELS: reportSearchResults() definition moved to this Plugin Tweak tiddler and removed extranous code
''2006.01.19 [1.0.0]''
This is an adaptation of Eric Shulman's SearchOptionsPlugin. Adapted by MorrisGray to provide search results in table form. All the necessary controls for refining the search is provided within the table including slide-down access to AdvancedOptions.
<<<
!!!!!Code
***/
//{{{
if (config.options.chkSinglePageMode==undefined) config.options.chkSinglePageMode=false;
if (config.options.chkRegExpSearch==undefined) config.options.chkRegExpSearch=true;
if (config.options.chkSearchTitles==undefined) config.options.chkSearchTitles=false;
if (config.options.chkSearchText==undefined) config.options.chkSearchText=true;
if (config.options.chkSearchTags==undefined) config.options.chkSearchTags=false;
if (config.options.chkSearchTitlesFirst==undefined) config.options.chkSearchTitlesFirst=true;
if (config.options.chkSearchList==undefined) config.options.chkSearchList=true;
if (config.options.chkSearchIncremental==undefined) config.options.chkSearchIncremental=false;
if (config.options.chkToggleLinks==true) config.options.chkToggleLinks=false;
if (config.options.chkHoldSearches==undefined) config.options.chkHoldSearches=false;
if (config.options.chkSortTags==undefined) config.options.chkSortTags=false;
config.options.chkToggleLinks=false;
config.options.chkSinglePageMode=false;
config.options.chkHoldSearches=false;
config.options.chkSearchIncremental=false;
config.options.chkHttpReadOnly = false;
config.options.chkRegExpSearch=true;
config.options.chkSearchList=true;
config.options.chkToggleLinks=false;
config.shadowTiddlers.AdvancedOptions += "\n<<option chkHoldSearches>> Hold search results";
//}}}
//{{{
// Give the report a custom name
config.macros.search.reportTitle="TWHelp-SearchResults";
// Override default SearchOptionsPlugin formatting for SearchResults tiddler
window.reportSearchResults=function(text,matches)
{
var title=config.macros.search.reportTitle
config.macros.search.reportTitle;
var q = config.options.chkRegExpSearch ? "/" : "'";
if (!config.options.chkHoldSearches) body="";
body+="\n|>|bgcolor(#8af):@@color(#000080):''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''@@|bgcolor(#8af): @@color(#A00000): SearchHelp@@ "+"|"+"\n";
body+="|>|>|bgcolor(#E3FFE3):<<search>> <<option chkSearchTitles>> Titles <<option chkSearchText>> Text <<option chkSearchTags>>Tags <<option chkHoldSearches>> Hold |"+"\n";
body+="\n|bgcolor(#8af): |bgcolor(#8af): @@color(#000080):sort by: ''Titles''@@ |bgcolor(#8af): @@color(#000080): ''Size'' (bytes)@@ |bgcolor(#8af): @@color(#000080): ''Tags''@@ |h";
for(var t=0;t<matches.length;t++)
body+="\n"+"| "+(t+1)+"|[["+matches[t].title+"]]| "+matches[t].text.length+"|"+"@@"+matches[t].tags+"@@"+"|";
body+="\n";
// create/update the tiddler
var tiddler=store.getTiddler(title); if (!tiddler) tiddler=new Tiddler();
tiddler.set(title,body,config.options.txtUserName,(new Date()),"excludeLists excludeSearch killbookmark");
store.addTiddler(tiddler); story.closeTiddler(title);
// render tiddler
var oldprompt=config.macros.search.label;
config.macros.search.label="search again"; // use alternate "search again" label
story.displayTiddler(null,title,1); // force refresh
config.macros.search.label=oldprompt; // restore standard search label
}
//}}}
|<<tiddler [[TwoColumn##firstletter]]>>|<<tiddler TwoColumn##code>>|
/%
!firstletter
{{textjustify{
{{firstletterK{
@@color:#c06;K@@
}}}''arl Popper'' CH, MA, Ph.D., D.LITT, FBA, FRS (July 28, 1902 to September 17, 1994), was an Austrian and British philosopher {{imgfloatright{
[img[Click to go to a web page on Popper.|http://img391.imageshack.us/img391/362/kpopperqk2.jpg][http://www.eeng.dcu.ie/~tkpw/]]
}}}and a professor at the London School of Economics. He is counted among the most influential philosophers of science of the 20th century, and also wrote extensively on social and political philosophy. Popper is perhaps best known for repudiating the classical observationalist-inductivist account of scientific method by advancing ''empirical falsifiability'' as the criterion for distinguishing scientific theory from non-science.
}}}
Source: http://science.tiddlyspot.com
%/
/%
!code
<<tiddler SystemTop>>
%/
[[3:How to download|3:How to download]]
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 25/05/2009 02:51:33 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . |
| 25/05/2009 02:51:59 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . | ok | ok |
| 25/05/2009 05:25:31 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . | ok |
| 25/05/2009 05:29:44 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . | ok |
| 25/05/2009 05:33:00 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . | ok |
| 26/05/2009 13:05:23 | YourName | [[twt-notes-trreeview-experimental.html|file:///F:/TiddlyWiki/TWExperiments/jQuery/twt-notes-trreeview-experimental.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . | ok |
| 28/05/2009 10:11:14 | YourName | [[tw-net-trial.html|file:///F:/TiddlyWiki/TW-NET/TW-NET-Test/tw-net-trial.html]] | [[store.cgi|http://twt-notes-treeview-experimental.tiddlyspot.com/store.cgi]] | . | [[index.html | http://twt-notes-treeview-experimental.tiddlyspot.com/index.html]] | . |
| 28/05/2009 10:24:08 | YourName | [[tw-net-trial.html|file:///F:/TiddlyWiki/TW-NET/TW-NET-Test/tw-net-trial.html]] | [[store.cgi|http://tw-net-trial.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tw-net-trial.tiddlyspot.com/index.html]] | . | ok |
| 28/05/2009 10:36:42 | YourName | [[tw-net-trial.html|file:///F:/TiddlyWiki/TW-NET/TW-NET-Test/tw-net-trial.html]] | [[store.cgi|http://tw-net-trial.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tw-net-trial.tiddlyspot.com/index.html]] | . | ok |
| 28/05/2009 10:53:59 | YourName | [[tw-net-trial.html|file:///F:/TiddlyWiki/TW-NET/TW-NET-Test/tw-net-trial.html]] | [[store.cgi|http://tw-net-trial.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tw-net-trial.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
''Usage Treeview.23''
<<<
{{{<<treeview2 [root tag] [tree style] [startup parameters]>>}}}
Startup parameters are a set of optional parameters given in a comma-separated, key/value string like this: 'collapsed: false, animated: "normal", persist: true' ''Carefully observe the quotes.''
''Version .23.''
{{{<<treeview2 "TWT-Notes" "filetree" 'collapsed: false, antisesame: "closed", animated: "fast", persist: "cookie", cookieId: "myid"' >>}}}
Where:
root tag is the tag at the the name of your top level topic, it related to subTopics by using its name as one of their tags. Tree style indicates which type of tree will be displayed, possibly treeview, filetree, and treeview-red, and treeview-famfamfam. This ~TiddlyWiki is set up for treeview' only.
<<<
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'> <span style="padding-right:0em;" macro='tagger'></span ><span macro='newHere label:"make subtopic"'></span></div>
<span class='title' macro='view title'></span>
<div class='viewer' macro='view text wikified'></div>
<div class='viewer' macro='notes'></div>
<div class='tagClear'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'> <span style="padding-right:0em;" macro='tagger'></span ><span macro='newHere label:"make subtopic"'></span></div>
<span class='title' macro='view title'></span>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
/***
!!!WebStyleSheet /%==================================================%/
***/
.firstletter{
float:left;
width:0.75em;
font-size:400%;
font-family:times,courier;
line-height:80%;
}
div.container
{
width:100%;
margin:0px;
border:0px solid gray;
line-height:130%;
}
div.header
{
padding:0.5em;
color:white;
background-color:gray;
clear:left;
}
div.footer
{
padding:0.5em;
color:white;
background-color:blue;
clear:left;
}
h1.header
{
padding:0;
margin:0;
}
div.left
{
float:left;
width:200px;
margin:0;
padding:1em;
}
div.content
{
margin-left:130px;
border-left:1px solid gray;
padding:1em;
}
Welcome to OnlineConversion.com
What is a knot? What is a nautical mile?
Knots and Nautical miles are good old navy terms. The nautical mile was based on the circumference of the earth at the equator. Since the earth is 360 degrees of longitude around, and degrees are broken into 60 so-called "minutes", that means there are 360 * 60 = 21,600 "minutes" of longitude around the earth. This was taken as the basis for the nautical mile; thus, by definition, 1 minute of longitude at the equator is equal to 1 nautical mile. So the earth is ideally, by definition, 21,600 nautical miles (and 21,600 "minutes" of longitude) in circumference at the equator. If anyone ever asks you how far is it around the earth, you can quickly do the math in your head (360 degrees * 60 minutes per degree) and answer "about 21,600 nautical miles!"
In fact, even modern navigators use the "minute of latitude" on charts to measure distance; this is what you see them doing when they use their compass spreaders while they are hovering over their nautical charts (maps). [For geometrical reasons, we use the minute of latitude on charts to correspond to a nautical mile rather than the minute of longitude. Minutes of longitude shrink as they move away from the equator and towards the poles; minutes of latitude do not shrink. Take a look at a globe with longitude and latitude lines marked on it to understand why.]
Using the definition of a nautical mile for distance at sea, the challenge was to measure speed -- i.e. what is the ship's speed in nautical miles per hour? (By the way, the nautical mile is about 1.15 larger than the "statute" mile used by land lubbers.) Since [speed] = [distance] divided by [time], if we measure a small distance (or length) in a small time we can do the math and figure our speed.
The device that sailors used to make their speed measurement was called the "chip log." Chip as in chip of wood, and log as in to record in a log. The chip was a wedge of wood about 18" in size; it was tied to one end of a rope on a large spool. The rope had knots tied into it about every 47'3" (more about how that was calibrated below).
The wooden chip was thrown overboard at the ship's stern (back end). Because of its wedge shape, it would "grab" the water and start pulling out rope as the ship moved forward at some yet unknown speed. One man would hold the spool of rope as it played out; another man would start a sandglass filled with 30 seconds of sand; and a third man would count the knots as they passed over the stern board. When the 30 seconds of sand expired, the time keeper would call out and the counting of knots would stop.
The faster the ship was sailing, more knots and a longer length of rope were played out. The number of knots in the rope that were counted in 30 seconds, then, was equal to the speed of the ship in nautical miles per hour. A "knot", therefore, is not a nautical mile, it is a nautical mile per hour. Thus 1 knot was equivalent to 1 nautical mile per hour; 5 knots were equivalent to 5 nautical miles per hour; etc. The similar sound of "knot" and "naut" is entirely coincidental.
Finally, what about the actual values of 47'3" between knots on the rope and the 30 seconds that were used with the chip log? The length was based on converting [1 nautical mile per hour] to [feet per second(fps)], and then multiplying [fps] by 30 seconds (which was a practical time to spend counting knots with a sandglass). The result was the calibrated length in feet at which to tie the knots for a 30-second run of the chip log.
... Now that we have much more precise technology to measure things, and because we need to establish international standards and conversion factors, and because the earth is not uniformly flat or round anywhere, and because even the precise definition of the second has changed, the official value for how many international feet in an international nautical mile has changed. Likewise, the measuring time of about "30 seconds" in the sandglass is now calibrated at 28 seconds. Time itself didn't change by 6.7%! But the cumulative effects of new international standard definitions for time, feet, statute miles, and nautical miles and more accurate measurements of the actual size of the earth -- and the fact that we don't use sand to measure time anymore -- have changed the modern calibration of the chip log.
For a photograph and brief explanation of the chip log, see [..link temporarily down..]
"All hands to loose topgallant sails!"
By Brian Hagerty, posted with permission.
Source: [[FAQ: What is a knot? What is a nautical mile?|http://www.onlineconversion.com/faq_07.htm]]
I wish I had a never ending package of ~TimTams
{{doubleborder{
[img[http://img40.imageshack.us/img40/7262/images1702191.jpg]]
}}}
NO Two packets of never-ending ~TimTams
config.tasks.viewTabs = {
text: "editA",
tooltip: "Edit a specific tiddler",
content: "|width:18em;<<tiddler EditATiddler>>|"
};
config.backstageTasks.splice(config.backstageTasks.indexOf("save")+0,0,"viewTabs");
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\file.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[file.gif|file.gif]] - {{{type=image/gif, size=110 bytes, encoded=150 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|file.gif]] or [img[tooltip|file.gif][link]]}}}
[img[tooltip|file.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhDwAOAIIAAWpsYoy3oamMQdS9fDmJdP////9tcH98XywAAAAADwAOAAID
O1gl3KxQiajGpDcOi2nZHDQZpBFliyeeReAeBSCxagrBZHEAsh7BNaACNnAFCITh
r+a7MYW6g3RKVSQAADs=
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\folder-closed.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[folder-closed.gif|folder-closed.gif]] - {{{type=image/gif, size=105 bytes, encoded=142 bytes}}}|
| local file:|/%LOCAL_LINK%/[[file:///F:/TiddlyWiki/TW jQuery/TreeView/images/folder-closed.gif|file:///F:/TiddlyWiki/TW jQuery/TreeView/images/folder-closed.gif]]|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|folder-closed.gif]] or [img[tooltip|folder-closed.gif][link]]}}}
[img[tooltip|folder-closed.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhEAAOAMIDAJdaH+C6eP/inq1zLf/////Sg59oJMOHNCwAAAAAEAAOAAAD
Nki63P7vyAPXYBcewUsIk8RQFalsXKoCmOoKmTK8akwYRa7vBgPswAJrARgEdcOF
YclsVp6EBAA7
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\folder.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[folder.gif|folder.gif]] - {{{type=image/gif, size=106 bytes, encoded=146 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|folder.gif]] or [img[tooltip|folder.gif][link]]}}}
[img[tooltip|folder.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhEAAOAIIAAZdaH+C6eP/inq1zLf/////Sg59oJMOHNCwAAAAAEAAOAAID
N0i63P7vyAPXYBcewUsIk8RQFalsXKoCmDq8cEwMKa2mxWUUOe//GUDvB1wABsQi
w8BsOitQQgIAOw==
---END_DATA---
%/
<script>
var tiddlers=store.getTiddlers("modified");
var last=tiddlers[tiddlers.length-1];
var when=last.modified.formatString("YYYY/0MM/0DD at 0hh:0mm:0ss");
return "Last Modified: " +when
</script>
| source file:|{{{F:\TiddlyWiki\TW Help\ScienceImages\mainmenugray7ef.gif}}}|
| attached on:|26 May 2009 by YourName|
| embedded:|[[mainmenugray7ef.gif|mainmenugray7ef.gif]] - {{{type=image/gif, size=105 bytes, encoded=142 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|mainmenugray7ef.gif]] or [img[tooltip|mainmenugray7ef.gif][link]]}}}
[img[tooltip|mainmenugray7ef.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhAQBkAPMPALa2trm5ub29vb+/v8TExMbGxsvLy9HR0dfX19vb29zc3OHh
4efn5+vr6+zs7O7u7iH5BAAAAAAALAAAAAABAGQAAAQW8D3X2FIJHVPIEAEgjmRp
nmiqrqwZAQA7
---END_DATA---
%/
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'> <span style="padding-right:0em;" macro='tagger'></span ><span macro='newHere label:"make subtopic"'></span></div>
<span class='title' macro='view title'></span>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'> <span style="padding-right:0em;" macro='tagger'></span ></div>
<span class='title' macro='view title'></span>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
Type the text for 'New Tiddler'
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'> <span style="padding-right:0em;" macro='tagger'></span ><span macro='newHere label:"make subtopic"'></span></div>
<span class='title' macro='view title'></span>
<div class='subtitle'><span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='viewer' macro='view text wikified'></div>
<div class='viewer' macro='notes'></div>
<div class='tagClear'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
<div class='toolbar' macro='toolbar fullscreen jump top -closeTiddler closeOthers closeAll +editTiddler permalink references'><span style="padding-right:0em;" macro='tagger exclude: " ToDoWork" '></span></div>
<div class='title' macro='view title'></div>
<div macro="gradient horiz #ccf #fff"><div class='viewer' macro='view text wikified'></div><div align="center"></div></div>
<div class='tagClear'><span macro='tiddler ShiftClickToEdit'></span> </div>
<div class='fdfbackground'> </div>
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-black-line.gif}}}|
| attached on:|25 May 2009 by YourName|
| embedded:|[[treeview-black-line.gif|treeview-black-line.gif]] - {{{type=image/gif, size=1877 bytes, encoded=2543 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-black-line.gif]] or [img[tooltip|treeview-black-line.gif][link]]}}}
[img[tooltip|treeview-black-line.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhEADwBvcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAQAPAGAAj/AP8JHPgPAMGDCA0iXFiQ
4UKFDglCjChwIkWLETE61MgQgMePHx9SlDhyIEeRJRumPJkwpcqSLA/GJLnS5UyT
NnPW3AlTZ0+eI29W9BmU6EWjGZFuVNqRKcqfUIsCPTo1adWlV5tmfSo1KlWvVsFi
FauVLNevXdOiXRtWbVu2Y93GhVtWbl26Z9/qnbv3bt+8fAP7FQx4sOHCiFtuVWyW
sd3EMp06xjv5b2XClw9nhkyzceTFnz13fry5dGjSpymntrwac2vNrznjBD1adW3W
t13nhr1b9lDas0UHR93bdPHYxofbVo6buW7nvKH7fkncpfXr2LNr3869e/TfwsFX
/xe/nHxz88/Rf6denv159+nhrxcqfzr9+5KR6z/OX3py9fbl1x+A/9VXIH7AEbif
fwsqOKCBDUL4IILhScjghAJeqKGDG1rI4YcehkjheCJmCOKI7aH4norxsTifiSUm
GGOFLgYoY40HwohjhDtieKOOQP4oJI1BEjkkiT12mOSJRSLZZIpPrhhli1O+eCSU
V0qZJZVbWmnkl052aSOYWJKppZlcoullmGqOyeabZcJ5ppxp0rlmnHjOmWede96p
5598AupnoIQOaqibfSIqqKKFMnpojmJC2qakdjpqKaWJYrqopo1y+iiPVV4KaqSj
TlpqpZ6K6qOpq6J6aqavbv8aa6ezftoqrLfKmiutu9qqZKipBlurqr+S2iuxTBpb
LKvLunqssM8OC22zuFKrq7W8Yutrssxy66y2yM74rbfVknutudmiu6245bJ7rrvp
wrvukvKGS++9wEqrb7T8gjutuvbm2y/A/9ZbML7KEryvvwsrPLDBDUP8MMLdSszw
xAJfrLHDG1vM8cceh0zxuCJnDPLI7aL8rsrxsjyvySUnHHPFLgcsc80Hw4xzxDtj
fLPOQP8sNM1BEz00yT13nPTJRSPddMpPrxx1y1O/fDTUV0udNdVbW2301053bTPY
WJOttdlco+112GqPzfbbZcN9ttxp07123HjPnXfde9//rffffAPud+CED264230j
LrjihTN+eM5iQ9625HY7bjnliWO+uOaNc/44z1VfDnrko09eeuWei+6z6aujfnrm
r28ee+ezf9467LfLnjvtu9uudOipB1+76r+T3jvxTBtfPOvLu3688M8PD33zuFOv
u/W8Y+978sxz77z2yM/8vffVk3+9+dmjv7345bN/vvvpw7/+0vKHT//9wEuvf/T8
gz+9+vbLX/8A+L/6FRB/yiPg/vy3QAUO0IANhOADEdg9CTJwggK8oAYduEELcvCD
HgwhBccnwgyCcITtQ+H7VBg/Fs7PhCVMYAwr6MIAyrCGB4QhDiO4QwzeUIdA/KEQ
MmkYRCIOkYQ97GAST1hEJDYxhU9cYRRbOMUXHhGKV5RiFqm4RSsa8YtO7KINaQgS
kAQEADs=
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-black.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[treeview-black.gif|treeview-black.gif]] - {{{type=image/gif, size=1216 bytes, encoded=1649 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-black.gif]] or [img[tooltip|treeview-black.gif][link]]}}}
[img[tooltip|treeview-black.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhYACFAPcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAABgAIUAAAj/AP8JHEiwoMGDCBMqXMjw
H4CHABRCbEixosWLBCNi3Mixo0WNHkOKFAlypMmTKFOqPAmx5cOVMEkeLBmz5seB
IGna3LkwJ06eQBlGdOmwZdCjGX8K1In0qM+lTaNCNchU6k6XRq1araoVKdeuQb+C
5Sl2rM2yZmOiTRuS6Vq2Hd3CxThR4kuqcy++Rbg3b9+8gAMLBou17mCTcg8jnql4
Md7GMokShbwxMeW4jC9jfqy5cuG/nTmHljl6JOjSolFzPK1aaWuhmV/3jB3aMN+7
BVmb1e0QNW/ZwIMLF/z5N2TLw3O7Nt74ae/keCVnhe6cueLq0FNPzY7zM/fv4MOL
nR+/m7z21tNn4gaOnHv77O+p0zb/nHxx8fGTYw+/H/xQo5PJt511h/X3XX7D3Uff
ggw26GB9CxLYmYS7racehWNhSJmGxz3o4YcK+jcffCMKqBx/RU0UoH4lsnieiyf6
592HNNZoY20Octicfhbm1qOJEeYoZIM6BhbigS0mmKRwCDKZ4ksrKvmilDEiOSWT
M96o5ZZcdunll2AaFBAAOw==
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-default.gif}}}|
| attached on:|24 May 2009 by YourName|
| description:|defaultgif|
| embedded:|[[treeview-default.gif|treeview-default.gif]] - {{{type=image/gif, size=1222 bytes, encoded=1657 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-default.gif]] or [img[tooltip|treeview-default.gif][link]]}}}
[img[tooltip|treeview-default.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhYACFAPcAAAAAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAABgAIUAAAj/AP8JHEiwoMGDCBMqXMjw
H4CHABRCbEixosWLBCNi3Mixo0WNHkOKFAlypMmTKFOqPBmgpUuXK2OKDHCQpsyb
G206HKgTp8+GOkH2/EkUIU2ID//RXFq0KcGgPJ1KfTpQ6NSrQwVmvfrzpVeuYMOK
VTq2rFmnW8+qXTsyLVuSb4uWjBq34USJSetynIvRrd6qfwMLHszV60vCIbf6RcxQ
MeOOjh/ndIiULFPJFCNjtqh5c+aanjkbbhm6tNTFplOvRK26tUnWpvm6Xigbdty7
CXGrls3ZM+/ZwIMLjzua9HC6BW2Hhqr1OHKrzskijchU+WPmZKNjt7658/Di3KOL
ox9Pvrx5ir+jp8dcOXfe1uuP1xYff/j88/iVFhfvXfh2/oA1px1lE1X3XYDZOfff
gAaFJxl4+UUo4YTO1SechcFhSJhuB3EYW4QazhYihSS2BiGDyQHYoIopDjidZQkC
119wM8oImnb7lajjjjz+NSJ8IALnYUbv9aiag0YyhmSSf52o4I1ProgiVS5WZqB/
UB5X42xbuuYkk2CGKeaYZJY5W0AAOw==
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-famfamfam-line.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[treeview-famfamfam-line.gif|treeview-famfamfam-line.gif]] - {{{type=image/gif, size=807 bytes, encoded=1092 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-famfamfam-line.gif]] or [img[tooltip|treeview-famfamfam-line.gif][link]]}}}
[img[tooltip|treeview-famfamfam-line.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhAQABAPcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAABAAEAAAgEAP8FBAA7
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-famfamfam.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[treeview-famfamfam.gif|treeview-famfamfam.gif]] - {{{type=image/gif, size=1280 bytes, encoded=1734 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-famfamfam.gif]] or [img[tooltip|treeview-famfamfam.gif][link]]}}}
[img[tooltip|treeview-famfamfam.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhYACFAPcAAAAAADFrGDlzIUJzIVKEMXOcY71CAL1KANZaCMZaId5rIfdz
APd7GIS1Y4y9Y5S1e++EQvetc5S1jKW9nLXWlLXGrbnSpN6lhOetjOe1lO+1lNbn
vf/Stf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAABgAIUAAAj/AP8JHEiwoMGDCBMqXMjw
H4CHABRCbEixosWLBCNi3Mixo0WNHkOKFAlypMmTKFOqXMmypcuXMGPKnCnQQoEC
BCbQ3JmwQgMKGxwQeMCzKEECFCh0cOBAgNGnSDtIpRDgqdEBDhp0aNDUalEJBBxQ
EErUK08JAwIMkGC2rdu3cOPKnUu3Ls2SdlvizVtxosSHfDfuDYxyMOHDiBMrXsy4
sdsMCQwkuOCYYwYFGjhEUJChMsYEGiAwYAAhgeeLBjhI7cDAwGmLCSIwWLAAgenX
FDEkmI3gAGXcFCFL/g28uPHjyJMrl7icoeHKfhNGB/68ucDq1rNr3869u1WbOHVy
3fcJlCx3pEqZOt0edWrV7Vi1cl2vHaxY89zRqmXrvb///wAGOBB2zRG4GETVTYeb
gcoxmJyDyEEo4IQUHgdeTt2RF9RQ5yW1VFfsKeUed/FtBWJ9YY3FYX5prVXhizDG
eJiExtFYnI18KWiQjqfhuCCAPsoo5JBE8iTcZN1dltlmnW0Hmmik3aZdaqu1xl1s
s9UmZXa68eZbkpEhWeSYZJapUpA9AhkhYNKxaeabcMYp55yMHUmcdkpqxtmVoY1W
GndUSmWlk7LRZht3Xdb2JXd20unoo5BGKumkBwUEADs=
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-gray-line.gif}}}|
| attached on:|24 May 2009 by YourName|
| embedded:|[[treeview-gray-line.gif|treeview-gray-line.gif]] - {{{type=image/gif, size=1877 bytes, encoded=2543 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-gray-line.gif]] or [img[tooltip|treeview-gray-line.gif][link]]}}}
[img[tooltip|treeview-gray-line.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhEADwBvcAAAAAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAQAPAGAAj/AP8JHPgvAMGDCA0iXFiQ
4UKFDglCjChwIkWLETE61MgwgMePHx9SlDhyIEeRJRumPJkwpcqSLA/GJLnS5UyT
NnPW3AlTZ0+eI29W9BmU6EWjGZFuVNqRKcqfUIsCPTo1adWlV5tmfSo1KlWvVsFi
FauVLNevXdOiXRtWbVu2Y93GhVtWbl26Z9/qnbv3bt+8fAP7FQx4sOHCiFtuVWyW
sd3EMp06xjv5b2XClw9nhkyzceTFnz13fry5dGjSpymntrwac2vNrznjBD1adW3W
t13nhr1b9lDas0UHR93bdPHYxofbVo6buW7nvKH7fkncpfXr2LNr3869e/TfwsFX
/xe/nHxz88/Rf6denv159+nhrxcqfzr9+5KR6z/OX3py9fbl1x+A/9VXIH7AEbif
fwsqOKCBDUL4IILhScjghAJeqKGDG1rI4YcehkjheCJmCOKI7aH4norxsTifiSUm
GGOFLgYoY40HwohjhDtieKOOQP4oJI1BEjkkiT12mOSJRSLZZIpPrhhli1O+eCSU
V0qZJZVbWmnkl052aSOYWJKppZlcoullmGqOyeabZcJ5ppxp0rlmnHjOmWede96p
5598AupnoIQOaqibfSIqqKKFMnpojmJC2qakdjpqKaWJYrqopo1y+iiPVV4KaqSj
TlpqpZ6K6qOpq6J6aqavbv8aa6ezftoqrLfKmiutu9qqZKipBlurqr+S2iuxTBpb
LKvLunqssM8OC22zuFKrq7W8Yutrssxy66y2yM74rbfVknutudmiu6245bJ7rrvp
wrvukvKGS++9wEqrb7T8gjutuvbm2y/A/9ZbML7KEryvvwsrPLDBDUP8MMLdSszw
xAJfrLHDG1vM8cceh0zxuCJnDPLI7aL8rsrxsjyvySUnHHPFLgcsc80Hw4xzxDtj
fLPOQP8sNM1BEz00yT13nPTJRSPddMpPrxx1y1O/fDTUV0udNdVbW2301053bTPY
WJOttdlco+112GqPzfbbZcN9ttxp07123HjPnXfde9//rffffAPud+CED264230j
LrjihTN+eM5iQ9625HY7bjnliWO+uOaNc/44z1VfDnrko09eeuWei+6z6aujfnrm
r28ee+ezf9467LfLnjvtu9uudOipB1+76r+T3jvxTBtfPOvLu3688M8PD33zuFOv
u/W8Y+978sxz77z2yM/8vffVk3+9+dmjv7345bN/vvvpw7/+0vKHT//9wEuvf/T8
gz+9+vbLX/8A+L/6FRB/yiPg/vy3QAUO0IANhOADEdg9CTJwggK8oAYduEELcvCD
HgwhBccnwgyCcITtQ+H7VBg/Fs7PhCVMYAwr6MIAyrCGB4QhDiO4QwzeUIdA/KEQ
MmkYRCIOkYQ97GAST1hEJDYxhU9cYRRbOMUXHhGKV5RiFqm4RSsa8YtO7KINaQgS
kAQEADs=
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-gray.gif}}}|
| attached on:|24 May 2009 by YourName|
| description:|treeview-gray|
| embedded:|[[treeview-gray.gif|treeview-gray.gif]] - {{{type=image/gif, size=1230 bytes, encoded=1665 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-gray.gif]] or [img[tooltip|treeview-gray.gif][link]]}}}
[img[tooltip|treeview-gray.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhYACFAPcAAAAAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAABgAIUAAAj/AP8JHEiwoMGDCBMqXMjw
H4CHABRCbEixosWLBCNi3Mixo0WNHkOKFAlypMmTKFOqPBmgpUuXK2OKDHCQpsyb
G206HKgTp8+GOkH2/EkUIU2ID/+9HFq0aFCeTaMafCqQqVSnNa9qXfpSq9eqX8OC
FfvVKlmsZ7emVbv2ZkmobWW+HRu34kSJSafW/RjS7N6Dc/8KHkw4LVeYhUda9ZvY
4uLGM7NC9ngUqdKuky8+zsxxM2eMnj87PsxYNMPSpimiTn2adV/XlGF3XA07MG3X
tlPfTbib4O29gR3rlk28uPHjVUkjl1zwd2qqSpfrFShUenOHlpdah+7cNHfrvpmD
qyfdHbz58+jTqzcZHH1705Z55y2e+3x98/fB518ffT159KFtN1B1531XIHYTaSed
geYxOJ542ynH34QUVmjhThW+h99xvQE2H3Ea6mdhiBeWWKCEDUK4oIrLBbgiUhEp
2CKLyLk443QNomjijjz2mBmJ0gG5nJCTdViQkTdSWB5xS8rWJGxPivbfgTg+WKWA
V76YHWZJhkfldV96meNhPpZp5plopqnmmggFBAA7
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-red-line.gif}}}|
| attached on:|24 May 2009 by YourName|
| description:|redline|
| embedded:|[[treeview-red-line.gif|treeview-red-line.gif]] - {{{type=image/gif, size=1877 bytes, encoded=2543 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-red-line.gif]] or [img[tooltip|treeview-red-line.gif][link]]}}}
[img[tooltip|treeview-red-line.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhEADwBvcAAAAAAPV2dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAQAPAGAAj/AP8JHPgvAMGDCA0iXFiQ
4UKFDglCjChwIkWLETE61MgwgMePHx9SlDhyIEeRJRumPJkwpcqSLA/GJLnS5UyT
NnPW3AlTZ0+eI29W9BmU6EWjGZFuVNqRKcqfUIsCPTo1adWlV5tmfSo1KlWvVsFi
FauVLNevXdOiXRtWbVu2Y93GhVtWbl26Z9/qnbv3bt+8fAP7FQx4sOHCiFtuVWyW
sd3EMp06xjv5b2XClw9nhkyzceTFnz13fry5dGjSpymntrwac2vNrznjBD1adW3W
t13nhr1b9lDas0UHR93bdPHYxofbVo6buW7nvKH7fkncpfXr2LNr3869e/TfwsFX
/xe/nHxz88/Rf6denv159+nhrxcqfzr9+5KR6z/OX3py9fbl1x+A/9VXIH7AEbif
fwsqOKCBDUL4IILhScjghAJeqKGDG1rI4YcehkjheCJmCOKI7aH4norxsTifiSUm
GGOFLgYoY40HwohjhDtieKOOQP4oJI1BEjkkiT12mOSJRSLZZIpPrhhli1O+eCSU
V0qZJZVbWmnkl052aSOYWJKppZlcoullmGqOyeabZcJ5ppxp0rlmnHjOmWede96p
5598AupnoIQOaqibfSIqqKKFMnpojmJC2qakdjpqKaWJYrqopo1y+iiPVV4KaqSj
TlpqpZ6K6qOpq6J6aqavbv8aa6ezftoqrLfKmiutu9qqZKipBlurqr+S2iuxTBpb
LKvLunqssM8OC22zuFKrq7W8Yutrssxy66y2yM74rbfVknutudmiu6245bJ7rrvp
wrvukvKGS++9wEqrb7T8gjutuvbm2y/A/9ZbML7KEryvvwsrPLDBDUP8MMLdSszw
xAJfrLHDG1vM8cceh0zxuCJnDPLI7aL8rsrxsjyvySUnHHPFLgcsc80Hw4xzxDtj
fLPOQP8sNM1BEz00yT13nPTJRSPddMpPrxx1y1O/fDTUV0udNdVbW2301053bTPY
WJOttdlco+112GqPzfbbZcN9ttxp07123HjPnXfde9//rffffAPud+CED264230j
LrjihTN+eM5iQ9625HY7bjnliWO+uOaNc/44z1VfDnrko09eeuWei+6z6aujfnrm
r28ee+ezf9467LfLnjvtu9uudOipB1+76r+T3jvxTBtfPOvLu3688M8PD33zuFOv
u/W8Y+978sxz77z2yM/8vffVk3+9+dmjv7345bN/vvvpw7/+0vKHT//9wEuvf/T8
gz+9+vbLX/8A+L/6FRB/yiPg/vy3QAUO0IANhOADEdg9CTJwggK8oAYduEELcvCD
HgwhBccnwgyCcITtQ+H7VBg/Fs7PhCVMYAwr6MIAyrCGB4QhDiO4QwzeUIdA/KEQ
MmkYRCIOkYQ97GAST1hEJDYxhU9cYRRbOMUXHhGKV5RiFqm4RSsa8YtO7KINaQgS
kAQEADs=
---END_DATA---
%/
| source file:|{{{F:\TiddlyWiki\TW jQuery\TreeView\images\treeview-red.gif}}}|
| attached on:|25 May 2009 by YourName|
| embedded:|[[treeview-red.gif|treeview-red.gif]] - {{{type=image/gif, size=1230 bytes, encoded=1665 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|treeview-red.gif]] or [img[tooltip|treeview-red.gif][link]]}}}
[img[tooltip|treeview-red.gif]]
<<<
/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhYACFAPcAAAAAAPV2dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAABgAIUAAAj/AP8JHEiwoMGDCBMqXMjw
H4CHABRCbEixosWLBCNi3Mixo0WNHkOKFAlypMmTKFOqPBmgpUuXK2OKDHCQpsyb
G206HKgTp8+GOkH2/EkUIU2ID/+9HFq0aFCeTaMafCqQqVSnNa9qXfpSq9eqX8OC
FfvVKlmsZ7emVbv2ZkmobWW+HRu34kSJSafW/RjS7N6Dc/8KHkw4LVeYhUda9ZvY
4uLGM7NC9ngUqdKuky8+zsxxM2eMnj87PsxYNMPSpimiTn2adV/XlGF3XA07MG3X
tlPfTbib4O29gR3rlk28uPHjVUkjl1zwd2qqSpfrFShUenOHlpdah+7cNHfrvpmD
qyfdHbz58+jTqzcZHH1705Z55y2e+3x98/fB518ffT159KFtN1B1531XIHYTaSed
geYxOJ542ynH34QUVmjhThW+h99xvQE2H3Ea6mdhiBeWWKCEDUK4oIrLBbgiUhEp
2CKLyLk443QNomjijjz2mBmJ0gG5nJCTdViQkTdSWB5xS8rWJGxPivbfgTg+WKWA
V76YHWZJhkfldV96meNhPpZp5plopqnmmggFBAA7
---END_DATA---
%/
//{{{
config.options.chkHttpReadOnly = false;
config.options.chkAutoSave = true;
config.options.chkSaveBackups = false;
config.options.chkAnimate = false;
config.options.chkShowRightSidebar= false;
config.options.chkSinglePageMode= true;
config.options.chkSinglePagePermalink= false;
if (window.location.protocol!="file:") showBackstage=false;
config.options.chkSearchTitles=true;
config.options.chkSearchText=true;
config.options.chkSearchTags=true;
config.options.chkSearchFields=true;
config.options.chkSearchTitlesFirst=false;
config.options.chkSearchList=true;
config.options.chkSearchByDate=false;
config.options.chkSearchIncremental=false;
config.options.chkSearchShadows=false;
//}}}