Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
/***
|''Name:''|AccordionMenuPlugin ''altered''|
|''Description:''|Turn an unordered list into an accordion style menu|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#AccordionMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''|03/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.accordion={
dropchar : "\u200B", /* dropdownchar altered */
handler : function(place,macroName,params,wikifier,paramString,tiddler){
list = findRelated(place.lastChild,"UL","tagName","previousSibling");
if (!list)
return;
addClass(list,"accordion");
if (params.length){
addClass(list,paramString);
}
this.fixLinks(list.childNodes);
},
fixLinks : function(els){
for (var i=0; i<els.length; i++){
if(els[i].tagName.toLowerCase()=="li"){
var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
if(!link){
var ih = els[i].firstChild.data;
els[i].removeChild(els[i].firstChild);
link = createTiddlyElement(null,"a",null,null,ih+this.dropchar,{href:"javascript:;"});
els[i].insertBefore(link,els[i].firstChild);
}
else{
link.firstChild.data = link.firstChild.data + this.dropchar;
removeClass(link,"tiddlyLinkNonExisting");
}
link.onclick = this.show;
}
}
},
show : function(e){
var list = this.parentNode.parentNode;
var els = list.childNodes;
for (var i=0; i<els.length; i++){
removeClass(els[i],"accordion-active");
}
addClass(this.parentNode,"accordion-active");
}
};
config.shadowTiddlers["StyleSheetAccordionMenuPlugin"] = "/*{{{*/\n"+
"ul.accordion, ul.accordion li, ul.accordion li ul {margin:0; padding:0; list-style-type:none;text-align:left;}\n"+
"ul.accordion li ul {display:none;}\n"+
"ul.accordion li.accordion-active ul {display:block;}\n"+
"\n"+
"ul.accordion li.accordion-active a {cursor:default;}\n"+
"ul.accordion li.accordion-active ul li a{cursor:pointer;}\n"+
"\n"+
"ul.accordion a {display:block; padding:0.5em;}\n"+
"ul.accordion li a.tiddlyLink, ul.accordion li a.tiddlyLinkNonExisting, ul.accordion li a {font-weight:bold;}\n"+
"ul.accordion li a {background:#0066aa; color:#FFF; border-bottom:1px solid #fff;}\n"+
"ul.accordion li.accordion-active a, ul.accordion li a:hover {background:#00558F;color:#FFF;}\n"+
"\n"+
"ul.accordion li ul li{display:inline-block;overflow:hidden;}\n"+
"ul.accordion li.accordion-active ul li {background:#eff3fa; color:#000; padding:0em;}\n"+
"ul.accordion li.accordion-active ul li div {padding:1em 1.5em; background:#eff3fa;}\n"+
"ul.accordion li.accordion-active ul a{background:#eff3fa; color:#000; padding:0.5em 0.5em 0.5em 1.0em;border:none;}\n"+
"ul.accordion li.accordion-active ul a:hover {background:#e0e8f5; color:#000;}\n" +
"/*}}}*/";
store.addNotification("StyleSheetAccordionMenuPlugin",refreshStyles);
//!END-PLUGIN-CODE
// %/
* Add some help tiddlers tagged with "help"
* Create a "Help" button that opens the "help" tagtiddler
* Put link on the side / top bar
<<tiddler LoadLocalWithRefresh with: AddSpacesInWikiLinks AddSpacesInWikilinksPlugin.js>>
Add a tab holding all the system information like:
* ==Macros==
* ==Shadowed tiddlers==
* ==Desktop stuff==
* Stylesheets - these aren't tagged so might need a new mechanism
* Named Notifications
<<forEachTiddler
sortBy
'tiddler.text.length'
descending
write
'(index < 300) ? "|"+(index+1)+"|[["+tiddler.title+"]]|"+tiddler.tags+"|"+tiddler.text.length+"|\n" : ""'
begin '"|!#|!Tiddler|!Tags|!Size|\n"'
end 'count+" Tiddlers found\n"'
none '"No Tiddlers found\n"'>>
<<forEachTiddler
sortBy
'getSortedTagsText(tiddler)+"###"+tiddler.title'
script
'
function getSortedTagsText(tiddler) {
var tags = tiddler.tags;
if (!tags || !tags.length)
return "{no tags}";
tags.sort();
var result = "";
for (var i = 0; i < tags.length;i++) {
result += tags[i]+ " ";
}
return result;
}
function getGroupTitle(tiddler, context) {
if (!context.lastGroup || context.lastGroup != getSortedTagsText(tiddler)) {
context.lastGroup = getSortedTagsText(tiddler);
return "* {{{"+(context.lastGroup?context.lastGroup:"no tags")+"}}}\n";
} else
return "";
}
'
write
'getGroupTitle(tiddler, context)+"** [[" + tiddler.title+"]]\n"'
>>
<<forEachTiddler where 'tiddler.tags.length == 0' sortBy '(tiddler.title)' write '"[["+tiddler.title+"]]\n"'>>
''This is an experimental TiddlyWiki setup !
Any liability for damages that may occur as a result of its use remains solely you own.
Don't use any of the altered installed scripts and plugins if you can't live with the possibility of loss yourself.
Use the scripts or plugins from the original Author's websites instead.''
{{right{Wolfgang}}}
/%
|Name|AutoRefresh|
|Source|http://www.TiddlyTools.com/#AutoRefresh|
|Version|0.6.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|
|Description|enable/disable auto-refresh of selected content to force/prevent re-rendering when tiddler changes occur|
usage:
<<tiddler AutoRefresh with: mode 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>
<<tiddler LoadLocalPlugin with: AutoWeave AutoWeavePlugin.js>>
/***
adapted from http://www.tiddlytools.com/#BackstageTweaks
***/
//{{{
if (config.tasks!=undefined) { // TW2.2B3 or above
// add ImportTiddlerPlugin controls to built-in import
config.tasks.importTask.content="{{small{{{floatright{<<importTiddlers link 'use ImportTiddlersPlugin control panel...'>>}}}~TiddlyWiki built-in importer:\n<<importTiddlers core>>"
config.tasks.get = {
text: "get",
tooltip: "Load external code",
content: "<<tiddler Get>>"
};
config.backstageTasks.push("get");
config.tasks.tiddler = {
text: "tiddler",
tooltip: "Tiddler Tweaker Panel",
content: "<<tiddler TidIDE>>"
};
config.backstageTasks.push("tiddler");
config.tasks.menu = {
text: "menu",
tooltip: "View the Menu",
content: "<<tiddler DropDownMenu>>"
};
config.backstageTasks.push("menu");
config.tasks.tab = {
text: "tab",
tooltip: "View the tabs",
content: "<<tiddler SideBarTabs>>"
};
config.backstageTasks.push("tab");
config.tasks.lay = {
text: "lay",
tooltip: "Set the layout",
content: "<<tiddler Lay>>"
};
config.backstageTasks.push("lay");
config.tasks.new = {
text: "new",
tooltip: "Various edit options",
content: "<<tiddler New>>"
};
config.backstageTasks.push("new");
config.tasks.sys = {
text: "sys",
tooltip: "Various options",
content: "<<tiddler Sys>>"
};
config.backstageTasks.push("sys");
config.tasks.go = {
text: "go",
tooltip: "Go to previous viewed tiddlers",
content: "<<tiddler ShowBreadcrumbs>>"
};
config.backstageTasks.push("go");
// hide "backstage/close" text, use text chars for glyphs
config.messages.backstage.open.text="";
config.glyphs.codes.bentArrowLeft=["<","<"];
config.glyphs.codes.bentArrowRight=["",""];
config.glyphs.codes.downTriangle=["..",".."];
// adjust backstage panel styles
setStylesheet("\
#backstageButton \
{ font-size:7pt; } \
#backstageArea \
{ font-size:7pt; } \
#backstagePanel #importPanel \
{ left:10%; right:auto; }\
","BackstageBarTweaks");
}
//}}}
<<tiddler LoadLocalWithPanel with: backup Backup2TextMacro.js>>
|''URL:''|http://tiddlywiki.bidix.info/|
|''Description:''|Repository for BidiX's TiddlyWiki Extensions|
|''Author:''|BidiX|
/***
|Name|BreadcrumbsPlugin ''compressed''|
|Author|Eric Shulman|
|Source|http://www.TiddlyTools.com/#BreadcrumbsPlugin|
|Version|1.8.2|
|License|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Overrides|Story.prototype.displayTiddler,TiddlyWiki.prototype.deleteTiddler|
|Description|Show a list of tiddlers viewed during this session. Also defines "back" (previousTiddler) toolbar button and macro|
***/
//{{{
version.extensions.breadCrumbs={major:1,minor:8,revision:2,date:new Date("Oct 26, 2007")};if(config.options.chkShowBreadcrumbs==undefined){config.options.chkShowBreadcrumbs=true;}if(config.options.chkReorderBreadcrumbs==undefined){config.options.chkReorderBreadcrumbs=false;}if(config.options.chkCreateDefaultBreadcrumbs==undefined){config.options.chkCreateDefaultBreadcrumbs=true;}if(config.options.chkShowStartupBreadcrumbs==undefined){config.options.chkShowStartupBreadcrumbs=false;}config.macros.breadcrumbs={crumbs:[],handler:function(_1,_2,_3,_4,_5,_6){var _7=createTiddlyElement(_1,"span",null,"breadCrumbs",null);_7.setAttribute("homeSep",_3[0]?_3[0]:this.homeSeparator);_7.setAttribute("crumbSep",_3[1]?_3[1]:this.crumbSeparator);this.render(_7);},add:function(_8){var _9="[["+_8+"]]";var _a=this.crumbs.find(_9);if(_a===null){this.crumbs.push(_9);}else{if(config.options.chkReorderBreadcrumbs){this.crumbs.push(this.crumbs.splice(_a,1)[0]);}else{this.crumbs=this.crumbs.slice(0,_a+1);}}this.refresh();return false;},getAreas:function(){var _b=[];var _c=document.getElementsByTagName("*");for(var i=0;i<_c.length;i++){try{if(hasClass(_c[i],"breadCrumbs")){_b.push(_c[i]);}}catch(e){}}var _e=document.getElementById("breadCrumbs");if(_e&&!hasClass(_e,"breadCrumbs")){_b.push(_e);}if(!_b.length&&config.options.chkCreateDefaultBreadcrumbs){var _f=createTiddlyElement(null,"span",null,"breadCrumbs",null);_f.style.display="none";var _10=document.getElementById("tiddlerDisplay");_10.parentNode.insertBefore(_f,_10);_b.push(_f);}return _b;},refresh:function(){var _11=this.getAreas();for(var i=0;i<_11.length;i++){_11[i].style.display=config.options.chkShowBreadcrumbs?"block":"none";removeChildren(_11[i]);this.render(_11[i]);}},render:function(_13){createTiddlyButton(_13,"Home",null,this.home,"tiddlyLink tiddlyLinkExisting");for(c=0;c<this.crumbs.length;c++){if(!store.tiddlerExists(this.crumbs[c].replace(/\[\[/,"").replace(/\]\]/,""))){this.crumbs.splice(c,1);}}var _14=_13.getAttribute("homeSep");if(!_14){_14=this.homeSeparator;}var _15=_13.getAttribute("crumbSep");if(!_15){_15=this.crumbSeparator;}wikify(_14+this.crumbs.join(_15),_13);},home:function(){story.closeAllTiddlers();restart();config.macros.breadcrumbs.crumbs=[];var _16=config.macros.breadcrumbs.getAreas();for(var i=0;i<_16.length;i++){_16[i].style.display="none";}return false;}};if(config.macros.breadcrumbs.homeSeparator==undefined){config.macros.breadcrumbs.homeSeparator=" | ";}if(config.macros.breadcrumbs.crumbSeparator==undefined){config.macros.breadcrumbs.crumbSeparator=" > ";}config.commands.previousTiddler={text:"back",tooltip:"view the previous tiddler",hideReadOnly:false,dateFormat:"DDD, MMM DDth YYYY hh:0mm:0ss",handler:function(_18,src,_1a){var _1b=story.findContainingTiddler(src);if(!_1b){return;}var _1c=config.macros.breadcrumbs.crumbs;if(_1c.length>1){var _1d=_1c[_1c.length-2].replace(/\[\[/,"").replace(/\]\]/,"");story.displayTiddler(_1b,_1d);}else{config.macros.breadcrumbs.home();}return false;}};config.macros.previousTiddler={label:"back",prompt:"view the previous tiddler",handler:function(_1e,_1f,_20,_21,_22,_23){var _24=_20.shift();if(!_24){_24=this.label;}var _25=_20.shift();if(!_25){_25=this.prompt;}createTiddlyButton(_1e,_24,_25,function(){var _26=config.macros.breadcrumbs.crumbs;if(_26.length>1){var _27=_26[_26.length-2].replace(/\[\[/,"").replace(/\]\]/,"");story.displayTiddler(_1e,_27);}else{config.macros.breadcrumbs.home();}});}};if(Story.prototype.breadCrumbs_coreDisplayTiddler==undefined){Story.prototype.breadCrumbs_coreDisplayTiddler=Story.prototype.displayTiddler;}Story.prototype.displayTiddler=function(_28,_29,_2a,_2b,_2c){this.breadCrumbs_coreDisplayTiddler.apply(this,arguments);if(!startingUp||config.options.chkShowStartupBreadcrumbs){config.macros.breadcrumbs.add(_29);}};if(TiddlyWiki.prototype.breadCrumbs_coreRemoveTiddler==undefined){TiddlyWiki.prototype.breadCrumbs_coreRemoveTiddler=TiddlyWiki.prototype.removeTiddler;}TiddlyWiki.prototype.removeTiddler=function(_2d){this.breadCrumbs_coreRemoveTiddler.apply(this,arguments);config.macros.breadcrumbs.refresh();};
//}}}
Need to be able to bring Tiddlers to the front when you start dragging them:
* ==Remove element then addFirstChild?==
* ==Increase z-index?==
* ==Need solid background colour==
On mousedown now brings the tiddler div to the front, by removing it from its parent then re-attaching it.
!General
* ==If animation is on layout has problems== disabled now
* ==Move functionality into macros rather than external JS file ... it's just easier developing that way ;-)==
* After editing a resized tiddler the internal / scrollable tiddler display area remembers the initial size
!Internet Explorer
* ==Resizing makes the toolbar grow massively==
* ==Scrollbars get in the way of everything==
* Borders not working properly on window bar buttons
!Opera
* ==Gradient in toolbar not working==
* Single click on the toolbar of inactive tiddler starts dragging rather than just bringing to front
!Firefox
* ==Extra bullets appearing in tag list==
<html><input value="0"
style="width:10em;font-size:3em;text-align:right;"
onchange="try{this.value=eval(this.value)}
catch(e){displayMessage(e.description||e.toString())}">
</html>
/*{{{*/
table.calendarWrapper {border-collapse:collapse; border:2px solid #c6dbff;}
.calendarWrapper td {border-collapse:collapse; border:1px solid #c6dbff; text-align:center;margin:0; padding:0 0.05em;}
table.calendar {border-collapse:collapse; border:0;}
.calendar tbody, .calendar th, .calendar td, .calendar tr {border:0; text-align:center; font-size:1em; padding:0 0.1em;}
.calendar th {color:#000; background-color:#c6dbff;}
#sidebarOptions .calendar td {font-size:0.96em; margin:0; padding:0;}
#sidebarTabs .calendar td, #mainMenu .calendar td {padding:0 0.25em;}.calendar .naviBar select {border:0;}
.calendar .today a {padding:0; border:1px solid blue;}
.calendar .weekend {background-color:#deeeff;}
.calendar .hasChanged {font-family:bold; background-color:#fe8; color:darkblue;}
.calendar .holiday {font-weight:bold; font-size:1.06em; color:red;}
.datePopup {background:#efffff;} .datePopup .isCreated {color:#df6300;}
/*}}}*/
When you cascade / auto-layout all tiddlers they should all be resized back to their original size to make it all look neat
They are now closed then reopened, forcing them back to their original layout.
Need to remove tiddler positions from layout when they're closed and update them when they're moved
Name: BottomlessColors
Background: #fff
Foreground: #000
PrimaryPale: #eff3fa
PrimaryLight: #9bd
PrimaryMid: #336699
PrimaryDark: #003366
SecondaryPale: #ffe
SecondaryLight: #ece9d8
SecondaryMid: #baa07b
SecondaryDark: #886655
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/%
|Name|CompareTiddlers|
|Source|http://www.TiddlyTools.com/#CompareTiddlers|
|Version|0.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|TidIDE: show color-coded differences between two selected tiddlers|
%/<<tiddler HideTiddlerTags>>{{smallform small{
<html><form action="javascript:;" style="display:inline"><!--
--><select name=list1 size=1 style="width:30%" onchange="var f=this.form; f.view1.disabled=f.edit1.disabled=f.done.disabled=!this.value.length; f.compare.disabled=!f.list1.value.length||!f.list2.value.length; if (!this.value.length) return; f.text1.style.display=f.text2.style.display='inline'; f.text1.value=store.getTiddlerText(this.value);"></select><!--
--><input type=button name=view1 style="width:10%" value='view' disabled
onclick="if (this.form.list1.value.length) story.displayTiddler(story.findContainingTiddler(this),this.form.list1.value,DEFAULT_VIEW_TEMPLATE)"><!--
--><input type=button name=edit1 style="width:10%" value='edit' disabled
onclick="if (this.form.list1.value.length) story.displayTiddler(story.findContainingTiddler(this),this.form.list1.value,DEFAULT_EDIT_TEMPLATE)"><!--
--><select name=list2 size=1 style="width:30%" onchange="var f=this.form; f.view2.disabled=f.edit2.disabled=f.done.disabled=!this.value.length; f.compare.disabled=!f.list1.value.length||!f.list2.value.length; if (!this.value.length) return; f.text1.style.display=f.text2.style.display='inline'; f.text2.value=store.getTiddlerText(this.value)"></select><!--
--><input type=button name=view2 style="width:10%" value='view' disabled
onclick="if (this.form.list2.value.length) story.displayTiddler(story.findContainingTiddler(this),this.form.list2.value,DEFAULT_VIEW_TEMPLATE)"><!--
--><input type=button name=edit2 style="width:10%" value='edit' disabled
onclick="if (this.form.list2.value.length) story.displayTiddler(story.findContainingTiddler(this),this.form.list2.value,DEFAULT_EDIT_TEMPLATE)"><br><!--
--><textarea name=text1 style="width:49.5%;display:none" rows="10" readonly></textarea><!--
--><textarea name=text2 style="width:49.5%;display:none" rows="10" readonly></textarea><!--
--><div style='float:left'><!--
-->Compare two tiddlers using <!--
--><a target="_blank" href="http://bradleymeck.tiddlyspot.com/#[[Diff Function]]">Bradley Meck's Diff Function</a>.
The output shows additions in green, and deletions in red<!--
--></div><!--
--><div style='text-align:right'><!--
--><input type=button name=compare style="width:10%" value='compare' disabled
onclick="var f=this.form; if (!f.list1.value.length) { f.list1.focus(); return alert('select a tiddler'); } var t1=store.getTiddlerText(f.list1.value); if (!t1) { displayMessage(f.list1.value+' not found');return false; } if (!f.list2.value.length) { f.list2.focus(); return alert('select a tiddler'); } var t2=store.getTiddlerText(f.list2.value); if (!t2) { displayMessage(f.list2.value+' not found');return false; } removeChildren(f.parentNode.nextSibling); var out=diffString(t1,t2); if (!out || !out.length) out='no differences'; f.parentNode.nextSibling.innerHTML=out; f.parentNode.nextSibling.style.display='block'; f.done.disabled=false;"><!--
--><input type=button name=done style="width:10%" value='done' disabled
onclick="var f=this.form; f.text1.style.display='none'; f.text1.value=''; var list=f.list1; while (list.options[0]) list.options[0]=null; list.options[0]=new Option('select a tiddler...','',false,false); var tids=store.getTiddlers('title','excludeLists'); for (i=0; i<tids.length; i++) list.options[list.length]=new Option(tids[i].title,tids[i].title,false,false); f.text2.style.display='none'; f.text2.value=''; var list=f.list2; while (list.options[0]) list.options[0]=null; list.options[0]=new Option('select a tiddler...','',false,false); var tids=store.getTiddlers('title','excludeLists'); for (i=0; i<tids.length; i++) list.options[list.length]=new Option(tids[i].title,tids[i].title,false,false); f.parentNode.nextSibling.style.display='none'; removeChildren(f.parentNode.nextSibling); f.view1.disabled=f.view2.disabled=f.edit1.disabled=f.edit2.disabled=f.compare.disabled=this.disabled=true;"><!--
--></div><!--
--></form></html><script>
// initialize form
var form=place.lastChild.firstChild;
var tids=store.getTiddlers('title','excludeLists');
while (form.list1.options[0]) form.list1.options[0]=null;
form.list1.options[0]=new Option("select a tiddler...","",false,false);
for (i=0; i<tids.length; i++)
form.list1.options[form.list1.length]=new Option(tids[i].title,tids[i].title,false,false);
while (form.list2.options[0]) form.list2.options[0]=null;
form.list2.options[0]=new Option("select a tiddler...","",false,false);
for (i=0; i<tids.length; i++)
form.list2.options[form.list2.length]=new Option(tids[i].title,tids[i].title,false,false);
</script>@@display:none;margin-top:1em;border:1px solid;-moz-border-radius:1em;padding:1em;white-space:normal;/%
this will be replaced with output from compare button
%/@@}}}<html><div style='clear:both'></div></html><script>
//{{{
// returns difference between old and new text, color-formatted additions and deletions
window.diffString=function( o, n ) {
if (o==n) return ""; // simple check, saves time if true
var error = 5;
var reg = new RegExp( "\\n|(?:.{0,"+error+"})", "g" );
var oarr = o.match( reg ); // dices text into chunks
var narr = n.match( reg );
var out = diff(oarr,narr); // compare the word arrays
var str = ""; // construct output
for (i=0; i<out.length; i++) {
switch (out[i].change) {
case "ADDED":
str+="<span style='color:green'>";
str+=narr.slice(out[i].index,out[i].index+out[i].length).join("");
str+="</span> ";
break;
case "DELETED":
str+="<span style='color:red'>";
str+=oarr.slice(out[i].index,out[i].index+out[i].length).join("");
str+="</span> ";
break;
default:
str+="<span>";
str+=oarr.slice(out[i].index,out[i].index+out[i].length).join("");
str+="</span> ";
break;
}
}
return str;
return "<html>"+str+"</html>";
}
/***
!About
|Author - Bradley Meck|
|Date - Dec 24, 2006|
|Version - 1.4.1|
This is a simple function to be used to find the differences between one set of objects and another. ''The objects do not need to be Strings''. It outputs and array of objects with the properties value and change. This function is pretty hefts but appears to be rather light for a diff and tops out at O(N^^2^^) for absolute worst cast scenario that I can find.
!History
*December 23, 2006 - Function made to be minimal edit diff, and changed output.
!Code
***/
function diff( oldArray, newArray ) {
var newElementHash = { };
for( var i = 0; i < newArray.length; i++ ) {
if( ! newElementHash [ newArray [ i ] ] ) {
newElementHash [ newArray [ i ] ] = [ ];
}
newElementHash [ newArray [ i ] ].push( i );
}
var substringTable = [ ];
for( var i = 0; i < oldArray.length; i++ ) {
if(newElementHash [ oldArray [ i ] ] ) {
var locations = newElementHash [ oldArray [ i ] ] ;
for( var j = 0; j < locations.length; j++){
var length = 1;
while( i + length < oldArray.length && locations [ j ] + length < newArray.length
&& oldArray [ i + length ] == newArray [ locations [ j ] + length ] ){
length++;
}
substringTable.push( {
oldArrayIndex : i,
newArrayIndex : locations [ j ],
matchLength : length
} );
}
}
}
substringTable.sort( function( a, b ) {
if ( a.matchLength > b.matchLength /* a is less than b by some ordering criterion */ ) {
return -1;
}
if ( a.matchLength < b.matchLength /* a is greater than b by the ordering criterion */ ) {
return 1;
}
// a must be equal to b
return 0
} );
//displayMessage( substringTable.toSource( ) );
for( var i = 0; i < substringTable.length; i++) {
for( var j = 0; j < i; j++) {
var oldDelta = substringTable [ i ].oldArrayIndex + substringTable [ i ].matchLength - 1 - substringTable [ j ].oldArrayIndex;
var newDelta = substringTable [ i ].newArrayIndex + substringTable [ i ].matchLength - 1 - substringTable [ j ].newArrayIndex;
//displayMessage( "oldDelta ::: " + oldDelta );
//displayMessage( "newDelta ::: " + newDelta );
//displayMessage( "matchLength ::: " + substringTable [ j ].matchLength );
if( ( oldDelta >= 0 && oldDelta <= substringTable [ j ].matchLength )
|| ( newDelta >= 0 && newDelta <= substringTable [ j ].matchLength )
|| ( oldDelta < 0 && newDelta > 0 )
|| ( oldDelta > 0 && newDelta < 0 ) ) {
substringTable.splice( i, 1 );
i--;
break;
}
}
}
//displayMessage( substringTable.toSource( ) );
substringTable.sort( function( a, b ) {
if ( a.oldArrayIndex < b.oldArrayIndex /* a is less than b by some ordering criterion */ ) {
return -1;
}
if ( a.oldArrayIndex > b.oldArrayIndex /* a is greater than b by the ordering criterion */ ) {
return 1;
}
// a must be equal to b
return 0
} );
//displayMessage( substringTable.toSource( ) );
var oldArrayIndex = 0;
var newArrayIndex = 0;
var results = [ ];
for( var i = 0; i < substringTable.length; i++ ) {
if( oldArrayIndex != substringTable [ i ].oldArrayIndex ) {
results.push( {
change : "DELETED",
length : substringTable [ i ].oldArrayIndex - oldArrayIndex,
index : oldArrayIndex
} );
}
if( newArrayIndex != substringTable [ i ].newArrayIndex ) {
results.push( {
change : "ADDED",
length : substringTable [ i ].newArrayIndex - newArrayIndex,
index : newArrayIndex
} );
}
results.push( {
change : "STAYED",
length : substringTable [ i ].matchLength,
index : substringTable [ i ].oldArrayIndex
} );
oldArrayIndex = substringTable [ i ].oldArrayIndex + substringTable [ i ].matchLength;
newArrayIndex = substringTable [ i ].newArrayIndex + substringTable [ i ].matchLength;
}
if( oldArrayIndex != oldArray.length ) {
results.push( {
change : "DELETED",
length : oldArray.length - oldArrayIndex,
index : oldArrayIndex
} );
}
if( newArrayIndex != newArray.length ) {
results.push( {
change : "ADDED",
length : newArray.length - newArrayIndex,
index : newArrayIndex
} );
}
return results;
}
//}}}
</script>
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::SecondaryMid]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump fullscreen collapseTiddler closeTiddler'></span>
<span class='title' macro='view title'></span></div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler backup wikibar previewTiddler autosizeEditor'></span>
<span class='toolbar' macro='tiddler QuickEditToolbarCommand'></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span class='toolbar' macro='tiddler ToggleFullscreen'></span> </div>
<span class='editor' macro='edit title'></span>
<span macro='tiddler QuickEditToolbar'></span>
<div macro='annotations'></div>
<b>Name:</b> <span macro="edit name"></span><br>
<b>Email:</b> <span macro="edit email"></span><br>
<b>Phone:</b> <span macro="edit phone"></span><br>
<b>Handy:</b> <span macro="edit handy"></span><br>
<b>Street:</b> <span macro="edit street"></span><br>
<b>City:</b> <span macro="edit city"></span><br>
<b>State:</b> <span macro="edit state"></span><br>
<b>Country:</b> <span macro="edit country"></span><br>
<b>Webpage:</b> <span macro="edit webpage"></span><br>
<b>Note:</b> <span macro="edit note"></span><br>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div>
<span macro='resizeEditor'></span>
<div class='editorFooter' macro='deliciousTagging'></div>
<div macro='sizer' class='sizer'></div>
</div>
<!--}}}-->
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump fullscreen collapseTiddler -closeTiddler'></span>
<span class='title' macro='view title'></span></div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +editTiddler closeOthers deleteTiddler > copyTiddler easyEdit externalize fields syncing permalink references'>
<span class="toolbar" macro="tiddler TidIDECommand"></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span macro='tagger'></span></span></span></div>
<div class='scrollable'>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<table><tr>
<td style='text-align:right'><b>Name:</b></td>
<td><span macro="view name wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Email:</b></td>
<td><span macro="view email wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Phone:</b></td>
<td><span macro="view phone wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Handy:</b></td>
<td><span macro="view handy wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Street:</b></td>
<td><span macro="view street wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>City:</b></td>
<td><span macro="view city wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>State:</b></td>
<td><span macro="view state wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Country:</b></td>
<td><span macro="view country wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Webpage:</b></td>
<td><span macro="view webpage wikified"></span></td>
</tr><tr>
<td style='text-align:right'><b>Note:</b></td>
<td><span macro="view note wikified"></span></td>
</tr></table>
</div>
<div class='viewer' macro='view text wikified'></div>
<div class='subtitle'>
<span macro='view modifier link'></span>,
<span macro='view modified date [[DD mmm YY]]'></span>
(created: <span macro='view created date [[DD mmm YY]]'></span>)
</div>
<div class='tagClear'></div>
</div>
<div macro='sizer' class='sizer'></div>
<!--}}}-->
(function() {
for (var i = 0; i < config.formatters.length; i++)
if (config.formatters[i].name == "strikeByChar")
break;
if (i < config.formatters.length)
config.formatters.splice(i,1);
})();
<<tiddler LoadLocalPlugin with: CopyTiddler CopyTiddlerPlugin.js>>
TiddlyWiki was created by [[Jeremy Ruston|http://tiddlywiki.com/#JeremyRuston]] and is published under a [[BSD Open Source License|http://tiddlywiki.com/#OpenSourceLicense]]
TiddlyDesktop was created by JonnyLeRoy and is released under the same terms.
© 2007 [[UnaMesa|http://www.unamesa.org/]]^^
/***
|Name|CoreTweaks ''altered''|
|Source|http://www.TiddlyTools.com/#CoreTweaks|
|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.4|
***/
//{{{
window.coreTweaks_getPageTitle=window.getPageTitle;
window.getPageTitle=function() {
var txt=wikifyPlain("PageTitle"); if (txt.length) return txt;
return window.coreTweaks_getPageTitle.apply(this,arguments);
}
store.addNotification("PageTitle",refreshPageTitle); // so title stays in sync with tiddler changes
//}}}
There are various methods that should live on the tiddlyDiv itself - pull these out into a decorate tiddly div function
<script label="DeleteAllTagged" title="Delete all tiddlers with the specified tag">
if(window.version && window.version.title == 'TiddlyWiki'){
var tag = prompt('Delete tiddlers with the tag:','');
store.suspendNotifications();
var t = store.getTaggedTiddlers(tag);
for(var i=0;
i<t.length;
i++)
store.removeTiddler(t[i].title);
store.resumeNotifications();
refreshDisplay();
}
return false; // ELS: added
</script>
/***
|''Name:''|DeliciousTaggingPlugin ''compressed''|
|''Version:''|0.1|
|''Source''|http://jackparke.googlepages.com/jtw.html#DeliciousTaggingPlugin ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%DeliciousTaggingPlugin]])|
|''Author:''|[[Jack]]|
|''Description:''|Allows easy 'del.icio.us'-like tagging in the EditTemplate by showing all tags as a list of link-buttons.|
***/
//{{{
version.extensions.deliciousTagging={major:0,minor:1,revision:0,date:new Date("June 11, 2007")};config.macros.deliciousTagging={};config.macros.deliciousTagging.onTagClick=function(e){if(!e){var e=window.event}var _3=this.getAttribute("tag");var _4=this.getAttribute("tiddler");if(!readOnly){story.setTiddlerTag(_4,_3,0)}return false};config.macros.deliciousTagging.handler=function(_5,_6,_7,_8,_9,_a){if(_a instanceof Tiddler){var _b=_a.title;if(!e){var e=window.event}var _d=store.getTags();var _e=config.views.editor.tagChooser;for(var t=0;t<_d.length;t++){var _10=createTiddlyButton(_5,_d[t][0],_e.tagTooltip.format([_d[t][0]]),config.macros.deliciousTagging.onTagClick);_10.setAttribute("tag",_d[t][0]);_10.setAttribute("tiddler",_a.title);_5.appendChild(document.createTextNode(" "))}}};
//}}}
/***
|''Name:''|~TaggerPlugin ''altered''|
|''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|
***/
// /%
config.tagger={defaults:{label:"tag",tooltip:"Manage tiddler tags",taglist:"true",excludeTags:"",notags:"tiddler has no tags",aretags:"current tiddler tags:",toggletext:"add tags:"}};config.macros.tagger={};config.macros.tagger.arrow=(document.all?"":"");config.macros.tagger.handler=function(_1,_2,_3,_4,_5,_6){var _7=config.tagger.defaults;var _8=_5.parseParams("tagman",null,true);var _9=((_8[0].label)&&(_8[0].label[0])!=".")?_8[0].label[0]+this.arrow:_7.label+this.arrow;var _a=((_8[0].tooltip)&&(_8[0].tooltip[0])!=".")?_8[0].tooltip[0]:_7.tooltip;var _b=((_8[0].taglist)&&(_8[0].taglist[0])!=".")?_8[0].taglist[0]:_7.taglist;var _c=((_8[0].exclude)&&(_8[0].exclude[0])!=".")?(_8[0].exclude[0]).readBracketedList():_7.excludeTags.readBracketedList();if((_8[0].source)&&(_8[0].source[0])!="."){var _d=_8[0].source[0];}if(_d&&!store.getTiddler(_d)){return false;}var _e=function(e){if(!e){var e=window.event;}var _11=Popup.create(this);var _12=store.getTags();var _13=new Array();for(var i=0;i<_12.length;i++){_13.push(_12[i][0]);}if(_d){var _15=store.getTiddler(_d);_13=_15.tags.sort();}var _16=_6.tags.sort();var _17=function(_18,_19,_1a){var sp=createTiddlyElement(createTiddlyElement(_11,"li"),"span",null,"tagger");var _1c=createTiddlyButton(sp,_18,_1a+" '"+_19+"'",taggerOnToggle,"button","toggleButton");_1c.setAttribute("tiddler",_6.title);_1c.setAttribute("tag",_19);insertSpacer(sp);if(window.createTagButton_orig_mptw){createTagButton_orig_mptw(sp,_19)}else{createTagButton(sp,_19);}};createTiddlyElement(_11,"li",null,"listTitle",(_6.tags.length==0?_7.notags:_7.aretags));for(var t=0;t<_16.length;t++){_17("[x]",_16[t],"remove tag ");}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");if(_b!="false"){createTiddlyElement(_11,"li",null,"listTitle",_7.toggletext);for(var i=0;i<_13.length;i++){if(!_6.tags.contains(_13[i])&&!_c.contains(_13[i])){_17("[ ]",_13[i],"add tag ");}}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");}var _1f=createTiddlyButton(createTiddlyElement(_11,"li"),("Create new tag"),null,taggerOnToggle);_1f.setAttribute("tiddler",_6.title);if(_d){_1f.setAttribute("source",_d);}Popup.show(_11,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};createTiddlyButton(_1,_9,_a,_e,"button","taggerDrpBtn");};window.taggerOnToggle=function(e){var tag=this.getAttribute("tag");var _22=this.getAttribute("tiddler");var _23=store.getTiddler(_22);if(!tag){var _24=prompt("Enter new tag:","");if(_24!=""&&_24!=null){var tag=_24;if(this.getAttribute("source")){var _26=store.getTiddler(this.getAttribute("source"));_26.tags.pushUnique(_24);}}else{return false;}}if(!_23||!_23.tags){store.saveTiddler(_22,_22,"",config.options.txtUserName,new Date(),tag);}else{if(_23.tags.find(tag)==null){_23.tags.push(tag);}else{if(!_24){_23.tags.splice(_23.tags.find(tag),1);}}store.saveTiddler(_23.title,_23.title,_23.text,_23.modifier,_23.modified,_23.tags);}story.refreshTiddler(_22,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(_27,_28,_29){for(var i=0;i<_27.tags.length;i++){if(_27.tags[i]==_28){_27.tags[i]=_29;return true;}}return false;};window.lewcidRenameTag=function(e){var tag=this.getAttribute("tag");var _2d=prompt("Rename tag '"+tag+"' to:",tag);if((_2d==tag)||(_2d==null)){return false;}if(store.tiddlerExists(_2d)){if(confirm(config.messages.overwriteWarning.format([_2d.toString()]))){story.closeTiddler(_2d,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,_2d);}}if(store.tiddlerExists(tag)){store.saveTiddler(tag,_2d);}if(document.getElementById("tiddler"+tag)){var _2f=document.getElementById(story.idPrefix+tag);var _30=story.positionTiddler(_2f);var _31=document.getElementById(story.container);story.closeTiddler(tag,false,false);story.createTiddler(_31,_30,_2d,null);story.saveTiddler(_2d);}if(config.options.chkAutoSave){saveChanges();}return false;};window.onClickTag=function(e){if(!e){var e=window.event;}var _34=resolveTarget(e);var _35=(!isNested(_34));if((Popup.stack.length>1)&&(_35==true)){Popup.removeFrom(1);}else{if(Popup.stack.length>0&&_35==false){Popup.removeFrom(0);}}var _36=(_35==false)?"popup":"nestedtagger";var _37=createTiddlyElement(document.body,"ol",_36,"popup",null);Popup.stack.push({root:this,popup:_37});var tag=this.getAttribute("tag");var _39=this.getAttribute("tiddler");if(_37&&tag){var _3a=store.getTaggedTiddlers(tag);var _3b=[];var li,r;for(r=0;r<_3a.length;r++){if(_3a[r].title!=_39){_3b.push(_3a[r].title);}}var _3d=config.views.wikified.tag;if(_3b.length>0){var _3e=createTiddlyButton(createTiddlyElement(_37,"li"),_3d.openAllText.format([tag]),_3d.openAllTooltip,onClickTagOpenAll);_3e.setAttribute("tag",tag);createTiddlyElement(createTiddlyElement(_37,"li"),"hr");for(r=0;r<_3b.length;r++){createTiddlyLink(createTiddlyElement(_37,"li"),_3b[r],true);}}else{createTiddlyText(createTiddlyElement(_37,"li",null,"disabled"),_3d.popupNone.format([tag]));}createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var h=createTiddlyLink(createTiddlyElement(_37,"li"),tag,false);createTiddlyText(h,_3d.openTag.format([tag]));createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var _40=createTiddlyButton(createTiddlyElement(_37,"li"),("Rename tag '"+tag+"'"),null,lewcidRenameTag);_40.setAttribute("tag",tag);}Popup.show(_37,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};if(!window.isNested){window.isNested=function(e){while(e!=null){var _42=document.getElementById("contentWrapper");if(_42==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:''|DeprecatedFunctionsPlugin ''compressed''|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin){version.extensions.DeprecatedFunctionsPlugin={installed:true};config.formatterHelpers.charFormatHelper=function(w){w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);};config.formatterHelpers.monospacedByLineHelper=function(w){var _3=new RegExp(this.lookahead,"mg");_3.lastIndex=w.matchStart;var _4=_3.exec(w.source);if(_4&&_4.index==w.matchStart){var _5=_4[1];if(config.browser.isIE){_5=_5.replace(/\n/g,"\r");}createTiddlyElement(w.output,"pre",null,null,_5);w.nextMatch=_3.lastIndex;}};config.macros.br={};config.macros.br.handler=function(_6){createTiddlyElement(_6,"br");};Array.prototype.find=function(_7){var i=this.indexOf(_7);return i==-1?null:i;};Tiddler.prototype.loadFromDiv=function(_9,_a){return store.getLoader().internalizeTiddler(store,this,_a,_9);};Tiddler.prototype.saveToDiv=function(){return store.getSaver().externalizeTiddler(store,this);};function allTiddlersAsHtml(){return store.allTiddlersAsHtml();}function applyPageTemplate(_b){refreshPageTemplate(_b);}function displayTiddlers(_c,_d,_e,_f,_10,_11,_12){story.displayTiddlers(_c,_d,_e,_11);}function displayTiddler(_13,_14,_15,_16,_17,_18,_19){story.displayTiddler(_13,_14,_15,_18);}var createTiddlerPopup=Popup.create;var scrollToTiddlerPopup=Popup.show;var hideTiddlerPopup=Popup.remove;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");}
//}}}
/***
|''Name:''|PreserveSpaceInTitlePlugin ''compressed''|
***/
//{{{
Story.prototype.saveTiddler=function(_1,_2){var _3=document.getElementById(this.idPrefix+_1);if(_3!=null){var _4={};this.gatherSaveFields(_3,_4);var _5=_4.title?_4.title:_1;if(store.tiddlerExists(_5)&&_5!=_1){if(!confirm(config.messages.overwriteWarning.format([_5.toString()]))){return null;}}if(_5!=_1){this.closeTiddler(_5,false);}_3.id=this.idPrefix+_5;_3.setAttribute("tiddler",_5);_3.setAttribute("template",DEFAULT_VIEW_TEMPLATE);_3.setAttribute("dirty","false");if(config.options.chkForceMinorUpdate){_2=!_2;}if(!store.tiddlerExists(_5)){_2=false;}var _6=new Date();var _7=store.tiddlerExists(_5)?store.fetchTiddler(_5).fields:(_5!=_1&&store.tiddlerExists(_1)?store.fetchTiddler(_1).fields:{});for(var n in _4){if(!TiddlyWiki.isStandardField(n)){_7[n]=_4[n];}}var _9=store.saveTiddler(_1,_5,_4.text,_2?undefined:config.options.txtUserName,_2?undefined:_6,_4.tags,_7);autoSaveChanges(null,[_9]);return _5;}return null;};
//}}}
<<closeAll>><<tiddler Go>><<collapseAll>><<autoLayout>><<expandAll>><<saveLayout>><<restoreLayout>><<renameButton restore>><<tiddler ToggleTopMenu>><<tiddler Search>>
/***
|''Name:''|DisableStrikeThroughPlugin|
|''Description:''|Allows you to disable TiddlyWiki's automatic linking of WikiWords|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#DisableStrikeThroughPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/DisableStrikeThroughPlugin.js |
|''Version:''|0.0.1|
|''Date:''|Feb 18, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.1.0|
***/
//{{{
// Ensure that the DisableStrikeThroughPlugin is only installed once.
if(!version.extensions.DisableStrikeThroughPlugin) {
version.extensions.DisableStrikeThroughPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('DisableStrikeThroughPlugin requires TiddlyWiki 2.1 or newer.');}
DisableStrikeThroughPlugin = {};
DisableStrikeThroughPlugin.replaceFormatters = function()
{
for(var i=0; i<config.formatters.length; i++) {
var name = config.formatters[i].name;
if(name == 'characterFormat') {
config.formatters[i].match = "''|//|__|\\^\\^|~~|\\{\\{\\{";
break;
} else if(name == 'strikeByChar') {
config.formatters.splice(i,1);
break;
}
}
};
DisableStrikeThroughPlugin.replaceFormatters();
} // end of 'install only once'
//}}}
<<tiddler LoadLocalWithRefresh with: DisableWikiLinks DisableWikilinksPlugin.js>>
/***
<<tiddler DividedListsPluginDocumentation>>
!Code
***/
//{{{
version.extensions.DividedListsPlugin = { major: 1, minor: 1, revision: 0, date: new Date(2006,17,3),
source: "http://yann.perrin.googlepages.com/twkd.html#DividedListsPlugin"
};
//}}}
/***
// //Partial Tiddler List
***/
//{{{
config.macros.listPart = {};
config.macros.listPart.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
var type = params[0] ? params[0] : "all";
var theList = document.createElement("ul");
place.appendChild(theList);
if(config.macros.list[type].prompt)
createTiddlyElement(theList,"li",null,"listTitle",config.macros.list[type].prompt);
var results;
if(config.macros.list[type].handler)
results = config.macros.list[type].handler(params);
var model = new RegExp("^["+params[1]+"]","i");
for (var t = 0; t < results.length; t++)
{
var theListItem = document.createElement("li")
if(typeof results[t] == "string")
{
if (model.test(results[t]))
{
theList.appendChild(theListItem);
createTiddlyLink(theListItem,results[t],true);
}
}
else
{
if (model.test(results[t].title))
{
theList.appendChild(theListItem);
createTiddlyLink(theListItem,results[t].title,true);
}
}
}
}
//}}}
// //Partial Tag List
//{{{
config.macros.tagListPart = {};
config.macros.tagListPart.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
var model = new RegExp("^["+params[0]+"]","i");
var tags = store.getTags();
var theDateList = createTiddlyElement(place,"ul",null,null,null);
if(tags.length == 0)
createTiddlyElement(theDateList,"li",null,"listTitle",config.macros.allTags.noTags);
for (var t=0; t<tags.length; t++) {
if (model.test(tags[t])) {
var theListItem =createTiddlyElement(theDateList,"li",null,null,null);
var theTag = createTiddlyButton(theListItem,tags[t][0] + " (" + tags[t][1] + ")",config.macros.allTags.tooltip.format([tags[t][0]]),onClickTag);
theTag.setAttribute("tag",tags[t][0]);
}
}
}
//}}}
/***
// //Defining shadow tiddlers
***/
//{{{
function defineTabShadow (listType,tabsTitle,containerTitle)
{
var tabdef = "<<tabs txtTabbedList" + listType + " ";
for (var t = 0; t < tabsTitle.length; t++)
{
tabdef += tabsTitle[t] + " 'Tiddlers in " + tabsTitle[t] +"' " + listType.toUpperCase()+tabsTitle[t] + " ";
if (containerTitle != 'TabTags')
config.shadowTiddlers[listType.toUpperCase()+tabsTitle[t]]="<<listPart " + listType + " " + tabsTitle[t] + ">>";
else
config.shadowTiddlers[listType.toUpperCase()+tabsTitle[t]]="<<tagListPart " + tabsTitle[t] + ">>";
}
tabdef += ">>";
config.shadowTiddlers[containerTitle]=tabdef;
}
tabs=['a-e','f-j','k-o','p-s','t-z','\\W'];
defineTabShadow('all',tabs,'TabAll');
defineTabShadow('tags',tabs,'TabTags');
defineTabShadow('missing',tabs,'TabMoreMissing');
defineTabShadow('orphans',tabs,'TabMoreOrphans');
defineTabShadow('shadowed',tabs,'TabMoreShadowed');
config.shadowTiddlers.DividedListsPluginDocumentation = "Documentation for this plugin is available [[here|" + version.extensions.DividedListsPlugin.source +"Documentation]]";
//}}}
// // Optionally replace timeline by a calendar
//{{{
if (config.macros.calendar!=undefined)
{
if (config.options.chkCalendarAsTimeline==undefined)
config.options.chkCalendarAsTimeline=false;
config.shadowTiddlers.AdvancedOptions +="\n<<option chkCalendarAsTimeline>> Replace timeline with a calendar of the current month";
if (config.options.chkCalendarAsTimeline)
config.shadowTiddlers.TabTimeline = "<<calendar thismonth>>";
}
//}}}
<<tiddler LoadLocalPlugin with: TiddlerWithEdit TiddlerWithEditPlugin.js>>
<<tiddler LoadLocalPlugin with: TabWithEdit TabEditPlugin.js>>
<<tiddler LoadLocalPlugin with: MenuWithEdit MenuEditPlugin.js>>
{{tiny{Right click and save as:}}}
[[This TiddlyDesktop file|http://vipa.3host.biz/TiddlyDesktop.html]]
[[TiddlyWiki core|http://vipa.3host.biz/twcore.js]]
[[TiddlyMasterPlugin|http://vipa.3host.biz/TiddlyMasterPlugin.js]]
* Intro
** {{topMenu{<<tiddlerList tags:intro format:stack>>}}}
* Done
** {{topMenu{<<tiddlerList tags:fixed format:stack>>}}}
* ToDo
** {{topMenu{<<tiddlerList tags:todo format:stack>>}}}
* Layout
** {{topMenu{<<tiddler Lay>>}}}
* Loading
** {{topMenu{<<tiddler Get>>}}}
* Edit
** {{topMenu{<<tiddler New>>}}}
* System
** {{topMenu{<<tiddler Sys>>}}}
<<dropMenu vertical>><<moveablePanel noedges>>
/***
|''Name:''|DropDownMenuPlugin ''altered''|
|''Description:''|Create dropdown menus from unordered lists|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#DropDownMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|11/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.dropMenu={
dropdownchar: "\u200B", /* dropdownchar altered */
handler : function(place,macroName,params,wikifier,paramString,tiddler){
list = findRelated(place.lastChild,"UL","tagName","previousSibling");
if (!list)
return;
addClass(list,"suckerfish");
if (params.length){
addClass(list,paramString);
}
this.fixLinks(list);
},
fixLinks : function(el){
var els = el.getElementsByTagName("li");
for(var i = 0; i < els.length; i++) {
if(els[i].getElementsByTagName("ul").length>0){
var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
if(!link){
var ih = els[i].firstChild.data;
els[i].removeChild(els[i].firstChild);
var d = createTiddlyElement(null,"a",null,null,ih+this.dropdownchar,{href:"javascript:;"});
els[i].insertBefore(d,els[i].firstChild);
}
else{
link.firstChild.data = link.firstChild.data + this.dropdownchar;
removeClass(link,"tiddlyLinkNonExisting");
}
}
els[i].onmouseover = function() {
addClass(this, "sfhover");
};
els[i].onmouseout = function() {
removeClass(this, "sfhover");
};
}
}
};
config.shadowTiddlers["StyleSheetDropDownMenuPlugin"] =
"/*{{{*/\n"+
"/***** LAYOUT STYLES - DO NOT EDIT! *****/\n"+
"ul.suckerfish, ul.suckerfish ul {\n"+
" margin: 0;\n"+
" padding: 0;\n"+
" list-style: none;\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" display: inline-block; \n"+
" display: block;\n"+
" float: left; \n"+
"}\n\n"+
"ul.suckerfish li ul {\n"+
" position: absolute;\n"+
" left: -999em;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul {\n"+
" left: auto;\n"+
"}\n\n"+
"ul.suckerfish ul li {\n"+
" float: none;\n"+
" border-right: 0;\n"+
" border-left:0;\n"+
"}\n\n"+
"ul.suckerfish a, ul.suckerfish a:hover {\n"+
" display: block;\n"+
"}\n\n"+
"ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}\n"+
"/**** END LAYOUT STYLES *****/\n"+
"\n\n"+
"/**** COLORS AND APPEARANCE - DEFAULT *****/\n"+
"ul.suckerfish li a {\n"+
" padding: 0.5em 1.5em;\n"+
" color: #FFF;\n"+
" background: #0066aa;\n"+
" border-bottom: 0;\n"+
" font-weight:bold;\n"+
"}\n\n"+
"ul.suckerfish li:hover a, ul.suckerfish li.sfhover a{\n"+
" background: #00558F;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a{\n"+
" color: #000;\n"+
" background: #eff3fa;\n"+
" border-top:1px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish ul li a:hover {\n"+
" background: #e0e8f5;\n"+
"}\n\n"+
"ul.suckerfish li a{\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish ul li a, ul.suckerfish ul li a:hover{\n"+
" display:inline-block;\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" border-left: 1px solid #00558F;\n"+
"}\n"+
"/***** END COLORS AND APPEARANCE - DEFAULT *****/\n"+
"\n\n"+
"/***** LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"ul.suckerfish.vertical li{\n"+
" width:10em;\n"+
" border-left: 0px solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a {\n"+
" border-left: 0.8em solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a, ul.suckerfish.vertical li.sfhover a:hover{\n"+
" width:8em;\n"+
"}\n\n"+
"ul.suckerfish.vertical {\n"+
" width:10em; text-align:left;\n"+
" float:left;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a {\n"+
" padding: 0.5em 1em 0.5em 1em;\n"+
" border-top:1px solid #fff;\n"+
"}\n\n"+
"ul.suckerfish.vertical, ul.suckerfish.vertical ul {\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul { \n"+
" margin: -2.4em 0 0 10.9em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a {\n"+
" border: 0px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{\n"+
" padding-right:1.1em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li {\n"+
" border-bottom:1px solid #fff;\n"+
"}\n\n"+
"/***** END LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"/*}}}*/";
store.addNotification("StyleSheetDropDownMenuPlugin",refreshStyles);
//!END-PLUGIN-CODE
// %/
<<tiddler LoadLocalPlugin with: E.A.S.E e_a_s_e.js>>
<<tiddler LoadLocalPlugin with: easyFormat EasyFormat.js>>
<<tiddler LoadLocalPlugin with: easySlicer EasySlicer.js>>
<<tiddler LoadLocalWithRefresh with: EasyEdit EasyEditPlugin.js>>
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::SecondaryMid]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump fullscreen collapseTiddler closeTiddler'></span>
<span class='title' macro='view title'></span></div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler backup autosizeEditor'></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span class='toolbar' macro='tiddler ToggleFullscreen'></span> </div>
<span class='editor' macro='edit title'></span>
<span macro='tiddler QuickEditToolbar'></span>
<div macro='annotations'></div>
<div class='editor' macro='easyEdit text'></div>
<div class='editor' macro='edit tags'></div>
<span macro='resizeEditor'>
<div class='editorFooter' macro='deliciousTagging'></div>
<div macro='sizer' class='sizer'></div>
</div>
<!--}}}-->
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::SecondaryMid]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump collapseTiddler closeOthers closeTiddler'></span>
<span class='title' macro='view title'></span></div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler backup wikibar previewTiddler richText autosizeEditor'>
<span class='toolbar' macro='tiddler QuickEditToolbarCommand'></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span class='toolbar' macro='tiddler ToggleFullscreen'></span> </div>
<span class='editor' macro='edit title'></span>
<span macro='tiddler QuickEditToolbar_a'></span>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div>
<span macro='resizeEditor'></span>
<div class='editorFooter' macro='deliciousTagging'></div>
<div macro='sizer' class='sizer'></div>
</div>
<!--}}}-->
<script label="EnableEdit" title="Enables editing and backstage functionalities, also disables animations">if (window.version && window.config && window.store && window.story){readOnly=false;if(window.backstage){if(!backstage.button)backstage.init();backstage.show();}config.options.chkAnimate=false;refreshDisplay();}</script>
<script label="EnlargeEditBox" title="Enlarge the edit text area by 5 rows">
for(i=0;
x=document.getElementsByTagName("textarea")[i];
++i) x.rows += 5;
</script>
<html><p align="center"><textarea id="xclToTw" rows="10" cols="60"></textarea><button onclick="(function(){var ta=document.getElementById('xclToTw'); displayMessage('original: ' + ta.value); ta.value=ta.value.replace(/^|$|\t/gm, '|');})();" >
Translate</button></p></html>
When you jump to a closed tiddler using the # button it should be expanded as well as being brought to the front
<<tiddler LoadLocalWithPanel with: ExportTiddlers ExportTiddlersPlugin.js>>
<<tiddler LoadLocalPlugin with: ExternalTiddlers ExternalTiddlersPlugin.js>>
<<tiddler LoadLocalWithRefresh with: Externalize ExternalizePlugin.js>>
<<tiddler LoadLocalPlugin with: FieldEditor FieldEditorPlugin.js>>
<<tiddler LoadLocalPlugin with: FileDrop FileDropPlugin.js>>
<<tiddler LoadLocalPlugin with: FileDropConfig FileDropPluginConfig.js>>
Make the layout and styles work with the latest 2.0 release
/***
|''Name:''|FontSizePlugin ''altered''|
|''Description:''|Resize tiddler text on the fly. The text size is remembered between sessions.|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#FontSizePlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.2|
***/
// /%
//!BEGIN-PLUGIN-CODE
config.fontSize={};
//configuration settings
config.fontSize.settings =
{
defaultSize : 100, // all sizes in %
maxSize : 200,
minSize : 40,
stepSize : 10
};
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
var sp = createTiddlyElement(place,"span",null,"fontResizer");
sp.ondblclick=this.onDblClick;
if (params[0])
createTiddlyText(sp,params[0]);
createTiddlyButton(sp,"+","increase font-size",this.incFont);
createTiddlyButton(sp,"=","reset font-size",this.resetFont);
createTiddlyButton(sp,"–","decrease font-size",this.decFont);
};
config.macros.fontSize.onDblClick = function (e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;
};
config.macros.fontSize.setFont = function ()
{
saveOptionCookie("txtFontSize");
setStylesheet(".tiddler .viewer,.tiddler .editor {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
};
config.macros.fontSize.incFont=function()
{
if (config.options.txtFontSize < config.fontSize.settings.maxSize)
config.options.txtFontSize = (config.options.txtFontSize*1)+config.fontSize.settings.stepSize;
config.macros.fontSize.setFont();
};
config.macros.fontSize.decFont=function()
{
if (config.options.txtFontSize > config.fontSize.settings.minSize)
config.options.txtFontSize = (config.options.txtFontSize*1) - config.fontSize.settings.stepSize;
config.macros.fontSize.setFont();
};
config.macros.fontSize.resetFont=function()
{
config.options.txtFontSize=config.fontSize.settings.defaultSize;
config.macros.fontSize.setFont();
};
config.paramifiers.font =
{
onstart: function(v){
config.options.txtFontSize = v;
config.macros.fontSize.setFont();
}
};
config.macros.fontSize.init = function(){
if (!config.options.txtFontSize){
config.options.txtFontSize = config.fontSize.settings.defaultSize;
saveOptionCookie("txtFontSize");
}
setStylesheet(".tiddler .viewer,.tiddler .editor {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");
};
//!END-PLUGIN-CODE
// %/
AllTiddlerBySize
AllTiddlerWithoutTag
AllTiddlerByTag
<<tiddler LoadLocalPlugin with: ForEachTiddler ForEachTiddlerPlugin.js>> [[- Panel only|ForEach]]
Create a Framing div for the tiddler display / edit area:
* ==Contains the buttons / title bar etc==
* ==Scrolls inside this so you don't lose the drag bit==
* Parameterise the minimum tiddler size
/%
|Name|FramedLink|
|Source|http://www.TiddlyTools.com/#FramedLink|
|Version|1.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||
|Overrides||
|Description|create an external link that, when clicked, is displayed in an iframe |
Usage:
<<tiddler FramedLink with: label URL>>
%/{{externalLink{<script label="$1" title="$2">
var f=place.nextSibling.firstChild;
try { f.src="$2"; f.style.display='block'; }
catch(e) { f.style.display='none'; alert(e.description?e.description:e.toString()); }
return false;
</script><html><iframe src="" style="display:none;background:#fff;width:100%;height:300px"></iframe></html>}}}
<<tiddler "ListExtCode load">>
<<tiddler NukeCookies>>
<<tiddlerList tags:"st" itemTemplate:"%text\n">>
<<tiddler ShowPopup with: "WikiBar load" "~WikiBar" "Advanced formatting tools" "" "10em" "">>
<<tiddler ShowPopup with: "DoubleClickEdit load" "~DoubleClickEdit" "Edit all layout elements with double click" "" "8em" "">>
[[More local plugins|MoreToLoad]]
[[More TiddlyWiklets|TiddlyWiklets]]
[[InstantBookmarklets & Wiklets]]
/%
|Name|BreadcrumbsCommand adapted|
|Source|http://www.TiddlyTools.com/#BreadcrumbsCommand|
|Version|1.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|BreadcrumbsPlugin|
|Description|"crumbs" command displays current breadcrumbs list in a popup|
%/<html><hide linebreaks><a href="javascript:;" class="TiddlyLink" title="tiddlers viewed during this session"
onclick="var p=Popup.create(this); if (!p) return;
var d=createTiddlyElement(p,'div');
d.style.whiteSpace='normal'; d.style.width='auto'; d.style.padding='2px';
wikify('\<\<breadcrumbs [[\<html\>\<hr\>\</html\>]] [[<br>]]\>\>',d);
Popup.show(p,false); event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation();
return(false);"
>go</a></html>
<script label="Google" title="Selected Text will be searched by Google">
q=document.getSelection();
for(i=0;
i<frames.length;
i++){q=frames[i].document.getSelection();
if(q)break;
}if(!q)void(q=prompt('Search Google using these keywords:',''));
if(q)void(open('http://www.google.com/search?q='+escape(q),'',''));
return false;
</script>
<<gotoTiddler>><<tiddler Hide>><<moveablePanel noedges>>
<<tiddler LoadLocalWithPanel with: Goto GotoPlugin.js>>
//{{{
config.commands.closeTiddler.text = "✕";
config.commands.closeOthers.text = "☼";
config.commands.editTiddler.text = "✐";
config.commands.saveTiddler.text = "✓";
config.commands.cancelTiddler.text = "✕";
config.messages.messageClose.text = "✕";
config.commands.permalink.text = "☍";
config.commands.references.text = "※"
config.macros.toolbar.moreLabel = "≫";
config.commands.deleteTiddler.text = "∅";
config.commands.autosizeEditor.text = "↕";
config.macros.closeAll.label = "☼";
config.macros.permaview.label = "☍";
config.macros.saveChanges.label = "✓";
config.macros.newTiddler.label = "+";
//}}}
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::SecondaryMid]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump fullscreen collapseTiddler closeTiddler'></span>
<span class='title' macro='view title'></span></div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler backup wikibar previewTiddler autosizeEditor'></span>
<span class='toolbar' macro='tiddler QuickEditToolbarCommand'></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span class='toolbar' macro='tiddler ToggleFullscreen'></span> </div>
<span class='editor' macro='edit title'></span>
<span macro='tiddler QuickEditToolbar'></span>
<div macro='annotations'></div>
<div class='editor' macro='editHtml text 500'></div>
<div class='editor' macro='edit tags'></div>
<span macro='resizeEditor'></span>
<div class='editorFooter' macro='deliciousTagging'></div>
<div macro='sizer' class='sizer'></div>
</div>
<!--}}}-->
/***
|Name|HTMLFormattingPlugin ''compressed''|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.1.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|
|Overrides|'HTML' formatter|
|Description|embed wiki syntax formatting inside of HTML content|
***/
//{{{
version.extensions.HTMLFormatting={major:2,minor:1,revision:5,date:new Date(2007,6,14)};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){this.lookaheadRegExp=new RegExp(this.lookahead,"mg")}this.lookaheadRegExp.lastIndex=w.matchStart;var _3=this.lookaheadRegExp.exec(w.source);if(_3&&_3.index==w.matchStart){var _4=_3[1];if(_4.indexOf("<hide linebreaks>")!=-1){_4=_4.replace(/\n/g," ")}_4=_4.replace(/\r/g,"");_4=_4.replace(/\n/g,"\\n");_4=_4.replace(/<</g,"%%(").replace(/>>/g,")%%");var e=createTiddlyElement(w.output,"span");e.innerHTML=_4;wikifyTextNodes(e);w.nextMatch=this.lookaheadRegExp.lastIndex}}}}function wikifyTextNodes(_6){if(_6.nodeName.toLowerCase()=="textarea"){_6.value=_6.value.replace(/\%%\(/g,"<<").replace(/\)\%%/g,">>").replace(/\\n/g,"\n")}else{for(var i=0;i<_6.childNodes.length;i++){var _8=_6.childNodes.item(i);if(_8.nodeName.toLowerCase()=="option"){continue}if(_8.nodeName.toLowerCase()=="select"){continue}wikifyTextNodes(_8);if(_8.nodeName=="#text"){var _9=_8.nodeValue;_9=_9.replace(/\%%\(/g,"<<").replace(/\)\%%/g,">>").replace(/\\n/g,"\n");var _a=createTiddlyElement(null,"span");_6.replaceChild(_a,_8);wikify(_9,_a)}}}}
//}}}
<<tiddler HideTiddlerTitle>><<tiddler HideTiddlerSubtitle>><<tiddler HideTiddlerToolbar>><<tiddler HideTiddlerBackground>><<tiddler HideTiddlerTags>>
/%
|Name|HideTiddlerBackground|
|Source|http://www.TiddlyTools.com/#HideTiddlerBackground|
|Version|0.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|hide a tiddler's background and border (if any)|
Usage: <<tiddler HideTiddlerBackground>>
%/<script>
var t=story.findContainingTiddler(place);
if (!t || t.id=="HideTiddlerBackground") return;
var nodes=t.getElementsByTagName("*");
for (var i=0; i<nodes.length; i++) if (hasClass(nodes[i],"viewer")) {
var s=nodes[i].style;
s.backgroundImage="none";
s.backgroundColor="transparent"
s.borderColor="transparent";
s.borderWidth=0;
s.margin=0;
s.padding=0;
}
</script>
/%
|Name|HideTiddlerSubtitle|
|Source|http://www.TiddlyTools.com/#HideTiddlerSubtitle|
|Version|0.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|hide a tiddler's subtitle (dates/created by) display|
Usage: <<tiddler HideTiddlerSubtitle>>
%/<script>
var t=story.findContainingTiddler(place);
if (!t || t.id=="tiddlerHideTiddlerSubtitle") return;
var nodes=t.getElementsByTagName("*");
for (var i=0; i<nodes.length; i++)
if (hasClass(nodes[i],"subtitle"))
nodes[i].style.display="none";
</script>
/%
|Name|HideTiddlerTags|
|Source|http://www.TiddlyTools.com/#HideTiddlerTags|
|Version|0.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|hide a tiddler's tagged/tagging display elements|
Usage: <<tiddler HideTiddlerTags>>
%/<script>
var t=story.findContainingTiddler(place);
if (!t || t.id=="tiddlerHideTiddlerTags") return;
var nodes=t.getElementsByTagName("div");
for (var i=0; i<nodes.length; i++)
if (hasClass(nodes[i],"tagging")||hasClass(nodes[i],"tagged"))
nodes[i].style.display="none";
</script>
/%
|Name|HideTiddlerTitle|
|Source|http://www.TiddlyTools.com/#HideTiddlerTitle|
|Version|0.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|hide a tiddler's title display elements (name, dates, and author)|
Usage: <<tiddler HideTiddlerTitle>>
%/<script>
var t=story.findContainingTiddler(place);
if (!t || t.id=="tiddlerHideTiddlerTitle") return;
var nodes=t.getElementsByTagName("*");
for (var i=0; i<nodes.length; i++)
if (hasClass(nodes[i],"title")||hasClass(nodes[i],"subtitle"))
nodes[i].style.display="none";
</script>
/%
|Name|HideTiddlerToolbar|
|Source|http://www.TiddlyTools.com/#HideTiddlerToolbar|
|Version|0.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|hide a tiddler's toolbar display|
Usage: <<tiddler HideTiddlerToolbar>>
%/<script>
var t=story.findContainingTiddler(place);
if (!t || t.id=="tiddlerHideTiddlerToolbar") return;
var nodes=t.getElementsByTagName("*");
for (var i=0; i<nodes.length; i++)
if (hasClass(nodes[i],"toolbar"))
nodes[i].style.display="none";
</script>
<script label="◊" title="Redisplay initial page content without reloading">
story.closeAllTiddlers(); restart(); refreshPageTemplate();
return false;
</script>
<<tiddler ShowPopup with: InlineSearch "find" "Search this TiddlyWiki" "" "" "">><br>
<<closeAll>><br>
<<permaview>><br>
<<saveChanges>><br>
<<tiddler ShowPopup with: SideBarTabs "tab" "See Tables of Content" "" "20em" "">><br>
<<tiddler ShowPopup with: Lay "lay" "Arrange the layout" "" "10em" "">><br>
<<tiddler ShowPopup with: Opt "opt" "Change TiddlyWiki advanced options" "" "16em" "">><br>
<<tiddler ShowPopup with: New "new" "Create new tiddlers and edit" "" "10em" "">><br>
<<tiddler Go>><br>
<<tiddler ToTop>>
<<moveablePanel noedges>>
/*{{{*/
#hoverMenu { float: right; }
#hoverMenu A {border:none; font-weight:bold; padding:0 5px; float:right; }
#hoverMenu A:hover {font-weight:bold; border:none; padding:0 5px; float:right; }
#hoverMenu .button {width:auto; text-align:center;}
#hoverMenu .search .button { display: none; }
#hoverMenu { position:absolute; width:2em;}
/*}}}*/
<!--{{{-->
<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({mode : "textareas", theme : "simple");
</script>
<!--}}}-->
<<importTiddlers inline>>
<<tiddler LoadLocalWithPanel with: ImportTiddlers ImportTiddlersPlugin.js>>
<<tabs txtInclude
Ready 'Ready to include?' TabReady
IncludeOld 'Include old' TabIncludeOld
IncludeNew 'Include new' TabIncludeNew
>>
<<tiddler LoadLocalWithPanel with: Include IncludePlugin.js>>
/***
|Name|InlineJavascriptPlugin ''altered''|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|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|
|Description|Insert Javascript executable code directly into your tiddler content.|
***/
//{{{
version.extensions.inlineJavascript= {major: 1, minor: 7, revision: 0, date: new Date(2007,12,15)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\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 show=lookaheadMatch[4];
var code=lookaheadMatch[5];
if (src) {
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) {
if (show)
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) {
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
link.code="function _out(place){"+fixup+"\n};_out(this);"
link.setAttribute("title",tip?tip:"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
}
else {
var code="function _out(place){"+code.replace(/document.write\s*\(/gi,'place.innerHTML+=(')+"\n};_out(w.output);"
try { var out = eval(code); } 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;
}
}
} )
//}}}
<<inlineSearch>><<tiddler "YourSearch load">>
//{{{
config.macros.inlineSearch = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
var formElement = document.createElement("form");
var aleaQueryId = "Q"+Math.random().toString().substr(3,5);
var aleaTargetId = "T"+Math.random().toString().substr(3,5);
formElement.setAttribute("action","javascript:config.macros.inlineSearch.displayResult('"+aleaQueryId+"','"+aleaTargetId+"')");
var queryField = document.createElement("input");
queryField.setAttribute("type","text");
queryField.setAttribute("id",aleaQueryId);
formElement.appendChild(queryField);
place.appendChild(formElement);
var targetElement=createTiddlyElement(null,"div",null,"searchResults");
targetElement.setAttribute("id",aleaTargetId);
place.appendChild(targetElement);
},
displayResult:function(inputId,resultId) {
var queryElement = document.getElementById(inputId);
var targetElement = document.getElementById(resultId);
if (targetElement) {
removeChildren(targetElement);
if (queryElement&&queryElement.value) {
var list=createTiddlyElement(targetElement,"ul");
var titles=store.search(new RegExp(queryElement.value,"mgi"));
for(var cpt=0;cpt<titles.length;cpt++) createTiddlyLink(createTiddlyElement(list,"li",null,"listLink"), titles[cpt].title, titles[cpt].title);
}
}
}
}
//}}}
/***
''Source:'' http://tw.lewcid.org/sandbox/
''altered:'' to replace NestedSlidersPlugin's dependencies
***/
//{{{
config.formatters.unshift( {
name: "inlinesliders",
match: "\\+\\+\\+|\\<slider",
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[1] + " "+"\u200B",lookaheadMatch[1],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = "none";
wikify(lookaheadMatch[2],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;
}
})
//}}}
<script>
function bob() {
if (window.trackingFocus!=true) {
window.lastFocusedElement = null;
window.focusedElement = null;
window.trackingFocus = true;
document.addEventListener("focus", function(event) { if ((event.target.type=='textarea') && (event.target.name!='tabSepTable')) window.lastFocusedElement = event.target }, true);
}
}
bob();
</script>
<html><form name="FindAndInsertForm1" OnClick="addedBit=FindAndInsertForm1.insertText.value;lfe=window.lastFocusedElement;se=lfe.selectionEnd;sl=lfe.selectionEnd-lfe.selectionStart;lfe.value=lfe.value.substring(0,lfe.selectionStart)+addedBit+lfe.value.substring(se);lfe.focus();lfe.selectionStart=se+addedBit.length-sl;lfe.selectionEnd=se+addedBit.length-sl;">
<INPUT type=hidden name="insertText"><u>Insert character</u><div><INPUT TYPE="button" NAME="fileName" value="µ" OnClick="FindAndInsertForm1.insertText.value=this.value"' class="insBtn"><INPUT TYPE="button" NAME="fileName" value="β" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="α" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="γ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="±" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="¼" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="½" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="¾" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="÷" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="≅" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="≠" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="≤" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="≥" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="¹" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="²" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="³" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="∴" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="∑" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="✓" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="⇌" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="⇑" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="⇓" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="⇐" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="⇒" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"></div></form></form></html>
<script>
function bob() {
if (window.trackingFocus!=true) {
window.lastFocusedElement = null;
window.focusedElement = null;
window.trackingFocus = true;
document.addEventListener("focus", function(event) { if ((event.target.type=='textarea') && (event.target.name!='tabSepTable')) window.lastFocusedElement = event.target }, true);
}
}
bob();
</script>
<html><form name="FindAndInsertForm1" OnClick="addedBit=FindAndInsertForm1.insertText.value;lfe=window.lastFocusedElement;se=lfe.selectionEnd;sl=lfe.selectionEnd-lfe.selectionStart;lfe.value=lfe.value.substring(0,lfe.selectionStart)+addedBit+lfe.value.substring(se);lfe.focus();lfe.selectionStart=se+addedBit.length-sl;lfe.selectionEnd=se+addedBit.length-sl;">
<INPUT type=hidden name="insertText"><u>Insert character</u><div><INPUT TYPE="button" NAME="fileName" value="Ā" OnClick="FindAndInsertForm1.insertText.value=this.value"' class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ā" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ī" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ī" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ū" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ū" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ḍ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ḍ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ḷ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ḷ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ṁ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ṁ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ṃ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ṃ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ṅ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ṅ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ṇ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ṇ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ṭ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ṭ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="Ñ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"><INPUT TYPE="button" NAME="fileName" value="ñ" OnClick="FindAndInsertForm1.insertText.value=this.value" class="insBtn"></div></form></form></html>
/***
|Name|InstantBookmarklets|
|Source|http://www.TiddlyTools.com/#InstantBookmarklets|
|Version|1.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|
|Description|instantly create bookmarklets by dragging onclick links to the browser toolbar|
If you use InlineJavascripPlugin's {{{<script>}}} syntax with the 'label="..."' option, then instead of immediately processing the associated javascript code, the plugin creates linked text that directly invokes the javascript code whenever that link is clicked on.
In addition, the plugin automatically generates a URI-encoded "bookmarklet"-ready version of the script code, which it binds to the HREF of the "onclick" link, allowing you to simply drag-and-drop the link onto the browser's toolbar (or right-click and use the "bookmark this link" menu command) to save the encoded script as a stand-alone "bookmarklet" toolbar item (or bookmark). That's it! The URI-encoded script is automatically saved in the browser's toolbar/bookmarks, and can then be invoked directly from the toolbar/bookmarks, without requiring access to (or even a copy of) the document in which the original "onclick" script was defined!!
Note: Typically, an "onclick" script defined with InlineJavascriptPlugin can use an automatically-defined context variable, "place", to generate output into the tiddler in which the script is embedded. However, because a saved bookmarklet script is not embedded in any tiddler content (in fact, it's not even embedded in a *document*), there is no current rendering context and "place" is UNDEFINED. If you create a bookmarklet from an "onclick" script does refer to "place", it will halt and report a "Reference Error" when that bookmarklet is invoked.
Also, in addition to not using "place" within bookmarklets, you must not include a double-quote character (") anywhere in the original onclick script, due to the syntax needed by the browser to invoke a URI-encoded bookmarklet script. If a double-quote DOES occur in the original script code, the stored bookmarklet will report a "syntax error" when invoked. To create a valid bookmarklet, use only single-quotes (') within the script code.
***/
{{nowrap{
__[[InstantBookmarklets:|InstantBookmarklets]]{{fine{// drag these links to your browser toolbar!//}}}__
//~TiddlyWiklets: {{fine{(TiddlyWiki "tear-off" utilities)}}}///%
========================== TOGGLE SITE TITLES %/
*<script label="▲ toggle titles" title="show/hide SiteTitle and SiteSubtitle (header) content">
var c=document.getElementById('contentWrapper'); if (!c) return;
for (var i=0; i<c.childNodes.length; i++)
if (hasClass(c.childNodes[i],'header')) { var h=c.childNodes[i]; break; }
if (!h) return;
config.options.chkHideSiteTitles=h.style.display!='none';
h.style.display=config.options.chkHideSiteTitles?'none':'block';
saveOptionCookie('chkHideSiteTitles');
return false;
</script>/%
========================== TOGGLE LEFT SIDEBAR %/
*<script label="◄ toggle left sidebar" title="show/hide MainMenu content">
var mm=document.getElementById('mainMenu'); if (!mm) return;
var show=mm.style.display=='none';
if (!show) { mm.style.display='none'; var margin='1em'; }
else { mm.style.display='block'; var margin=config.options.txtDisplayAreaLeftMargin||''; }
document.getElementById('displayArea').style.marginLeft=margin;
config.options.chkShowLeftSidebar=show;
saveOptionCookie('chkShowLeftSidebar');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
return false;
</script>/%
========================== TOGGLE RIGHT SIDEBAR %/
*<script label="► toggle right sidebar" title="show/hide SideBarOptions content">
var sb=document.getElementById('sidebar'); if (!sb) return;
var show=sb.style.display=='none';
if (!show) { sb.style.display='none'; var margin='1em'; }
else { sb.style.display='block'; var margin=config.options.txtDisplayAreaRightMargin||''; }
document.getElementById('displayArea').style.marginRight=margin;
config.options.chkShowRightSidebar=show;
saveOptionCookie('chkShowRightSidebar');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
return false;
</script>/%
========================== TOGGLE ANIMATION EFFECTS %/
*<script label="∞ toggle animation effects" title="enable/disable animation effects">
config.options.chkAnimate=!config.options.chkAnimate;
saveOptionCookie('chkAnimate');
displayMessage('Animation effects are: '+(config.options.chkAnimate?'ON':'OFF'));
return false;
</script>/%
========================== TOGGLE "FULLSCREEN" (SIDEBARS AND TITLES) %/
*<script label="= toggle fullscreen" title="show/hide header (SiteTitle/SiteSubtitle) and sidebars (MainMenu/SideBarOptions)">
/* HEADER */
var c=document.getElementById('contentWrapper'); if (!c) return;
for (var i=0; i<c.childNodes.length; i++)
if (hasClass(c.childNodes[i],'header')) { var h=c.childNodes[i]; break; }
if (!h) return false;
config.options.chkFullScreen=!config.options.chkFullScreen;
var show=!config.options.chkFullScreen;
h.style.display=show?'block':'none';
config.options.chkFullscreen=!show;
/* MAIN MENU */
var da=document.getElementById('displayArea');
var mm=document.getElementById('mainMenu'); if (!mm) return false;
if (mm) {
if (show && config.options.chkShowLeftSidebar!==false) {
mm.style.display='block';
da.style.marginLeft=config.options.txtDisplayAreaLeftMargin||'';
} else {
mm.style.display='none';
da.style.marginLeft='1em';
}
}
/* SIDE BAR */
var sb=document.getElementById('sidebar'); if (!sb) return false;
if (sb) {
if (show && config.options.chkShowRightSidebar!==false) {
sb.style.display='block';
da.style.marginRight=config.options.txtDisplayAreaRightMargin||'';
} else {
sb.style.display='none';
da.style.marginRight='1em';
}
}
/* STORY MENU */
var sm=document.getElementById('storyMenu');
if (sm) sm.style.display=show?'block':'none';
/* BREADCRUMBS */
if (config.macros.breadcrumbs!=undefined) {
var bc=document.getElementById('breadCrumbs');
var showcrumbs=config.options.chkShowBreadcrumbs && config.macros.breadcrumbs.crumbs.length;
if (bc) bc.style.display=show&&showcrumbs?'block':'none';
}
return false;
</script>/%
========================== RESTART WITHOUT RELOADING %/
*<script label="⌂ Home (redisplay initial page content)" title="Restart initial page content WITHOUT RELOADING!">
story.closeAllTiddlers(); restart(); refreshPageTemplate();
return false;
</script>/%
========================== REFRESH WITHOUT RESTARTING %/
*<script label="≈ Refresh (redisplay current page content)" title="Redisplay current page content WITHOUT RESTARTING!">
story.forEachTiddler(function(t,e){story.refreshTiddler(t,null,true)});
refreshDisplay();
return false;
</script>/%
========================== SHOW CURRENT VERSION, TIMESTAMP, and TIDDLER INFO %/
*<script label="[i] Show TiddlyWiki document info..." title="Show TiddlyWiki version, filedate and tiddler summary">
if (window.version) {
var ver=version.major+'.'+version.minor+'.'+version.revision;
var tids=window.store.getTiddlers('modified').reverse();
var plugins=window.store.getTaggedTiddlers('systemConfig','modified').reverse();
var msg='TiddlyWiki version: '+ver
+'\nDocument modified: '+document.lastModified
+'\nLast tiddler changed: '+tids[0].title
+'\n\nThere are a total of '+tids.length+' tiddlers,'
+' including '+plugins.length+' plugins:\n\n';
msg+=plugins.map(function(t){
return t.modified.formatString('YYYY.0MM.0DD 0hh:0mm:0ss')+' | '+t.title; }).join('\n');
alert(msg);
}
return false;
</script>/%
========================== RESET TIDDLYWIKI OPTION COOKIES (WITH CONFIRM) %/
*<script label="∗ Reset all cookie options..." title="Clears all TiddlyWiki options stored in browser cookies (w/confirmation)">
var opts=new Array(); var p=document.cookie.split('; ');
for (var i=0;i<p.length;i++){
var c=p[i]; var v=''; var pos=p[i].indexOf('=');
if (pos!=-1) { c=p[i].substr(0,pos); v=unescape(p[i].slice(pos+1)); }
if (config.options[c]!==undefined) opts.push(c);
} opts.sort();
var msg='There are '+opts.length+' option cookies:\n\n'+opts.join(', ');
msg+='\n\nPress OK to proceed, or press CANCEL to keep options unchanged'; if (!confirm(msg)) return false;
var msg='Press OK reset all options at once, or press CANCEL to confirm each option, one at a time';
var quiet=confirm(msg);
for (var i=0;i<opts.length;i++) {
if (quiet || confirm('Press OK to reset option: '+opts[i])) {
var ex=new Date(); ex.setTime(ex.getTime()-1000);
document.cookie=opts[i]+'=deleted; path=/; expires='+ex.toGMTString();
}
}
return false;
</script>/%
========================== CLEAR CHANGE COUNTERS %/
*<script label="∅ Reset tiddler change counters..." title="remove change counters from all tiddlers in this document">
var msg="Are you sure you want to remove the change counters from these tiddlers:\n\n";
var t=store.getTiddlers("title"); var tids=[];
for (var i=0;i<t.length;i++) {
var v=store.getValue(t[i],"changecount");
if (v) { msg+=t[i].title+" ("+v+")\n"; tids.push(t[i]); }
}
msg+="\nPress OK to proceed";
if (!confirm(msg)) return false;
for (var i=0;i<tids.length;i++) tids[i].clearChangeCount();
displayMessage("Change counters have been reset to 0");
displayMessage("Don't forget to save your document!");
return false;
</script>/%
========================== LOAD REMOTE PLUGINS... %/
//Load remote plugins: {{fine{(load on demand)}}}///%
========================== Abego Software (Udo Borkowski)...%/
*[[Abego Software|http://tiddlywiki.abego-software.de/]]{{block{/%
========================== LOAD YOURSEARCH PLUGIN
%/<script label="YourSearchPlugin" title="Load YourSearchPlugin from tiddlywiki.abego-software.de">
var script=document.createElement('script');
script.src='http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/Plugin-YourSearch-src.2.1.1.js';
script.onload=function(){
refreshPageTemplate();
alert('YourSearchPlugin has been loaded.');
};
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>/%
%/}}}/%
========================== TiddlyTools (Eric Shulman)...%/
*[[TiddlyTools|http://www.TiddlyTools.com/]]{{block{/%
========================== LOAD IMPORT TIDDLERS PLUGIN
%/<script label="ImportTiddlersPlugin" title="Load ImportTiddlersPlugin from www.TiddlyTools.com">
var script=document.createElement('script');
script.src='http://www.TiddlyTools.com/plugins/ImportTiddlersPlugin.js';
script.onload=function(){
story.displayTiddler(null,'ImportTiddlers');
displayMessage('ImportTiddlersPlugin has been loaded.');
};
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script> /%
========================== LOAD TIDDLER TWEAKER PLUGIN
%/<script label="TiddlerTweakerPlugin" title="Load TiddlerTweakerPlugin from www.TiddlyTools.com">
var script=document.createElement('script');
script.src='http://www.TiddlyTools.com/plugins/TiddlerTweakerPlugin.js';
script.onload=function(){
story.displayTiddler(null,'TiddlerTweaker');
displayMessage('TiddlerTweakerPlugin has been loaded.');
};
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script> /%
========================== REARRANGE TIDDLERS PLUGIN
%/<script label="RearrangeTiddlersPlugin" title="Load RearrangeTiddlersPlugin from www.TiddlyTools.com">
var script=document.createElement('script');
script.src='http://www.TiddlyTools.com/plugins/RearrangeTiddlersPlugin.js';
script.onload=function(){
story.forEachTiddler(function(t,e){story.refreshTiddler(t,null,true)});
refreshDisplay();
displayMessage('RearrangeTiddlersPlugin has been loaded.');
};
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>/%
%/}}}/%
========================== Jash (Billy Reisinger) %/
*[[BillyReisinger.com:|http://www.billyreisinger.com/jash/]]{{block{/%
========================== LOAD AND DISPLAY JAVASCRIPT SHELL
%/<script label="Jash (JAvascript SHell)" title="Load Jash (JAvascript SHell) from www.billyreisinger.com/jash">
var script=document.createElement('script');
script.src='http://www.billyreisinger.com/jash/source/latest/Jash.js';
script.onload=function(){ displayMessage('JASH has been loaded'); };
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>/%
%/}}}
}}}/% END NOWRAP %/
<<tiddler LoadLocalPlugin with: IntelliTagger IntelliTaggerPlugin.js>>
<<tiddler LoadLocalPlugin with: IntelliTaggerCommand IntelliTagsEditCommandPlugin.js>>
<<tiddler LoadLocalPlugin with: JASHJavasriptshell JashJavaScriptShell.js>>
Jonny LeRoy works for [[ThoughtWorks|http://www.thoughtworks.com/]] in London and created the TiddlyDesktop enhancements to TiddlyWiki
See http://www.digitaldimsum.co.uk/ for more TiddlyWiki adaptations.
email jonny [at] leroy [dot] com
Tiddlers should underlap the sidebars rather than overlapping them.
The sidebar now stays on top and you can't move a tiddler completely out of the viewable area
<<fontSize>>
<<closeAll>>
<<permaview>>
<<collapseAll>>
<<autoLayout>>
<<expandAll>>
<<saveLayout>>
<<restoreLayout>>
<<tiddler ToggleFullscreen>>
<<tiddler ToggleMainMenu>>
<<tiddler ToggleHeader>>
<<tiddler ToggleSidebar>>
<<tiddler ToggleHoverMenu>>
<<tiddler ToggleTopMenu>>
<<tiddler ResizeFonts>>
!Layout Fixes
* ==Make the resizer look nice and appear in the bottom corner - semi done==
* ==Add an extra div with padding to frame the content==
* ==Only make the internal bit scrolling==
* ==Sort out IE - getting better==
* ==Change the heading colours==
* Maybe get some icons (embedded in CSS data?) - maybe better as just text ...
/***
|''Name:''|LegacyStrikeThroughPlugin ''compressed''|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''License:''|[[BSD open source license]]|
***/
//{{{
if(!version.extensions.LegacyStrikeThroughPlugin){version.extensions.LegacyStrikeThroughPlugin={installed:true};config.formatters.push({name:"legacyStrikeByChar",match:"==",termRegExp:/(==)/mg,element:"strike",handler:config.formatterHelpers.createElementAndWikify})}
//}}}
<<tiddler LoadLocalWithPanel with: PluginManager ListExtCode.js>>
<script label="$1" title="Load $1Plugin from local directory">
var script=document.createElement('script');
script.src='js/$2';
script.onload=function(){ displayMessage('$1Plugin has been loaded.'); };
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>
<script label="$1" title="Load $1Plugin from local directory">
var script=document.createElement('script');
script.src='js/$2';
script.onload=function(){ story.displayTiddler(null,'$1'); displayMessage('$1Plugin has been loaded.'); };
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>
<script label="$1" title="Load $1Plugin from local directory">
var script=document.createElement('script');
script.src='js/$2';
script.onload=function(){ refreshPageTemplate(); alert('$1Plugin has been loaded.'); };
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script>
/***
|''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);
}
//}}}
* Intro
** <<list filter [tag[intro]]>>
* Done
** <<list filter [tag[fixed]]>>
* ToDo
** <<list filter [tag[todo]]>>
* Layout
** <<tiddler Lay>>
* Edit
** <<tiddler New>>
* System
** <<tiddler ShowPopup with: Opt "Options.." "Change TiddlyWiki custom options" "" "" "">>
** <<tiddler ShowPopup with: Get "Loading.." "Load external scripts" "" "" "">>
** <<tiddler Sys>>
<<accordion>><<tiddler InsertPali>><<moveablePanel noedges>>
Need to make the [[_TagChooser]] macro work with v2.0
<!--{{{-->
<script type="text/javascript" src="TiddlyMasterPlugin.js"></script>
<!--}}}-->
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<!--}}}-->
/%
|Name|MicroCalc|
|Source|http://www.TiddlyTools.com/#MicroCalc|
|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|html|
|Requires||
|Overrides||
|Description|a simple embeddable calculator using javascript eval() function|
Usage: <<tiddler MicroCalc>>
%/<<tiddler HideTiddlerTags>>/%
%/{{small smallform{/%
%/<html><div style="width:100%"><hide linebreaks>
<form action="javascript:;" style="display:inline;margin:0;padding:0;"><!--
--><input name="input" value="0" style="width:70%;text-align:right;"
title="INPUT: enter a JavaScript expression, function, or object/variable name"
onfocus="this.select()"
onkeyup="if (event.keyCode==13) {this.form.go.click(); return false;}"><!--
--><input name="go" type="button" value="=" style="width:10%"
title="CALCULATE: evaluate input and display results"
onclick="var i=this.form.input; var o=this.form.output; var val=i.value; var res='';
try{res=eval(val);i.value=res}catch(e){res=e.description||e.toString()};
o.value+=(o.value.length?'\n':'')+val+'\n='+res;
o.style.display='block'; o.scrollTop=o.scrollHeight;
i.select();i.focus();"><!--
--><input name="memstore" type="button" value="m" style="width:10%"
title="MEMORY STORE: save input to temporary memory"
onclick="var f=this.form; f.memory.value=f.input.value;
f.memory.parentNode.style.display='block'"><!--
--><input name="clear" type="button" value="c" style="width:10%"
title="CLEAR: erase history and reset input"
onclick="var i=this.form.input; var o=this.form.output;
o.value='';o.style.display='none';
i.value='0';i.select();i.focus();"><!--
--><div style="display:none"><!--
--><input name="memory" value="0" style="width:70%;text-align:right;"
title="MEMORY: temporarily store input during calculations"><!--
--><input name="meminsert" type="button" value="mi" style="width:10%"
title="MEMORY INSERT: append memory value to current input"
onclick="var i=this.form.input;
i.value+=this.form.memory.value; i.select();i.focus();"><!--
--><input name="memrecall" type="button" value="mr" style="width:10%"
title="MEMORY RECALL: replace current input with memory value "
onclick="var i=this.form.input;
i.value=this.form.memory.value; i.select();i.focus();"><!--
--><input name="memclear" type="button" value="mc" style="width:10%"
title="MEMORY CLEAR: clear temporary memory"
onclick="var f=this.form; f.memory.value='0';
f.memory.parentNode.style.display='none';
f.input.select();f.input.focus();"><!--
--></div><!--
--><textarea name="output" rows=5 style="width:99%;display:none;"
title="HISTORY: previous inputs and calculated results"></textarea><!--
--></form></div></html>/%
%/}}}
/%
|Name|MiniBrowser|
|Source|http://www.TiddlyTools.com/#MiniBrowser|
|Version|0.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, MiniBrowserList|
|Overrides||
|Description|use an 'inline frame' to display another site inside a tiddler with navigation buttons and a dropdown list of favorite URLs.|
Usage:
<<tiddler MiniBrowser with: id>>
where:
id - (optional) specifies an ID to assign to the DOM element for the embedded IFRAME. If you want to have **more than one** MiniBrowser displayed at a time, you MUST provide an ID, so that each MiniBrowser can be uniquely identified within the DOM structure.
Note: MiniBrowserList can be *empty*, but must already exist for you to ADD a favorite to the list. If you don't copy the sample list from TiddlyTools, be sure to create this tiddler in your own document if you intend to use the MiniBrowser's "favorites" droplist.
%/<html><form target="browser_$1" style="margin:0;padding:0"
onsubmit="this.action=this.url.value; this.form.done.disabled=false" style="margin:0;padding:0"><nobr><!--
--><input type="button" value="<" title="back" style="font-size:8pt;width:3%"
onclick="try{window.frames['browser_$1'].history.go(-1)}catch(e){window.history.go(-1)}" ><!--
--><input type="button" value=">" title="forward" style="font-size:8pt;width:3%"
onclick="try{window.frames['browser_$1'].history.go(+1)}catch(e){window.history.go(+1)}"><!--
--><input type="button" value="+" title="refresh"style="font-size:8pt;width:3%"
onclick="window.frames['browser_$1'].location.reload()"><!--
--><input type="button" value="x" title="stop"style="font-size:8pt;width:3%"
onclick="window.stop()"><!--
--><select name="bookmarks" id="browser_bookmarks_$1" size="1" style="font-size:8pt;width:21%"
onchange="var f=document.getElementById('browser_$1'); if (!this.value.length) return window.miniBrowserResetSize(); else window.miniBrowserSetSize(this.form); this.form.url.value=this.value; this.form.action=this.value; this.form.submit(); this.form.done.disabled=false">
<option value="">bookmarks...</option>
</select><!--
--><input type="button" value="add" title="add this URL to the MiniBrowser bookmarks" style="font-size:8pt;width:5%"
onclick="window.miniBrowserAddBookmark(this.form.url);"><!--
--><input type="button" value="del" title="remove this URL from the MiniBrowser bookmarks" style="font-size:8pt;width:5%"
onclick="window.miniBrowserDeleteBookmark(this.form.bookmarks);"><!--
--><input type="button" value="edit" title="edit the MiniBrowser bookmarks list definition" style="font-size:8pt;width:5%"
onclick="story.displayTiddler(null,'MiniBrowserList',2)"><!--
--><input type="text" name="url" size="60" value="" style="font-size:8pt;width:35%"
onfocus="this.select();" onkeyup="var k=event.keyCode; if (k==13|k==10) this.form.go.click();"><!--
--><input type="button" name="go" value="go" title="view this URL" style="font-size:8pt;width:4%"
onclick="if(!this.form.url.value.length) return; window.miniBrowserSetSize(this.form); this.form.action=this.form.url.value; this.form.submit(); this.form.done.disabled=false"><!--
--><input type="button" value="open" title="open this URL in a separate window" style="font-size:8pt;width:6%"
onclick="if(this.form.url.value.length) window.open(this.form.url.value)"><!--
--><input type="button" value="done" name="done" title="stop viewing this URL" disabled style="font-size:8pt;width:6%"
onclick="this.form.url.value=''; this.form.bookmarks.selectedIndex=0; window.miniBrowserResetSize(); this.disabled=true;">
<iframe name="browser_$1" id="browser_$1" style="width:100%;height:1em;display:none;background:#fff;border:1px solid"></iframe><div id="browser_resize_$1" style="text-align:center;marginTop:2px;display:none;font-size:8pt"><!--
--> size: <input type="text" name="w" size="3" value="100%" style="font-size:8pt;"
onfocus="this.select()"><!--
-->x<input type="text" name="h" size="3" value="400" style="font-size:8pt;"
onfocus="this.select()"><!--
--> <input type="button" value="set" style="font-size:8pt;"
onclick="var w=this.form.w.value.trim(); if (!w||!w.length) w='100%'; var h=this.form.h.value.trim(); if (!h||!h.length) h='400'; if (!w.replace(/[0-9]*/,'').length) w+='px'; if (!h.replace(/[0-9]*/,'').length) h+='px'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h;"><!--
--><input type="button" value="reset" style="font-size:8pt;"
onclick="var w='100%'; var h='400'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h+'px'; this.form.w.value=w; this.form.h.value=h;"><!--
--><input type="button" value="fit" title="resize to fit containing window" style="font-size:8pt;"
onclick="window.miniBrowserFitSize(this)"><!--
--></div></nobr></form></html><script>
// load bookmarks droplist from HR-separated "MiniBrowserList" tiddler contents
var here=document.getElementById("browser_bookmarks_$1");
while (here.length) here.options[0]=null; // remove current list items
here.options[here.length]=new Option("bookmarks...","",true,true);
var list=store.getTiddlerText("MiniBrowserList");
if (list && list.trim().length) {
var parts=list.split("\n----\n");
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
var indent=value&&value.length?"\xa0\xa0":"";
here.options[here.length]=new Option(indent+label,value,false,false);
}
}
window.miniBrowserSetSize = function(form) {
var f=document.getElementById('browser_$1');
var w=form.w.value.trim(); if (!w||!w.length) w='100%'; if (!w.replace(/[0-9]*/,'').length) w+='px';
var h=form.h.value.trim(); if (!h||!h.length) h='400'; if (!h.replace(/[0-9]*/,'').length) h+='px';
f.style.width=w; f.style.height=h; f.style.display="block";
document.getElementById('browser_resize_$1').style.display="block";
return false;
}
window.miniBrowserResetSize = function() {
var f=document.getElementById('browser_$1');
if (f.src.length) f.src="";
f.style.width='100%'; f.style.height='1em'; f.style.display="none";
document.getElementById('browser_resize_$1').style.display="none";
return false;
}
window.miniBrowserFitSize = function(place) {
var trim=88; // fudge factor for controls + padding + borders. ADJUST TO FIT LAYOUT
var t=story.findContainingTiddler(place);
if (!t) { t=place; while (t && t.className!='floatingPanel') t=t.parentNode; } if (!t) return;
var w="100%"; // horizontal stretching via CSS works, but vertical stretching doesn't... so:
var h=(t.offsetHeight-trim); // workaround: get containing panel/tiddler height and subtract "trim" height
place.form.w.value=w; place.form.h.value=h; // update width/height input fields
var f=document.getElementById('browser_$1');
f.style.width=w; f.style.height=h+"px";
}
window.miniBrowserAddBookmark = function(place) {
var v=place.value; if (!v.length) return;
var d=prompt("Please enter a description for\n"+place.value); if (!d || !d.length) return;
var t = store.getTiddler("MiniBrowserList"); t.set(null,"%0\n%1\n----\n%2".format([d,v,t.text]));
var here=story.findContainingTiddler(place);
if (here) story.refreshTiddler(here.getAttribute("tiddler"),1,true);
story.refreshTiddler("MiniBrowserList",1,true);
story.refreshTiddler("MiniBrowser",1,true);
store.setDirty(true);
}
window.miniBrowserDeleteBookmark = function(place) {
var v=place.value; if (!v.length) return;
var d=place.options[place.selectedIndex].text; if (!d.length) return;
var t = store.getTiddler("MiniBrowserList");
if (!confirm("Are you sure you want to remove this MiniBrowser bookmark?\n\n"+d+"\n"+v)) return;
var pat='%0\n%1\n----\n'.format([d.replace(/\xa0/g,''),v]); var re=new RegExp(pat,"i");
t.set(null,t.text.replace(re,""));
var here=story.findContainingTiddler(place);
if (here) story.refreshTiddler(here.getAttribute("tiddler"),1,true);
story.refreshTiddler("MiniBrowserList",1,true);
story.refreshTiddler("MiniBrowser",1,true);
store.setDirty(true);
}
</script><<tiddler HideTiddlerTags>>
JeremyRuston
http://www.tiddlywiki.com/
----
Extensions- System Server:
----
[[svn.tiddlywiki.org]] - Revision 3310: /Trunk (Mar 08)
http://svn.tiddlywiki.org/Trunk/
----
/Trunk/ - TiddlyWiki - Trac (Mar 08)
http://trac.tiddlywiki.org/browser/Trunk/
----
EricShulman - Tiddly Tools "Small Tools for Big Ideas!" (Mar 08)
http://www.tiddlytools.com/
----
JackParke - Plugins, Macros and Hacks (Jan 08)
http://jackparke.googlepages.com/jtw.html
----
[[FND]] - FND's DevPad, Experimental TiddlyWiki Projects (eternally work in progress) - (Dec 07)
http://devpad.tiddlyspot.com
----
BramChen - PrinceTiddyWik, BramChen's Extensions for TiddlyWiki (Dec 07)
http://ptw.sourceforge.net/ptwe.html#Plugins
----
BramChen's Extensions Repository for TiddlyWiki (Dec 07)
http://garr.dl.sourceforge.net/sourceforge/ptw/
----
PauloSoares - TiddlyWiki 2.2.5 addons (Dec 07)
http://www.math.ist.utl.pt/~psoares/addons.html#Plugins
----
PascalCollin - VisualTW, Extensions powered by TiddlyWiki (Dec 07)
http://visualtw.ouvaton.org/VisualTW.html
----
PascalCollin - Index of /old (Dec 07)
http://visualtw.ouvaton.org/old/
----
UdoBorkowski - AbegoExtensions for TiddlyWiki (Dec 07)
http://tiddlywiki.abego-software.de/#Plugins
----
SaqImtiaz - Lewcid TW repository of extensions for TW (Nov 07)
http://tw.lewcid.org/
----
SaqImtiaz - Lewcid's Revision 41: /plugins (Nov 07)
http://tw.lewcid.org/svn/plugins/
----
MartinBudden - Martin's pre-release TiddlyWiki for plugins under development (Nov 07)
http://martinswiki.com/prereleases.html#Home
----
BidiXTW - Repository for BidiX's TiddlyWiki Extensions (Oct 07)
http://tiddlywiki.bidix.info/#%5B%5BExtension%20directory%5D%5D
----
SimonBaird - Monkey Pirate TW, lets you manage and structure your content with tags (Oct 07)
http://mptw.tiddlyspot.com/
----
SaqImtiaz - Lewcid's Sandbox work in progress, undocumented plugins and experiments (Jun 07)
http://tw.lewcid.org/sandbox/
----
WaltWoods - Walt Woods' TiddlyWiki Plugins (Jun 07)
http://www.orst.edu/~woodswa/tiddlywikiplugs.html
----
MartinBudden - Martin's wiki Martin Budden's plugins and extensions for TiddlyWiki (Apr 07)
http://www.martinswiki.com
----
YannPerrin - TWkd, Tweaked TiddlyWiki (Mar 07)
http://yann.perrin.googlepages.com/twkd.html
----
DawnAhukanna - Thought Book, Capture your thoughts (Feb 007)
http://dahukanna.net/wiki/tiddlywiki.htm
----
JulianKnight - Knightnet Default TiddlyWiki TW the way I like it - plus my Plugins (Feb 07)
http://knighjm.googlepages.com/knightnet-default-tw.html
----
BradleyMeck - PeachTW, Resources that are Ripe for the Picking (Jan 07)
http://bradleymeck.tiddlyspot.com
----
BobMcElrath - Bob McElrath's Plugins (Jan 07)
http://bob.mcelrath.org/plugins.html#systemConfig
----
YannPerrin - TWkd, Tweaked TiddlyWiki (Jan 07)
http://yann.perrin.googlepages.com/twkd1.html#Plugins
----
BobDenny - Red Mountain Vista, Bob Denny's extensions to TiddlyWiki (Dec 06)
http://solo.dc3.com/tw/
----
SimonBaird - MonkeyPirateTiddlyWiki - some plugins and hacks for tiddlywiki (2.0.10) (Sep 06)
http://mptw2.tiddlyspot.com/#Plugins
----
SteveRumsby - YATWA 2 (Yet Another TiddlyWiki Adaptation) (Mar 06)
http://www.rumsby.org/yatwa2/#systemConfig
----
DanielBaird - Tiddly W;nks! some TiddlyWiki stuff by Daniel Baird (Mar 06)
http://danielbaird.com/tiddlywinks/
----
SimonBaird - OldMonkeyPirateTiddlyWiki (TiddlyWiki 1.2.x) (Jan 06)
http://mptw1.tiddlyspot.com/#%5B%5BMPTW%20Plugins%5D%5D
----
SteveRumsby - YATWA (Yet Another TiddlyWiki Adaptation) (Jan 06)
http://www.rumsby.org/yatwa/#Plugins
----
ArphenLin - WikiBar for TiddlyWiki 2.0.0 (beta 6), a way to TiddlyWiki's formatting features (Dec 05)
http://aiddlywiki.sourceforge.net/wikibar_demo_2.html
----
Server Side TiddlyWiki adaptations:
----
MiniTiddlyServer - SeanHes, SaqImtiaz (07)
http://www.minitiddlyserver.com/
----
ZiddlyWiki - BobMcElrath, TimMorgan (06)
http://zw.mcelrath.org/ziddlywiki.com
----
ccTiddly - CoolCold (06)
http://cctiddly.sourceforge.net/
----
pytw - JosephReisinger, very simple (Jan 05)
http://www.cs.utexas.edu/~joeraii/pytw/
----
Theme Server:
----
TiddlyThemes.com - A gallery of themes for TiddlyWiki (Sep 07)
http://tiddlythemes.com/#Home
----
Ocat - MenuMore: a TiddlyWiki Theme (Apr 07)
http://oldcat.googlegroups.com/web/MenuMoreEn.html
----
Ocat - Theme: Simple2 (Apr 07)
http://oldcat.googlegroups.com/web/Simple2.html
----
Ocat - AccordionEffect + slider2 plugin (Mar 07)
http://oldcat.googlegroups.com/web/AccordionEffect.html
----
Clint Checketts - A collection of TiddlyWiki creations (Jan 07)
http://tiddlystyles.com
----
Joeraii - Siglet (Sep 2005)
http://www.cs.utexas.edu/~joeraii/siglet/
----
Help:
----
TiddlyWiki.org Wiki
http://tiddlywiki.org/wiki/Main_Page
----
Q&A Google Group
http://groups.google.at/group/TiddlyWiki?lnk=srg&hl=de
----
TiddlyWiki Tips
http://tiddlywikitips.com/
----
TiddlyWiki Tutorial - the basics
http://www.blogjones.com/TiddlyWikiTutorial.html
----
TiddlyWiki Guides
http://tiddlywikiguides.org/
----
TiddlyWiki for the rest of us
http://www.giffmex.org/twfortherestofus.html
----
Using TiddlyWiki - the textbook collection
http://en.wikibooks.org/wiki/Using_TiddlyWiki
----
TiddlyWiki Help - a comprehensive guide
http://twhelp.tiddlyspot.com/
----
Questions and Answers on TiddlyWiki
http://twfaq.tiddlyspot.com/
----
TiddlyWiki Handbuch - in German
http://www.tiddlywikihandbuch.de/tiddlywikihandbuch.html
----
General:
----
Google Groups - discussion/community help
http://groups.google.com/group/TiddlyWiki/
----
del.icio.us - find popular TiddlyWiki sites
http://del.icio.us/tag/tiddlywiki
----
Frappr - add a pin to the TiddlyWiki user map!
http://www.frappr.com/TiddlyWiki
----
References:
----
DevGuru CSSQuickRef
http://www.devguru.com/technologies/css2/
----
DevGuru JSQuickRef
http://www.devguru.com/technologies/javascript/
----
Open Source License
http://en.wikipedia.org/wiki/Open_source_license
Translations:
----
SimplifiedChineseTranslationPlugin - BramChen (Oct 07)
http://tiddlywiki-zh.googlecode.com/svn/trunk/
----
TraditionalChineseTranslationPlugin - BramChen (Oct 07)
http://http://tiddlywiki-zh.googlecode.com/svn/trunk/
----
GermanTranslationPlugin - Besim Karadeniz (Aug 07))
http://www.karadeniz.de/tiddlywiki/
----
DutchTranslationPlugin - TonvanRooijen (Jul 07)
http://http//svn.tiddlywiki.org/Trunk/association/locales/core/nl/locale.nl.js
----
LatvianTranslationPlugin - MārcisŠ (Jul 07)
http://www.webdizains.com/tw/
----
PortugueseTranslationPlugin - PauloSoares (Jul 07)
http://www.math.ist.utl.pt/~psoares/addons.html#PortugueseTranslationPlugin
----
EnglishTranslationPlugin - MartinBudden (Jul 07)
http://svn.tiddlywiki.org/Trunk/association/locales/core/en/locale.en.js
----
CatalanTranslationPlugin - PacoRivière (Jun 07)
http://pacoriviere.googlepages.com/TiddlyWiki.html
----
FinnishTranslationPlugin - JuhaKrapinoja (Jun 07))
http://www.iworld.de/~juha_krapinoja/TiddlyWiki/TiddlyWiki_fi.html#finnisch
----
FrenchTranslationPlugin - BidiX (Jun 07)
http://svn.tiddlywiki.org/Trunk/association/locales/core/fr/locale.fr.js
----
GreekTranslationPlugin - SpyrosKroustalakis (May 07)
http://svn.tiddlywiki.org/Trunk/association/locales/core/el/locale.el.js
----
ItalianTranslationPlugin - MathewWarburton, PollioMaurizio (Mar 07)
http://pollio.maurizio.googlepages.com/MiniGuidaTiddlyWiki.html
----
JapaneseTranslationPlugin - Zephyr (Mar 07)
http://flow.dip.jp/mt/archives/u/twmemo.html#JapaneseTranslation
----
PolishTranslationPlugin - MarcinGedlek (Jan 07)
http://members.lycos.co.uk/psorek/
----
TurkishTranslationPlugin - KıvılcımHindistan
http://www.fazlamesai.net/sundance
----
SpanishTranslationPlugin ClintChecketts (Jan 07)
http://svn.tiddlywiki.org/Trunk/association/locales/core/es/locale.es.js
----
KoreanLingo - EdSeunghoonYeon (Nov 06)
http://www.kcug.net/TiddlyWiki/Korean.utf-8.txt
----
TraducciónGalego - MakeijaN (Sep 06)
http://makeijan.googlepages.com/tiddlywiki.html
----
MagyarFordítás - JároliJózsef (May 06)
http://innen.hu/MagyarTiddlyWiki#MagyarFord%C3%ADt%C3%A1s
----
PortuguêsBrasileiro - DavidHopkins (May 06)
http://udigrudi.net/#PortugueseLingo
----
CroatianLingo - MarcellMars (Dec 05)
http://www.picigin.net/logcells
----
Slovak - JurajBorza (Dec 05)
http://student.fiit.stuba.sk/~borza05/TiddlyWiki.html
----
Russian - DenisBaluev (05)
http://lifehack.ru/files/tw/empty_tw.html
-----
BasqueLingo - SéamusPálás (05)
http://zopelana.org/wiki/hutsik.html
----
BulgarianTranslation - ВашетоИме (05)
http://fire.atspace.org/
----
CzechLingo - LubosPajtina (05)
http://www.zsn5vy.ipex.cz/~pajtina/
----
Swedish - LarsEnglund
http://www.tiddlywiki.se/
<script label="Calculator" title="Calculate">
expr=prompt('Formula...(eg: 2*3 + 7/8 )','');
if(expr){with(Math){evl=parseFloat(eval(expr))};
if(isNaN(evl)){alert('Not a number!')}else{void(prompt('Result:',evl))}}else{void(null)}
return false;
</script>
Solitary Extensions:
----
TinyTiddly - SaqImtiaz, Super small compressed and optimized version of TW (daily)
http://tinytiddly.lewcid.org/
----
Nightly TW Builds - SaqImtiaz, the latest bleeding edge TiddlyWiki (daily)
http://nightly.lewcid.org/
----
tiddlywiki private pastebin - collaborative debugging tool
http://tiddlywiki.pastebin.com/
----
TiddlerEncryption - PluginLyallPearce (Jan 08)
http://www.remotely-helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html
----
LaunchApplicationPlugin - LyallPearce (Dec 07)
http://remotely-helpful.com/TiddlyWiki/LaunchApplication.html
----
TiddlyVault - DaveGifford, an index of TiddlyWiki extensions (Dec 07)
http://tiddlyvault.tiddlyspot.com/
----
UweWennmann - TW Lernkatei (Oct 07)
http://bbz-dormagen.de/wennmann/TWLernkartei/TWLernkartei.html
----
JeremySheeley - ReminderMacros (Sep 07)
http://remindermacros.tiddlyspot.com/
----
SaqImtiaz - MiniTiddlyServer (Sep 07)
http://www.minitiddlyserver.com/
----
Conal's Journal - (Sep 07)
http://journal.conal.net/#%5B%5Bsite%20map%5D%5D
----
Lernkartei - nach Sebastian Leitner (Sep 07)
http://bbz-dormagen.de/wennmann/TWLernkartei/TWLernkartei.html#Anleitung
----
Moodle Wiki - Tiddlywiki Integration, A Ludo's DFWikiteam Site (Jul 07)
http://moodle.tiddlyspot.com/
----
RichardHobbis - TiddlyLockPlugin (June 2007)
http://www.minormania.com/tiddlylock/tiddlylock.html#TiddlyLockPlugin
----
VincentDiBartolo - twab, the tiddly wiki address book (Jun 07)
http://www.tiddly-twab.com
----
Umibozu - Wikify your web album (May 07)
http://umibozu.org/en/index.html#Features
----
DawnAhukanna - Simile Timeline 2.2.0 (beta 5) (Apr 07)
http://project.dahukanna.net/tiddlywiki/timeline/sampletimeline220b5.html
----
GeorgeBrackett - AnswerMacro, displays answers and other feedback for online questions (Apr 07)
http://luceatlux.net/macros/answer
----
LaurenceMan - AutoWeavePlugin (Mar 07)
http://weave.tiddlyspot.com/index.html
----
PascalCollin - RichTextPlugin (Mar 07)
http://tiddlywiki.ouvaton.org/Demo.html
----
Mike - SyncOutlookNotesMacro (Mar 07)
http://syncoutlooknotes.tiddlyspot.com/#SyncOutlookNotes
----
Collapsible Table of Contents (Mar 07)
http://du180.n77.queensu.ca/TW/ToC.html
----
Riccardo - n00b@work: hideIfshowIf plugin (Mar 07)
http://rgplugins.tiddlyspot.com/#%5B%5BhideIfshowIf%20plugin%5D%5D
----
CoolCold - ccTiddly - a site of news and info regarding ccTiddly (Mar 07)
http://cctiddly.sourceforge.net/
----
MartinBudden - Simile Timeline, a TiddlyWiki demomstrator (Feb 07)
http://www.martinswiki.com/timeline/
----
FabriceProudhon - SEOTiddlyWikiPlugin (Feb 07)
http://www.superphysique.net/#%5B%5BSEO%20TiddlyWiki%20Plugin%5D%5D
----
KenGirard - Conflation A kid-free SciFi Relax-A-Con (Feb 07)
http://conflation.org/#BlogUserPlugin
-----
Speth - HaloscanMacro, comments and trackback support for TiddlyWiki (Feb 06)
http://end.com/~speth/HaloscanMacro.html
-----
SaqImtiaz - TiddlySnip, allows you to use TiddlyWiki as a scrapbook (Jan 07)
http://tiddlysnip.com/#About
----
ChrisKlimas - Gimcrack'd: Code and Other Oddments (Jan 07)
http://gimcrackd.com/etc/src/
----
Ido's TiddlyWiki Extensions (Jan 07)
http://ido-xp.tiddlyspot.com/
----
AnshulNigham - Blog Wiki, Blog plugin for tiddlywiki 2.1.3 (Jan 07)
http://www.anshul.info/blogwiki.html
----
SaqImtiaz - PresentationPlugin (Dec 06)
http://lewcid.googlepages.com/presentation_empty_full.html#Documentation
----
[[Potto]] - HTML Slidy Maker HTMLプレゼンテーションツールの生成 (Dec 06)
http://www.potto.client.jp/htmlslidymaker/index.html
----
Wiki - by Soloport: ExcludeTimelinePlugin (Nov 06)
http://soloport.tiddlyspot.com/#ExcludeTimelinePlugin
----
DanielBaird - DiscerningTagsPlugin (Nov 06)
http://discerningtags.tiddlyspot.com/
----
Rodrigo - StickyDatePlugin (Aug 06)
http://paularodrigo.homeip.net/stickydate.html#StickyDatePlugin
----
LindsayDonaghe - MacroLinz TiddlyWare - where LindsayDonaghe pushes her TW plugins on the world (Aug 06)
http://www.macrolinz.com/macrolinz/tiddlyware/MacroLinz.html
----
gkwWiki - GregWalker (Jul 06)
http://gwsyzygy.googlepages.com/creator.html
----
MathCell TiddlyWiki - BradleyMeck (Jun 06)
http://genisis329.googlepages.com/TWMath.html
----
LabWiki - LukeBlanshard's plugins for TiddlyWiki: TaskMacroPlugin (May 06)
http://labwiki.sourceforge.net/
----
DcTableOfContentsPlugin - DougCompton (Apr 06)
http://www.zagware.com/tw/plugins.html#DcTableOfContentsPlugin
----
ASciencePad - PeterJipsen, a TiddlyWiki suitable for scientific notes - (Mar 06)
http://math.chapman.edu/~jipsen/asciencepad/asciencepad.html
----
wikiMobil 2.0 - Learning-Center (Feb 06)
http://www.twteamserver.de/es/index3.php
----
AlanHecht - TiddlyWikiExtensions creations by AlanHecht (Jan 06)
http://www.personal.psu.edu/ach12/tiddlywiki/extensions.htm
----
TiddlyDesktop v1.0 (beta 2) Set the Tiddlers free! (Jan 06)
http://www.digitaldimsum.co.uk/wp-content/uploads/2007/04/tiddlydesktop-v10beta2.htm
----
FrankDellaert's TiddlyWiki Page - A tiddling adventure (Dec 05)
http://www-static.cc.gatech.edu/~dellaert/dhtml/tiddly.html
----
JeremyCowgar - ESV Macros (Nov 05)
http://biblestudy.tiddlyspot.com/#ESVLinkMacro
----
ВашетоИме - Загубени Мисли ... на един загубен човек (Авг 05)
http://fire.atspace.org/
----
<<tiddlerList tags:"load,-st,-nd" itemTemplate:"%text\n">>
/***
|Name|MoveablePanelPlugin ''altered''|
|Source|http://www.TiddlyTools.com/#MoveablePanelPlugin|
|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.1|
|Requires|NestedSlidersPlugin|
|Description|Add move and size mouse event handling and fold/unfold, and close/dock toolbar command items to any floating slider panel or tiddler|
***/
//{{{
version.extensions.moveablePanel= {major: 2, minor: 1, revision: 0, date: new Date(2007,12,30)};
config.macros.moveablePanel= {
handler: function(place,macroName,params) {
var p=this.getPanel(place); if (!p) return;
var showfold=true; var showclose=true; var showhover=true;
var noedges=false; var param=null;
while (param=params.shift()) { param=param.toLowerCase();
if (param=="noclose") showclose=false;
if (param=="nofold") showfold=false;
if (param=="nohover") showhover=false;
if (param=="noedges") noedges=true;
}
if (!p.saved) p.saved= {
mouseover: p.onmouseover, mouseout: p.onmouseout, dblclick: p.ondblclick,
top: p.style.top, left: p.style.left, width: p.style.width, height: p.style.height,
position: p.style.position, border: p.style.border, title: p.title,
transient: p.getAttribute("transient")
};
var html='<div class="toolbar" style="display:none;position:absolute;';
html+=(hasClass(p,"floatingPanel")?'right:1em;top:1em;':'right:.5em;top:-1em;')+'">';
var s='border:1px solid #666;background:#ccc;color:#666 !important;padding:0px .25em;-moz-border-radius:0px';
if (showfold)
html+='<a href="javascript:;" title="FOLD: reduce panel size" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.foldPanel(this,event)">−</a>';
if (showhover)
html+='<a href="javascript:;" title="SCROLLING: panel moves with page" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.hoverPanel(this,event)">=</a>';
if (showclose) {
if (hasClass(p,"floatingPanel"))
html+='<a href="javascript:;" title="CLOSE: hide panel and reset size/position" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.closePanel(this,event)">X</a>';
else
html+='<a href="javascript:;" title="DOCK: reset panel size/position" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.dockPanel(this,event)">√</a>';
}
html+='</div>';
p.menudiv=createTiddlyElement(place,"span");
p.menudiv.innerHTML=html;
p.setAttribute("noedges",noedges?"true":"false");
p.onmousemove=function(event) { return config.macros.moveablePanel.setCursorPanel(this,event); };
p.onmousedown=function(event) { return config.macros.moveablePanel.moveOrSizePanel(this,event); };
p.ondblclick=function(event) {
if (p.getAttribute("noedges")=="true" && !((isTop&&!isLeft&&!isRight)||(isBottom&&isRight)))
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (!config.macros.moveablePanel.isEdge(this,event))
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (config.macros.moveablePanel.dockPanel(this,event))
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
else return false;
};
p.onmouseover=function(event) {
addClass(this,"selected");
if (this.getAttribute("undocked")=="true"||hasClass(this,"floatingPanel")) this.menudiv.firstChild.style.display="inline";
if (this.saved.mouseover) return this.saved.mouseover.apply(this,arguments);
};
p.onmouseout=function(event) {
removeClass(this,"selected");
if (this.menudiv) this.menudiv.firstChild.style.display="none";
if (this.saved.mouseout) return this.saved.mouseout.apply(this,arguments);
};
if (hasClass(p,"floatingPanel") && p.button) {
p.saved.mouseover=null;
p.saved.mouseout=null;
p.button.onmouseover=null;
if(!p.button.saved_onclick) p.button.saved_onclick=p.button.onclick;
p.button.onclick=function(ev){
config.macros.moveablePanel.dockPanel(this.sliderPanel,ev);
return this.saved_onclick.apply(this,arguments);
}
}
},
processed: function(event) {
event.cancelBubble=true; if (event.stopPropagation) event.stopPropagation(); return false;
},
getPanel: function(place) {
var p=place; while (p && !(hasClass(p,"floatingPanel")||p.saved)) p=p.parentNode;
return p||place;
},
isEdge: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return false;
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
if (x<left||x>=left+width||y<top||y>=top+height) return false;
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
return isTop||isLeft||isBottom||isRight;
},
dockPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (p.folded) this.foldPanel(p.foldButton,event);
if (p.hover) this.hoverPanel(p.hoverButton,event);
if (p.saved) {
p.style.top=p.saved.top; p.style.left=p.saved.left;
p.style.width=p.saved.width; p.style.height=p.saved.height;
p.style.position=p.saved.position;
if (p.saved.transient) p.setAttribute("transient","true");
p.setAttribute("undocked","");
}
if (hasClass(p,"floatingPanel") && window.adjustSliderPos)
window.adjustSliderPos(p.parentNode,p.button,p);
return this.processed(event);
},
closePanel: function(place,event) {
var p=this.getPanel(place); if (!p) return true;
if (p.button) { p.button.focus(); onClickNestedSlider({target:p.button}); }
return this.dockPanel(place,event);
},
foldPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!p.foldButton) p.foldButton=place;
if (p.folded) {
p.style.height=p.folded_savedheight;
p.style.overflow=p.folded_savedoverflow;
if (!hasClass(p,"floatingPanel")) p.menudiv.firstChild.style.top="-1em";
} else {
p.folded_savedheight=p.style.height; p.style.height="1em";
p.folded_savedoverflow=p.style.overflow; p.style.overflow="hidden";
if (!hasClass(p,"floatingPanel")) p.menudiv.firstChild.style.top="1em";
}
p.folded=!p.folded;
place.innerHTML=p.folded?"+":"−";
place.title=p.folded?"UNFOLD: restore panel size":"FOLD: reduce panel size";
return this.processed(event);
},
hoverPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!p.hoverButton) p.hoverButton=place;
if (p.hover) {
p.style.position=p.hover_savedposition;
if (p.getAttribute("undocked")!="true" && p.saved && p.saved.transient)
p.setAttribute("transient","true");
} else {
p.hover_savedposition=p.style.position; p.style.position="fixed";
if (p.saved.transient) p.setAttribute("transient","false");
}
p.hover=!p.hover;
place.innerHTML=p.hover?"^":"=";
place.title=p.hover?"HOVERING: panel stays in view when scrolling page":"SCROLLING: panel moves with page";
return this.processed(event);
},
setCursorPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
if (x<left||x>=left+width||y<top||y>=top+height) return true;
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
p.style.cursor="auto";
p.title=p.saved?p.saved.title:"";
if (!(isTop||isLeft||isBottom||isRight)) return true;
if (p.getAttribute("noedges")=="true") {
if (isTop&&!isLeft&&!isRight) {
p.style.cursor="move";
p.title="MOVE: drag top panel edge"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
} else if (isBottom && isRight) {
p.style.cursor="se-resize";
p.title="RESIZE: drag lower right corner"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
}
} else {
p.style.cursor=!event.shiftKey?"move":((isTop?'n':(isBottom?'s':''))+(isLeft?'w':(isRight?'e':''))+'-resize');
p.title="MOVE: drag panel edge, RESIZE: hold shift key"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
}
return true;
},
moveOrSizePanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!this.isEdge(place,event)) return true;
if (!p.saved) p.saved= {
mouseover: p.onmouseover, mouseout: p.onmouseout, dblclick: p.ondblclick,
top: p.style.top, left: p.style.left, width: p.style.width, height: p.style.height,
position: p.style.position, border: p.style.border, transient: p.getAttribute("transient")
};
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
var sizing=event.shiftKey;
if (p.getAttribute("noedges")=="true") {
if (!((isTop&&!isLeft&&!isRight)||(isBottom&&isRight))) return true;
var sizing=isBottom&&isRight;
}
var adjustLeft=0; var adjustTop=0;
var pp=p.parentNode; while (pp && !(pp.style&&pp.style.position=='relative')) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
var pp=p.parentNode; while (pp && !hasClass(pp,"floatingPanel")) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
this.activepanel=p;
var target=p;
if (document.body.setCapture) { document.body.setCapture(); var target=document.body; }
if (window.captureEvents) { window.captureEvents(Event.MouseMove|Event.MouseUp,true); var target=window; }
if (target.onmousemove!=undefined) target.saved_mousemove=target.onmousemove;
target.onmousemove=function(e){
if (!e) var e=window.event;
var p=config.macros.moveablePanel.activepanel;
if (!p) { this.onmousemove=this.saved_mousemove?this.saved_mousemove:null; return; }
var paddingWidth=10.6667; var paddingHeight=10.6667;
var borderWidth=1; var borderHeight=1;
var adjustWidth=-(paddingWidth*2+borderWidth*2);
var adjustHeight=-(paddingHeight*2+borderHeight*2);
if (p.style.position!="absolute"&&p.style.position!="fixed") {
p.style.position="absolute";
p.style.left=left+"px"; p.style.top=top+"px";
p.style.width=(width+adjustWidth)+"px"; p.style.top=(height+adjustHeight)+"px";
}
var newX=!config.browser.isIE?e.pageX:e.clientX;
var newY=!config.browser.isIE?e.pageY:e.clientY;
if (sizing) {
var minWidth=edgeWidth*2-adjustWidth;
var minHeight=edgeHeight*2-adjustHeight;
if (p.folded) this.foldPanel(p.foldButton,e);
if (isBottom) var newHeight=height+newY-y+1;
if (isTop) var newHeight=height-newY+y+1;
if (isLeft) var newWidth=width-newX+x+1;
if (isRight) var newWidth=width+newX-x+1;
if (isLeft||isRight) p.style.width=(newWidth>minWidth?newWidth:minWidth)+adjustWidth+"px";
if (isLeft) p.style.left=left-adjustLeft+newX-x+1+"px";
if (isTop||isBottom) p.style.height=(newHeight>minHeight?newHeight:minHeight)+adjustHeight+"px";
if (isTop) p.style.top=top-adjustTop+newY-y+1+"px";
p.setAttribute("undocked","true");
} else {
p.style.top=top-adjustTop+newY-y+1+"px";
p.style.left=left-adjustLeft+newX-x+1+"px";
if (p.saved && p.saved.transient) p.setAttribute("transient","false");
p.setAttribute("undocked","true");
}
var status=sizing?("size: "+p.style.width+","+p.style.height):("pos: "+p.style.left+","+p.style.top);
window.status=status.replace(/(\.[0-9]+)|px/g,"");
return config.macros.moveablePanel.processed(e);
};
if (target.onmouseup!=undefined) target.saved_mouseup=target.onmouseup;
target.onmouseup=function(e){
if (!e) var e=window.event;
if (this.releaseCapture) this.releaseCapture();
if (this.releaseEvents) this.releaseEvents(Event.MouseMove|Event.MouseUp);
this.onmousemove=this.saved_mousemove?this.saved_mousemove:null;
this.onmouseup=this.saved_mouseup?this.saved_mouseup:null;
config.macros.moveablePanel.activepanel=null;
window.status="";
return config.macros.moveablePanel.processed(e);
};
return this.processed(event);
}
};
//}}}
<<tiddler LoadLocalWithPanel with: MultiTagEditor MultiTagEditorPlugin.js>> [[- Panel only|MultiTagEditor]]
<<newTiddler label:"tiddler" focus:"title" tag:"new">>
<<newJournal "YYYY 0MM DD" label:"journal" prompt:"create new journal" focus:"text" text:"New Journal:" tag:"journal">>
<<newJournal "YY 0MM DD" label:"schedule" prompt:"create new schedule" focus:"text" text:"New Schedule:" tag:"schedule">>
<<newTiddler label:"contact" title:"new contact" prompt:"create new contact" focus:"title" text:"New Contact:" template:"ContactViewTemplate" tag:"contact">>
[[open file|OpenFile]]
[[excel to TW|ExcelToTW]]
[[calculate|MicroCalc]]
+++ more..
{{tiny{Initial loading required:}}}
<<tiddler 'TidIDE load'>>
<<tiddler 'MultiTagEditor load'>>
<<tiddler 'Wysiwyg load'>>
===
! Unresolved Issues using this old theme
!!View Mode
* What determines the limit just above the 'clear' button (of the hover menu), above which not tiddler can be placed?
* [This bug started only with TW 2.3.0] The following opening tiddlers often don't take focus, their windowBar is hidden and therefore aren't drag able, and additionally..:
** only one of the tagged tiddlers opens from a tag in the TabTags when clicking 'Open all' (here helped by the OpenTaggedTiddler script of Eric)
** only one of the matching tiddlers returns through the search function (remedied here with InlineSearchMacro by Pascal)
** the same with automatically created and displayed tiddlers, like ImportedTiddlers
* Scrolling a long page down and clicking a link to an other tiddler sometimes makes the scrollbar jump to the top of that tiddler without opening the clicked link. Scrolling down again and clicking the same link for a second time, it finally opens the tiddler.
* How to expand a tiddler with one click to full screen?
* In IE the background is transparent
!!Edit Mode
* The cursor in the Edit Box disappears most of the time
* At times the resizer in edit mode isn't working
* After editing a tiddler, resizing and changing into view mode again, the resizer and background area of a tiddler loose their synchronization
* The scrolling sidebar of a tiddler in edit mode jumps to the top of the tiddler when coming back with the focus from an other tiddler (can by remedied by setting 'autosize' by TextAreaPlugin)
* How to get 'resize textarea' of TextAreaPlugin synchronize with 'resize me'?
!!Compability
* Haven't been able to adjust the Wysiwyg and Contact EditTemplates to display the windowBar with the newTiddler macro (similarly as the disappearance in view mode). And equally, after hitting done and opening such a new tiddler the second time - the windowBar does display again - like it does with any other already existing tiddler. (here remedied by opening these templates in view mode)
* HoverMenu sometime needs a 'restoreLayout' to display (the '+' button in the top menu). LoadExtPlugin disables the grabbing of tiddlers opening at startup. And FullscreenPlugin isn't working with this layout as it should (ie. expanding a tiddler and not only hidding the bars). FootnotePlugin isn't working at all.
!Other
This experimental ~TiddlyWiki makes use of loading plugins on demand from the local file system. For that to work you need a subfolder titled 'js' where you save plugins in separate files with the extension '.js'.
<<newDocument ask ask>>
<<newDocument nofile print here>>
<<tiddler LoadLocalWithPanel with: NewDocument NewDocumentPlugin.js>>
/***
| Name:|NewMeansNewPlugin|
| Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
| Source:|http://tiddlywiki.pastebin.com/m12b8f57f|
***/
//{{{
String.prototype.getNextFreeName = function() {
var numberRegExp = / \(([0-9]+)\)$/;
var match = numberRegExp.exec(this);
if (match) {
var num = parseInt(match[1]) + 1;
return this.replace(numberRegExp," ("+num+")");
}
else {
return this + " (1)";
}
}
config.macros.newTiddler.getName = function(newName) {
while (store.getTiddler(newName))
newName = newName.getNextFreeName();
return newName;
}
config.macros.newTiddler.originalOnClickNewTiddler = config.macros.newTiddler.onClickNewTiddler;
config.macros.newTiddler.onClickNewTiddler = function()
{
var originalTitle = this.getAttribute("newTitle");
var title = config.macros.newTiddler.getName(originalTitle);
this.setAttribute("newTitle", title);
var rc = config.macros.newTiddler.originalOnClickNewTiddler.apply(this);
this.setAttribute("newTitle", originalTitle);
return rc;
};
//}}}
<script label="NukeCookies" title="Clears all TiddlyWiki options stored in browser cookies (w/confirmation)">
var opts=new Array(); var p=document.cookie.split('; ');
for (var i=0;i<p.length;i++){
var c=p[i]; var v=''; var pos=p[i].indexOf('=');
if (pos!=-1) { c=p[i].substr(0,pos); v=unescape(p[i].slice(pos+1)); }
if (config.options[c]!==undefined) opts.push(c);
} opts.sort();
var msg='There are '+opts.length+' option cookies:\n\n'+opts.join(', ');
msg+='\n\nPress OK to proceed, or press CANCEL to keep options unchanged'; if (!confirm(msg)) return false;
var msg='Press OK reset all options at once, or press CANCEL to confirm each option, one at a time';
var quiet=confirm(msg);
for (var i=0;i<opts.length;i++) {
if (quiet || confirm('Press OK to reset option: '+opts[i])) {
var ex=new Date(); ex.setTime(ex.getTime()-1000);
document.cookie=opts[i]+'=deleted; path=/; expires='+ex.toGMTString();
}
}
return false;
</script>
|!Open all tagged tiddlers with..|Show tiddlers tagged..|
|<<tiddler OpenTaggedTiddlers with: "0" "0" "sortBy" "reverse">>|<<tag 0>>|
|<<tiddler OpenTaggedTiddlers with: "load" "load" "sortBy" "reverse">>|<<tag load>>|
|<<tiddler OpenTaggedTiddlers with: "wikLet" "wikLet" "sortBy" "reverse">>|<<tag wikLet>>|
|<<tiddler OpenTaggedTiddlers with: "systemConfig" "systemConfig" "sortBy" "reverse">>|<<tag systemConfig>>|
|<<tiddler OpenTaggedTiddlers with: "txt" "txt" "sortBy" "reverse">>|<<tag txt>>|
|<<tiddler OpenTaggedTiddlers with: "1" "1" "sortBy" "reverse">>|<<tag 1>>|
|<<tiddler OpenTaggedTiddlers with: "htm" "htm" "sortBy" "reverse">>|<<tag htm>>|
|<<tiddler OpenTaggedTiddlers with: "nd" "nd" "sortBy" "reverse">>|<<tag nd>>|
|<<tiddler OpenTaggedTiddlers with: "menu" "menu" "sortBy" "reverse">>|<<tag menu>>|
|<<tiddler OpenTaggedTiddlers with: "script" "script" "sortBy" "reverse">>|<<tag script>>|
|<<tiddler OpenTaggedTiddlers with: "meta" "meta" "sortBy" "reverse">>|<<tag meta>>|
|<<tiddler OpenTaggedTiddlers with: "fixed" "fixed" "sortBy" "reverse">>|<<tag fixed>>|
|<<tiddler OpenTaggedTiddlers with: "TiddlyDesktop:logic" "TiddlyDesktop:logic" "sortBy" "reverse">>|<<tag TiddlyDesktop:logic>>|
|<<tiddler OpenTaggedTiddlers with: "st" "st" "sortBy" "reverse">>|<<tag st>>|
|<<tiddler OpenTaggedTiddlers with: "copy" "copy" "sortBy" "reverse">>|<<tag copy>>|
|<<tiddler OpenTaggedTiddlers with: "todo" "todo" "sortBy" "reverse">>|<<tag todo>>|
|<<tiddler OpenTaggedTiddlers with: "intro" "intro" "sortBy" "reverse">>|<<tag intro>>|
|<<tiddler OpenTaggedTiddlers with: "StyleSheet" "StyleSheet" "sortBy" "reverse">>|<<tag StyleSheet>>|
|<<tiddler OpenTaggedTiddlers with: "url" "url" "sortBy" "reverse">>|<<tag url>>|
|<<tiddler OpenTaggedTiddlers with: "excludeLists" "excludeLists" "sortBy" "reverse">>|<<tag excludeLists>>|
|<<tiddler OpenTaggedTiddlers with: "HTML" "HTML" "sortBy" "reverse">>|<<tag HTML>>|
<html><hide linebreaks> <!-- note: extra psuedo-tag from HTMLFormattingPlugin suppresses newlines -->
<form target="theFrameID">
<input type=file name=whichfile>
<input type=button value="view"
onclick="var frame=document.getElementById(this.form.target);
this.form.action='file:///'+this.form.whichfile.value;
try { frame.style.display='block'; this.form.done.disabled=false; this.form.submit(); }
catch(e) { alert(e.description?e.description:e.toString()); }">
<input type=button name=done value="done" disabled
onclick="var frame=document.getElementById(this.form.target);
frame.style.display='none'; this.disabled=true;">
</form>
<iframe src="" name="theFrameID" id="theFrameID"
style="display:none;background:#fff;width:100%;height:500px">
</iframe>
</html>
/%
|Name|OpenTaggedTiddlers|
|Source|http://www.TiddlyTools.com/#OpenTaggedTiddlers|
|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|script|
|Requires|InlineJavascriptPlugin|
|Description|open multiple tagged tiddlers with a single click|
Usage: <<tiddler OpenTaggedTiddlers with: "label" "tagToMatch" "sortBy" "reverse">>
"sortBy" is an optional tiddler fieldname, and defaults to "title" (use "modified" or "created" for dates)
"reverse" is an optional KEYWORD, and reverses the order of display of the matched tiddler (i.e., descending vs. ascending)
%/<script label="$1">
var list=[];
var sortBy=("$"+"3"!="$3")?"$3":"title";
var tids=store.getTaggedTiddlers("$2",sortBy);
if ("$4"=="reverse") tids=tids.reverse();
for (var t=0;t<tids.length;t++) list.push(tids[t].title);
story.displayTiddlers(story.findContainingTiddler(place),list);
return false;
</script>
<<option chkSaveBackups>> save backups
<<option chkAutoSave>> auto save
<<option chkRegExpSearch>> regexp search
<<option chkCaseSensitiveSearch>> case sensitive search
<<option chkAnimate>> enable animations
<<option chkStickyPopups>> sticky popups
<<option chkDisableAutoSelect>> cursor at start
<<option chkTextAreaExtensions>> Strg+f, Strg+g inside edit
<<tiddler "SelectPalette load">><<slider chkSlideropt opt "more.." "Change TiddlyWiki custom options">>
/*{{{*/
#mainMenu { position: static; float: left; width: 10em; padding: 0px 0px 1px 1px; }
#sidebar { position: static; float: right; }
#sidebarOptions .sliderPanel { border:solid 1px [[ColorPalette::PrimaryLight]]; }
#sidebar .button { border-style: none; }
#sidebarOptions br { display:none; }
#sidebarOptions .sliderPanel br { display:inline; }
.headerShadow { left: 1px; top: 1px; }
.toolbar { visibility:hidden; }
.selected .toolbar { visibility:visible; }
.topMenu br { display:none; }
.viewer tr.oddRow { background: #ffe; }
.viewer tr.evenRow { background: [[ColorPalette::Background]]; }
.viewer p { margin:0 }
.tagged { float:left !important; }
.tagged li { display:inline; }
#nestedtagger { background:#DDDDDD; border: 1px solid #AAAAAA; }
/* the following mainly from www.tiddlytools.com - credits to Eric Shulman */
.popup { padding:0.4em; line-height:180%; white-space: nowrap; z-index:1000; color: #000; background: #ffe; border: 1px solid #000; -moz-border-radius-topright: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; }
.popup a, .popup .button, .popup .tiddlyLinkExisting, .popup .tiddlyLinkNonExisting { font-weight: normal; font-style: normal; }
.popup hr { color: #000; background: #ddd; border: 0; }
.popup li.disabled { color: #999; }
.popup li a, .popup li a:visited { color: #300; padding:1px; }
.popup li a:hover { background: #006; color: #fff !important;}
#backstageArea {background:[[ColorPalette::PrimaryLight]]; }
#backstageArea a {background:[[ColorPalette::PrimaryLight]]; }
#backstageCloak { z-index:49; }
#backstagePanel { margin:0em 0.5em 0em 0.5em; }
.backstagePanelFooter { display: none; }
#backstageButton a:hover { background-color:transparent !important; }
#tidIDE, .tidIDE input, .tidIDE textarea, .tidIDE button, .tidIDE checkbox, .tidIDE radio, .tidIDE select { font-family:Arial; font-size:9pt; }
.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 { margin:0;padding:0;border:0;margin-left:2em; }
.floatleft { float:left; }
.floatright { float:right; }
.clear { clear:both; }
.wrap { white-space:normal; }
.nowrap { white-space:nowrap; }
.hidden { display:none; }
.span { display:span; }
.block { display:block; }
.relative { position:relative; }
.absolute { position:absolute; }
.tiny { font-size:6pt; }
/* compact form */
.smallform { white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select { font-size:8pt; }
#toolBar {padding:0.25em 0.3em 0 0; position:absolute; right:0; top:0;}
#toolBar a {padding: 0 0.2px; }
#toolBar .button, toolBar .tiddlyLink, #toolBar a { margin-left: 0.3em; margin-right: 0.3em; padding-left: 2px; padding-right: 2px; color: [[ColorPalette::PrimaryPale]]; border: 0px;}
#toolBar .button:hover, toolBar .tiddlyLink:hover { background: [[ColorPalette::PrimaryPale]]; color:[[ColorPalette::PrimaryDark]]; border: 0px;}
/*}}}*/
<<tiddler FramedLink with: Packer "http://dean.edwards.name/packer/">>
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<!-- div id='toolBar' refresh='content' tiddler='ToolBar'></div -->
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='topMenu' refresh='content' tiddler='TopMenu'></div>
<div id='sidebar'>
<!-- div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div -->
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='messageArea'></div>
<div id='displayArea'>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
TiddlyDesktop - set the tiddlers free!
http://www.theravadanetz.de/theravada_glossar.html#P%C4%81%E1%B8%B7i-Sonderzeichen-Unicodes
Pāḷi-Sonderzeichen-Unicodes: Die Angabe von Uni-Code in HTML erfolgt mit & und der Angabe des Hexa-Codes z. B. mit "&x#0100" oder in dezimaler Form mit "& #256" für Ā.
|!Pali- Sonder zeichen|!Hexa dezimal|!Dezimal|!Html-Notation (hexadezimal)|!Html-Notation (dezima)|!Unicode-Bereich|
|Ā|0100|256|"Ā"|"& #256"|Lateinisch-Erweitert A|
|ā|0101|257|"ā"|"& #257"|Lateinisch-Erweitert A|
|Ī|012A|298|"Ī"|"& #298"|Lateinisch-Erweitert A|
|ī|012B|299|"ī"|"& #299"|Lateinisch-Erweitert A|
|Ū|016A|362|"Ū"|"& #362"|Lateinisch-Erweitert A|
|ū|016B|363|"& #x016B"|"& #363"|Lateinisch-Erweitert A|
|Ḍ|1E0C|7692|"Ḍ"|"& #7692"|Lateinisch-Zusatz(erweitert)|
|ḍ|1E0D|7693|"ḍ"|"& #7693"|Lateinisch-Zusatz(erweitert)|
|Ḷ|1E36|7734|"Ḷ"|"& #7734"|Lateinisch-Zusatz(erweitert)|
|ḷ|1E37|7735|"ḷ"|"& #7735"|Leiteinisch-Zusatz(erweitert)|
|Ṁ|1E40|7744|"Ṁ"|"& #7744"|Lateinisch-Zusatz(erweitert)|
|ṁ|1E41|7745|"ṁ"|"& #7745"|Lateinisch-Zusatz(erweitert)|
|Ṃ|1E42|7746|"Ṃ"|"& #7746"|Lateinisch-Zusatz(erweitert)|
|ṃ|1E43|7747|"ṃ"|"& #7747"|Lateinisch-Zusatz(erweitert)|
|Ṅ|1E44|7748|"Ṅ"|"& #7748"|Lateinisch-Zusatz(erweitert)|
|ṅ|1E45|7749|"ṅ"|"& #7749"|Lateinisch-Zusatz(erweitert)|
|Ṇ|1E46|7750|"Ṇ"|"& #7750"|Lateinisch-Zusatz(erweitert)|
|ṇ|1E47|7751|"ṇ"|"& #7751"|Lateinisch-Zusatz(erweitert)|
|Ṭ|1E6C|7788|"Ṭ"|"& #7788"|Lateinisch-Zusatz(erweitert)|
|ṭ|1E6D|7789|"ṭ"|"& #7789"|Lateinisch-Zusatz(erweitert)|
|Ñ|00D1|209|"Ñ"|"& #209"|Lateinische-1-Zusatz|
|ñ|00F1|241|"ñ"|"& #241"|Lateinisch-1-Zusatz|
/***
|''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"
});
*/
//}}}
[[Internal PluginManager|PlugIns]] [[External Plugins|TiddlyMaster]] <<tiddler ShowPopup with: Get "Load on demand" "External Javascript" "" "12em" "">> <<listExtCode>>
<<tiddler LoadLocalPlugin with: Preview PreviewPlugin.js>>
<script label="PublisherMode" title="For use with PublisherPlugin">
if (window.version && window.config && window.store && window.story){var mode=prompt('Enter the mode in which to open the file','Admin');
window.location.hash='mode:'+mode;
window.location.reload(true);}
return false; // ELS: added
</script>
/%
|Name|QuickEditToolbarCommand|
|Source|http://www.TiddlyTools.com/#QuickEditToolbarCommand|
|Version|1.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, QuickEditToolbar|
|Notes|altered: 6.1.08|
|Description|toggles QuickEditToolbar display and option setting|
Usage (in EditTemplate):
<span class='toolbar' macro='tiddler QuickEditToolbarCommand'></span>
%/<script>
// initial default is to NOT show the toolbar
if (config.options.chkShowQuickEdit==undefined) config.options.chkShowQuickEdit=false;
</script><script label="toolbar" title="show QuickEditToolbar">
// click on text toggles checkbox
config.options.chkShowQuickEdit=!config.options.chkShowQuickEdit;
// save cookie when toolbar shown, remove cookie when toolbar hidden
if (config.options.chkShowQuickEdit)
saveOptionCookie("chkShowQuickEdit");
else {
var ex=new Date(); ex.setTime(ex.getTime()-1000);
document.cookie = "chkShowQuickEdit=novalue; path=/; expires="+ex.toGMTString();
}
// set link and title based on option state
place.innerHTML=config.options.chkShowQuickEdit?"[✐]":"✐";
place.title=(config.options.chkShowQuickEdit?"hide":"show")+" QuickEditToolbar";
// refresh all actively displayed tiddler editor(s)
story.forEachTiddler(function(t,e){if (story.isDirty(t)) refreshElements(e);});
return false;
</script><script>
var label=place.lastChild;
// set link and title based on option state
label.innerHTML=config.options.chkShowQuickEdit?"[✐]":"✐";
label.title=(config.options.chkShowQuickEdit?"hide":"show")+" QuickEditToolbar";
// style tweak for link text
label.style.fontWeight="normal";
</script>
/%
|Name|QuickEditToolbar altered|
|Source|http://www.TiddlyTools.com/#QuickEditToolbar|
|Version|2.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.2|
|Type|script|
|Requires|InlineJavascriptPlugin, StickyPopupPlugin|
|Description|quickly insert TiddlyWiki tiddler links or common formatting sequences directly into tiddler content|
Usage (in EditTemplate):
<div macro='tiddler QuickEditToolbar'></div>
The QuickEdit "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 in this script, 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";
example:
config.macros.slider.guideText="cookie TiddlerName label tooltip";
%/<script>
// SET STYLESHEET (for toolbar button style)
setStylesheet(".quickEdit a { border:2px outset ButtonFace; -moz-appearance:button; padding:0px 3px; \
background-color:ButtonFace; color:ButtonText !important; line-height:200%; font-weight:normal; }", "quickEditStyles");
// 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...";
</script>/%
TOOLBAR DEFINITIONS BEGIN HERE...
= = = = = = = = = = = = = = = = =
%/{{hidden fine center quickEdit{
<script>
if (config.options.chkShowQuickEdit) place.style.display="block";
</script>/%
%/<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...','');
s.onchange=function(){
var title=this.value;
var txt=prompt('Enter the text to display for this link',title);
if (!txt) { this.selectedIndex=0; this.focus(); return false; }
config.quickEdit.setSelection(this.button,'[['+txt+'|'+title+']]');
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();
}
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;
">link</a></html>/%
**** MACRO ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="macro|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>/%
**** IMAGE ****
%/<script label="image" title="embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img[tooltip|path/to/file.ext]]">
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(place,"[img["+tip+fn+"]]");
</script>/%
**** 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();
}
Popup.show(p,false);
event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;
">tiddler</a></html>/%
**** FILE ****
%/<script label="file" title="insert content from an external text file">
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 '"+fn+"'"); return; }
return config.quickEdit.setSelection(place,text);
</script>/%
**** FORMATTING ****
%/ <script label=" B " title="''bold''">
return config.quickEdit.wrapSelection(place,"''","''");
</script>/%
%/<script label=" I " title="//italics//">
return config.quickEdit.wrapSelection(place,"//","//");
</script>/%
%/<script label=" H " title="@@highlight@@">
return config.quickEdit.wrapSelection(place,"@@","@@");
</script>/%
%/<script label=" U " title="__underline__">
return config.quickEdit.wrapSelection(place,"__","__");
</script>/%
%/ <script label=" L " title="[[forced link]]">
return config.quickEdit.wrapSelection(place,"[[","]]");
</script>/%
%/<script label=" + " title="--strikethrough--">
return config.quickEdit.wrapSelection(place,"--","--");
</script>/%
%/<script label=" S " title="[[^^superscript^^]]">
return config.quickEdit.wrapSelection(place,"^^","^^");
</script>/%
%/<script label=" s " title="~~subscript~~">
return config.quickEdit.wrapSelection(place,"~~","~~");
</script>/%
**** ALIGNMENT ****
%/ <script label=" ≡ " title="{{center{...}}}">
return config.quickEdit.wrapSelection(place,"{{center{","}}}");
</script>/%
%/<script label=" ≡|" title="{{right{...}}}">
return config.quickEdit.wrapSelection(place,"{{right{","}}}");
</script>/%
%/<script label="<nowiki>|</nowiki>≡|" title="{{justify{{...}}}">
return config.quickEdit.wrapSelection(place,"{{justify{","}}}");
</script>/%
%/ <script label=">≡ " title="{{indent{...}}}">
return config.quickEdit.wrapSelection(place,"{{indent{","}}}");
</script>/%
%/<script label="<≡ " title="{{floatleft{...}}}">
return config.quickEdit.wrapSelection(place,"{{floatleft{","}}}");
</script>/%
%/<script label=" ≡>" title="{{floatright{...}}}">
return config.quickEdit.wrapSelection(place,"{{floatright{","}}}");
</script>/%
**** WRAPPERS ****
%/ <script label="style" title="inline CSS styles - @@attr:value;attr:value;...@@">
var css=prompt("Enter CSS attribute/value pairs (attr:val;attr:val;...;)","");
if (!css) return false; // cancelled by user
return config.quickEdit.wrapSelection(place,"@@"+css,"@@");
</script>/%
%/<script label="class" title="CSS class wrapper - {{classname classname etc{...}}}">
var class=prompt("Enter a CSS classname","");
if (!class) return false; // cancelled by user
return config.quickEdit.wrapSelection(place,"{{"+class+"{","}}}");
</script>/%
**** COLOR ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="text/backgroun color - @@color:#RGB;background-color:#RGB;...@@"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
function hex(d) { return '0123456789ABCDEF'.substr(d,1); }
var fg=createTiddlyElement(p,'select'); fg.button=this;
fg.style.display='inline'; 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 s=this.nextSibling.nextSibling.nextSibling; s.style.color=val;
this.selectedIndex=0; return false;
};
var bg=createTiddlyElement(p,'select'); bg.button=this;
bg.style.display='inline'; 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 s=this.nextSibling.nextSibling; s.style.backgroundColor=val;
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+';';
if (fg.length||bg.length) config.quickEdit.wrapSelection(this.button,'@@'+fg+bg,'@@');
Popup.remove(); return false;
};
var preview=createTiddlyElement(p,'div'); var s=preview.style;
s.width='27em'; s.overflow='hidden'; s.textAlign='center'; s.whiteSpace='normal';
s.color='#000'; s.backgroundColor='#fff'; s.border='1px solid'; s.margin='2px'; s.MozBorderRadius='3px';
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>/%
%/<script label="html" title="<html>html content</html>">
return config.quickEdit.wrapSelection(place,"<html>","</html>");
</script>/%
%/ <script label="quote" title=">inline blockquote>">
return config.quickEdit.wrapSelection(place,">",">");
</script>/%
%/<script label="Quote" title="indented blockquote - <<<">
return config.quickEdit.wrapSelection(place,"\n<<<\n","\n<<<\n");
</script>/%
%/<script label="mono" title="{{{inline monospaced text}}}">
return config.quickEdit.wrapSelection(place,"{{{","}}}");
</script>/%
%/<script label="Code" title="multiline monospaced code box - //{{{...//}}}">
return config.quickEdit.wrapSelection(place,"\n//{{{\n","\n//}}}\n");
</script>/%
%/ <script label="code" title="invisible code - ///%...//%/">
return config.quickEdit.wrapSelection(place,"\n///%\n","\n//%/\n");
</script>/%
%/<script label="comm" title="comment - /%...%/">
return config.quickEdit.wrapSelection(place,"/%","%/");
</script>/%
%/<script label="visibl" title="visible comment - /***...***/">
return config.quickEdit.wrapSelection(place,"\n/***\n","\n***/\n");
</script>/%
**** OTHER ****
%/ <script label="select" title="select all">
var here=story.findContainingTiddler(place); if (!here) return false;
var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
if (!e||e.getAttribute("edit")!="text") return false;
e.select(); e.focus();
return false;
</script>/%
%/<script label="sort" title="sort selected lines of tiddler content">
return config.quickEdit.sortSelection(place);
</script>/%
**** FIND/REPLACE/NEXT/ALL ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="find/replace selected text with replacement text"
onclick="this.id=new Date().getTime+Math.random(); /* UNIQUE ID */
var here=story.findContainingTiddler(this); if (!here) return false;
var tid=here.getAttribute('tiddler');
var e=story.getTiddlerField(tid,'text'); if (!e||e.getAttribute('edit')!='text') return;
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 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);
if (range.findText(t.value,e.value.length,4)) range.select();
else { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); return; }
}
}
};
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;
if ( (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
|| (document.selection && document.selection.createRange().text==''))
this.previousSibling.click(); /* no selection... do FIND first */
var r=this.previousSibling.previousSibling;
if (!r.value.length) { alert('Please enter the replacement text'); r.focus(); r.select(); return; }
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(); t.select(); return; }
if (!r.value.length) { alert('Please enter the replacement text'); r.focus(); r.select(); return; }
var m='This will replace all occurences of:\n\n\''+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>/%
%/}}}/%
END OF TOOLBAR DEFINITIONS
= = = = = = = = = = = = = = = = =
%/<script>
// UTILITY FUNCTIONS (set/get edit field content and "select a file" prompting)
config.quickEdit = {
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 here=story.findContainingTiddler(where); if (!here) return false;
var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
if (!e||e.getAttribute("edit")!="text") return false;
e.focus(); replaceSelection(e,newtext);
return false;
},
wrapSelection: function(where,before,after) {
var here=story.findContainingTiddler(where); if (!here) return false;
var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
if (!e||e.getAttribute("edit")!="text") return false;
e.focus(); replaceSelection(e,before+config.quickEdit.getSelection(e)+after);
return false;
},
sortSelection: function(where) {
var here=story.findContainingTiddler(where); if (!here) return false;
var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
if (!e||e.getAttribute("edit")!="text") return false;
replaceSelection(e,config.quickEdit.getSelection(e).split('\n').sort().join('\n'));
e.focus();
return false;
},
getSelection: function(e) {
var seltext="";
if (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 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;
}
}
</script>
<<tiddler LoadLocalWithRefresh with: RearrangeTiddlers RearrangeTiddlersplugin.js>>
!For v 1.0 (beta 3) (18 Jan 2006)
* Updated the styling and templates to work with 2.0.2
* Added a system tab to the menu
* Divided up the main macro into lots of little ones to make it more importable
* Added an export of the tiddlers required to turn a TiddlyWiki into a TiddlyDesktop
!For v 1.0 (beta 2) (2 Jan 2006)
* ''Save layout'' - remembers the size of the tiddlers, whether they're collapsed and how they're stacked.
* ''Sidebar on top'' - tiddlers now appear under the top and side bars, and you can't drag them completely off the screen.
* ''Long tiddlers scroll'' - when you open a long tiddler the size of the window containing it is fixed so it shouldn't stretch off the bottom of the screen
* ''Desktop Buttons'' now sit in the top bar
!For v 1.0 (beta 1) (31 Dec 2005)
* ''Save layout'' - you can now save the current layout to a hidden tiddler so that when you revisit the wiki you will get the same layout.
* ''Jump to Tiddler expands it''
* ''Cascade resets tiddlers' size''
* All code, templates and styling now in [[_TiddlyDesktopKernel]] macro
!For v 0.1.1 (30 Dec 2005)
* Fixed various resizing / collapsing issues in IE and Opera
* Stopped window bar from growing when you resize
* Made the gradient appear in IE and Opera
* Tidied up some of the stylings a bit
* Disabled animations since it was messing with the layout
* Highlight the window bar when the tiddler is selected
* Fixed a bug I'd introduced in forEachTiddler
Thanks to Elise for some much needed cross-browser / platform QA
!For v 0.1 (30 Dec 2005)
* All the initial TiddlyDesktop work
* Added a list of macros to the "more" list tab
!Fixed List
<<tagList fixed>>
<script label="RenameTag" title="Renames all occurrences of a tag">
if (window.version && window.config && window.store && window.story)
var oldTag=prompt('Enter the tag to rename','oldTag');
var newTag=prompt('Rename tag '+oldTag+' to:','newTag');
var t=store.getTaggedTiddlers(oldTag);store.suspendNotifications();
for(var i=0;i<t.length;i++){t[i].tags.remove(oldTag);t[i].tags.pushUnique(newTag);}
refreshDisplay();
</script>
<script label="RenameTags" title="Renames all occurrences of a single tag with multiple tags.">
if (window.version && window.config && window.store && window.story)
var oldTag = prompt('Enter the tag to rename', 'oldTag');
var newTags = prompt('Rename tag '+oldTag+' to:','newTag');
newTags = newTags.readBracketedList();
var t = store.getTaggedTiddlers(oldTag);
store.suspendNotifications();
var j;
for(var i = 0; i < t.length; i++) {
t[i].tags.remove(oldTag);
for(j = 0; j < newTags.length; j++) {
t[i].tags.pushUnique(newTags[j]);
refreshDisplay();}}
</script>
<script label="RescueRaw" title="Opens a new window containing the raw content of the current document">
if (window.version && window.config && window.store && window.story){var w=window.open();w.document.open();
// ELS: changed 'w.place.innerHTML+=' to 'w.document.writeln'
w.document.writeln('<html><body><pre>');
w.document.writeln(store.allTiddlersAsHtml().htmlEncode());
w.document.writeln('</pre></body></html>');
w.document.close();}
return false; // ELS: added
</script>
<script label="ResizeAllFonts" title="Set font size of the whole site">
void(f=prompt('New font size?','8pt'));
for(i=0;
i<document.getElementsByTagName('*').length;
i++)void(document.getElementsByTagName('*')[i].style.fontSize=f);
return false;
</script>
<script label="eeePCScreen" title="Resize this browser window">
var rto=prompt('Resize this window to:','800*480');if(rto!=null){void(rtoX=parseInt(rto.match(/\d+/)));void(rtoY=parseInt(rto.match(/\d+$/)));void(window.resizeTo(rtoX,rtoY));}
return false;
</script>
<html><a href="" class="button" title="Restart" onclick="restart();">restart</a></html>
When a long tiddler opens it shouldn't go off the bottom of the screen.
* Limit the length of the tiddler when we open it
** By fixing the max size to 400px
** ==By making sure it's not off the bottom of the screen?==
<<tiddler LoadLocalPlugin with: RichText RichTextPlugin.js>>
<<tiddler LoadLocalPlugin with: RunTiddler RunTiddlerPlugin.js>>
<html><a href="javascript:runSEOPlugin();">Run SEOPlugin</a></html>
<<tiddler LoadLocalWithPanel with: SEO SEOPlugin.js>>
<script label="SafeMode" title="Reload the current document in safe mode">if (window.version && window.config && window.store && window.story)window.location.hash='start:safe';window.location.reload(true);</script>
Save the current layout into the a special tiddler [[__tiddlyDesktopLayout]] so that we can come back to the same layout.
Try it here <<saveLayout>> if you want.
!Done
* ==Create macro button for menu "save layout"==
* ==Serialize the Layout.tiddlers array to tiddler==
* ==Have method to restore layout based on array==
* ==Store the size and whether the tiddler is collapsed in the layout so we can restore that too.==
* ==Store the z-index so the tiddlers stack in the same way==
/%
|Name|SaveTiddlerToFile|
|Source|http://www.TiddlyTools.com/#SaveTiddlerToFile|
|Version|1.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|save tiddler SOURCE text to a local file|
Usage: <<tiddler SaveTiddlerToFile with: label tooltip filename path>>
where all parameters are optional, and:
* label - is text to be displayed as a clickable link
* tooltip - is guide text for when you mouseover the link
* filename and path - specify the location in which to save the file. Any "*" characters embedded in the filename or path are automatically replaced with the current tiddler title. If you omit the path, the current document directory is used. If you omit the filename, you will be automatically prompted to select a destination, using a system-specific "prompt for filename" dialog box.
%/<script label="$1" title="$2">
function promptForFilename(msg,path,file,defext)
{
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);
picker.displayDirectory=null;
picker.defaultExtension=defext;
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
}
catch(e) { var result=prompt(msg,path+file); }
}
else { // IE
try { // XP only
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
s.FilterIndex=1; // default to ALL 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;
}
var okmsg="Tiddler source written to %0";
var failmsg="An error occurred while creating %0";
var here=story.findContainingTiddler(place); if (!here) return;
var title=here.getAttribute('tiddler');
var tid=store.getTiddler(title);
var path=getLocalPath(document.location.href);
var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\\");
if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
if ("$3"!="$"+"3") var fn="$3".replace(/\*/g,title); // custom filename with "*" marker to insert tiddlername
if ("$4"!="$"+"4") var path="$4".replace(/\*/g,title); // custom path with "*" marker to insert tiddlername
if ("$3"=="$"+"3") // not filename specified, ask user
var filename=promptForFilename("select an output filename for this tiddler",path,title,""); // ask
else
var filename=path+fn;
if (!filename || !filename.length) return;
var ok=saveFile(filename,tid.text);
var msg=ok?okmsg:failmsg;
var link=ok?"file:///"+filename.replace(/\\/g,'/'):""; // change local path to link text
clearMessage();
displayMessage(msg.format([filename]),link);
</script><script>
place.lastChild.style.fontWeight="normal";
if ("$1"=="$"+"1") place.lastChild.innerHTML="save this tiddler to a file";
if ("$2"=="$"+"2") place.lastChild.title="save this tiddler's SOURCE text to a local file";
</script>
<script label="ScrubFields" title="Delete all extended fields from a TiddlyWiki,">if (window.version && window.config && window.store && window.story)store.forEachTiddler(function(title,tiddler){tiddler.fields={};});refreshDisplay();</script>
<<search>><<tiddler Hide>>
Search results don't look too good since most of them are hidden behind the front window, or are below the visible section of the tiddler display area.
Maybe create simple search results box - with lists of tiddlers found and links to them. Could put in the sentence the results are found in.
Check out Udo's search plugin to see if that can help
<<tiddler LoadLocalWithPanel with: SelectStyleSheet SelectStyleSheetPlugin.js>>
<script label="SetUserName" title="Changes all tiddlers’ “modifier” to the specified value">
if (window.version && window.config && window.store && window.story){var g=prompt('Enter the desired user name',config.options.txtUserName);var t=store.getTiddlers();store.suspendNotifications();for(var i=0;i<t.length;i++)t[i].modifier=g;store.resumeNotifications();story.refreshAllTiddlers();}
return false;
</script>
<<previousTiddler "< back" "Show previous tiddler">>
<<breadcrumbs "<br>" "<br>">>
<<tiddler [[GotoTiddler load]]>>
<script label="ShowCookies" title="Show all cookies stored by this domain">
alert('Cookies stored by this host or domain:\n\n' + document.cookie.replace(/; /g,'\n'));
return false;
</script>
/%
|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 a formatted table, containing PrettyLinks for
filenames, filesizes (in bytes), and modification dates, plus a summary
footer reporting the total file and byte counts.
%/{{hidden small{
<script label="select a folder...">
if (config.browser.isIE) {
try { // XPSP2 IE only -- // TBD: use "browserForFolder" instead of "select a file"
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|';
s.FilterIndex=1;
s.InitialDir=config.options.txtLocalDirectory;
s.FileName='';
var path=s.showOpen()?s.FileName.substr(0,s.FileName.lastIndexOf("\\")+1):null;
}
catch(e) { // fallback for < XPSP2
var path=prompt("Enter a directory path:",config.options.txtLocalDirectory);
}
} 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);
try { thispath.initWithPath(config.options.txtLocalDirectory); }
catch(e) { // if starting directory is not valid, use current document directory
var p=document.location.href; p=p.substr(0,p.lastIndexOf("/")+1);
thispath.initWithPath(getLocalPath(decodeURI(p)));
}
picker.displayDirectory=thispath;
picker.defaultExtension='';
picker.defaultString='';
picker.appendFilters(nsIFilePicker.filterAll);
var path=picker.show()!=nsIFilePicker.returnCancel?picker.file.persistentDescriptor:null;
}
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...">
var h=document.location.href;
config.options.txtLocalDirectory=getLocalPath(decodeURI(h.substr(0,h.lastIndexOf("/")+1)));
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>
function getCurrentFolder() {
var h=document.location.href;
return getLocalPath(decodeURI(h.substr(0,h.lastIndexOf("/")+1)));
}
function getParentFolder(here) {
var lastchar=here.substr(here.length-1,1);
if (lastchar=="/" || lastchar=="\\") here=here.substr(0,here.length-1);
var pos=here.lastIndexOf("/"); if (pos==-1) pos=here.lastIndexOf("\\");
return pos!=-1?here.substr(0,pos+1):null;
}
// default to current location if not already set
if (config.options.txtLocalDirectory==undefined)
config.options.txtLocalDirectory=getCurrentFolder();
// if no path param specified, show interactive 'select a folder' commands
if ("$1"=="$"+"1")
place.lastChild.style.display="block";
else if ("$1".toLowerCase()=="here") // if "here" keyword, use current document directory
config.options.txtLocalDirectory=getCurrentFolder();
else // use path param as specified
config.options.txtLocalDirectory="$1";
// get file list
var files=[];
if (config.browser.isIE) {
// IE uses ActiveX to read filesystem info
var fso = new ActiveXObject("Scripting.FileSystemObject");
if(!fso.FolderExists(config.options.txtLocalDirectory))
{ alert(config.options.txtLocalDirectory+" is not a directory"); return null; }
var dir=fso.GetFolder(config.options.txtLocalDirectory);
for(var f=new Enumerator(dir.SubFolders); !f.atEnd(); f.moveNext()) files.push(f.item());
for(var f=new Enumerator(dir.Files); !f.atEnd(); f.moveNext()) files.push(f.item());
} 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(config.options.txtLocalDirectory); }
catch(e) { // if starting directory is not valid, use current document directory
var result=prompt(config.options.txtLocalDirectory+" not found...\nPlease enter a different path:",config.options.txtLocalDirectory);
if (!result) return null; // cancelled by user
config.options.txtLocalDirectory=result;
try { file.initWithPath(config.options.txtLocalDirectory); }
catch (e) { displayMessage(config.options.txtLocalDirectory+" not found"); return null; }
}
if (!file.exists()) { alert(config.options.txtLocalDirectory+" not found"); return null; }
if (!file.isDirectory()) { alert(config.options.txtLocalDirectory+" is not a directory"); return null; }
var folder=file.directoryEntries;
while (folder.hasMoreElements()) {
var f=folder.getNext().QueryInterface(Components.interfaces.nsILocalFile);
if (f instanceof Components.interfaces.nsILocalFile) files.push(f);
}
}
// set output formats
var header="";
var footer="";
switch ("$2") {
case "plain":
var item="<nowiki>%0</nowiki>\n";
var folderitem="<nowiki>%0</nowiki>\n";
break;
case "list":
var item="[[%1|file:///%0]]\n";
var folderitem="[[%1|file:///%0]]\n";
break;
default:
var header="Index of %0\n^^(as of %1)^^\n|!filename | !size |!modified|\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+' | <dir> |%4|\n';
var footer="|>|>| !Total of %0 bytes in %1 files |\n|borderless|k\n";
var showDirectory=true;
break;
}
// generate output
var out=header.format([config.options.txtLocalDirectory,new Date().toLocaleString()]);
if (showDirectory) { // add "parent folder" (if any) to directory listing
var path=getParentFolder(config.options.txtLocalDirectory);
if (path) out+=('|'+folderscript+' | <dir> | - |\n').format([path,"(parent folder)"]).replace(/\\/g,"\\\\");
}
var total=0;
for (var i=0; i<files.length; i++) { // for each file, 'unpack' file info and generate line items
var f=files[i];
var path=f.path;
var name=config.browser.isIE?f.name:f.leafName;
var url="file:///"+f.path.replace(/\\/g,"/");
var size=config.browser.isIE?f.size:f.fileSize;
var isFolder=config.browser.isIE?fso.FolderExists(f.path):f.isDirectory();
var modified=new Date(config.browser.isIE?f.DateLastModified:f.lastModifiedTime).formatString("YYYY.0MM.0DD 0hh:0mm:0ss");
var line=(isFolder?folderitem:item).format([path,name,url,size,modified]);
if (showDirectory) line=line.replace(/\\/g,"\\\\"); // fixup for PC-style file paths embedded in 'folderscript'
if (!isFolder) total+=size;
out+=line;
}
out+=footer.format([total,files.length]); // add the summary (for directory listings)
return out;
</script>
/%
|Name|ShowPopup|
|Source|http://www.TiddlyTools.com/#ShowPopup|
|Version|1.0.2|
|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|transcluded html|
|Requires||
|Overrides||
|Description|display tiddler content in a TW popup|
usage: <<tiddler ShowPopup with: TiddlerName label tooltip buttonClass width popupClass>>
%/<html><a href="javascript:;" class="$4" title="$3" onclick="var p=Popup.create(this); if (!p) return; var t=store.getTiddler('$1'); if (!t) return; p.className+=' $6'; var d=createTiddlyElement(p,'div'); d.style.whiteSpace='normal'; d.style.width='$5'; d.style.padding='2px'; wikify(t.text,d); Popup.show(p,false); event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); return(false);">$2</a></html>
/%
|Name|ShowTabsForTags|
|Source|http://www.TiddlyTools.com/#ShowTabsForTags|
|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|script|
|Requires||
|Overrides||
|Description|automatically generate a tabbed display for tiddlers with a specified set of tags|
Usage:
<<tiddler ShowTabsForTags with: "tag tag ...">>
where:
"tag tag ..." is a space-separated list of tag values, ALL of which
must be present on the tiddlers that are to be displayed.
%/{{left wrap{<script>
var tags="$1".readBracketedList(); // get tags list from param
if ("$1"=="$"+"1") { // if no tags were specified, then ASK for tags...
var response=prompt("enter tag(s) to match:","txt");
if (!response) return "no tags specified"; // cancelled by user
var tags=response.readBracketedList();
}
// get tiddlers with a least one matching tag, in date order (newest first)
// and, for each tiddler that matches ALL tags, add macro params to output...
var out="";
var tids=store.getTaggedTiddlers(tags[0],'modified').reverse();
for (var t=0; t<tids.length; t++)
if (tids[t].tags.containsAll(tags)) out+='[[%0]] "view %0" [[%0]]'.format([tids[t].title]);
// if any tiddlers matched, output the <<tabs>> macro...
if (out.length) return "<<tabs tabTabsForTags "+out+">>";
// otherwise, output a message with popups for each specified tag...
return "There are no tiddlers tagged with <<tag "+tags.join(">> and <<tag ")+">>";
</script><script>
// add a space between tabs to enable word-wrapping in tabsets with many tabs
// so they can be displayed without horizontal scrolling
var tabset=place.lastChild.firstChild;
if (!tabset || !hasClass(tabset,"tabset")) return; // no tabset... we're done.
var tabs=tabset.getElementsByTagName("A");
for (var t=0; t<tabs.length; t++)
tabset.insertBefore(document.createTextNode(" "),tabs[t]);
</script>}}}
<<tiddler FramedLink with: ShrinkSafe "http://alex.dojotoolkit.org/shrinksafe/">><<resizeFrame>>
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options ≫" "Change TiddlyWiki advanced options">>
<<tabs txtMainTab Calendar 'Calendar' Calendar Content 'Stuff to read' TabContent System 'The engine room' TabSystem>><<moveablePanel noedges>>
Set the Tiddlers free!  Resize to: '<<tiddler ResizeWindow>>'  <<tiddler ToggleTopMenu>>
Import the smiley macro cos it's fun
/***
|Name|StickyPopupPlugin ''altered''|
|Source|http://www.TiddlyTools.com/#StickyPopupPlugin|
|Version|1.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|
|Overrides|Popup.onDocumentClick|
|Description|allow mouse interactions inside popups without automatically closing them|
***/
//{{{
version.extensions.StickyPopups= {major: 1, minor: 0, revision: 0, date: new Date(2007,11,25)};
if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;
Popup.stickyPopup_onDocumentClick = function(ev)
{
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)
Popup.onDocumentClick(ev);
return true;
};
removeEvent(document,"click",Popup.onDocumentClick);
addEvent(document,"click",Popup.stickyPopup_onDocumentClick);
//}}}
[[TiddlyDesktopStyle]]
[[HoverMenuStyles]]
[[OtherStyle]]
[[CalendarStyle]]
[[StyleSheetAccordionMenuPlugin]]
[[StyleSheetDropDownMenuPlugin]]
.insBtn{float:left;width:25%;}
/*{{{*/
ul.accordion br { display:none;}
ul.accordion, ul.accordion li, ul.accordion li ul { margin:0; padding:0; list-style-type:none; text-align:left; }
ul.accordion li ul { display:none;}
ul.accordion li.accordion-active ul { display:block;}
ul.accordion li.accordion-active a { cursor:default;}
ul.accordion li.accordion-active ul li a{ cursor:pointer;}
ul.accordion a {display:block; padding:0.3em 0.5em 0.3em 1em;}
ul.accordion li a.tiddlyLink, ul.accordion li a.tiddlyLinkNonExisting, ul.accordion li a { font-weight:bold;}
ul.accordion li a {background:[[ColorPalette::PrimaryMid]]; color:#FFF; border-top:1px solid #fff;}
ul.accordion li.accordion-active a, ul.accordion li a:hover { background:[[ColorPalette::PrimaryLight]]; color:#FFF;}
ul.accordion li ul li{display:inline-block;overflow:hidden;}
ul.accordion li.accordion-active ul li {background:#eff3fa; color:#000; padding:0em;}
ul.accordion li.accordion-active ul li div {padding:1em 1.5em; background:#eff3fa;}
ul.accordion li.accordion-active ul a{background:#eff3fa; color:#000; padding:0.3em 0.5em 0.3em 1em; border:none;}
ul.accordion li.accordion-active ul a:hover {background:#e0e8f5; color:#000;}
/*}}}*/
/*{{{*/
/***** LAYOUT STYLES - DO NOT EDIT! *****/
ul.suckerfish, ul.suckerfish ul { margin: 0; padding: 0; list-style: none; line-height:1.4em;}
ul.suckerfish li { display: inline-block; display: block; float: left;}
ul.suckerfish li ul { position: absolute; left: -999em; }
ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul { left: auto; z-index:999; }
ul.suckerfish ul li { float: none; border-right: 0; border-left:0; }
ul.suckerfish a, ul.suckerfish a:hover { display: block; }
ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}
/**** END LAYOUT STYLES *****/
/**** COLORS AND APPEARANCE - DEFAULT *****/
ul.suckerfish li a { padding: 0.4em 0.8em; color: #FFF; background: [[ColorPalette::PrimaryMid]]; border-bottom: 0; border-top:1px solid #fff; border-left:1px solid #fff; font-weight:bold; }
ul.suckerfish li:hover a, ul.suckerfish li.sfhover a { background: [[ColorPalette::PrimaryLight]]; }
ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a { color: #000; background: #eff3fa; border-top:1px solid #FFF; }
ul.suckerfish ul li a:hover { background: #e0e8f5; }
ul.suckerfish li a { width: auto; }
ul.suckerfish ul li a, ul.suckerfish ul li a:hover { display:inline-block; width: auto; }
ul.suckerfish li { border-left: 1px solid #00558F; }
/***** END COLORS AND APPEARANCE - DEFAULT *****/
/***** LAYOUT AND APPEARANCE: VERTICAL *****/
ul.suckerfish.vertical li{ width: 10em; border-left: 0px solid [[ColorPalette::PrimaryMid]]; }
ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{ border-left: 0.8em solid [[ColorPalette::PrimaryMid]]; }
ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a, ul.suckerfish.vertical li.sfhover a:hover{ width: 8em; }
ul.suckerfish.vertical { width: 10em; text-align:left; float:left; }
ul.suckerfish.vertical li a { padding: 0.5em 1em 0.5em 1em; border-top:1px solid #fff; }
ul.suckerfish.vertical, ul.suckerfish.vertical ul { line-height:1.4em; }
ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul { margin: -2.4em 0 0 10.9em; }
ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a { border: 0px solid #FFF; }
ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{ padding-right: 1.1em; }
ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li { border-bottom: 1px solid #fff; }
/***** END LAYOUT AND APPEARANCE: VERTICAL *****/
/*}}}*/
/*{{{*/
/***** LAYOUT STYLES - DO NOT EDIT! *****/
ul.suckerfish, ul.suckerfish ul {
margin: 0;
padding: 0;
list-style: none;
line-height:1.4em;
}
ul.suckerfish li {
display: inline-block;
display: block;
float: left;
}
ul.suckerfish li ul {
position: absolute;
left: -999em;
}
ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul {
left: auto;
}
ul.suckerfish ul li {
float: none;
border-right: 0;
border-left:0;
}
ul.suckerfish a, ul.suckerfish a:hover {
display: block;
}
ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}
/**** END LAYOUT STYLES *****/
/**** COLORS AND APPEARANCE - DEFAULT *****/
ul.suckerfish li a {
padding: 0.5em 1.5em;
color: #FFF;
background: #0066aa;
border-bottom: 0;
font-weight:bold;
}
ul.suckerfish li:hover a, ul.suckerfish li.sfhover a{
background: #00558F;
}
ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a{
color: #000;
background: #eff3fa;
border-top:1px solid #FFF;
}
ul.suckerfish ul li a:hover {
background: #e0e8f5;
}
ul.suckerfish li a{
width:9em;
}
ul.suckerfish ul li a, ul.suckerfish ul li a:hover{
display:inline-block;
width:9em;
}
ul.suckerfish li {
border-left: 1px solid #00558F;
}
/***** END COLORS AND APPEARANCE - DEFAULT *****/
/***** LAYOUT AND APPEARANCE: VERTICAL *****/
ul.suckerfish.vertical li{
width:10em;
border-left: 0px solid #00558f;
}
ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a {
border-left: 0.8em solid #00558f;
}
ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a, ul.suckerfish.vertical li.sfhover a:hover{
width:8em;
}
ul.suckerfish.vertical {
width:10em; text-align:left;
float:left;
}
ul.suckerfish.vertical li a {
padding: 0.5em 1em 0.5em 1em;
border-top:1px solid #fff;
}
ul.suckerfish.vertical, ul.suckerfish.vertical ul {
line-height:1.4em;
}
ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul {
margin: -2.4em 0 0 10.9em;
}
ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a {
border: 0px solid #FFF;
}
ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{
padding-right:1.1em;
}
ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li {
border-bottom:1px solid #fff;
}
/***** END LAYOUT AND APPEARANCE: VERTICAL *****/
/*}}}*/
/*{{{*/
BODY {
background-color: #ddd;
}
.collapsible {
margin: 4px;
}
.scrollable {
margin: 4px;
overflow: auto;
}
.windowBar {
color: #fff;
background-color: #04b;
cursor:pointer;
padding: 2px 2px 2px 4px;
}
.windowBar .title {
color: #ccc;
font-size: 1em;
cursor:move;
}
.selected .windowBar .title {
color: #fff;
}
.tiddler {
position: relative;
width: 500px;
border: solid 1px;
border-color: #999;
background-color: #fff;
padding: 0px;
}
.viewer {
background:white;
}
.windowToolbar {
text-align: right;
float: right;
}
.collapsible .toolbar {
text-align: right;
margin-top: 4px;
}
.sizer {
text-align: right;
cursor: move;
background-color: #ccc;
}
.sizer .resizer {
color: #fff;
background-color: #aaa;
padding: 0px 2px 0px 2px;
}
.tiddler .windowBar .button {
color: #04b;
background-color: #fff;
margin-right: 2px;
padding: 0em 0.4em;
border: solid 1px #ccc;
}
.tiddler .windowBar .button:Hover {
background-color: #8cf;
border-color: #04b;
}
h1,h2,h3,h4,h5 {
color: #04b;
background: transparent;
padding-left: 2px;
}
h1,h2 {
color: #04b;
background: transparent;
border-bottom: solid 1px #04b;
}
.tagging A, .tagged A {
border: none !important;
background-color: transparent !important;
}
.selected .tagging A, .selected .tagged A {
}
.tagging A:Hover, .tagged A:Hover {
border: none !important;
background-color: transparent !important;
color: #f00 !important;
}
#sidebarCopyright {
background-color: #ddd;
color: #666;
padding: 10px 4px 20px 4px;
}
#sidebarCopyright A {
color: #555;
}
#sidebarCopyright A:Hover {
color: #f00;
background-color: transparent;
}
#titleLine {
padding: 1em 0em 1em 0em;
}
#siteTitle {
font-size: 1em;
margin-left: 5px;
}
#siteTitle A {
color: #8cf;
}
#siteTitle A:hover {
color: #fff;
background-color: transparent;
}
#siteSubtitle {
font-size: .9em;
color: #fff;
}
#displayArea {
margin: 1em 17em 0em 2em;
}
.subtitle {
font-size: 1em;
text-align: right;
float: right;
padding-top: 1em;
}
#desktopButtons {
float: right;
}
#desktopButtons A {
font-weight: normal !important;
margin-right: .25em;
color: #ccc;
font-size: .9em;
padding: .1em .5em;
border: solid 1px #18f;
}
#desktopButtons A:Hover {
color: #fff;
border: solid 1px #04b;
background-color: #18f;
}
#sidebar {
background-color: #fff;
border-left: solid 1px #ccc;
border-bottom: solid 1px #ccc;
}
.tabContents {
border-left: 1px solid #fff;
}
.tabContents .tabContents {
border-left: 1px solid #ccc;
}
/*}}}*/
<script label="SuperSafeMode" title="Reloads the current document in safe mode and reset all shadow tiddlers">
if (window.version && window.config && window.store && window.story){window.location.hash='start:safe';
window.location.reload(true);
for(var n in config.shadowTiddlers){store.suspendNotifications();store.removeTiddler(n);
store.resumeNotifications();refreshAll();}}
return false; // ELS: added
</script>
<<closeAll>>
<<permaview>>
<<newTiddler tag:"new">>
<<saveChanges>>
<<tiddler Restart>>
<<tiddler "Backup load">>
+++ downloads..
<<tiddler Download>>
===
+++ options..
<<tiddler Opt>>
===
SideBarTabs
<<tiddler GoogleSearch>>
MiniBrowser
+++ more..
{{tiny{Initial loading required:}}}
<<tiddler "YourSearch load">>
===
<script label="?" title="Shows TiddlyWiki core version, filedate and tiddler summary">
if (window.version) {
var ver=version.major+'.'+version.minor+'.'+version.revision;
var tids=window.store.getTiddlers('modified').reverse();
var plugins=window.store.getTaggedTiddlers('systemConfig','modified').reverse();
var msg='TiddlyWiki version: '+ver
+'\nDocument modified: '+document.lastModified
+'\nLast tiddler changed: '+tids[0].title
+'\n\nThere are a total of '+tids.length+' tiddlers,'
+' including '+plugins.length+' plugins:\n\n';
if (plugins.map)
msg+=plugins.map(function(t){ return t.modified.formatString('YYYY.0MM.0DD 0hh:0mm:0ss')+' | '+t.title; }).join('\n');
alert(msg);
}
return false;
</script>
<<tabs txtMainTab Tags 'All tags' TabTags All 'All tiddlers' TabAll Timeline Timeline TabTimeline>>
<<tabs txtMoreTab Shadowed 'Shadowed tiddlers' TabMoreShadowed Missing 'Missing tiddlers' TabMoreMissing Orphans 'Orphaned tiddlers' TabMoreOrphans>>
<<tabs txtSystemTab More 'More lists' TabMore Macros 'Macros / plugins' TabSystemMacros Desktop 'Desktop system tiddlers' TabSystemDesktop>>
<<tabs txtTabbedListtags a-e 'Tiddlers in a-e' TAGSa-e f-j 'Tiddlers in f-j' TAGSf-j k-o 'Tiddlers in k-o' TAGSk-o p-s 'Tiddlers in p-s' TAGSp-s t-z 'Tiddlers in t-z' TAGSt-z \W 'Tiddlers in \W' TAGS\W >><<tiddler ShowPopup with: OpenAllTagged "Open All Tagged" "Open all tiddler with a common tag" "" "" "">>
/***
|Name|TaggedTemplateTweak ''altered''|
|Source|http://www.TiddlyTools.com/#TaggedTemplateTweak|
|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|
|Overrides|Story.prototype.chooseTemplateForTiddler()|
|Description|use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values|
***/
//{{{
version.extensions.taggedTemplate= {major: 1, minor: 1, revision: 0, date: new Date(2007,6,18)};
Story.prototype.taggedTemplate_chooseTemplateForTiddler = Story.prototype.chooseTemplateForTiddler
Story.prototype.chooseTemplateForTiddler = function(title,template)
{
var template=this.taggedTemplate_chooseTemplateForTiddler.apply(this,arguments);
var tiddler=store.getTiddler(title); if (!tiddler) return template;
for (t=0; t<tiddler.tags.length; t++) {
var tag=tiddler.tags[t];
if (store.tiddlerExists(tag+template)) { template=tag+template; break; }
var cap=tag.substr(0,1).toUpperCase()+tag.substr(1);
if (store.tiddlerExists(cap+template)) { template=cap+template; break; }
}
return template;
}
//}}}
<<tiddler LoadLocalWithPanel with: TaskTimer TaskTimerPlugin.js>>
<<tiddler LoadLocalPlugin with: TemporaryTiddlers TemporaryTiddlersPlugin.js>>
<<tiddler LoadLocalPlugin with: TextArea TextAreaPlugin.js>>
/***
|Name|TextAreaPlugin ''altered''|
|Source|http://www.TiddlyTools.com/#TextAreaPlugin|
|Version|2.1.9|
|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|
|Overrides|Story.prototype.focusTiddler|
|Description|Adds extra keyboard functions to the standard textarea control in the tiddler editor|
***/
//{{{
version.extensions.textAreaPlugin= {major: 2, minor: 1, revision: 9, date: new Date(2008,1,8)};
//}}}
//{{{
if (config.options.chkTextAreaExtensions===undefined) config.options.chkTextAreaExtensions=true;
if (config.options.chkDisableAutoSelect===undefined) config.options.chkDisableAutoSelect=true;
if (config.options.chkResizeEditor===undefined) config.options.chkResizeEditor=true;
if (config.options.chkResizeEditor)
config.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/deleteTiddler/,"deleteTiddler autosizeEditor");
if (config.options.chkResizeEditor)
config.shadowTiddlers.EditTemplate+="<span macro='resizeEditor'></span>";
Story.prototype.TextAreaExtensions_focusTiddler=Story.prototype.focusTiddler;
Story.prototype.focusTiddler = function(title,field)
{
this.TextAreaExtensions_focusTiddler.apply(this,arguments);
var e = this.getTiddlerField(title,field);
if (e && config.options.chkDisableAutoSelect) {
if (e.setSelectionRange)
e.setSelectionRange(0,0);
else if (e.createTextRange)
{ var r=e.createTextRange(); r.collapse(true); r.select(); }
}
if (e && config.options.chkTextAreaExtensions) addKeyDownHandlers(e);
}
function addKeyDownHandlers(e)
{
if (e.tagName.toLowerCase()!="textarea"||!e.setSelectionRange||e.initialized) return;
var processed=function(ev) {
ev.cancelBubble=true;
try{event.keyCode=0;}catch(e){};
if (window.event) ev.returnValue=false;
if (ev.preventDefault) ev.preventDefault();
if (ev.stopPropagation) ev.stopPropagation();
return false;
}
e.saved_onkeydown=e.onkeydown;
e.onkeydown=function(ev) { if (!ev) var ev=window.event;
var key=ev.keyCode;
if (!key) {
var char=event.which?event.which:event.charCode;
if (char==102) key=70;
if (char==103) key=71;
}
if (ev.ctrlKey && (key==70||key==71)) {
var defFind=e.findText?e.findText:e.value.substring(e.selectionStart,e.selectionEnd);
if (key==70||!e.findText||!e.findText.length)
{ var f=prompt("find:", defFind); e.focus(); if (f) e.findText=f; }
if (!e.findText||!e.findText.length) return processed(ev);
var newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase(),e.selectionStart+1);
if (newstart==-1) newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase());
if (newstart==-1) { alert("'"+e.findText+"' not found"); e.focus(); return processed(ev); }
e.setSelectionRange(newstart,newstart+e.findText.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);
window.status="line: "+thisline+"/"+linecount;
return processed(ev);
}
if (e.saved_onkeydown)
e.saved_onkeydown(ev);
}
e.initialized=true;
}
config.commands.autosizeEditor = {
text: 'autosize',
tooltip: 'automatically adjust the editor height to fit the contents',
text_alt: '[autosize]',
tooltip_alt: 'reset the editor to the standard height',
hideReadOnly: false,
handler: function(event,src,title) {
var here=story.findContainingTiddler(src); if (!here) return;
var ta=here.getElementsByTagName('textarea'); if (!ta) return;
for (i=0;i<ta.length;i++) {
if (ta[i].getAttribute("edit")==undefined) continue;
ta[i].button=src;
if (!ta[i].maxed)
config.commands.autosizeEditor.on(ta[i]);
else
config.commands.autosizeEditor.off(ta[i],true);
}
return false;
},
on: function(e) {
if (e.maxed) return;
if (e.savedheight==undefined)
e.savedheight=e.style.height;
if (e.savedkeyup==undefined) {
e.savedkeyup=e.onkeyup;
e.onkeyup=function(ev) {
if (!ev) var ev=window.event; var e=resolveTarget(ev);
e.style.height=e.scrollHeight+'px';
if (e.savedkeyup) e.savedkeyup();
}
}
if (!config.browser.isIE && e.savedkeypress==undefined) {
e.savedkeypress=e.onkeypress;
e.onkeypress=function(ev) {
if (!ev) var ev=window.event; var e=resolveTarget(ev);
if (ev.keyCode==33) {
if (window.scrollByPages) window.scrollByPages(-1);
return false;
}
if (ev.keyCode==34) {
if (window.scrollByPages) window.scrollByPages(1);
return false;
}
if (e.savedkeypress) e.savedkeypress();
}
}
e.style.height=e.scrollHeight+'px';
e.button.innerHTML=config.commands.autosizeEditor.text_alt;
e.button.title=config.commands.autosizeEditor.tooltip_alt;
e.maxed=true;
},
off: function(e,resetHeight) {
if (resetHeight) e.style.height=e.savedheight;
e.onkeyup=e.savedkeyup;
if (!config.browser.isIE) e.onkeypress=e.savedkeypress;
e.button.innerHTML=config.commands.autosizeEditor.text;
e.button.title=config.commands.autosizeEditor.tooltip;
e.maxed=false;
}
};
config.macros.resizeEditor = {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var here=story.findContainingTiddler(place); if (!here) return;
var ta=here.getElementsByTagName('textarea');
if (ta) for (i=0;i<ta.length;i++) {
if (ta[i].getAttribute("edit")==undefined) continue;
new window.TextAreaResizer(ta[i]);
}
}
}
config.macros.resizeTiddler = {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var here=story.findContainingTiddler(place); if (!here) return;
var elems=here.getElementsByTagName('div');
if (elems) for (i=0;i<elems.length;i++) if (hasClass(elems[i],'viewer')) break;
if (i<elems.length) new window.TextAreaResizer(elems[i]);
}
}
config.macros.resizeFrame = {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var here=story.findContainingTiddler(place); if (!here) return;
var fr=here.getElementsByTagName('iframe');
if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
}
}
window.TextAreaResizer = function(elt) {
this.element = elt;
this.create();
}
window.TextAreaResizer.prototype = {
create : function() {
var elt = this.element;
var thisRef = this;
var h = this.handle = document.createElement("div");
h.style.height = "3px";
h.style.overflow = "hidden";
h.style.width="auto";
h.style.backgroundColor = "#999";
h.style.cursor = "s-resize";
h.title = "Drag to resize text box";
h.onmousedown=function(evt){thisRef.dragStart(evt)};
elt.parentNode.insertBefore(h, elt.nextSibling);
},
dragStart : function(evt) {
if (!evt) var evt=window.event;
this.dragStop(evt);
var thisRef = this;
this.dragStartY = evt.clientY;
this.dragStartH = this.element.offsetHeight;
document.savedmousemove=document.onmousemove;
document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};
document.savedmouseup=document.onmouseup;
document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};
},
dragMove : function(evt) {
if (!evt) var evt=window.event;
var h=this.dragStartH+evt.clientY-this.dragStartY;
if (h<10) h=10; this.element.style.height=h+"px";
this.handle.style.width=(this.element.offsetWidth-4)+"px";
if (this.element.maxed!=undefined && this.element.maxed)
config.commands.autosizeEditor.off(this.element,false);
},
dragStop : function(evt) {
if (!evt) var evt=window.event;
document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;
document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;
},
destroy : function() {
var elt = this.element;
elt.parentNode.removeChild(this.handle);
elt.style.height = "";
}
};
//}}}
{{tidIDE{<<tiddler QuickEditToolbar>><<tidIDE id:$1 CompareTiddlers TiddlyTweaker +edit>><<resizeEditor>>}}}
<<tiddler LoadLocalWithPanel with: TidIDE TidIDEPlugin.js>> [[- Panel only|TidIDE]]
<<slider chkSliderOptionsPanel TidIDEHere "✐" "Edit this tiddler using the TiddlyWiki Integrated Development Environment">><<moveablePanel>>
<<tiddler ShowPopup with: TidIDEHere "✐" "TidIDE editor for current tiddler" "" "" "">>
{{tidIDE{<<tiddler QuickEditToolbar>><<tidIDE id:$1 CompareTiddlers TiddlerTweaker +edit:here>><<resizeEditor>>}}}
<<tiddler LoadLocalPlugin with: TiddlerBackup BackupCommand.js>>
/***
|''Name:''|TiddlerListMacro ''compressed''|
|''Version:''|2.3 (8-Jan-2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Documentation:''|[[TiddlerListMacroDocumentation|http://jackparke.googlepages.com/jtw.html#TiddlerListMacroDocumentation]]|
***/
//{{{
version.extensions.tiddlerList={major:2,minor:3,revision:0,date:new Date("Jan 08, 2008")};config.macros.tiddlerList={formats:{list:true,nlist:true,span:true,stack:true,csv:true,table:true},templates:{list:["%0\n","* %0\n","","%group\n","%0\n"],nlist:["%0","# %0\n","","%group\n","%0\n"],span:["%0","%0"," ","%group","%0"],stack:["%0","%0","\n","%group","%0"],csv:["%0","%0",", ","%0","%0\n"],table:["|!%0|\n","|%0|\n","","|%group|\n","|%0|\n"]},dateFormat:"DD MMM YYYY"};if(typeof gCurrentTiddler=="undefined"){var gCurrentTiddler}config.macros.tiddlerList.handler=function(_1,_2,_3,_4,_5,_6){var _7=0,groupCount=0,theGroup="",lastGroup="",firstInGroup=false;var _8=_6;gCurrentTiddler=_6;var _9="";var _a=this.formats;var _b=_5.parseParams("name",null,true);var _c=_b[0]["tags"]?_b[0]["tags"][0].split(","):[];var _d=_b[0]["order"]?_b[0]["order"][0]:"title";var _e=_b[0]["top"]?_b[0]["top"][0]:-1;var _f=_b[0]["text"]?_b[0]["text"][0]:"";var _10=_b[0]["title"]?_b[0]["title"][0]:"";var _11=_b[0]["search"]?_b[0]["search"][0]:"";var _12=_b[0]["filter"]?_b[0]["filter"][0]:"";var _13=_b[0]["header"]?paramFormat(_b[0]["header"][0]):"";var _14=_b[0]["footer"]?paramFormat(_b[0]["footer"][0]):"";var _15=_b[0]["group"]?_b[0]["group"][0]:"";var _16=_b[0]["dateFormat"]?_b[0]["dateFormat"][0]:this.dateFormat;var _17=_b[0]["customParameter"]?_b[0]["customParameter"][0]:"";var _18=_b[0]["format"]?_b[0]["format"][0]:"list";_18=_a[_18]?_18:"list";var _19=_b[0]["separator"]?paramFormat(_b[0]["separator"][0]):(_b[0]["seperator"]?paramFormat(_b[0]["seperator"][0]):this.templates[_18][2]);var _1a=this.templates[_18][3];if(_b[0]["groupTemplate"]){_1a=paramFormat(_b[0]["groupTemplate"][0])}_1a=_1a.replace("$))",">>");var _1b="";if(_b[0]["groupFooterTemplate"]){_1b=paramFormat(_b[0]["groupFooterTemplate"][0])}_1b=_1b.replace("$))",">>");var _1c=this.templates[_18][1];if(_b[0]["itemTemplate"]){_1c=paramFormat(_b[0]["itemTemplate"][0])}_1c=_1c.replace("$))",">>").replace("%link","%0").replace("%item","%1").replace("%abstract","%2").replace("%text","%3").replace("%created","%4").replace("%modified","%5").replace("%modifier","%6").replace("%group","%7").replace("%title","%8").replace("%tags","%9").replace("%nolink","%10").replace("%custom","%11");var _1d=this.templates[_18][4].replace("%count","%1");var _1e=store.reverseLookup("tags","excludeLists",false);if(!_d){_d="title"}if(_d.match(/^\-/i)){_d=_d.substr(1);var _1f=true}if(_d.match(/(title)|(text)|(modifier)|(modified)|(created)|(tags)/)){if(_1f){_1e.sort(function(a,b){if(a[_d]==b[_d]){return(0)}else{return(a[_d]>b[_d])?-1:+1}})}else{_1e.sort(function(a,b){if(a[_d]==b[_d]){return(0)}else{return(a[_d]<b[_d])?-1:+1}})}}else{if(_1f){_1e.sort(function(a,b){if(a.fields[_d]==b.fields[_d]){return(0)}else{return(a.fields[_d]>b.fields[_d])?-1:+1}})}else{_1e.sort(function(a,b){if(a.fields[_d]==b.fields[_d]){return(0)}else{return(a.fields[_d]<b.fields[_d])?-1:+1}})}}if(_13){_9+=formatItem(this.templates[_18][0],[_13],_18)}for(var t=0;t<_1e.length;t++){_6=_1e[t];if(_f!=""&&_6.text==""){_6.text=store.getValue(_6,"text")}if(_e==-1||_7<_e){if(_f==""||_6.text.match(_f)){if(_10==""||_6.title.match(_10)){if(_11==""||(_6.title.match(_11)||_6.text.match(_11))){if(_12==""||eval(_12)){if(_c.length==0||compareArrays(_6.tags,_c,"all")){_7++;if(_6.text==""){_6.text=store.getValue(_6,"text")}if(_15){theGroup=eval(_15);if(theGroup!=lastGroup){groupCount++;firstInGroup=true;if(_1b&&groupCount>1){_9+=_1b.replace("%group",theGroup)}_9+=_1a.replace("%group",theGroup);lastGroup=theGroup}else{firstInGroup=false}}if(_7>1&&!firstInGroup){_9+=_19}var _29=_6.title.match(config.textPrimitives.wikiLink)?"~"+_6.title:_6.title;if(_17){var _2a=""}try{_2a=eval(_17)}catch(e){}var _2b=formatItem(_1c,["[["+_6.title+"]]",_7,_6.text.substr(0,300),_6.text,_6.created.formatString(_16),_6.modified.formatString(_16),_6.modifier,theGroup,_6.title,_6.tags.join(" "),_29,_2a],_18);for(var fld in _6.fields){_2b=_2b.replace("%field."+fld,_6.fields[fld])}_9+=_2b}}}}}}}if(_15&&_1b&&_7>0){_9+=_1b.replace("%group",theGroup)}if(_14){_14=_14.replace("%count",_7);_9+=formatItem(_1d,[_14],_18)}if(!_b[0]["debug"]){wikify(_9,_1,null,_8)}else{_1.innerHTML="<textarea style=\"width:100%;\" rows=30>"+_9+"</textarea>"}function paramFormat(_2d){return _2d.replace(/\\n/g,"\n")}function formatItem(_2e,_2f,_30){if(_30.match(/table/)&&_2f[0].match(/\|/)){return("%0\n").format(_2f)}else{return _2e.format(_2f)}}function compareArrays(_31,_32,_33){var _34=0;for(var v=0;v<_32.length;v++){if(_32[v].replace(/^\s+|\s+$/g,"").match(/^\-/)&&!_31.contains(_32[v].replace(/^\s+|\s+$/g,"").substr(1))){_34++}else{if(_31.contains(_32[v])){_34++}}}return((_33=="all"&&_34==_32.length)||(_33!="all"&&_34>0))}};String.prototype.prettyTrim=function(len,_37,_38){var _39=this.trim().replace(/\r\n/g," ").replace(/\n/g," ");if(!_37){_37=""}if(!_38){_38=""}if(_39.length>len-3){return _37+_39.substr(0,len)+"..."+_38}else{if(_39.length>0){return _37+_39+_38}else{return _39}}};
//}}}
<<tiddler LoadLocalWithPanel with: TiddlerTweaker TiddlerTweakerPlugin.js>>
/***
|''Name:''|TiddlyCalendar ''compressed''|
|''Description:''|Tiddlers Calendar and Date picker|
|''Version:''|1.0.0|
|''Date:''|Nov 21, 2007|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License]]|
|''~CoreVersion:''|2.2.3|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
|''Optional''|DatePlugin|
***/
//{{{
version.extensions.tCalendar={major:1,minor:0,revision:0,date:new Date("Nov 21, 2007")};function Calendar(){this.locale=Calendar.locale;this.styles=Calendar.styles;this.callback={fn:null,fnEnable:false,option:null,params:{date:null,title:null,celldate:null,cellClass:null,dateFmt:null}};return this}Calendar.locale="en";Calendar[Calendar.locale]={dates:{days:["Su","M","Tu","W","Th","F","Sa"],yearFmt:"YYYY",monthFmt:"mmm YYYY",dateFmt:"MMM DD, YYYY",longHolidayFmt:"0DD/0MM/YYYY",shortHolidayFmt:"0DD/0MM",startOfWeek:0,weekends:[true,false,false,false,false,false,true],holidays:[]}};Calendar.styles=""+"\ntable.calendarWrapper {border-collapse:collapse; border:2px solid #c6dbff;}"+"\n.calendarWrapper td {border-collapse:collapse; border:1px solid #c6dbff; text-align:center;margin:0; padding:0 0.05em;}"+"\ntable.calendar {border-collapse:collapse; border:0;}"+"\n.calendar tbody, .calendar th, .calendar td, .calendar tr {border:0; text-align:center; font-size:1em; padding:0 0.1em;}"+"\n.calendar th {color:#000; background-color:#c6dbff;}"+"\n#sidebarOptions .calendar td {font-size:0.96em; margin:0; padding:0;}"+"\n#sidebarTabs .calendar td, #mainMenu .calendar td {padding:0 0.25em;}"+".calendar .naviBar select {border:0;}"+"\n.calendar .today a {padding:0; border:1px solid blue;}"+"\n.calendar .weekend {background-color:#deeeff;}"+"\n.calendar .hasChanged {font-family:bold; background-color:#fe8; color:darkblue;}"+"\n.calendar .holiday {font-weight:bold; font-size:1.06em; color:red;}"+"\n.datePopup {background:#efffff;} .datePopup .isCreated {color:#df6300;}"+"\n";Calendar.prototype.show=function(_1,_2,_3,_4){var y,m=new Date().getMonth()+1,c=1;c=isNaN(_4)?(isNaN(_2)&&isNaN(_3)?c:(!isNaN(_2)&&isNaN(_3)?12:c)):parseInt(_4);m=isNaN(_3)?(isNaN(_2)?m:(isNaN(_3)?1:parseInt(_3))):parseInt(_3);y=isNaN(_2)?new Date().getFullYear():parseInt(_2);this.dateFmt=(this.callback.params.dateFmt)?this.callback.params.dateFmt:Calendar[this.locale].dates.dateFmt;for(var i=0;i<c;i++){var _7=new Date(y,m-1+i,1);if((m+i)%12==1||i==0){var _8=createTiddlyElement(_1,"table",null,"calendarWrapper");var _9=createTiddlyElement(_8,"tbody");if(c>1&&m==1&&c%12==0){this.naviBar(_8,_9,_7,true)}}if(i%3==0){var tr=createTiddlyElement(_9,"tr",null,"monthRow")}var td=createTiddlyElement(tr,"td");td.vAlign="top";this.selectMonth(td,_7)}if(c>3){Calendar.dummyDateCell(tr,(3-c%3)%3,2)}};Calendar.prototype.selectMonth=function(_c,_d){var _e=_d.getFullYear();var _f=createTiddlyElement(_c,"table",null,"calendar");var _10=createTiddlyElement(_f,"tbody");this.naviBar(_c,_10,_d);if(store.isDirty()||!Calendar.tiddlers){Calendar.hashTiddlers(_d)}this.showMonth(_10,_d)};Calendar.prototype.naviBar=function(_11,_12,_13,_14){var cal=this;var _16=createTiddlyElement(createTiddlyElement(_12,"tr"),"td",null,"naviBar",null,{colSpan:7});var _17=function(s,_19,_1a){if(_1a){cal.show(s.parentNode,_19.getFullYear(),1,12);removeNode(s)}else{cal.selectMonth(s,_19,cal.dateFmt);removeNode(s.firstChild)}};var _1b=function(ev){var e=ev?ev:window.event;var _1e=null;for(var i=0,options=this.options;i<this.options.length;i++){if(options[i].selected){_1e=new Date(options[i].value)}}_17.call(this,_11,_1e,_14);return false};var _20=_13.getFullYear();var n=3;var y=_14?_20-n:_20;var m=_14?0:new Date(_13).getMonth()-n;var c=null;var _25=[];var fmt=_14?Calendar[this.locale].dates.yearFmt:Calendar[this.locale].dates.monthFmt;for(var i=0;i<n*2+1;i++){c=_14?new Date(y+i,1,1):new Date(y,m+i,1);_25.push({caption:c.formatString(fmt),name:c})}var sel=createTiddlyDropDown(_16,_1b,_25,n);sel.selectedIndex=n};Calendar.prototype.showMonth=function(_29,_2a){var _2b=new Date(_2a).getFullYear();var _2c=new Date(_2a).getMonth()+1;var _2d=new Date(_2b,_2c,0).getDate();var _2e=new Date(_2b,_2c,1).getDay();var _2f=(7+_2a.getDay()-Calendar[this.locale].dates.startOfWeek)%7;var _30=createTiddlyElement(_29,"tr");for(var i=0,ii=0,text=null;i<7;i++){ii=(Calendar[this.locale].dates.startOfWeek+i)%7;text=Calendar[this.locale].dates.days[ii];createTiddlyElement(_30,"th",null,null,text)}var d=1,dayRow=null,celldate=null,isWeekend=false;while(d<=_2d){dayRow=createTiddlyElement(_29,"tr");if(_2f>0){Calendar.dummyDateCell(dayRow,_2f,6)}for(var i=_2f;i<7&&d<=_2d;i++,d++){celldate=new Date(_2b,_2c-1,d);isWeekend=Calendar[this.locale].dates.weekends[(i+Calendar[this.locale].dates.startOfWeek)%7];this.showDate(dayRow,d,celldate,isWeekend)}_2f=0}var n=7-(7+_2e-Calendar[this.locale].dates.startOfWeek)%7;if(n<7){Calendar.dummyDateCell(dayRow,n,6)}};Calendar.prototype.showDate=function(_35,_36,_37,_38){var now=new Date();var _3a=this.dateFmt;var _3b=now.formatString(_3a);var _3c="dateCell";var _3d=_37.formatString(_3a);var day=_37.getDay();var _3f=_3b==_3d;var _40=this.isHoliday(_37);if(_3f){_3c+=" today"}if(_38){_3c+=" weekend"}if(_40){_3c+=" holiday"}var _41=createTiddlyElement(_35,"td",null,_3c);var ymd=_37.convertToLocalYYYYMMDDHHMM().substr(0,8);var _43=this.callback;var _44=_43.option;if(!_44){if(Calendar.tiddlers[ymd]){_3c+=" hasChanged";_44="popup"}else{_44="displayTiddler"}}var _45=_43.params;merge(_45,{date:_36,title:_3d,celldate:_37,cellClass:_3c,dateFmt:_3a});if(_43.fn instanceof Function&&_43.fnEnable){_43.fn(_41,_45)}else{Calendar.optionHandler(_41,_44,_45,_37)}};Calendar.prototype.isHoliday=function(_46){return Calendar[this.locale].dates.holidays.containsAny([_46.formatString(Calendar[this.locale].dates.longHolidayFmt),_46.formatString(Calendar[this.locale].dates.shortHolidayFmt)])};Calendar.dummyDateCell=function(_47,n,max){for(var i=0;i<n&&i<max;i++){createTiddlyElement(_47,"td")}};Calendar.hashTiddlers=function(_4b){if(_4b){var ymd=_4b.convertToLocalYYYYMMDDHHMM().substr(0,8)}var _4d=false;var _4e={};store.forEachTiddler(function(_4f,_50){var _51=_50.modified.convertToLocalYYYYMMDDHHMM().substr(0,8);var _52=_50.created.convertToLocalYYYYMMDDHHMM().substr(0,8);var _53=(_50.modified==_50.created);if(!_4e[_51]){_4e[_51]=[]}_4e[_51].push({title:_50.title,modified:_50.modified,ymd:_51,isCreated:_53?" isCreated":""})});this.tiddlers=_4e};Calendar.optionHandler=function(_54,_55,_56,_57){var fn=Calendar.optionType[_55];var _59=function(ev){var e=ev?ev:window.event;var fn=Calendar.optionType[_55];if(fn instanceof Function){fn.call(this,e,_54,_56)}return false};createTiddlyButton(_54,_56.date,_56.title,_59,_56.cellClass,null,null,_56)};Calendar.optionType={displayTiddler:function(e){story.displayTiddler(null,this.title)},popup:function(e,_5f){var _60=new Date(this.getAttribute("celldate"));Calendar.onClickDatePopup(e,_5f,this.title,_60)},pickDate:function(e){Calendar.pickDate.call(this,e)}};Calendar.onClickDatePopup=function(ev,_63,_64,_65){var e=ev?ev:window.event;if(store.isDirty()){Calendar.hashTiddlers(_65)}var ymd=_65.convertToLocalYYYYMMDDHHMM().substr(0,8);var _68=Calendar.tiddlers[ymd];var _69=Popup.create(_63,null,"datePopup popup");createTiddlyElement(_69,"br");this.optionHandler(_69,"displayTiddler",{title:_64,date:_64});if(_68){createTiddlyElement(_69,"hr");for(var i=0;i<_68.length;i++){this.optionHandler(createTiddlyElement(_69,"li"),"displayTiddler",{date:_68[i].title,title:_68[i].title,cellClass:_68[i].isCreated})}}Popup.show();e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation()}return false};Calendar.pickDate=function(ev){var e=ev?ev:window.event;var _6d=this.getAttribute("inputId");if(_6d){var _6e=document.getElementById(_6d);if(_6e){_6e.value=this.title}}return false};config.shadowTiddlers.CalendarStyle=Calendar.styles;config.notifyTiddlers.pushUnique({name:"CalendarStyle",notify:refreshStyles});var calendar=new Calendar();var datepicker=new Calendar();config.macros.tCalendar={init:function(){var _6f=config.options.chkCalendarCallback==undefined?false:config.options.chkCalendarCallback;calendar.callback={fn:this.showDate,fnEnable:(window.showDate instanceof Function&&_6f),option:null,params:{date:null,dateFmt:null,celldate:null}}}};config.macros.tCalendar.handler=function(_70,_71,_72){var _73=_72[2]?_72[2]:(_72[1]?_72[1]:_72[0]);var _74=_72[0];var _75=isNaN(_72[1])?1:parseInt(_72[1]);var now=new Date();var y=now.getFullYear();var m=now.getMonth()+1;var c=isNaN(_72[1])?1:parseInt(_72[1]);switch(_73){case"month":case"months":m=_74=="last"?m-c:m+1;break;case"thisyear":m=1;c=12;break;case"year":case"years":y=_74=="last"?y-c:y+1;m=1;c=12*c;break;case"timeline":break;default:y=_72[0];m=_72[1];c=_72[2]}calendar.locale=config.options.txtLocale?config.options.txtLocale:Calendar.locale;calendar.locale=Calendar[calendar.locale]?calendar.locale:"en";calendar.show(_70,y,m,c)};config.macros.tCalendar.showDate=function(_7a,_7b){var _7c=(_7b.cellClass.indexOf("weekend")!=-1);window.showDate(_7a,_7b.celldate,"popup","DD",_7b.dateFmt,true,_7c)};config.macros.datePicker={onClick:function(ev){var e=ev?ev:window.event;var _7f=this.getAttribute("inputId");var _80=this.getAttribute("dateFmt");_80=_80=="null"?null:_80;datepicker.callback={fn:null,fnEnable:false,option:"pickDate",params:{inputId:_7f,dateFmt:_80}};var _81=Popup.create(this);datepicker.locale=config.options.txtLocale?config.options.txtLocale:Calendar.locale;datepicker.locale=Calendar[datepicker.locale]?datepicker.locale:"en";datepicker.show(_81);Popup.show();e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation()}return false}};config.macros.datePicker.handler=function(_82,_83,_84){if(!_84){return}var id=_84[0];var _86=_84[1]?_84[1]:null;var _87={inputId:id,dateFmt:_86};var _88=createTiddlyElement(_82,"input",id);var btn=createTiddlyButton(_82,"?","Date Picker",this.onClick,"datepicker",null,null,_87)};
//}}}
!Introducing v1.0 (beta 3) - 18 Jan 2006
A new layout for TiddlyWiki, made by JonnyLeRoy, allowing you to move tiddlers around and resize them. Still in @@beta@@, but now working quite well in most browsers. Tested most in Firefox 1.5 on Windows. The latest version lives [[here|http://www.digitaldimsum.co.uk/tiddly/tiddlydesktop/]]
!The idea
As TiddlyWiki has been progressing it seems to have been getting closer and closer to an operating system rather than just a content management system. Borrowing a few ideas from [[Joe Rai|http://www.cs.utexas.edu/~joeraii/dragn/]], [[YATWA|http://www.rumsby.org/yatwa/]] and some code from [[young pup|http://www.youngpup.net]] I started trying to see if I could make TiddlyWiki more like a desktop ...
Only part of the way there so far, but it looks promising. Thanks as ever to [[Jeremy Ruston|http://tiddlywiki.com/#JeremyRuston]] and the rest of the [[Tiddly Developers|http://groups.google.com/group/TiddlyWikiDev]]
!What you can do
You can:
* @@''move tiddlers''@@ by dragging the title bar
* @@''resize tiddlers''@@ by grabbing the "resize me" link that floats vaguely near the bottom right corner of the tiddler
* @@''collapse / expand tiddlers''@@ by double clicking the toolbar or using the -/+ signs in the toolbar
* @@''auto cascade tiddlers''@@ to position them nicely when you open lots of them
* @@''collapse / expand all''@@ from the sidebar
* @@''bring tiddler to front''@@ by clicking on it
* @@''save and restore layout''@@ - stored in a hidden tiddler
* @@''err that's it''@@ for now, but more coming soon
* @@''oh yes''@@ the message box has moved to the sidebar and now disappears after 4 seconds ... which makes me very happy
See RecentChanges for more details.
!Technical (& Historical)
This version was based on TW 2.0.0 (beta 6). All the code, templates and styles were held in the [[_TiddlyDesktopKernel]] macro. If you wanted to import it - just had to grab that and dump it into your version.
Next the TiddlyDesktopKernel was split into separate tiddlers all tagged with [[TiddlyDesktop:logic]] and loaded by one [[TiddlyDesktop:loader]] - the only systemConfig tiddler in that particular version of TiddlyDesktop.
Today [[TiddlyDesktop:loader]] doesn't work with the current TW version. Therefore all these [[TiddlyDesktop:logic]] tiddlers are tagged [[systemConfig]] and need to be imported to make a current TW show this theme. Beside [[TiddlyDesktop:loader]], only [[TiddlyDesktop:shadowed]] has been disabled, its content adapted and been placed into the respective shadow tiddlers directly (ie. TiddlyDesktopStyle, EditTemplate and ViewTemplate). Additionional plugin specific macros have to be removed from both templates. (rewritten by wl.)
!Todo List
<<tagList todo>>
/***
Thanks to [[Roman Porotnikov|http://www.jroller.com/page/deep/20030701]]
NB this systemConfig needs to be evaluated before other ones
that use the Aspects so the name starts with "."
since they're loaded alphabetically
should really put it into the main source code, but
wanted to keep everything upgrade-proof
***/
/*{{{*/
Aspects = new Object();
Aspects.addBefore = function(obj, fname, before) {
var oldFunc = obj[fname];
obj[fname] = function() {
return oldFunc.apply(this, before(arguments, oldFunc, this));
};
};
Aspects.addAfter = function(obj, fname, after) {
var oldFunc = obj[fname];
obj[fname] = function() {
return after(oldFunc.apply(this, arguments), arguments, oldFunc, this);
};
};
Aspects.addAround = function(obj, fname, around) {
var oldFunc = obj[fname];
obj[fname] = function() {
return around(arguments, oldFunc, this);
};
};
/*}}}*/
/***
!Core Drag Functionality
Borrowed from [[DOM Drag|http://www.youngpup.net]] with some changes
***/
/*{{{*/
var Drag = {
obj : null,
init : function(o, oRoot) {
o.onmousedown = Drag.start;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
if (isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start : function(e) {
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.root.style.top);
var x = parseInt(o.root.style.left);
o.root.onDragStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
return false;
},
drag : function(e) {
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.root.style.top);
var x = parseInt(o.root.style.left);
var nx, ny;
nx = x + ((ex - o.lastMouseX) * 1);
ny = y + ((ey - o.lastMouseY) * 1);
if (ny < TiddlyDesktop.canvas.top) ny = TiddlyDesktop.canvas.top;
if (nx + o.clientWidth < TiddlyDesktop.canvas.left) nx = TiddlyDesktop.canvas.left - o.clientWidth;
Drag.obj.root.style.left = nx + "px";
Drag.obj.root.style.top = ny + "px";
Drag.obj.root.clientX = nx + "px";
Drag.obj.root.clientY = ny + "px";
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function() {
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style.left),
parseInt(Drag.obj.root.style.top));
Drag.obj = null;
},
fixE : function(e) {
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
/*}}}*/
/***
!Drag Tiddler
***/
/*{{{*/
var lastClicked;
function bringToFront() {
if (lastClicked == this) return;
lastClicked = this;
var parent = this.parentNode;
parent.removeChild(this);
parent.appendChild(this);
layout.bringToFront(this);
}
Story.prototype.old_displayTiddler = Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly) {
this.old_displayTiddler(srcElement,title,template,animate,slowly);
var tiddlyDiv = document.getElementById(this.idPrefix +title);
var theHandle = tiddlyDiv.getElementsByTagName("div")[0];
layout.limitHeight(tiddlyDiv);
tiddlyDiv.bringToFront = bringToFront;
tiddlyDiv.onmousedown = bringToFront;
tiddlyDiv.bringToFront();
config.commands.collapseTiddler.toggle(title, false, true);
layout.add(tiddlyDiv, true);
if (theHandle) {
theHandle.fixHeight = function() {
this.style.height = '1.25em';
};
theHandle.fixHeight();
theHandle.ondblclick = function(e) {
this.fixHeight();
e = fixE(e);
config.commands.collapseTiddler.handler(e, null, title);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
};
Drag.init(theHandle, tiddlyDiv);
tiddlyDiv.onDragStart = function(x, y) {
this.style.borderColor_old = this.style.borderColor;
this.style.borderColor = 'red';
}
tiddlyDiv.onDragEnd = function(x, y) {
this.style.borderColor = this.style.borderColor_old ? this.style.borderColor_old : '#999';
layout.add(this, false);
var sideBar = document.getElementById("sidebar");
var parent = sideBar.parentNode;
var top = sideBar.offsetTop;
parent.removeChild(sideBar);
parent.appendChild(sideBar);
sideBar.style.top = top +'px';
}
}
}
Story.prototype.old_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force) {
var theTiddler = this.old_refreshTiddler(title,template,force);
layout.limitHeight(theTiddler);
return theTiddler;
}
/*}}}*/
/***
!Collapse / Expand all tiddlers
***/
/*{{{*/
config.macros.collapseAll = {label: "fold all", prompt: "Collapse all visible Tiddlers"};
config.macros.collapseAll.handler = function(place) {
createTiddlyButton(place,this.label,this.prompt,function () {story.collapseAll(); return false;});
}
Story.prototype.collapseAll = function() {
this.forEachTiddler(function(tiddler,e) {
config.commands.collapseTiddler.toggle(tiddler,true,false);
});
}
config.macros.expandAll = {label: "expand all", prompt: "expand all visible Tiddlers"};
config.macros.expandAll.handler = function(place) {
createTiddlyButton(place,this.label,this.prompt,function () {story.expandAll(); return false;});
}
Story.prototype.expandAll = function() {
this.forEachTiddler(function(tiddler,e) {
config.commands.collapseTiddler.toggle(tiddler,false,true);
});
}
config.macros.autoLayout = {label: "cascade", prompt: "Layout all open Tiddlers nicely"};
config.macros.autoLayout.handler = function(place) {
createTiddlyButton(place,this.label,this.prompt,function () {layout.autoLayout(); return false;});
}
/*}}}*/
/***
!Collapse Tiddler
***/
/*{{{*/
config.views.wikified.collapseTiddler = {
text: "-",
tooltip: "Collapse this tiddler",
toggleText: "+",
toggleTooltip: "Expand this tiddler"
};
config.commands.collapseTiddler = {
text: config.views.wikified.collapseTiddler.text,
tooltip: config.views.wikified.collapseTiddler.tooltip,
toggleText: config.views.wikified.collapseTiddler.toggleText,
toggleTooltip: config.views.wikified.collapseTiddler.toggleTooltip,
handler: function(event,src,title) {
this.toggle(title, true, true);
},
toggle: function(title, collapse, expand) {
var theDiv = document.getElementById(story.idPrefix + title);
var theLink = this.getCollapseLink(theDiv);
var div = this.findCollapseDiv(theDiv);
if (expand && div.style.display == 'none') {
this.toggleDisplay(theDiv, div, theLink, 'block', theDiv.style._oldHeight, this.text, this.tooltip)
} else if (collapse) {
if (theDiv.style.height) {
theDiv.style._oldHeight = theDiv.style.height;
}
this.toggleDisplay(theDiv, div, theLink, 'none', div.style.height, this.toggleText, this.toggleTooltip)
}
},
getCollapseLink: function(theDiv) {
var links = theDiv.getElementsByTagName('a');
for (i in links) {
var link = links[i];
if (link.innerHTML == this.text || link.innerHTML == this.toggleText) {
return link;
}
}
},
findCollapseDiv: function(theDiv) {
var children = theDiv.childNodes;
for (i in children) {
var div = children[i];
if (div && div.className == 'collapsible') {
return div;
}
}
},
toggleDisplay: function(theDiv, div, theLink, display, height, text, tooltip) {
div.style.display = display;
theLink.innerHTML = text;
theLink.setAttribute('title', tooltip);
if (typeof height != 'undefined') {
theDiv.style.height = height;
}
theDiv.collapsed = display == 'none';
}
};
/*}}}*/
/***
|''Name:''|JumpMacro ''adapted''|
|''Description:''|Macro version of the core jump command|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#JumpMacro|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
***/
/*{{{*/
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
var label = (params[0] && params[0]!=".")? params[0]: 'jump';
var tooltip = (params[1] && params[1]!=".")? params[1]: 'jump to an open tiddler';
var top = (params[2] && params[2]=='top') ? true: false;
var btn =createTiddlyButton(place,label,tooltip,this.onclick);
if (top==true){
btn.setAttribute("top","true");
}
};
config.macros.jump.onclick = function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
var top = theTarget.getAttribute("top");
var popup = Popup.create(this);
if(popup){
if(top=="true"){
createTiddlyButton(createTiddlyElement(popup,"li"),'Top \u2191','Top of TW',config.macros.jump.top);
createTiddlyElement(popup,"hr");
}
story.forEachTiddler(function(title,element) {
createTiddlyLink(createTiddlyElement(popup,"li"),title,true);
});
}
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;
};
config.macros.jump.top = function()
{
window.scrollTo(0,0);
};
/*}}}*/
/***
!Tiddler Layout
***/
/*{{{*/
function Layout() {};
Layout.prototype = {
tiddlers: [],
add: function(tiddler, nicely) {
var newPos = {
id: tiddler.id,
x: findPosX(tiddler),
y: findPosY(tiddler),
z: this.tiddlers.length,
toString: function() {
var theTiddler = document.getElementById(this.id);
return "\n{id: '%0', x: %1, y: %2, z: %3, width: %4, height: %5, collapsed: %6}".format([
this.id,
this.x,
this.y,
this.z,
theTiddler.clientWidth,
theTiddler.clientHeight,
(!!theTiddler.collapsed)
]);
}
};
this.remove(tiddler);
if (nicely) {
this.position(newPos, tiddler, true);
}
this.tiddlers.push(newPos);
this.tiddlers.sort(function(a, b) {return a.x - b.x});
},
position: function(newPos, tiddler, nicely) {
if (nicely) {
this.cascade(newPos);
}
tiddler.style.position = 'absolute';
tiddler.style.left = newPos.x +'px';
tiddler.style.top = newPos.y +'px';
tiddler.bringToFront()
},
cascade: function(newPos) {
for (t in this.tiddlers) {
var pos = this.tiddlers[t];
if (Math.abs(pos.x - newPos.x) < TiddlyDesktop.cascade.left) {
newPos.x += TiddlyDesktop.cascade.left;
if (Math.abs(pos.y - newPos.y) < TiddlyDesktop.cascade.top) {
newPos.y += TiddlyDesktop.cascade.top;
}
}
}
},
remove: function(tiddler) {
for (t in this.tiddlers) {
var pos = this.tiddlers[t];
if (pos.id == tiddler.id) {
this.tiddlers.splice(t, 1);
break;
}
}
},
autoLayout: function() {
var titles = [];
for (t in this.tiddlers) {
if (this.tiddlers[t].id) {
titles.push(this.tiddlers[t].id.substring(story.idPrefix.length));
}
}
story.closeAllTiddlers();
story.displayTiddlers(null, titles.reverse());
},
bringToFront: function(tiddler) {
var stacked = this.tiddlers.sort(function(a,b) {return a.z - b.z});
var tz = stacked.length;
for (t in stacked) {
var pos = stacked[t];
if (pos.id == tiddler.id) {
tz = pos.z;
pos.z = stacked.length;
} else if (pos.z > tz) {
pos.z--;
}
}
},
marshall: function() {
return "[%0\n]".format([this.tiddlers.toString()]);
},
unmarshall: function(serializedLayout) {
var savedTiddlers = eval(serializedLayout).sort(function(a,b) {return a.z - b.z});
for (t in savedTiddlers) {
if (savedTiddlers[t].id) {
var pos = savedTiddlers[t];
var title = pos.id.substring(story.idPrefix.length);
story.displayTiddler(null, title);
var tiddler = document.getElementById(pos.id);
this.position(pos, tiddler, false);
if (pos.width) {
tiddler.style.width = pos.width +'px';
tiddler.style.height = pos.height +'px';
if (pos.collapsed) {
config.commands.collapseTiddler.toggle(title, true, false);
} else {
tiddler.scrollable.style.width = (pos.width - 15) +'px';
tiddler.scrollable.style.height = (pos.height - 60) +'px';
}
}
}
}
},
limitHeight: function(tiddlyDiv) {
tiddlyDiv.findMovingParts = function() {
var divs = this.getElementsByTagName("div");
for (d in divs) {
var div = divs[d];
if (div && div.className == 'scrollable') {
this.scrollable = div;
}else if (div && div.className == 'windowBar') {
this.windowBar = div;
}
}
};
tiddlyDiv.limitHeight = function() {
this.findMovingParts();
if (this.clientHeight > 400) {
this.scrollable.style.height = '380px';
}
//for IE ...
if(this.scrollable && this.scrollable.clientWidth >= this.windowBar.clientWidth) {
this.scrollable.style.width = (this.windowBar.clientWidth - 15) +'px';
}
};
tiddlyDiv.limitHeight();
}
}
var layout = new Layout();
Story.prototype.old_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,slowly) {
var tiddler = document.getElementById(this.idPrefix + title);
if(tiddler != null) {
layout.remove(tiddler);
}
this.old_closeTiddler(title,animate,slowly);
}
/*}}}*/
/***
!Save Layout
Save the layout to a tiddler for redisplaying later
***/
/*{{{*/
config.macros.saveLayout = {
label: "save layout",
prompt: "Save the current layout as the default",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
createTiddlyButton(place,this.label,this.prompt,this.saveLayout);
},
saveLayout: function() {
var tiddlerName = "__tiddlyDesktopLayout";
var serializedLayout = layout.marshall();
serializedLayout = "/***\n@@''This tiddler is auto-generated - don't edit it!''@@\n***/\n/*{{{*/\n"+ serializedLayout +"\n/*}}}*/\n";
var tiddler = store.saveTiddler(tiddlerName,tiddlerName,serializedLayout,config.options.txtUserName,new Date(),"excludeLists");
if (config.options.chkAutoSave) {
saveChanges();
}
}
};
config.macros.restoreLayout = {
label: "restore layout",
prompt: "Restores the last saved layout",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
createTiddlyButton(place,this.label,this.prompt,restart);
}
};
this['restart'] = function() {
var serializedLayout = store.getTiddlerText("__tiddlyDesktopLayout");
var start = store.getTiddlerText("DefaultTiddlers");
if(window.location.hash) {
story.displayTiddlers(null,convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1))).readBracketedList());
} else if(serializedLayout) {
layout.unmarshall(serializedLayout);
} else if(start) {
story.displayTiddlers(null,start.readBracketedList());
}
}
/*}}}*/
/***
!Tiddly Desktop Core Logic
|''name''|_TiddlyDestopKernel|
|''version''|1.1|
|''date''|7 Jan 2006|
|''author''|JonnyLeRoy|
|''TW version''|2.0.0 (beta 6)|
This macro contains all the logic and styles to turn a standard TiddlyWiki into a TiddlyDesktop
***/
/*{{{*/
var TD_Loader = {
logic: store.getTaggedTiddlers("TiddlyDesktop:logic"),
load: function(list) {
for(t in list) {
var ex = processConfig(list[t].text);
if(ex)
alert(config.messages.customConfigError.format([ex,list[t].title]));
}
},
init: function() {
this.load(this.logic);
}
}
TD_Loader.init();
/*}}}*/
/***
!Components
<<tagList TiddlyDesktop:logic>>
***/
/***
!Shadow Tiddlers
Shadow the StyleSheet and various templates so they're retrievable and can all be imported with a single macro
***/
/*{{{*/
config.shadowTiddlers.StyleSheet = "/*{{{*/\n\nBODY {\n background-color: #ddd;\n}\n\n.collapsible {\n margin: 4px;\n}\n\n.scrollable {\n margin: 4px;\n overflow: auto;\n}\n\n.windowBar {\n color: #fff;\n background-color: #04b;\n cursor:pointer;\n padding: 2px 2px 2px 4px;\n}\n\n.windowBar .title {\n color: #ccc;\n font-size: 1em;\n cursor:move;\n}\n\n.selected .windowBar .title {\n color: #fff;\n}\n\n.tiddler { \n position: relative; \n width: 500px; \n border: solid 1px;\n border-color: #999;\n background-color: #fff;\n padding: 0px;\n}\n\n.viewer {\n background:white;\n}\n\n\n.windowToolbar {\n text-align: right;\n float: right;\n}\n\n.collapsible .toolbar {\n text-align: right;\n margin-top: 4px;\n}\n\n.sizer {\n text-align: right;\n cursor: move;\n background-color: #ccc;\n}\n\n.sizer .resizer {\n color: #fff;\n background-color: #aaa;\n padding: 0px 2px 0px 2px;\n}\n\n.tiddler .windowBar .button {\n color: #04b;\n background-color: #fff;\n margin-right: 2px;\n padding: 0em 0.4em;\n border: solid 1px #ccc;\n}\n\n.tiddler .windowBar .button:Hover {\n background-color: #8cf;\n border-color: #04b;\n}\n\nh1,h2,h3,h4,h5 {\n color: #04b;\n background: transparent;\n padding-left: 2px;\n}\n\nh1,h2 {\n color: #04b;\n background: transparent;\n border-bottom: solid 1px #04b;\n}\n\n.tagging A, .tagged A {\n border: none !important;\n background-color: transparent !important;\n}\n\n.selected .tagging A, .selected .tagged A {\n}\n\n.tagging A:Hover, .tagged A:Hover {\n border: none !important;\n background-color: transparent !important;\n color: #f00 !important;\n}\n\n#sidebarCopyright {\n background-color: #ddd;\n color: #666;\n padding: 10px 4px 20px 4px;\n}\n\n#sidebarCopyright A {\n color: #555;\n}\n\n#sidebarCopyright A:Hover {\n color: #f00;\n background-color: transparent;\n}\n\n\n#titleLine {\n padding: 1em 0em 1em 0em;\n}\n\n#siteTitle {\n font-size: 1em;\n margin-left: 5px;\n} \n\n#siteTitle A {\n color: #8cf;\n}\n\n#siteTitle A:hover {\n color: #fff;\n background-color: transparent;\n}\n\n#siteSubtitle {\n font-size: .9em;\n color: #fff;\n}\n\n#displayArea {\n margin: 1em 17em 0em 2em;\n}\n\n.subtitle {\n font-size: 1em;\n text-align: right;\n float: right;\n padding-top: 1em;\n}\n\n#desktopButtons {\n float: right;\n}\n\n#desktopButtons A {\n font-weight: normal !important;\n margin-right: .25em;\n color: #ccc;\n font-size: .9em;\n padding: .1em .5em;\n border: solid 1px #18f;\n}\n\n#desktopButtons A:Hover {\n color: #fff;\n border: solid 1px #04b;\n background-color: #18f;\n}\n\n#sidebar {\n background-color: #fff;\n border-left: solid 1px #ccc;\n border-bottom: solid 1px #ccc;\n}\n\n.tabContents {\n border-left: 1px solid #fff;\n}\n\n.tabContents .tabContents {\n border-left: 1px solid #ccc;\n}\n\n/*}}}*/\n\n";
/*}}}*/
/*{{{*/
config.shadowTiddlers.EditTemplate = "<div macro='gradient horiz #0044bb #1188ff #ffffff' class='windowBar'>\n<span class='windowToolbar' macro='toolbar jump collapseTiddler closeTiddler'></span>\n<span class='title' macro='view title'></span></div>\n\n<div class='collapsible'>\n<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div>\n<div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>\n<div macro='sizer' class='sizer'></div>\n</div>";
/*}}}*/
/*{{{*/
config.shadowTiddlers.PageTemplate = "<div id='header'>\n<div id='titleLine' macro='gradient vert #1188ff #0044bb'>\n<span id='desktopButtons' refresh='content' tiddler='DesktopButtons'></span>\n<span id='siteTitle' refresh='content' tiddler='SiteTitle'></span>\n<span id='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='sidebar'>\n<div id='messageArea'></div>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n<div id='sidebarCopyright' refresh='content' tiddler='Copyright'></div>\n</div>\n<div id='displayArea'>\n<div id='tiddlerDisplay'></div>\n</div>";
/*}}}*/
/*{{{*/
config.shadowTiddlers.ViewTemplate = "<div macro='gradient horiz #0044bb #1188ff #ffffff' class='windowBar'>\n<span class='windowToolbar' macro='toolbar jump collapseTiddler -closeTiddler'></span>\n<span class='title' macro='view title'></span></div>\n<div class='collapsible'>\n<div class='toolbar' macro='toolbar +editTiddler permalink references closeOthers'></div>\n<div class='scrollable'>\n<div class='tagging' macro='tagging'></div>\n\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='subtitle'>\n<span macro='view modified date [[DD/MM/YYYY]]'></span>\n (created: <span macro='view created date [[DD/MM/YYYY]]'></span>)\n</div>\n<div class='tagClear'></div>\n</div>\n<div macro='sizer' class='sizer'></div>\n</div>";
/*}}}*/
/*{{{*/
config.shadowTiddlers.SideBarOptions = "<<search>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options \u00BB' 'Change TiddlyWiki advanced options'>>",
/*}}}*/
/*{{{*/
config.shadowTiddlers.Copyright = "\nTiddlyWiki was created by [[Jeremy Ruston|http://tiddlywiki.com/#JeremyRuston]] and is published under an [[Open Source License|http://tiddlywiki.com/#OpenSourceLicense]]\n\nTiddlyDesktop was created by JonnyLeRoy and is released under the same terms.\n\nFeel free to sue me if it breaks your air-traffic-control system. It worked on my machine.";
/*}}}*/
/*{{{*/
config.shadowTiddlers.DesktopButtons = "<<closeAll>><<jump>><<collapseAll>><<autoLayout>><<expandAll>><<saveLayout>><<restoreLayout>>";
/*}}}*/
/***
!Core Sizer Functionality
Structure taken from [[DOM Drag|http://www.youngpup.net]]
***/
/*{{{*/
var Sizer = {
obj : null,
startX: 0,
startY: 0,
startWidth: 0,
startHeight: 0,
init : function(o, oRoot) {
o.onmousedown = Sizer.start;
o.root = oRoot && oRoot != null ? oRoot : o ;
o.root.onSizeStart = new Function();
o.root.onSize = new Function();
},
start : function(e) {
var o = Sizer.obj = this;
e = fixE(e);
o.root.onSizeStartPre(e);
Sizer.startHeight = parseInt(o.root.offsetHeight);
Sizer.startWidth = parseInt(o.root.offsetWidth);
o.root.style.height = Sizer.startHeight +'px';
o.root.style.width = Sizer.startWidth +'px';
Sizer.startX = e.clientX;
Sizer.startY = e.clientY;
o.root.onSizeStartPost(e);
document._oldonmousemove = document.onmousemove;
document._oldonmouseup = document.onmouseup;
document.onmousemove = Sizer.drag;
document.onmouseup = Sizer.end;
return false;
},
drag : function(e) {
e = fixE(e);
var x = (e.clientX - Sizer.startX);
var y = (e.clientY - Sizer.startY);
var nx = x + Sizer.startWidth;
var ny = y + Sizer.startHeight;
if (nx < 100) nx = 100;
if (ny < 100) ny = 100;
Sizer.obj.root.style.width = nx + "px";
Sizer.obj.root.style.height = ny + "px";
Sizer.obj.root.onSize(x, y);
return false;
},
end : function() {
document.onmousemove = document._oldonmousemove;
document.onmouseup = document._oldonmouseup;
Sizer.obj = null;
}
};
function fixE(e) {
if (typeof e == 'undefined') e = window.event;
return e;
}
/*}}}*/
/***
!Resize Tiddler
***/
/*{{{*/
config.macros.sizer = {};
config.macros.sizer.handler = function(place, macroName, params, wikifier, paramString, tiddler) {
var theSizer = createTiddlyElement(place,"span",null,"resizer","resize me");
var theTiddler = document.getElementById(story.idPrefix + tiddler.title);
Sizer.init(theSizer, theTiddler);
theTiddler.onSizeStartPre = function() {
this.findMovingParts();
this.scrollable.startHeight = parseInt(this.scrollable.offsetHeight);
this.scrollable.startWidth = parseInt(this.scrollable.offsetWidth);
this.windowBar.startHeight = parseInt(this.windowBar.clientHeight);
};
theTiddler.onSizeStartPost = function() {
this.windowBar.fixHeight();
};
theTiddler.onSize = function(x, y) {
var nx = x + this.scrollable.startWidth;
var ny = y + this.scrollable.startHeight;
if (nx < 80) nx = 80;
if (ny < 50) ny = 50;
this.scrollable.style.width = nx + "px";
this.scrollable.style.height = ny + "px";
this.windowBar.fixHeight();
};
};
/*}}}*/
/***
!List Macros Tab
***/
/*{{{*/
config.shadowTiddlers.SideBarTabs = "<<tabs txtMainTab Content 'Stuff to read' TabContent System 'The engine room' TabSystem>>";
config.shadowTiddlers.TabContent = "<<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>";
config.shadowTiddlers.TabMore = "<<tabs txtMoreTab Macros 'Macros / Plugins' TabMoreMacros Missing 'Missing tiddlers' TabMoreMissing Orphans 'Orphaned tiddlers' TabMoreOrphans>>";
config.shadowTiddlers.TabSystem = "<<tabs txtSystemTab Macros 'Macros / plugins' TabSystemMacros Shadowed 'Shadowed tiddlers' TabSystemShadowed Desktop 'Desktop system tiddlers' TabSystemDesktop>>";
config.shadowTiddlers.TabSystemMacros = "<<list macros>>";
config.shadowTiddlers.TabSystemShadowed = "<<list shadowed>>";
config.shadowTiddlers.TabSystemDesktop = "<<tagList TiddlyDesktop:logic>>";
config.macros.list.macros = {
prompt: "All macros / plugins",
handler: function(params) {
return store.getTaggedTiddlers("systemConfig", "title");
}
}
/*}}}*/
/***
!Tag List macro
So that you don't need to have a tiddler for the tag
***/
/*{{{*/
config.macros.tagList = {listTitle: "List of tiddlers tagged with '%0'", emptyListTitle: "Nothing tagged with '%0'"};
config.macros.tagList.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
var title = params[0];
var tagged = store.getTaggedTiddlers(title);
var theList = createTiddlyElement(place,"ul");
if (tagged.length == 0) {
createTiddlyElement(theList,"li",null,null,this.emptyListTitle.format([title]));
}
for(t in tagged) {
if (tagged[t].title) {
createTiddlyLink(createTiddlyElement(theList,"li"),tagged[t].title,true);
}
}
}
/*}}}*/
/***
|Name|''List Tags By Popularity''|
|Version|''1.0''|
|~CoreVersion|''2.0.0 (beta 6)''|
|Author|''Jonny LeRoy''|
!Overview
This macro changes the default ordering for the "Tags" menu list; ordering by the amount of Tiddlers with that tag, rather than a simple alphabetic ordering.
!The Macro
***/
/*{{{*/
TiddlyWiki.prototype.getTagsOld = TiddlyWiki.prototype.getTags;
TiddlyWiki.prototype.getTags = function() {
return this.getTagsOld().sort(function (a,b) {return b[1] - a[1]})
}
/*}}}*/
/***
!CloseAllPreOpenAllTags
Requires http://www.digitaldimsum.co.uk/#_.FunctionDecorator
***/
/*{{{*/
Aspects.addBefore(this, "onClickTagOpenAll", function(args) {
story.closeAllTiddlers();
return args;
});
/*}}}*/
/***
!Tiddly Desktop
Core stuff - should move more functionality (like decorating Tiddlers) into here
***/
/*{{{*/
var TiddlyDesktop = {
canvas: {
top: 39,
left: 60
},
cascade: {
top: 20,
left: 20
}
};
/*}}}*/
/***
!Config Changes
Set some text icons for the edit buttons
***/
/*{{{*/
config.commands.closeTiddler.text = "✕";
config.commands.closeOthers.text = "☼";
config.commands.jump.text = "↗";
/*}}}*/
/***
!Bug Fixes / Core Changes
***/
/*{{{*/
//Alert errors in systemConfigs if messageArea not yet rendered
function checkDisplay(obj) {
var oldFunc = obj['displayMessage'];
obj['displayMessage'] = function(text, linkText) {
oldFunc.apply(this, arguments);
//remove the message after 6 secs
setTimeout(clearMessage,6000);
}
};
checkDisplay(this);
/*}}}*/
/*{{{*/
BODY { font-family: Verdana,Arial,Helvetica; position:static; background: #f8f8f8; }
.collapsible { margin: 4px; }
.scrollable { margin: 4px; overflow: auto; }
.windowBar { color: [[ColorPalette::Background]]; background: [[ColorPalette::PrimaryMid]]; cursor:pointer; padding: 2px 2px 2px 4px; }
.windowBar .title { color: [[ColorPalette::TertiaryLight]]; font-size: 1em; cursor:move; }
.selected .windowBar .title { color: [[ColorPalette::Background]];}
.tiddler { position: relative; width: 600px; border: solid 1px; border-color: [[ColorPalette::TertiaryMid]]; background: #f8f8f8; padding: 0px; }
.tiddler.selected { background: [[ColorPalette::Background]]; }
.viewer { background: transparent; }
.windowToolbar { text-align: right; float: right; }
.collapsible .toolbar { text-align: right; margin-top: 4px; }
.sizer { text-align: right; cursor: move; background: [[ColorPalette::TertiaryLight]]; }
.sizer .resizer { color: [[ColorPalette::Background]]; background: #aaa; padding: 0px 2px 0px 2px; }
.tiddler .windowBar .button { color: [[ColorPalette::PrimaryMid]]; background: [[ColorPalette::Background]]; margin-right: 2px; padding: 0em 0.4em; border: solid 1px [[ColorPalette::TertiaryLight]]; }
.tiddler .windowBar .button:Hover { background: [[ColorPalette::PrimaryPale]]; border-color: [[ColorPalette::PrimaryMid]]; }
.subtitle { font-size: 0.9em; text-align: right; float: right; padding-top: 1.2em; }
/*}}}*/
/*{{{*/
BODY { background: #f8f8f8; }
.collapsible { margin: 4px; }
.scrollable { margin: 4px; overflow: auto; }
.windowBar { color: [[ColorPalette::Background]]; background: [[ColorPalette::PrimaryMid]]; cursor:pointer; padding: 2px 2px 2px 4px; }
.windowBar .title { color: [[ColorPalette::TertiaryLight]]; font-size: 1em; cursor:move; }
.selected .windowBar .title { color: [[ColorPalette::Background]];}
.tiddler { position: relative; width: 600px; border: solid 1px; border-color: [[ColorPalette::TertiaryMid]]; background: #f8f8f8; padding: 0px; }
.tiddler.selected { background: [[ColorPalette::Background]]; }
.windowToolbar { text-align: right; float: right; }
.collapsible .toolbar { text-align: right; margin-top: 4px; }
.sizer { text-align: right; cursor: move; background: [[ColorPalette::TertiaryLight]]; }
.sizer .resizer { color: [[ColorPalette::Background]]; background: #aaa; padding: 0px 2px 0px 2px; }
.tiddler .windowBar .button { color: [[ColorPalette::PrimaryMid]]; background: [[ColorPalette::Background]]; margin-right: 2px; padding: 0em 0.4em; border: solid 1px [[ColorPalette::TertiaryLight]]; }
.tiddler .windowBar .button:Hover { background: [[ColorPalette::PrimaryPale]]; border-color: [[ColorPalette::PrimaryMid]]; }
h1,h2,h3,h4,h5 { color: [[ColorPalette::PrimaryMid]]; background: transparent; padding-left: 2px; }
h1,h2 { color: [[ColorPalette::PrimaryMid]]; background: transparent; border-bottom: solid 1px [[ColorPalette::PrimaryMid]]; }
.tagging A, .tagged A { border: none !important; background: transparent !important; }
.selected .tagging A, .selected .tagged A { }
.tagging A:Hover, .tagged A:Hover { border: none !important; background: transparent !important; color: #f00 !important; }
#sidebarCopyright { background: #ddd; color: #666; padding: 10px 4px 20px 4px; }
#sidebarCopyright A { color: #555; }
#sidebarCopyright A:Hover { color: #f00; background: transparent; }
#titleLine { padding: 1em 0em 1em 0em; }
#siteTitle { font-size: 1em; margin-left: 5px; color: [[ColorPalette::TertiaryLight]]; }
#siteTitle A { color: [[ColorPalette::PrimaryPale]];}
#siteTitle A:hover { color: [[ColorPalette::Background]]; background: transparent; }
#siteSubtitle { font-size: 1em; color: [[ColorPalette::Background]]; }
#displayArea { margin: 1em 17em 0em 2em; }
.subtitle { font-size: 0.9em; text-align: right; float: right; padding-top: 1em; }
#desktopButtons { float: right; }
#desktopButtons A { font-weight: normal !important; margin-right: .25em; color: [[ColorPalette::TertiaryLight]]; font-size: .9em; padding: .1em .5em; border: solid 1px #18f; }
#desktopButtons A:Hover { color: [[ColorPalette::Background]]; border: solid 1px [[ColorPalette::PrimaryMid]]; background: #18f; }
#desktopButtons br { display:none; }
#sidebar { background: [[ColorPalette::Background]]; border-left: solid 1px [[ColorPalette::TertiaryLight]]; border-bottom: solid 1px [[ColorPalette::TertiaryLight]]; }
.tabContents { border-left: 1px solid [[ColorPalette::Background]]; }
.tabContents .tabContents { border-left: 1px solid [[ColorPalette::TertiaryLight]]; }
/*}}}*/
/***
|''Name:''|TiddlyHomeSetupPlugin|
|''Description:''|Check and setup all components|
|''Version:''|1.1.0|
|''Date:''|Aug 04, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#TiddlyHomeSetupPlugin|
|''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:''|UploadToHomeMacro|
***/
//{{{
version.extensions.TiddlyHomeSetupPlugin = {
major: 1, minor: 1, revision: 0,
date: new Date("Aug 04, 2007"),
source: 'http://tiddlywiki.bidix.info/#TiddlyHomeSetupPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info)',
coreVersion: '2.2.0'
};
if (!window.bidix) window.bidix = {}; // bidix namespace
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.getParamsFromTiddler = function(tiddlerTitle, sliceNames) {
tiddlerTitle = (tiddlerTitle ? tiddlerTitle:this.messages.homeParamsTiddler);
if (!store.tiddlerExists(tiddlerTitle) && !store.isShadowTiddler(tiddlerTitle)) {
throw(config.macros.uploadToHome.messages.tiddlerNotFound.toString().format([tiddlerTitle]));
}
return sliceValues = store.getTiddlerSlices(tiddlerTitle,sliceNames);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
bidix.checkPlugin('UploadPlugin',4,1,0);
config.macros.upload.authenticateUser = false; // authentication check by .htaccess
// default TiddlyHomeParameters in shadows
// user can overide this
merge(config.shadowTiddlers,{
'TiddlyHomeParameters':[
"|owner:|desk|",
"|site:|desk|",
"|url:|http://tiddlyhome.bidix.info/desk/|",
"|rootUrl:|http://tiddlyhome.bidix.info/|"
].join("\n")});
// get config from TiddlyHomeParameters
config.tiddlyHome = {};
merge(config.tiddlyHome, bidix.getParamsFromTiddler('TiddlyHomeParameters',['user','site','url','rootUrl']));
config.shadowTiddlers.TiddlyHomeParameters += [
"\n!Usefull url for your site",
"* " + config.tiddlyHome.url + "backup: List of backup files",
"* " + config.tiddlyHome.url + "download.php : to download thisTiddlyWiki",
"* " + config.tiddlyHome.url + "index.xml : your RSSFeed",
"* " + config.tiddlyHome.url + "news.php : to display your RSSFeed",
"!Access and change data",
"* " + config.tiddlyHome.rootUrl + "Site : Site properties",
"* " + config.tiddlyHome.rootUrl + "#User : User properties",
"!More Information on TiddlyHome",
"* " + config.tiddlyHome.rootUrl + " for your hosting service",
"*http://TiddlyHome.bidix.info/ for BidiX's TiddlyHome Package"
].join("\n");
// add TiddlyHomeSidebar in SideBarOptions
config.shadowTiddlers.SideBarOptions = config.shadowTiddlers.SideBarOptions.replace(/(<<saveChanges>>)/,
"$1<<tiddler TiddlyHomeSidebar>>");
merge(config.shadowTiddlers,{
// link to favicon.ico
'MarkupPreHead': [
"<!--{{{-->",
"<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>",
"<link rel=\"shortcut icon\"href=\"" +
config.tiddlyHome.rootUrl +
"_th/images/favicon.ico\" type=\"image/vnd.microsoft.icon\" />",
"<link rel=\"icon\" href=\"" +
config.tiddlyHome.rootUrl +
"_th/images/favicon.ico\" type=\"image/vnd.microsoft.icon\" /> ",
"<!--}}}-->"
].join("\n"),
'SiteProxy': [
"proxy.php?url="
].join("\n"),
'SiteUrl': config.tiddlyHome.url,
// tweaks to UploadToHomeMacro parameters
'HomeParameters': [
"|UploadUserName:||",
"|UploadStoreUrl:|" + config.tiddlyHome.url + "store.php|",
"|UploadDir:|.|",
"|UploadFilename:|index.html|",
"|UploadBackupDir:|backup|"
].join("\n"),
'TiddlyHomeSidebar':[
"<<uploadToHome>><html><a href=" +
config.tiddlyHome.url + "download.php class='button'>download</a></html>"
].join("\n")
});
// Options tweaks
//config.options.txtUserName = config.tiddlyHome.user;
config.options.pasUploadPassword = '';
config.options.txtBackupFolder = "backup";
config.options.chkSaveBackups = true;
config.options.chkAutoSave = false;
config.options.chkRegExpSearch = false;
config.options.chkCaseSensitiveSearch = false;
config.options.chkAnimate = false;
config.options.chkGenerateAnRssFeed = true;
config.options.chkSaveEmptyTemplate = false;
//}}}
|URL:|http://TiddlyHome.bidix.info/systemServer/TiddlyHomeSystem.html|
|Description|Repository for TiddlyHome system ressources |
|Author:|BidiX|
|''Title''|master|
|''MasterLocation''||
|''ExternalTiddlerLocations''||
|''ImportFilter''|[tag[d]]|
|''ExternalTags''|external excludeSearch|
!!Why TiddlyMasterPlugin?
* it is the only extension of ~TiddlyWiki which loads //automatically any kind of external files// at startup as separate tiddlers.
* it is the only extension of ~TiddlyWiki which loads 'systemConfig' tagged tiddlers of an other ~TiddlyWiki - and separate files with the file extension '.js' - as functioning plugins //at start-up//. Therefore they are included in the regular ~PluginManager too, and don't show red macro errors during startup.
!!How to install?
*Other than plugins and scripts installed within ~TiddlyWiki, [[TiddlyMasterPlugin.js]] is simply placed in the same folder as, and must remain external to the ~TiddlyWiki itself (if you add TiddlyMasterPlugin internally, as I do in this TW for easy access, don't tag it with 'systemConfig'!).
* First, open in the right sidebar tabs > 'More' > 'Shadowed' > 'MarkupPostBody' tiddler. Then enter in this tiddler in 'edit mode' (and as always, complete it with 'done' in the tiddler's toolbar) to tell the loading ~TiddlyWiki (hereafter named 'client' TW) to run with TiddlyMasterPlugin: :
{{{
<!--{{{-->
<script type="text/javascript" src="TiddlyMasterPlugin.js"></script>
<!--}}}-->
}}}
* Second, add the following table in a tiddler titled TiddlyMasterConfig to the client TW:
|''Title''|master|
|''MasterLocation''|master.html|
|''ExternalTiddlerLocations''|first.txt any.htm other.js last.php|
|''ImportFilter''|[tag[systemConfig]]|
|''ExternalTags''|external excludeSearch|
** 'MasterLocation' row specifies the name and path of the other ~TiddlyWiki with the tiddlers to load (called: 'master' TW).
** 'ExternalTiddlersLocations' row specifies separate external files to load (file names 'space' separated).
** 'ImportFilter' table row specifies the tags of those tiddler choosen to load from the master.html.
** 'ExternalTags' table row specifies additional tags the loaded tiddlers or files should carry while loaded.
** click 'done' for this tiddler and 'save all' for the whole client TW.
* The second TW from which to load the tiddlers - the master.html - is set up by adding plugins and/or content as usual.
* Save and close the master TW. Reload the client TW - and all the tiddlers of the master TW or external files are available as any other internal tiddlers of the client TW. Changing those loaded external tiddlers inside the client TW causes them to be added to the client permanently. Existing tiddlers in the client TW, which are again loaded from the master, are not included.
!!Limitation
* TiddlyMasterPlugin doesn't work on a server yet.
!!Enjoy
/***
TiddlyMaster v3.0 alpha
by FND
based on loadExternal by SaqImtiaz
!To Do
* XHR: import master/tiddler files via HTTP
* streamline/simplify/purge
** remove logging(?)
** remove inclusion of individual tiddler files
*** optional module vs. separate plugin
*** N.B.: each additional file access has significant impact on startup speed (=> warning in documentation)
* macro for outputting logs (imported, skipped & errors) [needs to be a macro because displayMessage() is not available yet]
* test absolute/relative paths for master/tiddler files
* problem: configTiddler must be replicated in all "slave" documents
=> define one default filename for the master document, pulling configTiddler directly from master
-> too much overhead, too limited (fixed filename), limited use
=> require only location parameter, reading the rest from the external file if local configTiddler does not exist
***/
//{{{
// hijack loadPlugins() to create hook
loadPlugins_old = window.loadPlugins;
window.loadPlugins = function() {
TiddlyMaster.init();
loadPlugins_old.apply(this, arguments);
};
TiddlyMaster = {
name: "TiddlyMasterPlugin",
version: "3.0 alpha",
title: "TiddlyMaster",
configTiddler: "TiddlyMasterConfig",
defaultTag: "TiddlyMaster", // DEBUG: rename?
annotation: "This tiddler has been loaded from an external file. Changes will only be saved in this local TiddlyWiki document.",
warning: "This tiddler has been loaded from an external file.\nDo you wish to save it in this file?",
styles: ".versionInfo { float: right; } body .TiddlyMasterAnnotation { border-color: #ff2f37; background: #ffbfc2; }", // DEBUG: tweak colors
imported: [],
skipped: [],
errors: []
};
TiddlyMaster.init = function() {
// backup store's dirty status
var dirtyStatus = store.isDirty();
// begin import
if(store.isTiddler(this.configTiddler)) {
// read configuration settings
this.readConfig(this.configTiddler);
// import master
this.importDocument(this.masterLocation);
// import individual tiddler files
this.importFiles(this.tiddlerLocations);
// apply custom styles
setStylesheet(this.styles, "TiddlyMasterStyles");
} else {
this.errors.push("[[" + this.configTiddler + "]] not found");
}
// create shadow tiddler
config.annotations.TiddlyMaster = "This shadow tiddler is created dynamically by " + this.name + ".\n"
+ "Please do not edit this tiddler." // DEBUG: rephrase -- warning sufficent? what if a (shadow or regular) tiddler of that name already exists?!
config.shadowTiddlers.TiddlyMaster = "{{versionInfo{\n" + this.name + " v" + this.version + "\n}}}"
+ "[[" + this.title + "|" + this.masterLocation + "]]\n" // DEBUG: button style!?
+ "!Log\n"
if(this.imported.length > 0)
config.shadowTiddlers.TiddlyMaster += "!!Imported\n* [[" + this.imported.join("]]\n* [[") + "]]\n";
if(this.skipped.length > 0)
config.shadowTiddlers.TiddlyMaster += "!!Skipped\n* [[" + this.skipped.join("]]\n* [[") + "]]\n";
if(this.errors.length > 0)
config.shadowTiddlers.TiddlyMaster += "!!Errors\n* {{{" + this.errors.join("}}}\n* {{{") + "}}}\n";
// restore store's dirty status
store.setDirty(dirtyStatus);
};
TiddlyMaster.readConfig = function(title) {
this.title = store.getTiddlerSlice(title, "Title") || this.title;
this.masterLocation = store.getTiddlerSlice(title, "MasterLocation");
var tiddlerLocations = store.getTiddlerSlice(title, "ExternalTiddlerLocations");
this.tiddlerLocations = tiddlerLocations ? tiddlerLocations.readBracketedList() : [];
this.importFilter = store.getTiddlerSlice(title, "ImportFilter");
var customTags = store.getTiddlerSlice(title, "ExternalTags");
this.tags = customTags ? customTags.readBracketedList() : [];
this.tags.pushUnique(this.defaultTag);
}
// import tiddlers from master document
TiddlyMaster.importDocument = function(filePath) {
var externalStore = new TiddlyWiki();
if(filePath)
var text = loadFile(getScriptPath() + filePath); // DEBUG: over HTTP?
if(text) {
externalStore.importTiddlyWiki(text);
if(this.importFilter) {
var tiddlers = externalStore.filterTiddlers(this.importFilter);
for(var t = 0; t < tiddlers.length; t++) {
this.importTiddler(tiddlers[t], tiddlers[t].title);
}
} else {
externalStore.forEachTiddler(function(title, tiddler) {
this.importTiddler(tiddler, title);
});
}
return true;
} else {
this.errors.push(getScriptPath() + filePath);
return false;
}
}
TiddlyMaster.importTiddler = function(tiddler, title) {
if(!store.tiddlerExists(title)) { // do not overwrite local tiddlers
for(var i = 0; i < this.tags.length; i++)
tiddler.tags.pushUnique(this.tags[i]);
store.addTiddler(tiddler);
this.imported.push(title);
return true;
} else {
this.skipped.push(title);
return false;
}
}
// import individual tiddler files
TiddlyMaster.importFiles = function(filePaths) { // DEBUG: return value?
var created = this.defaultCreated || new Date(); // DEBUG: to be read from configTiddler
var modified = this.defaultModified || new Date(); // DEBUG: to be read from configTiddler
var modifier = this.defaultModifier || "N/A"; // DEBUG: to be read from configTiddler
var externalStore = new TiddlyWiki();
for(var i = 0; i < filePaths.length; i++) {
var text = loadFile(getScriptPath() + filePaths[i]); // DEBUG: over HTTP?
if(text) {
text = text.replace(/\r/mg, ""); // remove additional EOL characters (Windows)
var constituents = filePaths[i].match(/(?:.*(?:\\|\/))?(.*)(?:\.)(.*)/); // DEBUG: flawed when there is no file extension (e.g. "../foo/bar")
var title = constituents[1];
var type = constituents[2];
var tags = this.tags;
if(type == "js")
tags.pushUnique("systemConfig");
if(!store.tiddlerExists(title)) { // do not overwrite local tiddlers
store.saveTiddler(title, title, text, modifier, modified, tags, null, null, created);
this.imported.push(title);
} else {
this.skipped.push(filePaths[i]);
}
return true;
} else {
this.errors.push(getScriptPath() + filePaths[i]);
return false;
}
}
}
// add plugin information to backstage
config.tasks.TiddlyMaster = {
tooltip: TiddlyMaster.name + " v" + TiddlyMaster.version,
content: "<<tiddler [[TiddlyMaster]]>>"
};
config.backstageTasks.push("TiddlyMaster");
// hijack backstage initialization to apply custom configuration settings
backstage.init_old = backstage.init;
backstage.init = function(place, macroName, params, wikifier, paramString, tiddler) {
config.tasks.TiddlyMaster.text = TiddlyMaster.title;
this.init_old.apply(this, arguments);
}
// override SaverBase.prototype.externalize() to exclude external tiddlers from store when saving
SaverBase.prototype.externalize = function(store) {
var results = [];
var tiddlers = store.getTiddlers("title", TiddlyMaster.defaultTag);
for(var t = 0; t < tiddlers.length; t++)
results.push(this.externalizeTiddler(store, tiddlers[t]));
return results.join("\n");
};
// hijack annotations macro to add annotation for external tiddlers
config.macros.annotations.handler_old = config.macros.annotations.handler;
config.macros.annotations.handler = function(place, macroName, params, wikifier, paramString, tiddler) {
if(tiddler.isTagged(TiddlyMaster.defaultTag)) {
wikify(TiddlyMaster.annotation, createTiddlyElement(place, "div", null, "annotation TiddlyMasterAnnotation"), null, tiddler);
} else
this.handler_old.apply(this, arguments);
}
// hijack Story.prototype.saveTiddler() to add warning for external tiddlers
Story.prototype.saveTiddler_old = Story.prototype.saveTiddler;
Story.prototype.saveTiddler = function(title, minorUpdate) {
if(store.getTiddler(title) && store.getTiddler(title).isTagged(TiddlyMaster.defaultTag)) {
var cont = confirm(TiddlyMaster.warning);
if(!cont)
story.setTiddlerTag(title, TiddlyMaster.defaultTag, -1); // remove default tag when saving locally
else
return false;
}
this.saveTiddler_old.apply(this, arguments);
};
// DEBUG: to become obsolete with ticket #442 (http://trac.tiddlywiki.org/ticket/442)
TiddlyWiki.prototype.isTiddler = function(title) {
return store.tiddlerExists(title) || store.isShadowTiddler(title);
};
// DEBUG: might become obsolete with refactored core code; cf. notes on ticket #435 (http://trac.tiddlywiki.org/ticket/435)
function getScriptPath() {
var originalPath = document.location.toString();
var localPath = getLocalPath(originalPath);
var backSlash = true;
var dirPathPos = localPath.lastIndexOf("\\");
if(dirPathPos == -1) {
dirPathPos = localPath.lastIndexOf("/");
backSlash = false;
}
return localPath.substr(0, dirPathPos) + (backSlash ? "\\" : "/");
}
//}}}
/%
|Name|TiddlerTweaker ''altered''|
|Source|http://www.TiddlyTools.com/#TiddlerTweaker|
|Version|0.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|
|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, and then modify the author, created, modified and/or tag values of those tiddlers using a compact set of form fields. The values you enter into the fields overwrite the existing values in all tiddlers you have selected.
TiddlerTweaker also allows you 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 simply *replacing* the entire tag definition of each tiddler (e.g., enter "-excludeLists" to remove that tag from all selected tiddlers.
Note: because you may be working with many tags on many tiddlers, selecting and updating all tiddlers in a document operation may take a while and FireFox might warn about an "unresponsive script"... you should give it a whole bunch of time to 'continue'... it will complete the processing... eventually.
Also, by design, TiddlerTweaker does NOT update the 'modified' date of tiddlers simply by making changes to their tags. The tiddlers' dates are ONLY updated when the corresponding 'created' and/or 'modified' checkboxes are selected. Be sure to SAVE YOUR DOCUMENT WHEN YOU ARE DONE tweaking tiddlers, even if the tiddler timeline tab does not show any recently modified tiddlers.
Finally: 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".
%/{{small smallform{<<tiddler HideTiddlerTags>><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;">select tiddlers:</div><!--
--></font><select multiple name=list size="8" style="width:99.99%"
title="use click, shift-click and/or ctrl-click to select multiple tiddler titles"
onclick="tiddlertweaker.selecttiddlers(this)"
onchange="tiddlertweaker.setfields(this)"><!--
--></select><br><!--
-->show<input type=text size=1 value="8"
onchange="this.form.list.size=this.value; this.form.list.multiple=(this.value>1);"><!--
-->by<!--
--><select name=sortby size=1
onchange="tiddlertweaker.init(this.form,this.value)"><!--
--><option value="title">title</option><!--
--><option value="modified">date</option><!--
--><option value="size">size</option><!--
--></select><!--
--><input type="button" value="refresh"
onclick="tiddlertweaker.init(this.form,this.form.sortby.value)"<!--
--> <input type=button name=stats disabled value='totals...'
onclick="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=setwho unchecked
title="allow changes to tiddler author"
onclick="this.form.who.disabled=!this.checked">author<!--
--></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="this.form.cm.disabled=this.form.cd.disabled=this.form.cy.disabled=this.form.ch.disabled=this.form.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="this.form.mm.disabled=this.form.md.disabled=this.form.my.disabled=this.form.mh.disabled=this.form.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=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="margin-top:.8em;text-align:center"><!--
--><nobr><input type=button name=display disabled style='width:32%' value='display tiddlers'
onclick="tiddlertweaker.displaytiddlers(this)"><!--
--> <input type=button name=del disabled style='width:32%' value='delete tiddlers'
onclick="tiddlertweaker.deltiddlers(this)"><!--
--> <input type=button name=set disabled style='width:32%' value='update tiddlers'
onclick="tiddlertweaker.settiddlers(this)"></nobr><!--
--></div><!--
--></td></tr></table><!--
--></form><span id="TiddlerTweaker_stats" style="display:none"></span></html><script>
window.tiddlertweaker = {
init: // load tiddler titles into multi-select listbox
function(form,sortby) {
while (form.list.options[0]) form.list.options[0]=null; // empty current list content
var tids=store.getTiddlers(sortby);
if (sortby=="size")
tids.sort(function(a,b) {return a.text.length < b.text.length ? -1 : (a.text.length == b.text.length ? 0 : +1);});
for (i=0; i<tids.length; i++) {
var label=tids[i].title; var value=tids[i].title;
if (sortby=="modified") {
label=tids[tids.length-i-1].modified.formatString("YY.0MM.0DD 0hh:0mm ")+tids[tids.length-i-1].title;
value=tids[tids.length-i-1].title;
}
if (sortby=="size") label="["+tids[i].text.length+"] "+label;
form.list.options[form.list.length]=new Option(label,value,false,false);
}
form.title.value=form.who.value=form.tags.value="";
form.cm.value=form.cd.value=form.cy.value=form.ch.value=form.cn.value="";
form.mm.value=form.md.value=form.my.value=form.mh.value=form.mn.value="";
form.stats.disabled=form.set.disabled=form.del.disabled=form.display.disabled=true;
form.settitle.disabled=false;
},
selecttiddlers: // enable/disable tweaker fields based on number of items selected
function(here) {
// count how many tiddlers are selected
var list=here.form.list; var c=0; for (i=0;i<list.length;i++) if (list.options[i].selected) c++;
if (c>1) here.form.title.disabled=true;
if (c>1) here.form.settitle.checked=false;
here.form.set.disabled=(c==0);
here.form.del.disabled=(c==0);
here.form.display.disabled=(c==0);
here.form.settitle.disabled=(c>1);
here.form.stats.disabled=(c==0);
var msg=(c==0)?'select tiddlers:':(c+' tiddler'+(c!=1?'s':'')+' selected');
here.previousSibling.firstChild.innerHTML=msg;
},
setfields: // set tweaker edit fields from first selected tiddler
function(here) {
var form=here.form;
if (!here.value.length) {
form.title.value=form.who.value=form.tags.value="";
form.cm.value=form.cd.value=form.cy.value=form.ch.value=form.cn.value="";
form.mm.value=form.md.value=form.my.value=form.mh.value=form.mn.value="";
return;
}
var tid=store.getTiddler(here.value); if (!tid) return;
form.title.value=tid.title;
form.who.value=tid.modifier;
form.tags.value=tid.tags.join(' ');
var c=tid.created; var m=tid.modified;
form.cm.value=c.getMonth()+1;
form.cd.value=c.getDate();
form.cy.value=c.getFullYear();
form.ch.value=c.getHours();
form.cn.value=c.getMinutes();
form.mm.value=m.getMonth()+1;
form.md.value=m.getDate();
form.my.value=m.getFullYear();
form.mh.value=m.getHours();
form.mn.value=m.getMinutes();
},
settiddlers:
function(here) {
var form=here.form; var list=form.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(form.cy.value,form.cm.value-1,form.cd.value,form.ch.value,form.cn.value);
var mdate=new Date(form.my.value,form.mm.value-1,form.md.value,form.mh.value,form.mn.value);
if (tids.length>1 && !confirm("Are you sure you want to update these tiddlers:\n\n"+tids.join(', '))) return;
for (t=0;t<tids.length;t++) {
var tid=store.getTiddler(tids[t]); if (!tid) continue;
var title=!form.settitle.checked?tid.title:form.title.value;
var who=!form.setwho.checked?tid.modifier:form.who.value;
var tags=tid.tags
if (form.settags.checked) {
var intags=form.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=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); }
// DEBUG alert("original tags="+tid.tags+"\n"+"reptags="+reptags+"\n"+"addtags="+addtags+"\n"+"deltags="+deltags+"\n"+"final tags="+tags+"\n");
}
if (!form.setcdate.checked) cdate=tid.created;
if (!form.setmdate.checked) mdate=tid.modified;
store.saveTiddler(tid.title,title,tid.text,who,mdate,tags,tid.fields);
if (form.setcdate.checked) tid.assign(null,null,null,null,null,cdate); // set create date
}
this.init(form,form.sortby.value);
},
displaytiddlers:
function(here) {
var form=here.form; var list=form.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(form),tids)
},
deltiddlers:
function(here) {
var form=here.form; var list=form.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;
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);
}
this.init(form,form.sortby.value);
},
stats:
function(here) {
var form=here.form; var list=form.list; var tids=[]; var out=''; var tot=0;
var target=document.getElementById("TiddlerTweaker_stats");
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";
}
}
// get THIS form...
var here=place.lastChild.firstChild;
// tweaker might be wrappered in a surrounding form (e.g., TidIDE) , so...
while(here && here.nodeName.toLowerCase()!="form") here=here.parentNode; // find containing form
// initialize tweaker controls
tiddlertweaker.init(here,here.sortby.value);
</script>}}}
The original - http://www.tiddlywiki.com
<<tiddlerList tags:"wikLet,-st,-nd" itemTemplate:%text\n>>
Would be a nice compliment to cascading all tiddlers to tile them.
* Expand all (initial size?)
* Place so not overlapping
* Don't overlap with menus
Think this will have to be low-priority for now.
!Layout Issues
* Display them in columns?
* Wouldn't know when to start new column
* If we go left to right it would be best if we ordered them by size, trying to get pairs of similar sized tiddlers together ...
<script label="⇑" title="Scroll to the top of the screen">
if(self.vpos&&!document.body.scrollTop){void(self.scrollTo(0,vpos));
void(vpos=0);
}else{vpos=document.body.scrollTop;
self.scrollTo(0,0);
}
</script>
<script label="ToggleAnimation" title="switch animation off or on">
config.options.chkAnimate=!config.options.chkAnimate;
saveOptionCookie('chkAnimate');
displayMessage('Animation effects are: '+(config.options.chkAnimate?'ON':'OFF'));
return false;
</script>
/%
|Name|ToggleFullScreen|
|Source|http://www.TiddlyTools.com/#ToggleFullScreen|
|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|show/hide main menu, sidebar and page header|
Usage: <<tiddler ToggleFullScreen with: label altlabel>>
%/<script label="$1" title="FULLSCREEN: toggle display of mainmenu, sidebar, and page header">
window.toggleFullScreen=function() {
config.options.chkFullScreen=!config.options.chkFullScreen;
var showmm=!config.options.chkFullScreen && config.options.chkShowLeftSidebar!==false;
var showsb=!config.options.chkFullScreen && config.options.chkShowRightSidebar!==false;
var showcrumbs=!config.options.chkFullScreen && config.options.chkShowBreadcrumbs!==false
&& config.macros.breadcrumbs && config.macros.breadcrumbs.crumbs.length;
var cw=document.getElementById('contentWrapper');
var da=document.getElementById('displayArea');
var mm=document.getElementById('mainMenu');
var sb=document.getElementById('sidebar');
var sm=document.getElementById('storyMenu');
var bc=document.getElementById('breadCrumbs');
if (cw){
for (var i=0; i<cw.childNodes.length; i++)
if (hasClass(cw.childNodes[i],'header')) { var h=cw.childNodes[i]; break; }
if (h) h.style.display=!config.options.chkFullScreen?'block':'none';
}
if (mm) {
mm.style.display=showmm?'block':'none';
da.style.marginLeft=showmm?(config.options.txtDisplayAreaLeftMargin||''):'1em';
}
if (sb) {
sb.style.display=showsb?'block':'none';
da.style.marginRight=showsb?(config.options.txtDisplayAreaRightMargin||''):'1em';
}
if (sm)
sm.style.display=!config.options.chkFullScreen ?'block':'none';
if (bc)
bc.style.display=showcrumbs?'block':'none';
var altlabel='$2'; if ('$'+'2'=='$2') altlabel=('$'+'1'=='$1')?'fullscreen':'$1';
if (place && place!=window.place)
place.innerHTML=!config.options.chkFullScreen ?(('$'+'1'=='$1')?'fullscreen':'$1'):altlabel;
var b=document.getElementById('restoreFromFullscreenButton');
if (b) removeNode(b);
else {
var b=createTiddlyElement(null,'span','restoreFromFullscreenButton','selected');
b.innerHTML='◊';
b.title='RESTORE: redisplay page header, menu and sidebar';
b.onclick=window.toggleFullScreen;
var s=b.style;
s.position='fixed'; s.zIndex='1001'; s.top='.3em'; s.right='.3em';
s.border='2px outset ButtonFace'; s.padding='0px 3px'; s.cursor='pointer'; s.fontSize='8pt';
s.backgroundColor='ButtonFace'; s.color='ButtonText !important;'; s.MozAppearance='button';
document.body.insertBefore(b,null);
}
return false;
};
window.toggleFullScreen();
return false;
</script><script>
place.lastChild.innerHTML=('$'+'1'=='$1')?'fullscreen':'$1';
</script>
/%
|Name|InstantBookmarklets|
|Source|http://www.TiddlyTools.com/#InstantBookmarklets|
|Version|1.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|
|Notes|Glyph changed|
|Description|instantly create bookmarklets by dragging onclick links to the browser toolbar|
If you use InlineJavascripPlugin's <script> syntax with the 'label="..."' option, then instead of immediately processing the associated javascript code, the plugin creates linked text that directly invokes the javascript code whenever that link is clicked on.
In addition, the plugin automatically generates a URI-encoded "bookmarklet"-ready version of the script code, which it binds to the HREF of the "onclick" link, allowing you to simply drag-and-drop the link onto the browser's toolbar (or right-click and use the "bookmark this link" menu command) to save the encoded script as a stand-alone "bookmarklet" toolbar item (or bookmark). That's it! The URI-encoded script is automatically saved in the browser's toolbar/bookmarks, and can then be invoked directly from the toolbar/bookmarks, without requiring access to (or even a copy of) the document in which the original "onclick" script was defined!!
Note: Typically, an "onclick" script defined with InlineJavascriptPlugin can use an automatically-defined context variable, "place", to generate output into the tiddler in which the script is embedded. However, because a saved bookmarklet script is not embedded in any tiddler content (in fact, it's not even embedded in a *document*), there is no current rendering context and "place" is UNDEFINED. If you create a bookmarklet from an "onclick" script does refer to "place", it will halt and report a "Reference Error" when that bookmarklet is invoked.
Also, in addition to not using "place" within bookmarklets, you must not include a double-quote character (") anywhere in the original onclick script, due to the syntax needed by the browser to invoke a URI-encoded bookmarklet script. If a double-quote DOES occur in the original script code, the stored bookmarklet will report a "syntax error" when invoked. To create a valid bookmarklet, use only single-quotes (') within the script code.
%/<script label=" ↕ " title="switch header and sidebars on or off">
/* HEADER */
var c=document.getElementById('contentWrapper'); if (!c) return;
for (var i=0; i<c.childNodes.length; i++)
if (hasClass(c.childNodes[i],'header')) { var h=c.childNodes[i]; break; }
if (!h) return false;
config.options.chkFullScreen=!config.options.chkFullScreen;
var show=!config.options.chkFullScreen;
h.style.display=show?'block':'none';
config.options.chkFullscreen=!show;
/* MAIN MENU */
var da=document.getElementById('displayArea');
var mm=document.getElementById('mainMenu'); if (!mm) return false;
if (mm) {
if (show && config.options.chkShowLeftSidebar) {
mm.style.display='block';
da.style.marginLeft=config.options.txtDisplayAreaLeftMargin||'';
} else {
mm.style.display='none';
da.style.marginLeft='1em';
}
}
/* SIDE BAR */
var sb=document.getElementById('sidebar'); if (!sb) return false;
if (sb) {
if (show && config.options.chkShowRightSidebar) {
sb.style.display='block';
da.style.marginRight=config.options.txtDisplayAreaRightMargin||'';
} else {
sb.style.display='none';
da.style.marginRight='1em';
}
}
/* STORY MENU */
var sm=document.getElementById('storyMenu');
if (sm) sm.style.display=show?'block':'none';
/* BREADCRUMBS */
var bc=document.getElementById('breadCrumbs');
if (bc) bc.style.display=show&&config.options.chkShowBreadcrumbs?'block':'none';
return false;
</script>
<script label="▲" title="switch header on or off">
var c=document.getElementById('contentWrapper'); if (!c) return;
for (var i=0; i<c.childNodes.length; i++)
if (hasClass(c.childNodes[i],'header')) { var h=c.childNodes[i]; break; }
if (!h) return;
config.options.chkHideSiteTitles=h.style.display!='none';
h.style.display=config.options.chkHideSiteTitles?'none':'block';
saveOptionCookie('chkHideSiteTitles');
return false;
</script>
<script label="~" title="Switch HoverMenu on or off">
if (window.version && window.version.title=='TiddlyWiki') {
var hm=document.getElementById('hoverMenu');
var show=hm.style.display=='none';
if (!show) { hm.style.display='none'; var margin='1em'; }
else { hm.style.display='block'; var margin=config.options.txtDisplayAreaTopMargin||''; }
document.getElementById('displayArea').style.marginTop=margin;
config.options.chkShowHoverMenu=show;
saveOptionCookie('chkShowHoverMenu');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
return false;
}
</script>
/%
|Name|ToggleLeftSidebar|
|Source|http://www.TiddlyTools.com/#ToggleLeftSidebar|
|Version|1.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 left sidebar (MainMenu)|
Usage: <<tiddler ToggleLeftSidebar>>
Config settings:
config.options.txtToggleLeftSideBarLabelShow (►)
config.options.txtToggleLeftSideBarLabelHide (◄)
config.options.txtToggleLeftSideBarTipShow ("show left sidebar")
config.options.txtToggleLeftSideBarTipHide ("hide left sidebar")
%/<script label="show/hide left sidebar">
var mm=document.getElementById('mainMenu'); if (!mm) return;
var show=mm.style.display=='none';
if (!show) { mm.style.display='none'; var margin='1em'; }
else { mm.style.display='block'; var margin=config.options.txtDisplayAreaLeftMargin||''; }
if (typeof(place)!='undefined') {
place.innerHTML=show?
config.options.txtToggleLeftSideBarLabelHide:config.options.txtToggleLeftSideBarLabelShow;
place.title=show?
config.options.txtToggleLeftSideBarTipHide:config.options.txtToggleLeftSideBarTipShow;
}
document.getElementById('displayArea').style.marginLeft=margin;
config.options.chkShowLeftSidebar=show;
saveOptionCookie('chkShowLeftSidebar');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
return false;
</script><script>
if (config.options.chkShowLeftSidebar==undefined)
config.options.chkShowLeftSidebar=true;
if (!config.options.txtDisplayAreaLeftMargin||!config.options.txtDisplayAreaLeftMargin.length)
config.options.txtDisplayAreaLeftMargin="13em";
if (config.options.txtToggleLeftSideBarLabelShow==undefined)
config.options.txtToggleLeftSideBarLabelShow="►";
if (config.options.txtToggleLeftSideBarLabelHide==undefined)
config.options.txtToggleLeftSideBarLabelHide=config.browser.isSafari?"◀":"◄";
if (config.options.txtToggleLeftSideBarTipShow==undefined)
config.options.txtToggleLeftSideBarTipShow="show left sidebar";
if (config.options.txtToggleLeftSideBarTipHide==undefined)
config.options.txtToggleLeftSideBarTipHide="hide left sidebar";
var show=config.options.chkShowLeftSidebar;
document.getElementById('mainMenu').style.display=show?"block":"none";
document.getElementById('displayArea').style.marginLeft=show?
config.options.txtDisplayAreaLeftMargin:"1em";
place.lastChild.innerHTML=show?
config.options.txtToggleLeftSideBarLabelHide:config.options.txtToggleLeftSideBarLabelShow;
place.lastChild.title=show?
config.options.txtToggleLeftSideBarTipHide:config.options.txtToggleLeftSideBarTipShow;
place.lastChild.style.fontWeight="normal";
</script>
/%
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|1.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 (SideBarOptions)|
Usage: <<tiddler ToggleRightSidebar>>
Config settings:
config.options.txtToggleRightSideBarLabelShow (◄)
config.options.txtToggleRightSideBarLabelHide (►)
config.options.txtToggleRightSideBarTipShow ("show right sidebar")
config.options.txtToggleRightSideBarTipHide ("hide right sidebar")
%/<script label="show/hide right sidebar">
var sb=document.getElementById('sidebar'); if (!sb) return;
var show=sb.style.display=='none';
if (!show) { sb.style.display='none'; var margin='1em'; }
else { sb.style.display='block'; var margin=config.options.txtDisplayAreaRightMargin||''; }
if (typeof(place)!='undefined') {
place.innerHTML=show?
config.options.txtToggleRightSideBarLabelHide:config.options.txtToggleRightSideBarLabelShow;
place.title=show?
config.options.txtToggleRightSideBarTipHide:config.options.txtToggleRightSideBarTipShow;
}
document.getElementById('displayArea').style.marginRight=margin;
config.options.chkShowRightSidebar=show;
saveOptionCookie('chkShowRightSidebar');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
return false;
</script><script>
if (config.options.chkShowRightSidebar==undefined)
config.options.chkShowRightSidebar=true;
if (!config.options.txtDisplayAreaRightMargin||!config.options.txtDisplayAreaRightMargin.length)
config.options.txtDisplayAreaRightMargin="18em";
if (config.options.txtToggleRightSideBarLabelShow==undefined)
config.options.txtToggleRightSideBarLabelShow=config.browser.isSafari?"◀":"◄";
if (config.options.txtToggleRightSideBarLabelHide==undefined)
config.options.txtToggleRightSideBarLabelHide="►";
if (config.options.txtToggleRightSideBarTipShow==undefined)
config.options.txtToggleRightSideBarTipShow="show right sidebar";
if (config.options.txtToggleRightSideBarTipHide==undefined)
config.options.txtToggleRightSideBarTipHide="hide right sidebar";
var show=config.options.chkShowRightSidebar;
document.getElementById('sidebar').style.display=show?"block":"none";
document.getElementById('displayArea').style.marginRight=show?
config.options.txtDisplayAreaRightMargin:"1em";
place.lastChild.innerHTML=show?
config.options.txtToggleRightSideBarLabelHide:config.options.txtToggleRightSideBarLabelShow;
place.lastChild.title=show?
config.options.txtToggleRightSideBarTipHide:config.options.txtToggleRightSideBarTipShow;
place.lastChild.style.fontWeight="normal";
</script>
<script label="^" title="switch Toolbar on or off">
if (window.version && window.version.title=='TiddlyWiki') {
var tb=document.getElementById('toolBar');
var show=tb.style.display=='none';
if (!show) { tb.style.display='none'; var margin='1em'; }
else { tb.style.display='block'; var margin=config.options.txtDisplayAreaTopMargin||''; }
document.getElementById('displayArea').style.marginTop=margin;
config.options.chkShowToolBar=show;
saveOptionCookie('chkShowToolBar');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
}
return false;
</script>
<script label="✓" title="switch TopMenu on or off">
if (window.version && window.config && window.store && window.story){
var tm=document.getElementById('topMenu');
var show=tm.style.display=='none';
if (!show) { tm.style.display='none'; var margin='1em'; }
else { tm.style.display='block'; var margin=config.options.txtDisplayAreaTopMargin||''; }
document.getElementById('displayArea').style.marginTop=margin;
config.options.chkShowTopMenu=show;
saveOptionCookie('chkShowTopMenu');
var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
}
return false;
</script>
{{floatright{<<tiddler ShowPopup with: SideBarTabs "tab" "See Tables of Content" "" "20em" "">> <<tiddler Go>> <<tiddler ShowPopup with: Lay "lay" "Arrange the layout" "" "12em" "">> {{search{<<search>><script>place.lastChild.style.width="6em";place.lastChild.style.fontSize="7pt";</script>}}} <<closeAll>> <<permaview>> <<tiddler ShowPopup with: New "new" "Create new tiddlers" "" "8em" "">> <<saveChanges>> <<tiddler ShowPopup with: Opt "opt" "Change TiddlyWiki advanced options" "" "17em" "">>}}}
* <<tiddler ToggleMainMenu>>
* <<tiddler ToggleHeader>>
* Intro
** {{topMenu{<<tiddlerList tags:intro format:stack>>}}}
* Done
** {{topMenu{<<tiddlerList tags:fixed format:stack>>}}}
* ToDo
** {{topMenu{<<tiddlerList tags:todo format:stack>>}}}
* Tag
** <<tiddler TabTags>>
* Lay
** {{topMenu{<<tiddler Lay>>}}}
* Get
** {{topMenu{<<tiddler Get>>}}}
* New
** {{topMenu{<<tiddler New>>}}}
* Sys
** {{topMenu{<<tiddler Sys>>}}}
* Go
** {{topMenu{<<tiddler ShowBreadcrumbs>>}}}
* <<tiddler ToggleSidebar>>
* <<tiddler ToggleHoverMenu>>
* <<restoreLayout>><<renameButton +>>
<<dropMenu>>
<<moveablePanel noedges>>
<<tiddler AutoRefresh with: force>>
<<tiddler LoadLocalWithPanel with: TrashPin TrashPlugin.js>>
It would be nice to have Ctrl+Z undo the last edit you made - I keep wanting to do that ...
We would need to:
* Store the last tiddler __before__ it was saved (maybe we could store a whole stack of them?)
* Map Ctrl+Z to a function that saved the previous version of the tiddler
<<tiddler FramedLink with: Unicode "http://slayeroffice.com/tools/unicode_lookup/">><<resizeFrame>>
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 13/05/2008 10:44:59 | .. | [[desk.htm|file:///C:/DOKUME~1/Wolfgang/Desktop/desk.htm]] | [[store.php|http://tiddlyhome.bidix.info/desk/store.php]] | . | [[index.html | http://tiddlyhome.bidix.info/desk/index.html]] | backup |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.0|
|''Date:''|May 5, 2007|
|''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 (#3125)|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 0,
date: new Date("May 5, 2007"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0 (#3125)'
};
//
// 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
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}
]);
},
refreshOptions: function(listWrapper) {
var uploadOpts = [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine",
]
var opts = [];
for(i=0; i<uploadOpts.length; i++) {
var opt = {};
opts.push()
opt.option = "";
n = uploadOpts[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 = 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,null,null,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 = Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
bidix.upload.httpUpload(rssUploadParams,convertUnicodeToUTF8(generateRss()),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 == httpStatus.NotFound)
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; 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");
//}}}
UploadTiddlerPlugin and [[storeTiddler.php]] "upload" or "save to web" a single tiddler by updating, inserting or deleting a single tiddler in a TiddlyWiki file located on the web.
@@Now UploadTiddlerPlugin and [[storeTiddler.php]] can rename a tiddler.@@
![[UploadTiddlerPlugin]]
*is activated by @@chkUploadTiddler option: <<option chkUploadTiddler>>@@
*uses @@txtUploadTiddlerStoreUrl: <<option txtUploadTiddlerStoreUrl>>@@
*override TiddlyWiki.prototype.saveTiddler and deleteTiddler core functions
*uses the same options as UploadPlugin.
*do an XmlHttpRequest POST to storeTiddler.php only with the corresponding tiddler in storeArea format.
![[storeTiddler.php]]
*Username and password are checked
*[[storeTiddler.php]] parses TiddlyWiki file
*tiddler is updated, inserted or deleted in the tiddler array
*optionally create and clean backup file
*write updated TiddlyWiki file
!UploadTiddlerPlugin and UploadPlugin
*The paradigm of UploadTiddlerPlugin and [[storeTiddler.php]] is exactly the same as UploadPlugin and [[store.php]]
*No concurrency managed
*Full compatible with UploadPlugin
*[[storeTiddler.php]] can be use to remotly update a TiddlyWiki. storeTiddler.php
*a GET to [[storeTiddler.php]] display a form to upload a tiddler in a TiddlyWiki
/***
|''Name:''|UploadTiddlerPlugin|
|''Description:''|Upload a tiddler and Update a remote TiddlyWiki |
|''Version:''|1.1.1|
|''Date:''|2008 03 29|
|''Source:''|http://tiddlywiki.bidix.info/#UploadTiddlerPlugin|
|''Usage:''|Uses {{{<<uploadOptions>>}}}<br>with those UploadTiddler Options : <br>chkUploadTiddler: <<option chkUploadTiddler>><br>txtUploadTiddlerStoreUrl: <<option txtUploadTiddlerStoreUrl>>|
|''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.3.0|
***/
//{{{
version.extensions.UploadTiddlerPlugin = {
major: 1, minor: 1, revision: 1,
date: new Date("2008 03 29"),
source: 'http://tiddlywiki.bidix.info/#UploadTiddlerPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.3.0'
};
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;
bidix.uploadTiddler = {
messages: {
aboutToSaveTiddler: "About to update tiddler '%0'...",
storeTiddlerNotFound: "Script store tiddler '%0' not found",
tiddlerSaved: "Tiddler '%0' updated in '%1'"
},
upload: function(title,tiddler,oldTitle) {
var callback = function(status,params,responseText,url,xhr) {
if (xhr.status == httpStatus.NotFound) {
alert(bidix.uploadTiddler.messages.storeTiddlerNotFound.format([url]));
return;
}
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);
else
displayMessage(bidix.uploadTiddler.messages.tiddlerSaved.format([params[0], params[1]]));
store.setDirty(false);
}
if (config.options['chkUploadTiddler']) {
displayMessage(bidix.uploadTiddler.messages.aboutToSaveTiddler.format([title]));
var ExtTiddler = null;
if (tiddler)
ExtTiddler = store.getSaver().externalizeTiddler(store,tiddler);
var form = "title="+encodeURIComponent(title);
form = form + "&tiddler="+encodeURIComponent(ExtTiddler);
var filename = (config.options['txtUploadFilename']?config.options['txtUploadFilename']:'index.html');
form = form +"&oldTitle="+encodeURIComponent(oldTitle);
form = form +"&fileName="+encodeURIComponent(filename);
form = form +"&backupDir="+encodeURIComponent(config.options['txtUploadBackupDir']);
form = form +"&user="+encodeURIComponent(config.options['txtUploadUserName']);
form = form +"&password="+encodeURIComponent(config.options['pasUploadPassword']);
form = form +"&uploadir="+encodeURIComponent(config.options['txtUploadDir']);
form = form +"&debug="+encodeURIComponent(0);
var storeScript = (config.options.txtUploadTiddlerStoreUrl
? config.options.txtUploadTiddlerStoreUrl : 'storeTiddler.php');
var r = doHttp("POST",storeScript,form+"\n",'application/x-www-form-urlencoded',
config.options['txtUploadUserName'],config.options['pasUploadPassword'],callback,Array(title,filename),null);
}
}
}
TiddlyWiki.prototype.saveTiddler_bidix = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(oldTitle,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
var tiddler = TiddlyWiki.prototype.saveTiddler_bidix.apply(this,arguments);
var title = (newTitle?newTitle:oldTitle);
if (oldTitle == title)
oldTitle = null;
bidix.uploadTiddler.upload(title, tiddler, oldTitle);
}
TiddlyWiki.prototype.removeTiddler_bidix =TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler = function(title) {
TiddlyWiki.prototype.removeTiddler_bidix.apply(this,arguments);
bidix.uploadTiddler.upload(title, null);
}
//
// Initializations
//
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
// styleSheet
setStylesheet('.txtUploadTiddlerStoreUrl {width: 22em;}',"uploadTiddlerPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadTiddlerStoreUrl: "Url of the UploadTiddlerService script (default: storeTiddler.php)",
chkUploadTiddler: "Do per Tiddler upload using txtUploadTiddlerStoreUrl (default: false)"
});
// Options Initializations
bidix.initOption('txtUploadTiddlerStoreUrl','');
bidix.initOption('chkUploadTiddler','');
// add options in backstage UploadOptions
if (config.macros.uploadOptions) {
if (config.macros.uploadOptions.options) {
config.macros.uploadOptions.options.push("txtUploadTiddlerStoreUrl","chkUploadTiddler");
}
}
//}}}
/***
|''Name:''|UploadToHomeMacro|
|''Description:''|Save TiddlyWiki using HomeParameters tiddler|
|''Version:''|0.0.2|
|''Date:''|May 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#UploadToHomeMacro|
|''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 (#2125)|
|''Requires:''|UploadPlugin|
|''Usage:''|{{{<<uploadToHome [HomeParameters]>>}}}<br>{{{HomeParameters:}}} optional - Tiddler with upload parameters in slices (see HomeParameters).|
***/
//{{{
version.extensions.UploadToHomeMacro = {
major: 0, minor: 0, revision: 2,
date: new Date("May 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#UploadToHomeMacro',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0 (#3125)'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
bidix.checkPlugin("UploadPlugin", 4, 1, 0);
//
// uploadUsing Macro
//
config.macros.uploadToHome = {
handler: function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = config.macros.upload.label.saveLabel;
else
label = config.macros.upload.label.uploadLabel;
var prompt;
var homeParams = (params[0] ? params[0]:this.messages.homeParamsTiddler);
if (store.tiddlerExists(homeParams) || store.isShadowTiddler(homeParams)) {
prompt = this.messages.prompt.toString().format([homeParams]);
} else {
throw(this.messages.tiddlerNotFound.toString().format([homeParams]));
}
var prompt = this.messages.prompt.toString().format([homeParams]);
createTiddlyButton(place, label, prompt, function() {config.macros.uploadToHome.action(homeParams);}, null, null, this.accessKey);
},
action: function(homeParams) {
homeParams = (homeParams ? homeParams : config.macros.uploadToHome.messages.homeParamsTiddler);
if (!store.tiddlerExists(homeParams) && !store.isShadowTiddler(homeParams)) {
throw(config.macros.uploadToHome.messages.tiddlerNotFound.toString().format([homeParams]));
}
config.macros.upload.action(config.macros.uploadToHome.getParamsFromTiddler(homeParams));
},
getParamsFromTiddler: function(tiddlerTitle) {
tiddlerTitle = (tiddlerTitle ? tiddlerTitle:this.messages.homeParamsTiddler);
if (!store.tiddlerExists(tiddlerTitle) && !store.isShadowTiddler(tiddlerTitle)) {
throw(config.macros.uploadToHome.messages.tiddlerNotFound.toString().format([tiddlerTitle]));
}
var sliceNames = [
"UploadStoreUrl",
"UploadFilename",
"UploadBackupDir",
"UploadDir",
"UploadUserName"
//"UploadPassword", // no password in tiddlers
];
var sliceValues = store.getTiddlerSlices(tiddlerTitle,sliceNames);
var parameters = [];
for(var i=0; i<sliceNames.length; i++) {
parameters.push(sliceValues[sliceNames[i]]);
}
return parameters;
},
messages: {
homeParamsTiddler: "HomeParameters",
prompt: "Save and Upload this TiddlyWiki using parameters in '%0' tiddler",
tiddlerNotFound: "Tiddler %0 not found"
},
initAtLoad: function () {
// install Shadowed HomeParameters
var storeUrl;
if ((document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
else
storeUrl = config.macros.upload.defaultStoreScript;
var shadowedHomeParameters = (config.shadowTiddlers['HomeParameters']?config.shadowTiddlers['HomeParameters']:'');
shadowedHomeParameters += [
"|UploadUserName:|"+config.options['txtUploadUserName']+"|",
"|UploadStoreUrl:|"+storeUrl+"|",
"|UploadDir:|.|",
"|UploadFilename:|index.html|",
"|UploadBackupDir:||"
].join("\n");
merge(config.shadowTiddlers,{'HomeParameters': shadowedHomeParameters});
// install Backstage uploadToHome
merge(config.tasks,{
uploadToHome: {text: "uploadToHome", tooltip: "Upload using '" + this.messages.homeParamsTiddler + "' tiddler", action: this.action}
});
config.backstageTasks.push("uploadToHome");
}
};
config.macros.uploadToHome.initAtLoad();
//}}}
<script label="ViewAsHtml" title="Display a tiddler as raw HTML">
if (window.version && window.config && window.store && window.story){var title=prompt('Tiddler to view as html:');
var t=store.getTiddler(title);
var stat=wikifyStatic(t.text,null,t);
var w=window.open();
w.document.open();
w.document.writeln('<html><body>');
w.document.writeln('<pre>'+stat.htmlEncode()+'</pre>');
w.document.writeln('</body></html>');
w.document.close();
}
return false; // ELS: added
</script>
<script label="ViewAsJs" title="Display a tiddler as a JavaScript string (for developers to use as shadow tiddler)">
if (window.version && window.config && window.store && window.story){
var title = prompt('Tiddler to view as JavaScript string:');
var text = store.getTiddlerText(title).replace(/"/g,'\\"').split("\n").join('\\n"+\n "');
var w=window.open();
w.document.open();
// ELS: changed 'w.place.innerHTML+=' to 'w.document.writeln'
w.document.writeln('<html><body>');
w.document.writeln('<pre>'+text.htmlEncode()+'</pre>');
w.document.writeln('</body></html>');
w.document.close();}
return false; // ELS: added
</script>
<script label="ViewShadow" title="Display the default contents of a shadow tiddler">
if (window.version && window.config && window.store && window.story){var shadow=prompt('View the shadow tiddler called:');
if (!config.shadowTiddlers[shadow]){alert(shadow+' not found');return false;} // ELS: added
var w=window.open();
w.document.open();
// ELS: changed 'w.place.innerHTML+=' to 'w.document.writeln'
w.document.writeln('<html><body>');
w.document.writeln('<pre>'+config.shadowTiddlers[shadow].htmlEncode()+'</pre>');
w.document.writeln('</body></html>');
w.document.close();}
return false; // ELS: added
</script>
<!--{{{-->
<div macro='gradient horiz [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryPale]]' class='windowBar'>
<span class='windowToolbar' macro='toolbar jump collapseTiddler closeOthers -closeTiddler'></span>
<span class='title' macro='view title'></span>
</div>
<div class='collapsible'>
<div class='toolbar' macro='toolbar +editTiddler deleteTiddler > copyTiddler easyEdit externalize fields syncing permalink references'>
<span class="toolbar" macro="tiddler TidIDECommand"></span>
<span class='toolbar' macro='tiddler SaveTiddlerToFile with: "file"'></span>
<span macro='tagger'></span>
<span class="toolbar" macro="tiddler ToggleFullscreen"></span> </span></div>
<div class='scrollable'>
<div class='tagging' macro='tagging'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='subtitle'>
<span macro='view modifier link'></span>,
<span macro='view modified date [[DD mmm YY]]'></span>
(created: <span macro='view created date [[DD mmm YY]]'></span>)
</div>
<div class='tagged' macro='tags'></div>
<div class='tagClear'></div>
</div>
<div macro='sizer' class='sizer'></div>
<!--}}}-->
<<tiddler LoadLocalPlugin with: WikiBar WikiBar.js>>
<<tiddler LoadLocalPlugin with: TWMacro TWMacro.js>>
<<tiddler LoadLocalPlugin with: Templater Templater.js>>
<<tiddler LoadLocalPlugin with: JsVerifier JsVerifier.js>>
<<tiddler LoadLocalPlugin with: JsStripper JsStripper.js>>
<<tiddler LoadLocalPlugin with: DateFormatString DateFormatString.js>>
<<tiddler LoadLocalPlugin with: CssStripper CssStripper.js>>
<<tiddler LoadLocalPlugin with: AdjustEditorRows AdjustEditorRows.js>>
//{{{
<script label="..." title="...">
//}}}
//{{{
<script>
var s="...";
var pre="\n{{{\n";
var post="\n}}}\n";
var code=decodeURIComponent(decodeURIComponent(s));
var fixup=code.replace(/;/g,";\n");
return pre+fixup+post;
</script>
//}}}
//{{{
</script>
//}}}
<<tiddler LoadLocalWithPanel with: Wysiwyg WYSIWYGPlugin.js>> [[- Panel only|Wysiwyg]]
<html><p>Edit this tiddler too see the Wysiwyg editor ([[FCKeditor|http://www.fckeditor.net/]]).</p> <p>Rich text can embed wiki syntax formatting with [[HTMLFormattingPlugin]]</p> <p><font size="2" color="#ff6600">Here</font><font color="#ff6600">, </font><font size="3" color="#ff0000" style="background-color: rgb(192, 192, 192);">you </font><font size="4" color="#ff00ff">can </font><strong><font size="5" color="#00ff00">play </font></strong><font size="4" style="background-color: rgb(0, 255, 255);">with </font><font size="3" style="background-color: rgb(255, 204, 153);">HTML </font><font size="2" color="#993300">formatting </font><sup>power.</sup></p></html>
<script label="Load YourSearch" title="Load YourSearchPlugin from local directory">
var script=document.createElement('script');
script.src='js/YourSearchPlugin.js';
script.onload=function(){ refreshPageTemplate(); story.displayTiddler(null,'Search'); alert('YourSearchPlugin has been loaded.'); };
document.getElementsByTagName('head')[0].appendChild(script);
return false;
</script> [[- Panel only|Search]]
/***
@@''This tiddler is auto-generated - don't edit it!''@@
***/
/*{{{*/
[
{id: 'tiddlerTiddlyDesktop', x: 44, y: 160, z: 4, width: 600, height: 512, collapsed: false},
{id: 'tiddlerNew Bugs', x: 72, y: 180, z: 3, width: 601, height: 336, collapsed: false},
{id: 'tiddlerJonnyLeRoy', x: 102, y: 200, z: 2, width: 600, height: 207, collapsed: false},
{id: 'tiddlerTiddlyWiki', x: 131, y: 219, z: 1, width: 600, height: 124, collapsed: false}
]
/*}}}*/
<script label="$1">
var who=prompt("Please set your $1",config.options.txt$1);
if (!who||!who.trim().length) return false;
config.options.txt$1=who;
saveOptionCookie("txt$1");
var tid=story.findContainingTiddler(place);
if (tid) story.refreshTiddler(tid.getAttribute("tiddler"),null,true); // sync containing tiddler
var nodes = document.getElementsByTagName("input");
for(var t=0; t<nodes.length; t++) // sync any input fields that show $1
if(nodes[t].getAttribute("option")=="txt$1") nodes[t].value=who;
return false;
</script><script>
place.lastChild.title="click to change your $1";
place.lastChild.innerHTML=config.options.txt$1;
</script>
/***
@@''This tiddler is auto-generated - don't edit it!''@@
***/
/*{{{*/
[
{id: 'tiddlerTiddlyDesktop', x: 44, y: 160, z: 4, width: 600, height: 512, collapsed: false},
{id: 'tiddlerNew Bugs', x: 72, y: 180, z: 3, width: 600, height: 336, collapsed: false},
{id: 'tiddlerJonnyLeRoy', x: 102, y: 200, z: 2, width: 600, height: 207, collapsed: false},
{id: 'tiddlerTiddlyWiki', x: 131, y: 219, z: 1, width: 600, height: 124, collapsed: false}
]
/*}}}*/
user: <<tiddler config.options.txt with: UserName>>
backup folder: <<tiddler config.options.txt with: BackupFolder>>
edit rows: <<tiddler config.options.txt with: MaxEditRows>>
externalize hotkey: <<tiddler config.options.txt with: ExternalizeHotkey>>
fck toolbar: <<tiddler config.options.txt with: FCKToolbar>>
preview width: <<tiddler config.options.txt with: PopupPreviewWidth>>
preview height: <<tiddler config.options.txt with: PopupPreviewHeight>>
~TinyMCE Path: <<tiddler config.option.txt with: TinyMCEPath>>
~RichText edit tag: <<tiddler config.option.txt with: RichTextTag>>
Also see AdvancedOptions
/***
|Name|HoverMenuPlugin ''compressed''|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#HoverMenuPlugin|
|Version|1.11|
|Requires|~TW2.x|
|Description|Provides a hovering menu on the edge of the screen for commonly used commands, that scrolls with the page.|
***/
//{{{
config.hoverMenu={};config.hoverMenu.settings={align:"right",x:1,y:158};config.hoverMenu.handler=function(){if(!document.getElementById("hoverMenu")){var _1=createTiddlyElement(document.getElementById("contentWrapper"),"div","hoverMenu");_1.setAttribute("refresh","content");_1.setAttribute("tiddler","HoverMenu");var _2=store.getTiddlerText("HoverMenu");wikify(_2,_1);}var _3=this.settings.x;Yloc=this.settings.y;var ns=(navigator.appName.indexOf("Netscape")!=-1);function SetMenu(id){var _6=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];if(document.layers){_6.style=_6;}_6.sP=function(x,y){this.style[config.hoverMenu.settings.align]=x+"px";this.style.top=y+"px";};_6.x=_3;_6.y=findScrollY();_6.y+=Yloc;return _6;}window.LoCate_XY=function(){var pY=findScrollY();ftlObj.y+=(pY+Yloc-ftlObj.y)/15;ftlObj.sP(ftlObj.x,ftlObj.y);setTimeout("LoCate_XY()",10);};ftlObj=SetMenu("hoverMenu");LoCate_XY();};window.old_lewcid_hovermenu_restart=restart;restart=function(){window.old_lewcid_hovermenu_restart();config.hoverMenu.handler();};setStylesheet("#hoverMenu .button, #hoverMenu .tiddlyLink {border:none; font-weight:bold; background:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::PrimaryDark]]; padding:0 5px; float:right; margin-bottom:4px;}\n"+"#hoverMenu .button:hover, #hoverMenu .tiddlyLink:hover {font-weight:bold; border:none; color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]]; padding:0 5px; float:right; margin-bottom:4px;}\n"+"#hoverMenu .button {width:100%; text-align:center}"+"#hoverMenu { position:absolute; width:7px;}\n"+"\n","hoverMenuStyles");config.macros.renameButton={};config.macros.renameButton.handler=function(_a,_b,_c,_d,_e,_f){if(_a.lastChild.tagName!="BR"){_a.lastChild.firstChild.data=_c[0];if(_c[1]){_a.lastChild.title=_c[1];}}};config.shadowTiddlers["HoverMenu"]="<<top>>\n<<toggleSideBar>><<renameButton '>' >>\n<<jump j '' top>>\n<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>\n<<newTiddler>><<renameButton n>>\n";Popup.show=function(_10,_11){var _12=Popup.stack[Popup.stack.length-1];var _13=findPosX(_12.root);var _14=findPosY(_12.root);var _15=_12.root.offsetHeight;var _16=_13;var _17=_14+_15;var _18=_12.popup.offsetWidth;var _19=findWindowWidth();if(isChild(_12.root,"hoverMenu")){var x=config.hoverMenu.settings.x;}else{var x=0;}if(_16+_18+x>_19){_16=_19-_18-x;}if(isChild(_12.root,"hoverMenu")){_12.popup.style.right=x+"px";}else{_12.popup.style.left=_16+"px";}_12.popup.style.top=_17+"px";_12.popup.style.display="block";addClass(_12.root,"highlight");if(config.options.chkAnimate){anim.startAnimating(new Scroller(_12.popup,_11));}else{window.scrollTo(0,ensureVisible(_12.popup));}};window.isChild=function(e,_1d){while(e!=null){var _1e=document.getElementById(_1d);if(_1e==e){return true;}e=e.parentNode;}return false;};
//}}}
//{{{
config.options.txtUserName = ".."; // default "YourName"
config.options.txtBackupFolder = "archive"; // default ""
config.options.txtMaxEditRows = "20"; // default "30"
config.options.txtExternalizeHotkey = "ctrl A";
config.options.txtFCKToolbar = "Custom";
config.options.txtPopupPreviewWidth = "70%";
config.options.txtPopupPreviewHeight = "40em";
config.options.txtTinyMCEPath = "tiny_mce/tiny_mce.js";
config.options.txtRichTextTag = "richText";
config.options.chkSaveBackups = false; // default true
config.options.chkAnimate = false; // default true
config.options.chkReorderBreadcrumbs = true; // default false
config.options.chkForceMinorUpdate = true; // default false
config.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler - default false
config.options.chkStickyPopups = true;
config.options.chkFramedLinks = true;
config.options.chkForceCreatorField = false;
config.options.chkHttpReadOnly = false; // web visitors can experiment with your site by clicking edit. default true
config.options.chkCreateDefaultBreadcrumbs = false;
config.options.chkReorderBreadcrumbs = true;
config.options.chkShowStartupBreadcrumbs = true;
config.options.chkShowRightSidebar = false;
config.options.chkShowLeftSidebar = false;
config.options.chkShowHoverMenu = true;
config.options.chkShowToolBar = false;
config.options.chkHttpReadOnly = false;
readOnly = false;
showBackstage = true;
config.options.slidercookiename = false; // default true
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = ""; // don't need message when creating a new tiddler
config.commands.syncing.text = "sync"; // default is "syncing"
config.commands.permalink.text = "link"; // default is "permalink"
config.commands.references.text = "refs" // default is "references"
config.macros.toolbar.moreLabel = "≫";
config.macros.closeAll.label = "clear";
config.macros.permaview.label = "link";
config.macros.saveChanges.label = "save";
//}}}
//{{{
config.hoverMenu.settings={
align: 'right', //align menu to right or left side of screen, possible values are 'right' and 'left'
x: 1, // horizontal distance of menu from side of screen, increase to your liking.
y: 6 //vertical distance of menu from top of screen at start, increase or decrease to your liking
};
//}}}