Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
{{centeredTable{
|>|>| !Contents of / |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[/]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[bin]]| Folder | <<tiddler NextTiddler with: bin "Browse">> |
| [[etc]]| Folder | <<tiddler NextTiddler with: etc "Browse">> |
| [[usr]]| Folder | <<tiddler NextTiddler with: usr "Browse">> |
| [[var]]| Folder | <<tiddler NextTiddler with: var "Browse">> |
|fsTableStyle|k
}}}
[[GettingStarted]]
[[Issues]]
<<tiddler EmbedTiddlers with: "[[WASH-SE]] [[TidIDE]]">>
/%
|Name|EmbedTiddlers|
|Source|http://www.TiddlyTools.com/#EmbedTiddlers|
|Version|1.2.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|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|transclude a list of tiddlers in a specific order|
usage:
<<tiddler EmbedTiddlers with: "TiddlerName [[TiddlerName with spaces]] TiddlerName ...">>
or
<<tiddler EmbedTiddlers with: @TiddlerName>>
or
<<tiddler EmbedTiddlers with: =tagValue sortby>>
where
@TiddlerName
specifies a //separate// tiddler containing the space-separated,
bracketed list of tiddlers to transclude (e.g., DefaultTiddlers)
=tagValue
embeds all tiddlers tagged with the indicated value
sortby (optional)
specifies a tiddler field for sorting the results (default="title")
"+" or "-" prefix indicates the sort direction (ascending/descending),
e.g., "-modified" sorts by tiddler modification date, most recent first
Note: if MatchTagsPlugin is installed, you can use FULL BOOLEAN LOGIC EXPRESSIONS
in place of the "tagValue" (following the leading "="). However, because the boolean
expression will contain spaces, it MUST be enclosed in [[...]], like this:
<<tiddler EmbedTiddlers with: [[=settings AND NOT systemConfig]]>>
%/<script>
var list='$1';
var sortby='title'; if ('$2'!='$'+'2') sortby='$2';
var tids=[];
if (list.substr(0,1)=='=') {
var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
var tagged=store.sortTiddlers(fn.apply(store,[list.substr(1)]),sortby);
for (var t=0; t<tagged.length; t++) tids.push(tagged[t].title);
} else {
if (list.substr(0,1)=='@') list=store.getTiddlerText(list.substr(1),'');
var tids=list.readBracketedList();
}
var out='';
for (var i=0; i<tids.length; i++) out+='<<tiddler [['+tids[i]+']]>>';
return out;
</script>
''Welcome''
This [[TiddlyWiki|http://www.tiddlywiki.com/]] was designed for TW and other web application developers. To get started, try opening a [[Command Line Shell|WASH-SE]] or an [[Integrated Development Environment|TidIDE]].
''Options''
* Username (for signing your edits): <<option txtUserName>>
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // load a script library
// make script tag, set src, add to body to execute, then remove for cleanup
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // there is script code
if (show) // show inline script code in tiddler output
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create a link to an 'onclick' script
// add a link, define click handler, save code in link (pass 'place'), set link attributes
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place){"+fixup+"\n};_out(this);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run inline script code
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var code="function _out(place){"+fixup+"\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;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=="undefined") { // avoid redefinition
function $() {
var elements=new Array();
for (var i=0; i<arguments.length; i++) {
var element=arguments[i];
if (typeof element=='string') element=document.getElementById(element);
if (arguments.length==1) return element;
elements.push(element);
}
return elements;
}
}
//}}}
* Should hijack the close buttons for garbage collection (on window.Console)... ?
* [[WashPlugin]] isn't playing nice with [[MoveablePanelPlugin]]. See [[/bin/WASH-SE2|WASH-SE2]].
* Need to verify inter-tiddler references for [[/bin/tree|tree]] & [[RelatedTiddlersPlugin]].
* How to get Jash fixed? (CSS, ?...)
* Setup TidIDE CSS
/*{{{*/
/**
* $Id: Jash.css,v 1.3 2007/11/16 03:06:33 billyreisinger Exp $
*
* Jash - JavaScript Shell
* Copyright: 2007, Billy Reisinger
* Documentation: http://www.billyreisinger.com/jash/
* License: GNU General Public License - http://www.gnu.org/licenses/gpl.html
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
#JashParent {
width: 581px;
height: 450px;
border: 1px solid gray;
-moz-border-radius: 10px; /* ELS */
color: black;
z-index: 10000;
overflow: hidden;
background: #ccc;
opacity: 0.90;
filter: alpha(opacity=90);
position: absolute;
left: 25%;
color: black;
font-family: monospace;
margin: 0;
}
#JashParent div {
margin: 0;
}
#JashParent a, #JashParent a:visited, #JashParent a:active, #JashParent a:hover {
text-decoration: none;
color: black;
}
.transparentMode {
opacity: 0.20 !important;
filter: alpha(opacity=20) !important;
}
#JashDragBar {
BACKGROUND: gray;
CURSOR: move;
COLOR: white;
font-family: arial,helvetica,sans-serif; /* ELS - changed from monospace to arial,helvetica,sans-serif */
font-weight: bold;
text-indent: 4px;
font-size: 14pt; /* ELS - changed from 14px to 14pt */
HEIGHT: 25px;
TEXT-ALIGN: left;
overflow: hidden;
border: 1px outset white;
-moz-border-radius-topleft: 10px; /* ELS */
-moz-border-radius-topright: 10px; /* ELS */
}
.JashXButton {
border: 1px solid white;
-moz-border-radius: 5px; /* ELS */
color: white !important;
position: absolute;
background: #bbb;
width: 20px;
text-align: center;
display: block;
right: 3px; _right: 1px;
top: 4px; _top: 1px;
font-family: arial,helvetica,sans-serif; /* ELS - changed to arial,helvetica,sans-serif */
font-size: 8pt; /* ELS - changed from 18px to 8pt */
cursor: pointer;
}
a.JashXButton:hover {
background: #ddd;
}
#JashTextareaWrap {
width: 100%;
_height: 420px;
}
html>body #JashTextareaWrap {
height: 100%;
}
#JashOutput {
border: 2px inset white;
FONT-SIZE: 10px;
font-family: "Lucida Console", monaco, monospace;
BACKGROUND: black;
width: 99%;
COLOR: lightgreen;
PADDING: 2px;
height: 60%;
height: expression(parseInt(this.parentNode.parentNode.offsetHeight * (3/5)) + 'px');
}
#JashInput {
padding: 2px;
WIDTH: 99%;
border: 2px inset white;
-moz-border-radius-bottomleft: 10px; /* ELS */
-moz-border-radius-bottomright: 10px; /* ELS */
HEIGHT: 25%;
font-family: monospace;
font-size: 11px;
height: expression(parseInt(this.parentNode.parentNode.offsetHeight * (3/13)) + 'px');
}
#JashParent .cssEntry {
background: lightgreen;
font-size: 11px;
font-family: monospace;
}
#JashBottomBar {
BACKGROUND: #ccc;
POSITION: relative;
HEIGHT: 20px;
overflow: hidden;
margin-top: 2px;
}
#JashBottomBar a {
HEIGHT: 14px;
font-size: 9px;
font-weight: normal;
font-family: arial;
float: left;
padding: 4px;
background: #eee;
cursor: pointer;
border: 1px outset white;
margin-right: 1px;
}
#JashBottomBar a:hover {
padding-top: 3px;
padding-bottom: 5px;
background-color: white;
}
#JashBottomBar a:active, #JashBottomBar a:focus {
padding-top: 5px;
padding-bottom: 3px;
background-color: #ddd;
}
#JashResizeButton {
BORDER: 1px solid gray;
-moz-border-radius-bottomright: 10px; /* ELS */
BACKGROUND: #eee;
WIDTH: 17px;
height: 17px;
line-height: 0;
CURSOR: move;
position: absolute;
bottom: -1px;
right: -1px;
z-index: 2000;
}
/*}}}*/
//{{{
// Jash - JavaScript Shell
// Copyright: 2007, Billy Reisinger
// Documentation: http://www.billyreisinger.com/jash/
// License: GNU General Public License - http://www.gnu.org/licenses/gpl.html
// MODIFIED BY ELS (www.TiddlyTools.com) on 12/11/2007 for embedded use within TiddlyWiki documents
// * disabled setting of stylesheet from remote URL - use internal CSS definitions instead (see [[jash.css]] tiddler)
// * disabled automatic display on startup (but initialize jash panel so ESC key will work)
window.Jash=function(){this.jashRoot="http://www.billyreisinger.com/jash/source/latest/";this.domGetElFunctions={id:new Array("document.getElementById","$"),className:new Array("getElementsByClassName","$C")};var line="-------------------------------------------------";var _null="nooutput";this.revision="$Revision: 1.14 $".replace(/(\$|[A-Za-z]|\s|:)/g,'');this.version="$Name: REL_1_35_7 $".replace(/\$|Name:|\s|REL_/g,'').replace(/_/g,'.');this.versionDate="$Date: 2007/11/16 03:24:54 $";this.main=function(){this.browser=this.returnBrowserType();this.lineNumber=0;this.mainBlock;this.output=document.getElementById("JashOutput");this.input;this.outputHistory=new Array();this.cssEvalFlag=false;this.innerHtmlInspection=false;this.accessKeyText=this.getAccessKeyText();this.defaultText="Jash, v"+this.version+"\nEnter \"jash.help()\" for a list of commands.\n";this.cls=this.clear;this.tabIndexIndex=0;this.currentNode={};this.tips=["Did you know?\nThe DOM Inspector will automatically put\n an element with an ID in the input field for you.","Did you know?\nYou can tie this script into your own to jash scripts. Use 'jash.methodName' anywhere\n in your scripts, and pull\n up this window before executing to see\n the results.","Did you know?\nUse jash.stopWatch.start() and jash.stopWatch.stop() to\n time execution speeds! Handy for optimization.","Did you know?\nPress TAB to complete a function, method, or property name.\n If more than one match is found, a list of possible\n matches will appear.","Did you know?\nYou can use jash.show() to show a list of the names\nand types of an object's members.\nOn the other hand, jash.dump will show names and\n_values_ of an object's members.","Whoa ---- you can now tab-complete HTML element ids after typing document.getElementsById(' (or the '$' shorthand if using Prototype). This also works with class names (i.e. document.getElementsByClassName)"]
this.defaultText+=line+"\n"+this.tips[(parseInt((Math.random()*10)%this.tips.length))]+"\n"+line+"\n";
/*
ELS: disable loading of remote stylesheet! (use styles from [[jash.css]] tiddler intead)
if(this.returnBrowserType()!="sa"){this.stylesheet=document.body.appendChild(document.createElement('link'));}else{this.stylesheet=document.getElementsByTagName("head")[0].appendChild(document.createElement("link"));}
this.stylesheet.type='text/css';this.stylesheet.rel='stylesheet';this.stylesheet.href=this.jashRoot+'Jash.css';
*/
this.create();Jash.TabComplete.prototype=this;this.tabComplete=new Jash.TabComplete();Jash.Evaluator.prototype=this;this.evaluation=new Jash.Evaluator();this.history=new Jash.History();var _self=this;window.setTimeout(function(){_self.input.focus();},500);if(typeof event!="undefined")delete event;}
this.returnBrowserType=function(){if(window.navigator.userAgent.toLowerCase().indexOf("opera")!=-1){return"op";}
if(window.navigator.userAgent.toLowerCase().indexOf("msie")!=-1){return"ie";}
if(window.navigator.userAgent.toLowerCase().indexOf("firefox")!=-1){return"ff";}
if(window.navigator.userAgent.toLowerCase().indexOf("safari")!=-1){return"sa";}}
this.returnOsType=function(){var ua=window.navigator.userAgent.toLowerCase();if(ua.indexOf("macintosh")!=-1){return"mac";}else if(ua.indexOf("windows")!=-1){return"win";}else if(ua.indexOf("linux i686")!=-1){return"linux";}}
this.getAccessKeyText=function(){var txt;var agt=this.returnOsType();switch(this.browser){case"ie":txt="Alt";break;case"ff":if(agt=="mac"){txt="Ctrl";}else if(agt=="linux"){txt="Alt";}else{txt="Alt-Shift";}
break;case"op":txt="Shift-Esc";break;case"sa":if(agt=="mac"){txt="Ctrl";}else{txt="Alt";}
break;default:txt="Alt";break;}
return txt;}
this.print=function(text,clear,suppressLineNumbers,autoscroll){clear=(typeof clear!="undefined")?clear:false;autoscroll=(typeof autoscroll!="undefined")?autoscroll:true;if(this.output==null||document.getElementById("JashParent")==null){this.create();this.output=document.getElementById("JashOutput");this.mainBlock=document.getElementById("JashParent");}
if(clear){this.clear();}
if(text!=""){if(typeof suppressLineNumbers!="undefined"&&!suppressLineNumbers){this.output.value+=this.lineNumber+". ";}
this.output.value+=text+"\n";if(autoscroll){this.output.scrollTop=this.output.scrollHeight;}
this.lineNumber++;}
return _null;}
this.show=function(obj){this.print(line,false,true);var out="";this.lineNumber=0;for(var p in obj){if(typeof obj[p]=="function"){var t=obj[p].toString();t=t.replace(/[\x0A\x0D]/g,"").replace(/\s+/g,"").replace(/\{.+\}/g,"{ ... }");t=t.replace(p,"");t=p+": "+t;}else{t=p+": "+typeof obj[p];}
out+=++this.lineNumber+". "+t+"\n";}
this.print(out,false,true);this.print(line,false,true);this.output.scrollTop=this.output.scrollHeight;return _null;}
this.dump=function(obj){if(typeof obj=="string"){this.print(obj);}else{this.print(line,false,true);var out=new Array();if(typeof obj.push=="undefined"){for(var th in obj){out.push(++this.lineNumber+". "+th+" = "+obj[th]);}}else{for(var i=0;i<obj.length;i++){out.push(++this.lineNumber+". "+obj[i]);}}
this.print(out.join("\n"),false,true);this.print(line,false,true);this.output.scrollTop=this.output.scrollHeight;}
return _null;}
this.clear=function(){this.outputHistory.push(this.output.value);this.output.value="";this.input.focus();return _null;}
this.showOutputHistory=function(){this.outputHistory.push(this.output.value);this.dump(this.outputHistory);}
this.assignInputKeyEvent=function(keyCode){if(keyCode==13){this.evaluation.evaluate(this.input.value);this.input.value="";return false;}else if(keyCode==38){if(this.browser!="op"){this.input.value=this.history.getPreviousInput();}
return false;}else if(keyCode==40){if(this.browser!="op"){this.input.value=this.history.getNextInput();}
return false;}else if(keyCode==9){this.tabComplete.tabComplete();return false;}}
this.getXBrowserYOffset=function(){var y;if(self.pageYOffset){y=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){y=document.documentElement.scrollTop;}else if(document.body){y=document.body.scrollTop;}
return y;}
this.getMouseXY=function(e){var tempX=0
var tempY=0
if(window.event){if(document.documentElement&&document.documentElement.scrollTop){tempX=window.event.clientX+document.documentElement.scrollLeft;tempY=window.event.clientY+document.documentElement.scrollTop;}else{tempX=window.event.clientX+document.body.scrollLeft;tempY=window.event.clientY+document.body.scrollTop;}}else{tempX=e.pageX;tempY=e.pageY;}
return{x:tempX,y:tempY};}
this.getDimensions=function(el){var dims={}
if(document.all){dims.x=el.offsetWidth;dims.y=el.offsetHeight;}else{dims.x=parseInt(document.defaultView.getComputedStyle(el,"").getPropertyValue("width"));dims.y=parseInt(document.defaultView.getComputedStyle(el,"").getPropertyValue("height"));}
return dims;}
this.addEvent=function(obj,eventName,func){if(obj.addEventListener)
return obj.addEventListener(eventName,func,true);else if(obj.attachEvent){obj.attachEvent("on"+eventName,func);return true;}
return false;}
this.findElementPosition=function(obj){var curleft=0;var curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft
curtop=obj.offsetTop
while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}}
return[curleft,curtop];}
this.create=function(){if(document.getElementsByTagName("frameset").length>0){alert("Jash currently does not support pages with frames.");return;}
var self=this;var debugParent=document.createElement("div");var windowScrollY=0;if(document.documentElement&&document.documentElement.scrollTop){windowScrollY=document.documentElement.scrollTop;}else if(document.body){windowScrollY=document.body.scrollTop}else{windowScrollY=window.scrollY;}
debugParent.style.top=windowScrollY+50+"px";debugParent.id="JashParent";
/*
ELS: 12/12/2007 - REMOVED ESC HANDLER SO OTHER PAGE ELEMENTS GET THEM!... SEE BELOW FOR ALTERNATIVE SHIFT-ESC HANDLER
this.addEvent(document,"keydown",function(e){e=(typeof window.event!="undefined")?window.event:e;if(e.keyCode=="27"){if(typeof e.shiftKey=="undefined"||!e.shiftKey && (this.mainBlock.style.display!="none")){self.close();}}});
*/
var textareaWrap=document.createElement("div");textareaWrap.id="JashTextareaWrap";var debugOutput=document.createElement("textarea");debugOutput.id="JashOutput";debugOutput.wrap="off";debugOutput.readOnly="true";debugOutput.value=this.defaultText;var inp=document.createElement("textarea");inp.id="JashInput";var last="";inp.onkeydown=function(e){e=(typeof window.event!="undefined")?window.event:e;return self.assignInputKeyEvent(e.keyCode);}
inp.onkeypress=function(e){e=(typeof window.event!="undefined")?window.event:e;var k=e.keyCode;if(!self.evaluation.cssEvalFlag){if(k==9||k==13||k==38||k==40){if(k!=40&&this.browser!="ie"){return false;}}}else if(k==9){return false;}}
var dragBut=document.createElement("div");dragBut.innerHTML="Jash";dragBut.id="JashDragBar";dragBut.onmousedown=function(e){e=(typeof window.event!="undefined")?window.event:e;var xplus=(typeof e.layerX=="undefined")?e.offsetX:e.layerX;var yplus=(typeof e.layerY=="undefined")?e.offsetY:e.layerY;document.onmousemove=function(e){var coords=self.getMouseXY(e);document.getElementById("JashParent").style.top=coords.y-yplus+"px";document.getElementById("JashParent").style.left=coords.x-xplus+"px";}
return false;}
document.onmouseup=function(){document.onmousemove=null;};dragBut.onclick=function(){return false;}
var xBut=document.createElement("a");xBut.className="JashXButton";xBut.innerHTML="X";xBut.href="#";xBut.onclick=function(){self.close();return false;}
var clearBut=document.createElement("a");clearBut.innerHTML="Clear ("+this.accessKeyText+"-C)";clearBut.accessKey="C";clearBut.className="JashButton";clearBut.onclick=function(){self.clear();return false;}
this.setCrossBrowserAccessKeyFunctionForAnchor(clearBut);var evalBut=document.createElement("a");evalBut.value="Evaluate ("+this.accessKeyText+"-Z)";evalBut.innerHTML="Evaluate ("+this.accessKeyText+"-Z)";evalBut.accessKey="Z";evalBut.className="JashButton";evalBut.title="Evaluate current input ("+this.accessKeyText+"-Z)";evalBut.onclick=function(){self.evaluation.evaluate(inp.value);if(!self.evaluation.cssEvalFlag){inp.value="";}
inp.focus();return false;}
this.setCrossBrowserAccessKeyFunctionForAnchor(evalBut);var helpBut=document.createElement("a");helpBut.innerHTML="Help";helpBut.className="JashButton";helpBut.title="Help: show list of commands (or type jash.help(); )";helpBut.onclick=function(){self.help();}
var domBut=document.createElement("a");domBut.innerHTML="Mouseover DOM ("+this.accessKeyText+"-X)";domBut.title="Mouseover DOM: toggle to turn on/off inspection of document nodes ("+this.accessKeyText+"-X)";domBut.className="JashButton";domBut.accessKey="X";domBut.tabIndex="4";this.domActive=false;domBut.onclick=function(){if(!self.domActive){document.body.onmouseover=function(e){if(typeof e=="undefined"){e=window.event;}
self.showNodes(e);}
self.setButtonVisualActiveState(domBut,"on");self.domActive=true;}else{document.body.onmouseover=function(){}
self.domActive=false;self.setButtonVisualActiveState(domBut,"off");}
return _null;}
this.setCrossBrowserAccessKeyFunctionForAnchor(domBut);var innerHtmlInspectBut=document.createElement("a");innerHtmlInspectBut.innerHTML="innerHTML Dump ("+this.accessKeyText+"-A)";innerHtmlInspectBut.title="innerHTML Inspect: toggle to turn on/off innerHTML inspection of document nodes ("+this.accessKeyText+"-A)";innerHtmlInspectBut.className="JashButton";innerHtmlInspectBut.accessKey="A";innerHtmlInspectBut.tabIndex="5";this.innerHtmlInspection=false;innerHtmlInspectBut.onclick=function(){self.innerHtmlInspection=!self.innerHtmlInspection;self.setButtonVisualActiveState(innerHtmlInspectBut,self.innerHtmlInspection?"on":"off");return _null;}
this.setCrossBrowserAccessKeyFunctionForAnchor(innerHtmlInspectBut);var cssBut=document.createElement("a");cssBut.innerHTML="CSS Input ("+this.accessKeyText+"-S)";cssBut.title="CSS Input: turn on CSS input to enter arbitrary CSS ("+this.accessKeyText+"-S)";cssBut.className="JashButton";cssBut.accessKey="S";cssBut.onclick=function(){if(!self.evaluation.cssEvalFlag){self.setButtonVisualActiveState(cssBut,"on");self.evaluation.cssEvalFlag=true;inp.className="cssEntry";if(document.getElementById("JashStyleInput")!=null){self.evaluation.styleInputTag.disabled=false;}
inp.value="";}else{self.setButtonVisualActiveState(cssBut,"off");inp.className="";self.evaluation.cssEvalFlag=false;if(document.getElementById("JashStyleInput")!=null){self.evaluation.styleInputTag.disabled=true;}
inp.value="";}
inp.focus();return _null;}
this.setCrossBrowserAccessKeyFunctionForAnchor(cssBut);var resizeBut=document.createElement("div");resizeBut.id="JashResizeButton";this.minDims={x:100,y:100};resizeBut.onmousedown=function(e){e=(typeof window.event!="undefined")?window.event:e;var originalDims=self.getDimensions(textareaWrap);var originMouseDims=self.getMouseXY(e);document.onmousemove=function(e){var newMouseDims=self.getMouseXY(e);var newWidth=originalDims.x+(newMouseDims.x-originMouseDims.x);if(newWidth<self.minDims.x){newWidth=self.minDims.x;}
textareaWrap.style.width=newWidth+"px";debugParent.style.width=newWidth+"px";var newHeight=originalDims.y+(newMouseDims.y-originMouseDims.y);if(newHeight<self.minDims.y){newHeight=self.minDims.y;}
textareaWrap.style.height=newHeight+"px";debugParent.style.height=newHeight+"px";}
document.onmouseup=function(){document.onmousemove="";}}
var bottomBar=document.createElement("div");bottomBar.id="JashBottomBar";debugParent.appendChild(dragBut);debugParent.appendChild(xBut);bottomBar.appendChild(evalBut);bottomBar.appendChild(cssBut);bottomBar.appendChild(domBut);bottomBar.appendChild(innerHtmlInspectBut);bottomBar.appendChild(clearBut);bottomBar.appendChild(helpBut);debugParent.appendChild(bottomBar);debugParent.appendChild(resizeBut);document.body.appendChild(debugParent);textareaWrap.appendChild(debugOutput);textareaWrap.appendChild(inp);debugParent.appendChild(textareaWrap);this.bottomBar=document.getElementById("JashBottomBar");this.dragBar=document.getElementById("JashDragBar")
this.output=document.getElementById("JashOutput");this.input=document.getElementById("JashInput");this.mainBlock=debugParent;this.addEvent(window,'scroll',function(){debugParent.style.top=50+self.getXBrowserYOffset()+'px';});}
this.setButtonVisualActiveState=function(button,state){if(state=="on"){button.style.backgroundColor="lightgreen";}else{button.style.backgroundColor="";}}
this.help=function(){var out=new Array();out.push(line);out.push("Jash v"+this.version+" "+this.versionDate.replace(/\$/g,''),true);out.push("http://www.billyreisinger.com/jash/documentation.html");out.push(line);out.push("METHODS");out.push(line);out.push("this.cls() - clear console and terminal");out.push("jash.print(str,clear) - output str to console ~~ str = string ~~ clear = true|false: clear console before output");out.push("this.close() - close this console");out.push("this.dump(obj) - output object and members to console");out.push("this.show(obj) - print out the names and types (only) of all members of obj");out.push("this.stopWatch.start() - start timer");out.push("this.stopWatch.stop() - end timer and return result in ms");out.push("this.kill(HTML Element) - remove an element from the page.");out.push("this.getDimensions(HTML Element) - get width, height dimensions of an html element. Returns an object [x,y]");out.push(line);out.push("KEYSTROKES");out.push(line);out.push("press up arrow in input field to retrieve last input");out.push("press ESC to show/hide console");out.push("press "+this.accessKeyText+"-Q to turn on/off Transparent mode, so you can see through the Jash.");out.push("press ENTER in input field to enter a command");out.push("press TAB to auto-complete input");out.push("press "+this.accessKeyText+"-Z to evaluate input");out.push("press "+this.accessKeyText+"-X to activate/deactivate DOM inspector");out.push("press "+this.accessKeyText+"-A to activate/deactivate innerHTML dump (only works w/ DOM inspector)");out.push("press "+this.accessKeyText+"-C to clear output and input");out.push("press "+this.accessKeyText+"-S to turn on/off CSS input mode. In CSS input mode, you can enter arbitrary CSS selectors and rules, as you would normally do in a CSS stylesheet.");this.print(out.join("\n"));return _null;}
this.close=function(){if(this.mainBlock.style.display=="none"){this.mainBlock.style.display="block";this.input.focus();}else{this.mainBlock.style.display="none";}}
this.setCrossBrowserAccessKeyFunctionForAnchor=function(el){var self=this;el.tabIndex=++this.tabIndexIndex;if(this.browser=="ie"){el.onfocus=function(){if(window.event.altKey){el.onclick();}
self.input.focus();}}}
this.stopWatch={t_start:0,t_end:0,t_total:0,start:function(){t_start=new Date().getTime();return t_start;},stop:function(){t_end=new Date().getTime();t_total=t_end-t_start;return(t_total);}}
this.showNodes=function(e){if(typeof e=="undefined")e=window.event;var el=typeof e.target=="undefined"?e.srcElement:e.target;this.currentNode=el;var childMost=this.identifyNode(el,false);var out="";var childmostTxt="childmost..... "+childMost.txt+"\n";while(el=el.parentNode){if(el.nodeName.toLowerCase()=="html"){out="parentmost.... <html>\n"+out;break;}
out=this.identifyNode(el).txt+"\n"+out;}
out="**** PRESS "+this.accessKeyText+"-X TO PAUSE / UNPAUSE ****\n"+out;out+=childmostTxt;this.print(out,true,true,false);if(this.innerHtmlInspection){this.print("INNER HTML");if(this.currentNode.innerHTML.indexOf("<")!=-1){this.print(Jash.Indenter.indent(this.currentNode.innerHTML),false,true,false);}else{this.print(this.currentNode.innerHTML,false,true,false);}}
if(!this.evaluation.cssEvalFlag){if(childMost.id!=""){if(typeof $!="undefined"){this.input.value='$("'+childMost.id+'")';}else{this.input.value='document.getElementById("'+childMost.id+'")';}}else{this.input.value="this.currentNode";}}}
this.identifyNode=function(el,showDots){showDots=typeof showDots=="boolean"?showDots:true;var out={txt:"",id:""};if(showDots)out.txt+=".............. ";out.txt+="<"+el.nodeName.toLowerCase();for(var i=0;i<el.attributes.length;i++){if((this.browser=="ie"&&el.attributes[i].specified===true)||this.browser!="ie"){out.txt+=" "+el.attributes[i].name;out.txt+="=\""+el.attributes[i].value+"\"";}}
out.txt+=">";return out;}
this.kill=function(){this.currentNode.parentNode.removeChild(this.currentNode);}}
Jash.Evaluator=function(){this.cssEvalFlag=false;var _null="nooutput";this.evaluate=function(input){if(input=="")return false;this.history.add(input);if(this.cssEvalFlag){this.evalCss(input);this.print(input);}else{var output=this.evalJs(input);if(typeof output!="undefined"){this.print(">> "+input);this.print(output);}}}
this.evalJs=function(input){try{var result;if(this.browser=="ie"){result=eval(input);}else{result=window.eval(input);}
if(result!=null&&result.toString()!=_null){return(result.toString());}else{return"null"}}catch(e){return(e.message);}}
this.evalCss=function(input){try{this.insertStyleRule(input);}catch(e){}
return input;}
this.insertStyleRule=function(rule){var lastStyleSheetIndex=document.styleSheets.length-1;if(document.getElementById("JashStyleInput")==null){this.styleInputTag=document.createElement("style");this.styleInputTag.id="JashStyleInput";this.styleInputTag.type="text/css";document.body.appendChild(this.styleInputTag);}
if(this.browser=="ff"||this.browser=="op"){this.styleInputTag.innerHTML+=rule+"\n";}else if(this.browser=="ie"||this.browser=="sa"){if(this.browser=="ie"){var i=0;}else if(this.browser="sa"){var i=document.styleSheets.length-1;}
var rulesArray=rule.split("}");for(var t=0;t<rulesArray.length;t++){var ruleSplit=rulesArray[t].split("{");var selectors=ruleSplit[0].split(",");for(var k=0;k<selectors.length;k++){document.styleSheets[i].addRule(selectors[k],ruleSplit[1]);}}}
return"";}
return this;}
Jash.History=function(){this.entries=new Array('');this.position=0;}
Jash.History.prototype={add:function(input){this.entries.push(input);this.position=this.entries.length-1;},getPreviousInput:function(){if(this.position<0){return'';}
var entry=typeof this.entries[this.position]!="undefined"?this.entries[this.position]:'';if(this.position>0){this.position--;}
return entry;},getNextInput:function(){if(this.position+1<this.entries.length){return this.entries[++this.position];}else{return'';}}}
Jash.Indenter={indentChar:"\t",nodesCommonlyUnclosed:new Array("link ","img ","meta ","!DOCTYPE ","input ","param","hr","br"),stringRepeat:function(stringToRepeat,times){var string=new Array();for(var i=0;i<times;i++){string.push(stringToRepeat);}
return string.join('');},closeUnclosedNode:function(str){for(var k=0;k<this.nodesCommonlyUnclosed.length;k++){var reg=new RegExp("^"+this.nodesCommonlyUnclosed[k].toLowerCase());if(str.toLowerCase().match(reg)){return str.replace(">","/>");}}
return str;},indentAndAdd:function(level,string,arr){var indents=this.stringRepeat(this.indentChar,level);arr.push(indents+string);return arr;},indent:function(source){var source=source;var arr=new Array();source=source.replace(/[\n\r\t]/g,'');source=source.replace(/>\s+/g,">");source=source.replace(/\s+</g,"<");var splitsrc=source.split("<");for(i=0;i<splitsrc.length;i++){splitsrc[i]=this.closeUnclosedNode(splitsrc[i]);}
source=splitsrc.join("<");var level=0;var sourceLength=source.length;var position=0;while(position<sourceLength){if(source.charAt(position)=='<'){var startedAt=position;var tagLevel=1;if(source.charAt(position+1)=='/'){tagLevel=-1;}
if(source.charAt(position+1)=='!'){tagLevel=0;}
while(source.charAt(position)!='>'){position++;}
if(source.charAt(position-1)=='/'){tagLevel=0;}
var tagLength=position+1-startedAt;if(tagLevel===-1){level--;}
arr=this.indentAndAdd(level,source.substr(startedAt,tagLength),arr);if(tagLevel===1){level++;}}
if((position+1)<sourceLength){if(source.charAt(position+1)!=='<'){startedAt=position+1;while(source.charAt(position)!=='<'&&position<sourceLength){position++;}
if(source.charAt(position)==='<'){tagLength=position-startedAt;arr=this.indentAndAdd(level,source.substr(startedAt,tagLength),arr);}}else{position++;}}else{break;}}
return arr.join("\n");}}
Jash.Profiler=function(func,onFinish){this.func=func;this.time=0;this.defaultOnFinish=function(){};this.results=new Array();this.onFinish=typeof onFinish!="function"?this.defaultOnFinish:onFinish;var self=this;this.reverseWhile=function(reps){this.stopWatch.start();while(reps>0){this.func();reps--;}
return this.stopWatch.stop();}
this.forLoop=function(reps){this.stopWatch.start();for(i=0;i<reps;i++){this.func();}
return this.stopWatch.stop();}
this.loop=function(kind,reps){if(!this.results[kind]){this.results[kind]=new Array();}
var repsMemberName="r_"+reps;if(!this.results[kind][repsMemberName]){this.results[kind][repsMemberName]=new Array();}
var time=this[kind](reps);this.results[kind][repsMemberName].push(time);}
this.runOnce=function(){if(!this.results.runOnce){this.results.runOnce=new Array();}
this.stopWatch.start();func();this.results.runOnce.push(this.stopWatch.stop());}
this.stopWatch={t_start:0,t_end:0,t_total:0,start:function(){t_start=new Date().getTime();return t_start;},stop:function(){t_end=new Date().getTime();t_total=t_end-t_start;self.time=t_total;return t_total;}}
this.average=function(arr){var sum=0;for(i=0;i<arr.length;i++){sum+=arr[i];}
return sum/arr.length}
this.multiPass=function(passes,type,reps){if(typeof type=="undefined"){type="runOnce";}else if(typeof this[type]=="undefined"){jash.print("Error: the loop type '"+type+"' does not exist");return false;}
var self=this;if(type=="runOnce"){if(passes<1){self.reportProfile(Math.round(this.average(this.results.runOnce)),type,reps);}else{window.setTimeout(function(){self.runOnce();self.multiPass(--passes,type);},50);}}else{if(passes<1){var repsMemberName="r_"+reps;self.reportProfile(Math.round(this.average(this.results[type][repsMemberName])),type,reps);}else{window.setTimeout(function(){self.loop(type,reps);self.multiPass(--passes,type,reps);},50);}}}
this.reportProfile=function(avgMs,type,reps){var line="-------PROFILER----------------------------------------------";var str=line+"\n"+this.func+"\n"+line+"\n";str+="Type of profile: "+type+"\n";if(typeof reps!="undefined"){str+="Loop iterations: "+reps+"\n";}
str+="Average execution time: "+avgMs+"ms"+"\n";if(type=="runOnce"){howManyTimes=this.results.runOnce.length;}else{repsMemberName="r_"+reps;howManyTimes=this.results[type][repsMemberName].length;}
str+="Average calculated from "+howManyTimes+" pass(es)\n";str+=line+"\n";jash.print(str);}}
Jash.TabComplete=function(){this.tabComplete=function(e){e=(typeof window.event!="undefined")?window.event:e;var inputText=this.input.value;var match=null;if(match=this.searchInputForDomGetElFunctions(inputText)){this.tabCompleteIdOrClassInJavascript(match.match[0],match.type);this.focusCaretAtEndOfInput();return false;}else if(this.evaluation.cssEvalFlag){this.tabCompleteIdOrClassInCss(inputText);this.focusCaretAtEndOfInput();return false;}else{this.tabCompleteJavascript(e,inputText);this.focusCaretAtEndOfInput();}}
this.focusCaretAtEndOfInput=function(){this.input.selectionEnd=this.input.selectionStart=this.input.value.length;}
this.tabCompleteJavascript=function(e,inputText){var words=inputText.split(/\s+/);var lastWord=words[(words.length-1)];var numOpeningParens=lastWord.split("(").length-1;var numClosingParens=lastWord.split(")").length-1;var scope;var sentinel=0;var diff=numOpeningParens-numClosingParens;if(diff>0){numClosingParens=lastWord.split("(")[numOpeningParens].split(")").length-1;var numRealDanglers=numOpeningParens-numClosingParens;scope=lastWord.split("(").slice(numRealDanglers).join("(");}else if(diff<0){this.print("error: too many closing parentheses");return false;}else{scope=lastWord;}
scope=scope.split(".");var fragment=scope.pop();scope=scope.join(".");if(scope=="")scope="window";var members=this.getMembers(scope);var results=this.findTextMatchesInArray(members,fragment);if(results==false){}else if(typeof results!="string"){this.dump(results);var bestMatch=this.findBestStringMatch(fragment,results);if(fragment!=''){fragReg=new RegExp(fragment+"$");this.input.value=this.input.value.replace(fragReg,bestMatch);}else{this.input.value+=bestMatch;}}else{var reggie=new RegExp(fragment+"$");this.input.value=this.input.value.replace(reggie,results);}
return false;}
this.doAllStringsInArrayHaveSameCharacterAtIndex=function(index,arr){var matched=0;if(!arr[0].charAt(index))return false;var character=arr[0].charAt(index);for(var i=1;i<arr.length;i++){if(!arr[i].charAt(index)||arr[i].charAt(index)!=character){return false;}}
return true;}
this.findBestStringMatch=function(str,arr){var fragLength=str.length;var matches=this.doAllStringsInArrayHaveSameCharacterAtIndex(fragLength,arr);while(matches){fragLength++;matches=this.doAllStringsInArrayHaveSameCharacterAtIndex(fragLength,arr);}
return arr[0].substr(0,fragLength);}
this.tabCompleteIdOrClassInJavascript=function(inputText,type){var query=inputText.split("(");query=query[query.length-1].replace(/\W/g,'');var matches=new Array();var els=document.getElementsByTagName("*");if(type=="id"){for(var i=0;i<els.length;i++){if(els[i].id&&els[i].id.indexOf(query)==0){matches.push(els[i].id);}}}else if(type=="class"){for(var i=0;i<els.length;i++){if(els[i].className&&els[i].className!=''){var classes=els[i].className.split(/\s/);for(var ii=0;ii<classes.length;ii++){if(classes[ii].indexOf(query)==0||query==''){if(matches.join("***").indexOf(classes[ii])==-1){matches.push(classes[ii]);}}}}}}
if(matches.length==1){this.input.value+=matches[0].split(query)[1];}else if(matches.length==0){this.print("no match");}else{this.dump(matches.sort());var bestMatch=this.findBestStringMatch(query,matches);if(query!=''){var replacement=inputText.split("(");replacement[replacement.length-1]=replacement[replacement.length-1].replace(query,bestMatch);this.input.value=this.input.value.replace(inputText,replacement.join("("));}else{this.input.value+=bestMatch;}}}
this.tabCompleteIdOrClassInCss=function(inputText){var selectors=inputText.replace(/(\.|#)/g,' $1').split(/\s+/);var lastSelector=selectors[selectors.length-1];var els=document.getElementsByTagName("*");var matches=new Array();if(lastSelector.match(/^\./)){for(var i=0;i<els.length;i++){if(els[i].className&&els[i].className!=''){var classes=els[i].className.split(/\s/);for(var ii=0;ii<classes.length;ii++){if(classes[ii].indexOf(lastSelector.substr(1))==0||lastSelector=="."){if(matches.join("***").indexOf(classes[ii])==-1){matches.push("."+classes[ii]);}}}}}}else if(lastSelector.match(/^#/)){for(var i=0;i<els.length;i++){if(els[i].id&&els[i].id.indexOf(lastSelector.substr(1))==0){matches.push("#"+els[i].id);}}}
if(matches.length==1){this.input.value+=matches[0].split(lastSelector)[1];}else if(matches.length==0){this.print("no match");}else{this.dump(matches.sort());var bestMatch=this.findBestStringMatch(lastSelector,matches);if(lastSelector!=''){this.input.value=this.input.value.replace(lastSelector,bestMatch);}else{this.input.value+=bestMatch;}}}
this.searchInputForDomGetElFunctions=function(inputText){for(var i=0;i<this.domGetElFunctions.id.length;i++){var selfct=new RegExp(this.domGetElFunctions.id[i].replace("\$","\\\$")+"\\\(['\"]\\w*$");if(inputText.match(selfct)){return{match:inputText.match(selfct),type:"id"};}}
for(var i=0;i<this.domGetElFunctions.className.length;i++){var selfct=new RegExp(this.domGetElFunctions.className[i].replace("\$","\\\$")+"\\\(['\"]\\w*$");if(inputText.match(selfct)){return{match:inputText.match(selfct),type:"class"};}}}
this.findTextMatchesInArray=function(arrayToTest,findMe){var resultsArray=new Array();var tester=new RegExp("^"+findMe);for(var i=0;i<arrayToTest.length;i++){if(tester.test(arrayToTest[i])){resultsArray.push(arrayToTest[i]);}}
if(resultsArray.length>1){resultsArray.sort();return resultsArray;}else if(resultsArray.length==1){return resultsArray[0];}else{return false;}}
this.getMembers=function(context){var members=new Array();for(memberName in eval(context)){members.push(memberName);}
return members;}
return this;}
// ELS 12/12/2007: init is deferred until first time panel is shown
window.toggleJash=function() // show/hide panel...
{ if("jash" in window)window.jash.close();else{window.jash=new Jash();window.jash.main();} }
window.isJashVisible=function() // so scripts can find out the current display state
{ return window.jash?window.jash.mainBlock.style.display!="none":false; }
addEvent(document,"keydown",function(ev){ // SHIFT-ESC shows/hides panel, ESC hides panel
var e=(typeof window.event!="undefined")?window.event:ev;
if(e.keyCode=="27"&&(e.shiftKey||window.isJashVisible())) window.toggleJash(); });
//}}}
<html><hide linebreaks><a href="javascript:;" class="button"
title='JASH: Javascript Shell - view/modify internal run time variables and functions!'
onclick="if (window.toggleJash) toggleJash(); return false;"
onmouseover="this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
+encodeURIComponent(encodeURIComponent(this.onclick))
+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';">
$1
</a></html>
{{centeredTable{
| ''System Menu'' |h
|''Command Line'' |
|[[WASH Shell|WASH-SE]] ([[Plugin|WashPlugin]]) |
|[[JASH Shell|JashCommand]] ([[Plugin|Jash.js]]) |
| |
|''IDE'' |
|[[TidIDE]] ([[Plugin|TidIDEPlugin]]) ([[Docs|TidIDEPluginInfo]]) |
| |
|''~TiddlyFS'' |
|[[MyDocument|/]] ([[Plugin|RelatedTiddlersPlugin]]) |
| |
|''Miscellaneous'' |
|[[GettingStarted]] |
|[[Issues]] |
|menuTableStyle|k
}}}
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>WASH-TW</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
/***
|Name|MoveablePanelPlugin|
|Source|http://www.TiddlyTools.com/#MoveablePanelPlugin|
|Documentation|http://www.TiddlyTools.com/#MoveablePanelPluginInfo|
|Version|2.1.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|plugin|
|Requires|NestedSlidersPlugin|
|Overrides||
|Description|drag/stretch 'floating sliders' and other page elements|
Adds move and size mouse event handling and fold/unfold, and close/dock toolbar command items to any floating slider panel or tiddler element
!!!!!Documentation
>see [[MoveablePanelPluginInfo]]
!!!!!Revisions
<<<
2008.09.11 [2.1.2] corrected caching of transient attribute (use =="true" to convert string to boolean)
|please see [[MoveablePanelPluginInfo]] for additional revision details|
''2006.03.04 [1.0.0]'' Initial public release
<<<
!!!!!Code
***/
//{{{
version.extensions.MoveablePanelPlugin= {major: 2, minor: 1, revision: 2, date: new Date(2008,9,11)};
//}}}
//{{{
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= { // remember original panel event handlers, size, location, border
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")=="true"
};
// create control menu items
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;
// init mouse handling and tooltip
p.setAttribute("noedges",noedges?"true":"false"); // for alternative mouseover/drag handling
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) { // DOUBLE-CLICK = DOCK
if (p.getAttribute("noedges")=="true" && !((isTop&&!isLeft&&!isRight)||(isBottom&&isRight))) // not over grab handles
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (!config.macros.moveablePanel.isEdge(this,event)) // not over edge
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (config.macros.moveablePanel.dockPanel(this,event)) // not docking
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
else return false; // docked... done.
};
p.onmouseover=function(event) { // MOUSEOVER = SHOW MENU ITEMS
if(addClass instanceof Function)
addClass(this,"selected"); // so toolbar-classed items will display
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) { // MOUSEOUT = HIDE MENU ITEMS
if(removeClass instanceof Function)
removeClass(this,"selected"); // so toolbar-classed items are hidden again
if (this.menudiv) this.menudiv.firstChild.style.display="none";
if (this.saved.mouseout) return this.saved.mouseout.apply(this,arguments);
};
// FIXUP for "floating sliders" (see NestedSlidersPlugin)
// prevent automatic trigger of adjustSliderPos() for mouse events on floating slider panel/button
// and make sure that slider button causes moveable panel to be close AND docked (if needed)
if (hasClass(p,"floatingPanel") && p.button) {
p.saved.mouseover=null; // discard previous mouse event handlers to prevent
p.saved.mouseout=null; // automatic triggering of adjustSliderPos() for mouseovers
p.button.onmouseover=null; // on slider panel and slider button
if(!p.button.saved_onclick) p.button.saved_onclick=p.button.onclick; // HIJACK SLIDER BUTTON
p.button.onclick=function(ev){
config.macros.moveablePanel.dockPanel(this.sliderPanel,ev); // DOCK PANEL FIRST...
return this.saved_onclick.apply(this,arguments); // ...THEN CLOSE IT
}
}
},
processed: function(event) {
event.cancelBubble=true; if (event.stopPropagation) event.stopPropagation(); return false;
},
getPanel: function(place) {
// find a floating panel or use containing element
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) // see NestedSlidersPlugin
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 a slider button exists close the panel by calling slider button handler
if (p.button) { p.button.focus(); onClickNestedSlider({target:p.button}); }
return this.dockPanel(place,event); // and then reset panel state
},
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"); // see NestedSlidersPlugin
} 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; // not inside panel, let mousedown bubble through
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; // let mouseover event bubble through
},
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= { // remember original panel event handlers, size, location, border
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")=="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;
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; // remember this for use during mousemove tracking
if (p.getAttribute("noedges")=="true") {
if (!((isTop&&!isLeft&&!isRight)||(isBottom&&isRight))) return true; // not over grab handle
var sizing=isBottom&&isRight;
}
var adjustLeft=0; var adjustTop=0;
// adjustment for relative container
var pp=p.parentNode; while (pp && !(pp.style&&pp.style.position=='relative')) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
// adjustment for floating slider container
var pp=p.parentNode; while (pp && !hasClass(pp,"floatingPanel")) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
// start tracking mousemove events
this.activepanel=p;
var target=p; // if 'capture' handling not supported, track within panel only
if (document.body.setCapture) { document.body.setCapture(); var target=document.body; } // IE
if (window.captureEvents) { window.captureEvents(Event.MouseMove|Event.MouseUp,true); var target=window; } // moz
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; }
// PROBLEM: p.offsetWidth and p.offsetHeight do not seem to account for padding or borders
// WORKAROUND: subtract padding and border (in px) when calculating new panel width and height
// TBD: get these values from p.style... convert to px as needed.
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") {
// convert static/relative panel to movable absolute panel
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) { // resize panel
// don't let panel get smaller than edge "grab" zones
var minWidth=edgeWidth*2-adjustWidth;
var minHeight=edgeHeight*2-adjustHeight;
if (p.folded) this.foldPanel(p.foldButton,e); // make sure panel is unfolded
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 { // move panel
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,""); // remove decimals and "px"
return config.macros.moveablePanel.processed(e);
};
// stop tracking mousemove events
if (target.onmouseup!=undefined) target.saved_mouseup=target.onmouseup;
target.onmouseup=function(e){
if (!e) var e=window.event;
if (this.releaseCapture) this.releaseCapture(); // IE
if (this.releaseEvents) this.releaseEvents(Event.MouseMove|Event.MouseUp); // moz
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); // mousedown handled
}
};
//}}}
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.6|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.09.07 - 2.4.6 added removeOptionCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons,<br>use call() method when invoking document.onclick function (avoids error in IE)
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release. Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 6, date: new Date(2008,9,7)};
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE
// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");
// if removeOptionCookie() function is not defined by TW core, define it here.
if (window.removeOptionCookie===undefined) {
window.removeOptionCookie=function(cookie) {
var ex=new Date(); ex.setTime(ex.getTime()-1000); // immediately expire cookie
document.cookie = cookie+"=novalue; path=/; expires="+ex.toGMTString();
}
}
config.formatters.push( {
name: "nestedSliders",
match: "\\n?\\+{3}",
terminator: "\\s*\\={3}\\n?",
lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
handler: function(w)
{
lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var defopen=lookaheadMatch[1];
var cookiename=lookaheadMatch[2];
var header=lookaheadMatch[3];
var panelwidth=lookaheadMatch[4];
var transient=lookaheadMatch[5];
var hover=lookaheadMatch[6];
var buttonClass=lookaheadMatch[7];
var label=lookaheadMatch[8];
var openlabel=lookaheadMatch[9];
var panelID=lookaheadMatch[10];
var blockquote=lookaheadMatch[11];
var deferred=lookaheadMatch[12];
// location for rendering button and panel
var place=w.output;
// default to closed, no cookie, no accesskey, no alternate text/tip
var show="none"; var cookie=""; var key="";
var closedtext=">"; var closedtip="";
var openedtext="<"; var openedtip="";
// extra "+", default to open
if (defopen) show="block";
// cookie, use saved open/closed state
if (cookiename) {
cookie=cookiename.trim().slice(1,-1);
cookie="chkSlider"+cookie;
if (config.options[cookie]==undefined)
{ config.options[cookie] = (show=="block") }
show=config.options[cookie]?"block":"none";
}
// parse label/tooltip/accesskey: [label=X|tooltip]
if (label) {
var parts=label.trim().slice(1,-1).split("|");
closedtext=parts.shift();
if (closedtext.substr(closedtext.length-2,1)=="=")
{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
openedtext=closedtext;
if (parts.length) closedtip=openedtip=parts.join("|");
else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
}
// parse alternate label/tooltip: [label|tooltip]
if (openlabel) {
var parts=openlabel.trim().slice(1,-1).split("|");
openedtext=parts.shift();
if (parts.length) openedtip=parts.join("|");
else openedtip="hide "+openedtext;
}
var title=show=='block'?openedtext:closedtext;
var tooltip=show=='block'?openedtip:closedtip;
// create the button
if (header) { // use "Hn" header format instead of button/link
var lvl=(header.length>5)?5:header.length;
var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
btn.onclick=onClickNestedSlider;
btn.setAttribute("href","javascript:;");
btn.setAttribute("title",tooltip);
}
else
var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
btn.innerHTML=title; // enables use of HTML entities in label
// set extra button attributes
btn.setAttribute("closedtext",closedtext);
btn.setAttribute("closedtip",closedtip);
btn.setAttribute("openedtext",openedtext);
btn.setAttribute("openedtip",openedtip);
btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
btn.defOpen=defopen!=null; // save default open/closed state (boolean)
btn.keyparam=key; // save the access key letter ("" if none)
if (key.length) {
btn.setAttribute("accessKey",key); // init access key
btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
}
btn.setAttribute("hover",hover?"true":"false");
btn.onmouseover=function(ev) {
// optional 'open on hover' handling
if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
document.onclick.call(document,ev); // close transients
onClickNestedSlider(ev); // open this slider
}
// mouseover on button aligns floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
}
// create slider panel
var panelClass=panelwidth?"floatingPanel":"sliderPanel";
if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
panel.button = btn; // so the slider panel know which button it belongs to
btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
panel.setAttribute("transient",transient=="*"?"true":"false");
panel.style.display = show;
panel.style.width=panel.defaultPanelWidth;
panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }
// render slider (or defer until shown)
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
if ((show=="block")||!deferred) {
// render now if panel is supposed to be shown or NOT deferred rendering
w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
// align floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
}
else {
var src = w.source.substr(w.nextMatch);
var endpos=findMatchingDelimiter(src,"+++","===");
panel.setAttribute("raw",src.substr(0,endpos));
panel.setAttribute("blockquote",blockquote?"true":"false");
panel.setAttribute("rendered","false");
w.nextMatch += endpos+3;
if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
}
}
}
}
)
function findMatchingDelimiter(src,starttext,endtext) {
var startpos = 0;
var endpos = src.indexOf(endtext);
// check for nested delimiters
while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
// count number of nested 'starts'
var startcount=0;
var temp = src.substring(startpos,endpos-1);
var pos=temp.indexOf(starttext);
while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
// set up to check for additional 'starts' after adjusting endpos
startpos=endpos+endtext.length;
// find endpos for corresponding number of matching 'ends'
while (startcount && endpos!=-1) {
endpos = src.indexOf(endtext,endpos+endtext.length);
startcount--;
}
}
return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
if (!theTarget) return false;
var theSlider = theTarget.sliderPanel;
var isOpen = theSlider.style.display!="none";
// toggle label
theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
// toggle tooltip
theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));
// deferred rendering (if needed)
if (theSlider.getAttribute("rendered")=="false") {
var place=theSlider;
if (theSlider.getAttribute("blockquote")=="true")
place=createTiddlyElement(place,"blockquote");
wikify(theSlider.getAttribute("raw"),place);
theSlider.setAttribute("rendered","true");
}
// show/hide the slider
if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
else
theSlider.style.display = isOpen ? "none" : "block";
// reset to default width (might have been changed via plugin code)
theSlider.style.width=theSlider.defaultPanelWidth;
// align floater panel position with target button
if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
// if showing panel, set focus to first 'focus-able' element in panel
if (theSlider.style.display!="none") {
var ctrls=theSlider.getElementsByTagName("*");
for (var c=0; c<ctrls.length; c++) {
var t=ctrls[c].tagName.toLowerCase();
if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
{ ctrls[c].focus(); break; }
}
}
var cookie=theTarget.sliderCookie;
if (cookie && cookie.length) {
config.options[cookie]=!isOpen;
if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
else window.removeOptionCookie(cookie); // remove cookie if slider is in default display state
}
// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
// prevent clicks *within* a slider button from being processed by browser
// but allow plain click to bubble up to page background (to close transients, if any)
if (e.shiftKey || theTarget!=resolveTarget(e))
{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
Popup.remove(); // close open popup (if any)
return false;
}
//}}}
//{{{
// click in document background closes transient panels
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);
if (document.nestedSliders_savedOnClick)
var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
// if click was inside a popup... leave transient panels alone
var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
if (p) return retval;
// if click was inside transient panel (or something contained by a transient panel), leave it alone
var p=target; while (p) {
if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
p=p.parentNode;
}
if (p) return retval;
// otherwise, find and close all transient panels...
var all=document.all?document.all:document.getElementsByTagName("DIV");
for (var i=0; i<all.length; i++) {
// if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
// otherwise, if the panel is currently visible, close it by clicking it's button
if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
}
return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
if (hasClass(panel,"floatingPanel")) {
var rightEdge=document.body.offsetWidth-1;
var panelWidth=panel.offsetWidth;
var left=0;
var top=btn.offsetHeight;
if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
}
if (place.style.position!="relative") {
var left=findPosX(btn);
var top=findPosY(btn)+btn.offsetHeight;
var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
if (p) { left-=findPosX(p); top-=findPosY(p); }
if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
if (left<0) left=0;
}
panel.style.left=left+"px"; panel.style.top=top+"px";
}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }
// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
Morpher.prototype.coreStop = Morpher.prototype.stop;
Morpher.prototype.stop = function() {
this.coreStop.apply(this,arguments);
var e=this.element;
if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
// adjust panel overflow and position after animation
e.style.overflow = "visible";
if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
}
};
}
//}}}
/%
|Name|NextTiddler|
|Source|http://www.TiddlyTools.com/#NextTiddler|
|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|insert a link that, when clicked, closes the current tiddler and opens another one in its place|
usage: <<tiddler NextTiddler with: NewTiddlerTitle linktext>>
%/<script label="$2">
var tiddler=story.findContainingTiddler(place);
story.displayTiddler(tiddler,"$1");
story.closeTiddler(tiddler.getAttribute("tiddler")); // close self
return false;
</script>
<<tiddler NextTiddler with: NextTiddlerTest2 "Next Page">>
<<tiddler NextTiddler with: NextTiddlerTest "Previous Page">>
<<tiddler NextTiddler with: NextTiddlerTest3 "Next Page">>
<<tiddler NextTiddler with: NextTiddlerTest2 "Previous Page">>
/**
|Name|RelatedTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#RelatedTiddlersPlugin|
|Version|1.1.7|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|InlineJavascriptPlugin, NestedSlidersPlugin, StyleSheetShortcuts|
|Overrides||
|Options|##Configuration|
|Description|starting from a selected tiddler, display a list and/or tree of linked or transcluded tiddlers|
Given a starting tiddler (default is the current tiddler), this plugin recursively follows the internal links[] data that is associated with each tiddler and constructs a list of all tiddlers that are related to the starting tiddler by being referenced in a TiddlyLink (e.g., {{{[[TiddlerName]]}}}) or used as macro parameter (e.g., {{{<<tiddler TiddlerName>>}}}) within the tiddler content.
Using the terminology of Graph Theory, the plugin's recursive algorithm finds what is called a 'minimal spanning tree' from any specific starting 'root node'. The results can be displayed as a simple flat list of related tiddler titles, or as an indented tree diagram that shows the specific connections between the related tiddlers, and can be helpful for identifying clusters of interdependent tiddlers or simply generating an on-the-fly site map for quick discovery and navigation through complex or unfamiliar document content.
!!!!!Usage
<<<
//{{{
<<relatedTiddlers TiddlerName hideform "exclude list">>
//}}}
where:
*TiddlerName (optional)<br>sets the initial "root" to the specified tiddler (and hides the 'select a tiddler' form controls). You can use keyword 'here' to specify the current tiddler.
*'hideform' (optional) or 'showform' (default)<br>keyword value to suppress display of 'select tiddler' droplist and buttons.
*"exclude list" (optional)<br>space-separated list of tiddlers whose links should not be followed. use quotes or double-square brackets to ensure list is processed as a single parameter
The plugin also defines two functions that can be called externally (from other plugins or scripts) to generate and retrieve either a list of links or a formatted "tree view":
>{{{var list=config.macros.relatedTiddlers.getList(start,exclude,callback);}}}
>{{{var tree=config.macros.relatedTiddlers.getTree(start,exclude,callback);}}}
These functions accept parameters to specify the starting tiddler, and a list of tiddlers to exclude, as well as an optional callback function that takes any specified tiddler as input and returns a custom-defined array of links related to that tiddler:
>{{{var list=callback(tiddler);}}}
Use of the callback function enables you to generate an alternative list/tree, based on application-specific data (such tiddler references contained in tags or custom fields), rather than using the default "links" list.
<<<
!!!!!Configuration
<<<
<<option chkRelatedTiddlersShowList>> show list display
<<option chkRelatedTiddlersShowTree>> show tree display
<<option chkRelatedTiddlersZoom>> enable autosizing of tree display //(aka, "zoom" or "shrink-and-grow")//
don't follow links contained in these tiddlers: <<option txtRelatedTiddlersExclude>>
<<<
!!!!!Examples
<<<
{{smallform{<<relatedTiddlers>>}}}
Using getList()/getTree() public API from other scripts/plugins:
><script show>
var start="About";
var exclude=config.options.txtRelatedTiddlersExclude.readBracketedList();
var callback=null;
var list=config.macros.relatedTiddlers.getList(start,exclude,callback);
var tree=config.macros.relatedTiddlers.getTree(start,exclude,callback);
return "There are "+list.length+" tiddlers related to [["+start+"]]...\n"+tree;
</script>
<<<
!!!!!Revisions
<<<
2007.11.11 [1.1.7] in findRelatedTiddlers(), refactored into separate getlinks(),<br>and added param for optional callback function that can be used to return an alternative set of links.<br>Also added API functions, getTree() and getList() for use by other scripts
2007.07.13 [1.1.6] performance optimizations, more code cleanup
2007.07.10 [1.1.5] extensive code cleanup
2007.07.08 [1.1.0] converted from inline script
2007.06.29 [1.0.0] started (as inline script)
<<<
!!!!!Code
***/
//{{{
version.extensions.RelatedTiddlersPlugin={major: 1, minor: 1, revision: 7, date: new Date(2007,11,11)};
// initialize 'autozoom' and 'exclude' tree options (defaults are not to zoom, and to follow all links)
if (config.options.chkRelatedTiddlersZoom===undefined)
config.options.chkRelatedTiddlersZoom=false;
if (config.options.txtRelatedTiddlersExclude===undefined)
config.options.txtRelatedTiddlersExclude='GettingStarted DefaultTiddlers SiteNews Download';
if (config.options.chkRelatedTiddlersShowList===undefined)
config.options.chkRelatedTiddlersShowList=true;
if (config.options.chkRelatedTiddlersShowTree===undefined)
config.options.chkRelatedTiddlersShowTree=false;
config.macros.relatedTiddlers={
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
// create form with unique DOM element ID (using current timestamp)... permits multiple form instances
var now=new Date().getTime();
var span=createTiddlyElement(place,"span");
span.innerHTML=this.form.format(["relatedTiddlers_form"+now]);
var form=span.getElementsByTagName("form")[0]; // find form that we just created
var target=createTiddlyElement(span,"div"); // create target block in which generated output will be placed
// initialize droplist contents (all tiddlers except hidden ones)
var tids=store.getTiddlers('title','excludeLists');
for (i=0; i<tids.length; i++) form.list.options[form.list.options.length]=new Option(tids[i].title,tids[i].title,false,false);
// initialize exclude field (space-separated list)
if (config.options.txtRelatedTiddlersExclude) form.exclude.value=config.options.txtRelatedTiddlersExclude;
// set starting tiddler, form display, and/or exclude list from macro params (if present) and then show the results!
var root="";
var hide=false;
var exclude=config.options.txtRelatedTiddlersExclude;
if (params[0]) root=params[0]; // TiddlerName
if (params[1]) hide=(params[1].toLowerCase()=="hideform"); // keyword: "hideform" or "showform" (default)
if (params[2]) exclude=params[2]; // list of tiddlers whose links should not be followed
if (root=="here") { var tid=story.findContainingTiddler(place); if (tid) root=tid.getAttribute("tiddler"); }
if (store.tiddlerExists(root)) {
// NOTE: don't hide form when running IE, where putting initial focus on hidden form creates an error
if (!config.browser.isIE) form.style.display=hide?"none":"block"; // show/hide the controls
form.list.value=root; // set the root
form.exclude.value=exclude; // set 'exclude' field
form.get.click(); // DISPLAY INITIAL RESULTS (if tiddler is selected)
}
},
form:
"<form id='%0' action='javascript:;' style='display:inline;margin:0;padding:0;' onsubmit='return false'><!-- \
--><span class='fine' style='float:left;vertical-align:bottom;width:39.5%;'><i>find all tiddlers related to:</i></span><!-- \
--><span class='fine' style='float:left;vertical-align:bottom;'><i>exclude links contained in:</i></span><!-- \
--><div style='clear:both'><!-- \
--><select name=list size=1 style='width:39.5%' onchange='this.form.get.click()'><!-- \
--><option value=''>select a tiddler...</option><!-- \
--></select><!-- \
--><input type='text' option='txtRelatedTiddlersExclude' name='exclude' value='' style='width:40%' \
title='enter the names of tiddlers whose links should NOT be followed' \
onkeyup='if (event.keyCode==13) { this.blur(); this.form.get.click(); }' \
onchange='config.options[this.getAttribute(\"option\")]=this.value;saveOptionCookie(this.getAttribute(\"option\"));'><!-- \
--><input type=button name=get value='get related' style='width:10%' \
onclick='config.macros.relatedTiddlers.show(this.form,this.form.nextSibling);'><!-- \
--><input type=button name=done value='done' disabled style='width:10%' \
onclick='this.form.list.selectedIndex=0; this.form.get.click();'><!-- \
--></div><!-- \
--></form>",
styles:
".relatedTiddlers blockquote \
{ border-left:1px dotted #999; margin:0 25px; padding-left:.5em; font-size:%0%; line-height:115%; } \
.relatedTiddlers .borderleft \
{ margin:0; padding:0; margin-left:1em; border-left:1px dotted #999; padding-left:.5em; } \
.relatedTiddlers .fourcolumns \
{ display:block; -moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%} \
.relatedTiddlers a \
{ font-weight:normal; } \
.relatedTiddlers .bold, .relatedTiddlers .bold a \
{ font-weight:bold; } \
.relatedTiddlers .floatright \
{ float:right; } \
.relatedTiddlers .clear \
{ clear:both; } ",
toggleform:
"{{floatright{<html><a href='javascript:;' class='button' title='show/hide tiddler selection droplist and buttons' \
onclick='var here=story.findContainingTiddler(this); var tid=here?here.getAttribute(\"tiddler\"):\"\"; \
var f=document.getElementById(\"%0\"); var hide=(f.style.display!=\"none\"); \
f.style.display=hide?\"none\":\"inline\"; this.innerHTML=hide?\"show form\":\"hide form\"; return false;'>%1</a></html>}}}",
treecheck:
"{{floatright{@@display:none;<<option chkRelatedTiddlersShowTree>>@@<html><a href='javascript:;' class='button' onclick='this.parentNode.previousSibling.firstChild.click(); return false;'>tree view</a></html>}}}",
tree:
"{{clear{\n----\n}}} \
{{floatright small{<<option chkRelatedTiddlersZoom>>autosize tree display}}} \
{{fine{\n''tiddlers linked from or included by'' [[%0]]\n}}}%1",
listcheck:
"{{floatright{@@display:none;<<option chkRelatedTiddlersShowList>>@@<html><a href='javascript:;' class='button' onclick='this.parentNode.previousSibling.firstChild.click(); return false;'>list view</a></html>}}}",
list:
"{{clear{\n----\n}}} \
{{fine{\n''tiddlers containing links to'' [[%0]]\n}}} \
{{small fourcolumns borderleft{\n%1}}} \
{{fine{\n''tiddlers linked from or included by'' [[%0]]\n}}} \
{{borderleft{\n \
{{fine{\n''bold''=//direct links//, plain=//indirect links//, ''...''=//links not followed//}}} \
{{small fourcolumns{\n%2}}} \
}}}",
skipped:
"<html><span title='links from %0 have NOT been followed'>...</span></html>",
mouseover: function(ev) {
this.saveSize=this.style.fontSize;
this.style.fontSize='100%';
this.style.borderLeftStyle='solid';
},
mouseout: function(ev) {
this.style.fontSize=this.saveSize;
this.style.borderLeftStyle='dotted';
},
findRelatedTiddlers: function(tid,tids,treeout,level,exclude,callback) {
// recursively build list of related tids (links and includes FROM the root tiddler) and generate treeview output
var t=store.getTiddler(tid);
if (!t || tids.contains(tid)) return tids; // tiddler already in results (or missing tiddler)... just return current results
tids.push(t.title); // add tiddler to results
var skip=exclude && exclude.contains(tid);
treeout.text+=level+"[["+tid+"]]"+(skip?this.skipped.format([tid]):"")+"\n";
if (skip) return tids; // branch is pruned... don't follow links
var links=callback?callback(t):this.getLinks(t);
for (var i=0; i<links.length; i++) tids=this.findRelatedTiddlers(links[i],tids,treeout,level+">",exclude);
return tids;
},
getLinks: function(tiddler) {
if (!tiddler.linksUpdated) tiddler.changed();
return tiddler.links;
},
getTree: function(start,exclude,callback) {
// get related tiddlers and generate blockquote-indented tree output
var list=[]; var tree={text:""}; var level="";
list=this.findRelatedTiddlers(start,list,tree,level,exclude,callback);
return tree.text;
},
getList: function(start,exclude,callback) {
// get related tiddlers and generate blockquote-indented tree output
var list=[]; var tree={text:""}; var level="";
list=this.findRelatedTiddlers(start,list,tree,level,exclude,callback);
return list;
},
show: function(form,target) {
removeChildren(target); form.done.disabled=true; // clear any existing output and disable 'done' button
var start=form.list.value; if (!start.length) return; // get selected starting tiddler. If blank value (heading), do nothing
// get related tiddlers and generate blockquote-indented tree output
var rels=[]; var treeview={text:""}; var level="";
var exclude=config.options.txtRelatedTiddlersExclude.readBracketedList();
var rels=this.findRelatedTiddlers(start,rels,treeview,level,exclude);
rels.shift(); // remove self from list
rels.sort(); // sort titles alphabetically
// generate list output
var tid=store.getTiddler(start);
var relsview=""; for (t=0; t<rels.length; t++) {
relsview+=tid.links.contains(rels[t])?("{{bold{[["+rels[t]+"]]}}}"):("[["+rels[t]+"]]");
if (exclude && exclude.contains(rels[t])) relsview+=this.skipped.format([rels[t]]);
relsview+="\n";
}
// get references TO the root tiddler, add to related tiddlers and generate refsview output
var refs=[]; var referers=store.getReferringTiddlers(start);
for(var r=0; r<referers.length; r++)
if(referers[r].title!=start && !referers[r].tags.contains("excludeLists")) refs.push(referers[r].title);
var refcount=refs.length; var relcount=rels.length; // remember individual counts
for (var r=0; r<refs.length; r++) rels.pushUnique(refs[r]); // combine lists without duplicates
var total=rels.length; // get combined total
var refsview="[["+refs.sort().join("]]\n[[")+"]]\n";
// set custom blockquote styles for treeview
setStylesheet(this.styles.format([config.options.chkRelatedTiddlersZoom?80:100]),'relatedTiddlers_styles');
// assemble and render output
var summary=(total?(total+" tiddler"+(total==1?" is":"s are")):"There are no tiddlers")+" related to: [["+start+"]]";
var list=this.list.format([start,refsview.length?refsview:"//none//",relsview.length?relsview:"//none//"]);
var tree=this.tree.format([start,treeview.text]);
var toggle=this.toggleform.format([form.id,(form.style.display=='none'?'show form':'hide form')]);
var sep="{{floatright{ | }}}";
var showList=total && config.options.chkRelatedTiddlersShowList;
var showTree=relcount && config.options.chkRelatedTiddlersShowTree;
var out="{{relatedTiddlers{"+toggle+(relcount?sep+this.treecheck:"")+(total?sep+this.listcheck:"")+summary+(showList?list:"")+(showTree?tree:"")+"}}}";
wikify(out,target);
form.done.disabled=false; // enable 'done' button
// add mouseover/mouseout handling to blockquotes (for autosizing)
var blocks=target.getElementsByTagName("blockquote");
for (var b=0; b<blocks.length; b++)
{ blocks[b].onmouseover=this.mouseover; blocks[b].onmouseout=this.mouseout; }
// add side-effect to checkboxes so that display is refreshed when a checkbox state is changed
var checks=target.getElementsByTagName("input");
for (var c=0; c<checks.length; c++) {
if (checks[c].type.toLowerCase()!="checkbox") continue;
checks[c].coreClick=checks[c].onclick; // save standard click handler
checks[c].formID=form.id; // link checkbox with correponding form
checks[c].onclick=function() { this.coreClick.apply(this,arguments); document.getElementById(this.formID).get.click(); }
}
}
}
//}}}
A ~TiddlyWiki For Developers
http://projects.psema4.com/wash-se/tiddlywiki/wash-tw.html
/***
''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''
|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.
!Installation
Copy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.
!Customizing
Once the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.
!History
* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.
* 26-06-06 : version 0.2, first release
!Code
***/
//{{{
window.old_lewcid_splash_restart=window.restart;
window.restart = function()
{ if (document.getElementById("SplashScreen"))
document.getElementById("SplashScreen").style.display = "none";
if (document.getElementById("contentWrapper"))
document.getElementById("contentWrapper").style.display = "block";
window.old_lewcid_splash_restart();
if (splashScreenInstall)
{if(config.options.chkAutoSave)
{saveChanges();}
displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");
}
}
var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
{var siteTitle = store.getTiddlerText("SiteTitle");
var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
if (! store.tiddlerExists("MarkupPreHead"))
{var myTiddler = store.createTiddler("MarkupPreHead");}
else
{var myTiddler = store.getTiddler("MarkupPreHead");}
myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
store.setDirty(true);
var splashScreenInstall = true;
}
//}}}
#mainMenu { width:12em; }
.fsTableStyle { width: 50%; }
.menuTableStyle { width: 98%; }
.viewer div.centeredTable {
text-align: center;
}
.viewer div.centeredTable table {
margin: 0 auto;
text-align: left;
}
[[Jash.css]]
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0em 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0em 1em;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|CSS|
|Requires||
|Overrides||
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|
These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.
***/
/*{{{*/
/* text alignments */
.left
{ display:block;text-align:left; }
.center
{ display:block;text-align:center; }
.right
{ display:block;text-align:right; }
.justify
{ display:block;text-align:justify; }
.indent
{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
{ float:left; }
.floatright
{ float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
{ vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
{ vertical-align:bottom; }
.clear
{ clear:both; }
.wrap
{ white-space:normal; }
.nowrap
{ white-space:nowrap; }
.hidden
{ display:none; }
.show
{ display:inline !important; }
.span
{ display:span; }
.block
{ display:block; }
.relative
{ position:relative; }
.absolute
{ position:absolute; }
/* font sizes */
.big
{ font-size:14pt;line-height:120% }
.medium
{ font-size:12pt;line-height:120% }
.normal
{ font-size:9pt;line-height:120% }
.small
{ font-size:8pt;line-height:120% }
.fine
{ font-size:7pt;line-height:120% }
.tiny
{ font-size:6pt;line-height:120% }
.larger
{ font-size:120%; }
.smaller
{ font-size:80%; }
/* font styles */
.bold
{ font-weight:bold; }
.italic
{ font-style:italic; }
.underline
{ text-decoration:underline; }
/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }
/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
-moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
-webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
column-count:2; column-gap:1em; column-width:50%; /* Opera */
}
.threecolumns { display:block;
-moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
-webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
column-count:3; column-gap:1em; column-width:33%; /* Opera */
}
.fourcolumns { display:block;
-moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
-webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
column-count:4; column-gap:1em; column-width:25%; /* Opera */
}
/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
*[class="ieOnly"]
{ display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
{ display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */
/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
{ border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
{ width:100%; }
/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }
/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }
/* grouped content */
.outline
{ display:block; padding:1em; -moz-border-radius:1em; border:1px solid; }
.menubox
{ display:block; padding:1em; -moz-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox
{ display:block; padding:1em; -moz-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox code
{ color:#333 !important; }
.borderleft
{ margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
.borderright
{ margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
.borderbottom
{ margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
.bordertop
{ margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }
/* compact form */
.smallform
{ white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
{ font-size:8pt; }
/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }
/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input { width:1em; }
.twochar input { width:2em; }
.threechar input { width:3em; }
.fourchar input { width:4em; }
.fivechar input { width:5em; }
/* text colors */
.green { color:#0c0 !important }
.red { color:#f66 !important }
.blue { color:#99f !important }
.gray { color:#999 !important }
/* rollover highlighting */
.mouseover
{color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
{color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
{color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
{color:[[ColorPalette::PrimaryDark]] !important;}
/* rollover zoom text */
.zoomover
{ font-size:80% !important; }
.selected .zoomover
{ font-size:100% !important; }
/*}}}*/
<<tabs txtFavourite
Introduction "Introduction" GettingStarted
IDE "IDE" TidIDE
Shell "Shell" [[WashPlugin]]
>>
<<tidIDE id:DefaultIDE SystemInfo TiddlerTweaker +edit:GettingStarted>>
''Moveable IDE Panel''
+++^30em^[Launch IDE]<<moveablePanel>>~DefautIDE
----
<<tidIDE id:DefaultIDE SystemInfo TiddlerTweaker +edit:GettingStarted>>
===
/***
|Name|TidIDEPlugin|
|Source|http://www.TiddlyTools.com/#TidIDEPlugin|
|Documentation|http://www.TiddlyTools.com/#TidIDEPluginInfo|
|Version|1.8.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|TiddlyWiki Integrated Development Environment - tools for authors and plugin writers|
~TidIDE (//prounounced "Tie Dyed"//) - ''Tid''dlyWiki ''I''ntegrated ''D''evelopment ''E''nvironment - lets you define a set of checkboxes to toggle a stack of 'tool panels' containing tools for TiddlyWiki authors to use when creating and debugging their TiddlyWiki documents. Each tool is defined by a separate tiddler, allowing you to define any convenient set of tools simply by adding/removing tiddler references from the {{{<<tidIDE...>>}}} macro call.
In addition to presenting checkboxes/tool panels that are defined in separate tiddlers, the {{{<<tidIDE>>}}} macro can invoke an optional built-in "editor panel" that presents an alternative tiddler editor to create, modify, and manage the tiddlers in your document... and, if you have also installed [[PreviewPlugin]], the editor can automatically display a ''//formatted preview//'' of the current tiddler content that is updated ''live, key-by-key'' while you edit the tiddler source.
!!!!!Documentation
>see [[TidIDEPluginInfo]]
!!!!!Configuration
<<<
Number of rows to display in text input area <<option txtTidIDEMaxEditRows>>
{{{usage: <<option txtTidIDEMaxEditRows>>}}}
^^Note: if value is not specified here, default is to use {{{<<option txtMaxEditRows>>}}} core setting (see [[AdvancedOptions]])^^
<<<
!!!!!Revisions
<<<
2008.04.24 [1.8.3] fixed 'run' button onclick handler
2007.12.21 [1.8.2] added txtTidIDEMaxEditRows option as custom override for standard core txtMaxEditRows setting
2007.09.27 [1.8.0] split preview functionality into separate stand-alone plugin (see [[PreviewPlugin]]). Moved {{{<<DOMViewer>>}}} macro definition to separate plugin (see [[DOMViewerPlugin]]). Replicated ''run'' button functionality in stand-along plugin (see [[RunTiddlerPlugin]]). Major re-write of documentation
|please see [[TidIDEPluginInfo]] for additional revision details|
2006.04.15 [0.5.0] Initial ALPHA release. Converted from inline script.
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.TidIDEPlugin= {major: 1, minor: 8, revision: 3, date: new Date(2008,4,24)};
//}}}
// // settings
//{{{
if (config.options.txtTidIDEMaxEditRows==undefined)
config.options.txtTidIDEMaxEditRows=config.options.txtMaxEditRows
//}}}
// // macro definition
//{{{
config.macros.tidIDE = {
versionMsg: "TidIDE v%0.%1.%2: ",
datetimefmt: "0MM/0DD/YYYY 0hh:0mm",
titleMsg: "Please enter a new tiddler title",
isShadowMsg: "'%0' is a shadow tiddler and cannot be removed.",
evalMsg: "Warning!! Processing '%0' as a systemConfig (plugin) tiddler may produce unexpected results! Are you sure you want to proceed?",
evalCompletedMsg: "Processing completed",
toolsDef: "<html><a href='javascript:config.macros.tidIDE.set(\"%0\",\"%1\");'>edit %1...</a></html>",
editorLabel: "TiddlerEditor"
};
config.macros.tidIDE.handler= function(place,macroName,params) {
var here=story.findContainingTiddler(place);
var selectors="";
var panels="";
var showsys=false;
var title="";
var id=""; if (here) id=here.getAttribute("tiddler").replace(/ /g,"_");
var p=params.shift();
if (!p) p="edit:here"; // default to editor if no params
var openpanels=[];
var panelcount=0;
while (p) {
var defOpen=(p.substr(0,1)=="+"); if (defOpen) p=p.substr(1);
if (p.substr(0,3)=="id:")
{ id=p.substr(3); }
else if (p.substr(0,4)=="edit") {
panelcount++;
defOpen=defOpen || (!params[0] && panelcount==1); // if only one panel to show, default to open
var toolname=this.editorLabel;
if (p.indexOf('|')!=-1) toolname=p.substr(0,p.indexOf('|'));
selectors+=this.html.editorchk.replace(/%toolname%/mg,toolname);
selectors=selectors.replace(/%showpanel%/mg,defOpen?"CHECKED":"");
panels+=this.html.editorpanel;
// editor panel setup...
panels=panels.replace(/%showpanel%/mg,defOpen?"block":"none");
panels=panels.replace(/%maxrows%/mg,config.options.txtTidIDEMaxEditRows);
panels=panels.replace(/%disabled%/mg,readOnly?"DISABLED":"");
panels=panels.replace(/%readonlychk%/mg,readOnly?"CHECKED":"");
panels=panels.replace(/%minoredits%/mg,config.options.chkForceMinorUpdate&&!readOnly?"":"DISABLED");
panels=panels.replace(/%minorchk%/mg,config.options.chkForceMinorUpdate?"CHECKED":"");
var tiddlers=store.getTiddlers("title"); var tiddlerlist="";
for (var t=0; t<tiddlers.length; t++)
tiddlerlist+='<option value="'+tiddlers[t].title+'">'+tiddlers[t].title+'</option>';
for (var t in config.shadowTiddlers)
if (!store.tiddlerExists(t)) tiddlerlist+="<option value='"+t+"'>"+t+" (shadow)</option>";
panels=panels.replace(/%tiddlerlist%/mg,tiddlerlist);
var tags = store.getTags(); var taglist="";
for (var t=0; t<tags.length; t++)
taglist+="<option value='"+tags[t][0]+"'>"+tags[t][0]+"</option>";
panels=panels.replace(/%taglist%/mg,taglist);
if (p.substr(0,5)=="edit:") {
title=p.substr(5);
if (here && title=="here") title=here.id.substr(7);
}
}
else {
panelcount++;
defOpen=defOpen || (!params[0] && panelcount==1); // if only one panel to show, default to open
var toolid=toolname=p;
if (p.indexOf('|')!=-1)
{ toolname=p.substr(0,p.indexOf('|')); toolid=p.substr(p.indexOf('|')+1); }
selectors+=this.html.toolschk.replace(/%toolid%/mg,toolid).replace(/%toolname%/mg,toolname);
selectors=selectors.replace(/%showpanel%/mg,defOpen?"CHECKED":"");
panels+=this.html.toolspanel.replace(/%toolid%/mg,toolid);
panels=panels.replace(/%showpanel%/mg,defOpen?"block":"none");
if (defOpen) openpanels.push(toolid);
}
p=params.shift(); // next param
}
var html=this.html.framework;
if (panelcount<2)
html=html.replace(/%version%/mg,'').replace(/%selector%/mg,''); // omit header/selectors if just one panel to display
else {
var v=version.extensions.TidIDEPlugin;
html=html.replace(/%version%/mg, this.versionMsg.format([v.major,v.minor,v.revision]));
html=html.replace(/%selector%/mg,selectors+"<hr style='margin:0;padding:0'>");
}
html=html.replace(/%panels%/mg,panels);
html=html.replace(/%id%/mg,id);
var newIDE=createTiddlyElement(place,"span");
newIDE.innerHTML=html;
if (title.length) this.set(id,title); // pre-load tiddler editor values (if needed)
if (openpanels.length) for (i=0;i<openpanels.length;i++) { config.macros.tidIDE.loadPanel(id,openpanels[i]); }
// see [[TextAreaPlugin]] for extended ctrl-F/G (search/search again)and TAB handler definitions
if (window.addKeyDownHandlers!=undefined) {
var elems=newIDE.getElementsByTagName("textarea");
for (var i=0;i<elems.length;i++) window.addKeyDownHandlers(elems[i]);
}
var prev=document.getElementById(id+'_previewpanel');
if (config.macros.preview && prev) // add previewer to editor (if installed)
config.macros.preview.handler(prev,"preview",["text","15"]);
}
//}}}
// // CUSTOM PANEL FUNCTIONS
//{{{
config.macros.tidIDE.loadPanel=function(id,toolid) {
var place=document.getElementById(id+"_"+toolid+"_panel"); if (!place) return;
var t=store.getTiddlerText(toolid,"");
place.innerHTML="";
if (t) wikify(t,place); else place.innerHTML=this.toolsDef.format([id,toolid]);
}
//}}}
// // EDITOR PANEL FUNCTIONS
//{{{
config.macros.tidIDE.set=function(id,title) {
var place=document.getElementById(id+"_editorpanel"); if (!place) return;
var f=document.getElementById(id+"_editorform");
if (f.dirty && !confirm(config.commands.cancelTiddler.warning.format([f.current]))) return;
// reset to form defaults
f.dirty=false;
f.current="";
f.created.value=f.created.defaultValue;
f.modified.value=f.modified.defaultValue;
f.author.value=f.author.defaultValue;
f.content.value=f.content.defaultValue;
f.tags.value=f.tags.defaultValue;
f.size.value=f.size.defaultValue;
if (!title.length) return;
f.current=title;
// values for new/shadow tiddlers
var cdate=new Date();
var mdate=new Date();
var modifier=config.options.txtUserName;
var text=config.views.editor.defaultText.format([title]);
var tags="";
// adjust values for shadow tiddlers
if (store.isShadowTiddler(title))
{ modifier=config.views.wikified.shadowModifier; text=store.getTiddlerText(title) }
// get values for specified tiddler (if it exists)
var t=store.getTiddler(title);
if (t) { var cdate=t.created; var mdate=t.modified; var modifier=t.modifier; var text=t.text; var tags=t.getTags(); }
if (!t && !store.isShadowTiddler(title)) f.tiddlers.options[f.tiddlers.options.length]=new Option(title,title,false,true); // add item to list
f.tiddlers.value=title; // select current title (just in case it wasn't already selected)
f.created.value=cdate.formatString(this.datetimefmt);
f.modified.value=mdate.formatString(this.datetimefmt);
f.author.value=modifier;
f.content.value=text;
f.tags.value=tags;
f.minoredits.checked=config.options.chkForceMinorUpdate&&!readOnly;
f.size.value=f.content.value.length+" bytes";
}
config.macros.tidIDE.add=function(id) {
var place=document.getElementById(id+"_editorpanel"); if (!place) return;
var f=document.getElementById(id+"_editorform");
if (f.dirty && !confirm(config.commands.cancelTiddler.warning.format([f.current]))) return;
var title=prompt(this.titleMsg,config.macros.newTiddler.title);
while (title && store.tiddlerExists(title) && !confirm(config.messages.overwriteWarning.format([title])))
title=prompt(this.titleMsg,config.macros.newTiddler.title);
if (!title || !title.trim().length) return; // cancelled by user
f.dirty=false; // suppress unneeded confirmation message
this.set(id,title);
}
config.macros.tidIDE.remove=function(id) {
var place=document.getElementById(id+"_editorpanel"); if (!place) return;
var f=document.getElementById(id+"_editorform");
if (!f.current.length) return;
if (!store.tiddlerExists(f.current) && store.isShadowTiddler(f.current)) { alert(this.isShadowMsg.format([f.current])); return; }
if (config.options.chkConfirmDelete && !confirm(config.commands.deleteTiddler.warning.format([f.current]))) return;
if (store.tiddlerExists(f.current)) {
story.closeTiddler(f.current);
store.removeTiddler(f.current);
store.setDirty(true);
if(config.options.chkAutoSave) saveChanges();
}
f.tiddlers.options[f.tiddlers.selectedIndex]=null; // remove item from list
f.dirty=false; // suppress unneeded confirmation message
this.set(id,""); // clear form controls
}
config.macros.tidIDE.save=function(id,saveAs) {
var place=document.getElementById(id+"_editorpanel"); if (!place) return;
var f=document.getElementById(id+"_editorform");
var title=f.current;
if (!title || !title.trim().length || saveAs) { // get a new title
title=prompt(this.titleMsg,config.macros.newTiddler.title);
while (title && store.tiddlerExists(title) && !confirm(config.messages.overwriteWarning.format([title])))
title=prompt(this.titleMsg,config.macros.newTiddler.title);
if (!title || !title.trim().length) return; // cancelled by user
f.tiddlers.options[f.tiddlers.options.length]=new Option(title,title,false,true); // add item to list
f.current=title;
}
var author=config.options.txtUserName;
var mdate=new Date();
var content=f.content.value;
var tags=f.tags.value;
var tiddler=store.saveTiddler(title,title,content,author,mdate,tags);
if (f.minoredits.checked) {
var author=f.author.value;
var mdate=new Date(f.modified.value);
var cdate=new Date(f.created.value);
tiddler.assign(null,null,author,mdate,null,cdate);
}
store.setDirty(true);
if(config.options.chkAutoSave) saveChanges();
story.refreshTiddler(title,null,true);
f.dirty=false;
}
//}}}
// // HTML DEFINITIONS
//{{{
config.macros.tidIDE.html = { };
config.macros.tidIDE.html.framework = " \
<html> %version% <form style='display:inline;margin:0;padding:0;'>%selector%</form> %panels% </html> \
";
//}}}
//{{{
config.macros.tidIDE.html.editorchk = " \
<input type=checkbox name=editor \
style='display:inline;width:auto;margin:1px;' \
title='add/delete/modify tiddlers' %showpanel% \
onclick='document.getElementById(\"%id%_editorpanel\").style.display=this.checked?\"block\":\"none\";'>%toolname% \
";
config.macros.tidIDE.html.toolschk = " \
<input type=checkbox name=tools \
style='display:inline;width:auto;margin:1px;' \
title='' %showpanel% \
onclick='document.getElementById(\"%id%_%toolid%_panel\").style.display=this.checked?\"block\":\"none\"; \
if (this.checked) config.macros.tidIDE.loadPanel(\"%id%\",\"%toolid%\");'>%toolname% \
";
//}}}
//{{{
config.macros.tidIDE.html.toolspanel = " \
<div id='%id%_%toolid%_panel' style='display:%showpanel%;margin:0;margin-top:0.5em'> \
</div> \
";
//}}}
//{{{
config.macros.tidIDE.html.editorpanel = " \
<div id='%id%_editorpanel' style='display:%showpanel%;margin:0;margin-top:0.5em'> \
<form id='%id%_editorform' style='display:inline;margin:0;padding:0;'> \
<!-- tiddler editor list and buttons --> \
<select size=1 name=tiddlers style='display:inline;width:44%;' \
onchange='config.macros.tidIDE.set(\"%id%\",this.value); this.value=this.form.current;'> \
<option value=''>select a tiddler...</option> \
%tiddlerlist% \
</select><!-- \
--><input name=add type=button style='display:inline;width:8%' \
value='new' title='create a new tiddler' \
onclick='config.macros.tidIDE.add(\"%id%\")' %disabled%><!-- \
--><input name=remove type=button style='display:inline;width:8%' \
value='remove' title='delete this tiddler' \
onclick='config.macros.tidIDE.remove(\"%id%\")' %disabled%><!-- \
--><input name=save type=button style='display:inline;width:8%' \
value='save' title='save changes to this tiddler' \
onclick='config.macros.tidIDE.save(\"%id%\")' %disabled%><!-- \
--><input name=saveas type=button style='display:inline;width:8%' \
value='save as' title='save changes to a new tiddler' \
onclick='config.macros.tidIDE.save(\"%id%\",true)' %disabled%><!-- \
--><input name=view type=button style='display:inline;width:8%' \
value='open' title='open this tiddler for regular viewing' \
onclick='if (!this.form.current.length) return; story.displayTiddler(null,this.form.current)'><!-- \
--><input name=run type=button style='display:inline;width:8%' \
value='run' title='evaluate this tiddler as a javascript \"systemConfig\" plugin' \
onclick='if (!confirm(config.macros.tidIDE.evalMsg.format([this.form.current]))) return false; \
try { window.eval(this.form.content.value); displayMessage(config.macros.tidIDE.evalCompletedMsg); } \
catch(e) { displayMessage(config.messages.pluginError.format([err])); }'><!-- \
--><input name=previewbutton type=button style='display:inline;width:8%;' \
value='preview' title='show \"live\" preview display' \
onclick='if (!config.macros.preview) { alert(\"Please install PreviewPlugin\"); return false; } \
this.form.preview.checked=!this.form.preview.checked; \
document.getElementById(\"%id%_previewpanel\").style.display=this.form.preview.checked?\"block\":\"none\"; \
if (this.form.freeze) this.form.freeze.checked=!this.form.preview.checked; \
if (this.form.preview.checked) config.macros.preview.render(this.form.content.id,this.form.content.getAttribute(\"previewid\"));'><!-- \
hidden field for preview show/hide state: \
--><input name=preview type=checkbox style='display:none;'>\
<!-- tiddler content edit --> \
<div><textarea id='%id%_content' name='content' edit='text' cols=60 rows=%maxrows% \
style='width:100%;' \
onkeyup='var f=this.form; f.dirty=true; f.size.value=this.value.length+\" bytes\";'></textarea></div> \
<!-- tag edit and droplist --> \
<table width='100%' style='border:0;padding:0;margin:0'><tr style='border:0;padding:0;margin:0'> \
<td style='border:0;padding:0;margin:0'> \
<input type=text name=tags size=60 style='width:100%;' value='' \
onchange='this.form.dirty=true' %disabled%> \
</td><td width='1' style='border:0;padding:0;margin:0;'> \
<select size=1 name=taglist \
onchange='this.form.dirty=true; this.form.tags.value+=\" \"+this.value' %disabled%> \
<option value=''>select tags...</option> \
%taglist% \
</select> \
</td></tr></table> \
<!-- created/modified dates, author, current tiddler size --> \
<div style='float:right;'> \
created <input type=text name=created size=15 \
style='display:inline;;text-align:center;padding:0;' value='' \
onchange='this.form.dirty=true' %minoredits%> \
modified <input type=text name=modified size=15 \
style='display:inline;text-align:center;padding:0;' value='' \
onchange='this.form.dirty=true;' %minoredits%> \
by <input type=text name=author size=15 \
style='display:inline;padding:0;' value='' \
onfocus='this.select()' onchange='this.form.dirty=true' %minoredits%> \
<input type=text name=size size=10 \
style='display:inline;text-align:center;padding:0;' value='' \
onfocus='this.blur()' onkeydown='return false' DISABLED> \
</div> \
<!-- toggles: read-only, minor edit --> \
<span style='white-space:nowrap'> \
<input type=checkbox name=readonly \
style='display:inline;width:auto;margin:1px;' %readonlychk% \
title='do not allow tiddler changes to be saved' \
onclick='readOnly=config.options.chkHttpReadOnly=this.checked;saveOptionCookie(\"chkHttpReadOnly\"); \
var f=this.form; f.minoredits.disabled=f.tags.disabled=f.taglist.disabled=this.checked; \
f.add.disabled=f.remove.disabled=f.save.disabled=f.saveas.disabled=this.checked; \
f.created.disabled=f.modified.disabled=f.author.disabled=this.checked||!f.minoredits.checked;'>readonly \
<input type=checkbox name=minoredits \
style='display:inline;width:auto;margin:1px;' %disabled% %minorchk% \
title='check: save datestamps/author as entered, uncheck: auto-update modified/author' \
onclick='this.form.created.disabled=this.form.modified.disabled=this.form.author.disabled=!this.checked; \
config.options.chkForceMinorUpdate=this.checked;saveOptionCookie(\"chkForceMinorUpdate\");'>minor edits \
</span> \
<!-- tiddler preview display --> \
<div id='%id%_previewpanel' style='display:none;white-space:nowrap'></div> \
";
//}}}
|Name|TidIDEPluginInfo|
|Source|http://www.TiddlyTools.com/#TidIDEPlugin|
|Documentation|http://www.TiddlyTools.com/#TidIDEPluginInfo|
|Version|1.8.3|
|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|documentation|
|Requires||
|Overrides||
|Description|documentation for TidIDEPlugin|
~TidIDE (//prounounced "Tie Dyed"//) - ''Tid''dlyWiki ''I''ntegrated ''D''evelopment ''E''nvironment - lets you define a set of checkboxes to toggle a stack of 'tool panels' containing tools for TiddlyWiki authors to use when creating and debugging their TiddlyWiki documents. Each tool is defined by a separate tiddler, allowing you to define any convenient set of tools simply by adding/removing tiddler references from the {{{<<tidIDE...>>}}} macro call.
In addition to presenting checkboxes/tool panels that are defined in separate tiddlers, the {{{<<tidIDE>>}}} macro can invoke an optional built-in "editor panel" that presents an alternative tiddler editor to create, modify, and manage the tiddlers in your document... and, if you have also installed [[PreviewPlugin]], the editor can automatically display a ''//formatted preview//'' of the current tiddler content that is updated ''live, key-by-key'' while you edit the tiddler source.
!!!!!Usage
<<<
Syntax:
{{{
<<tidIDE id:xyz TiddlerName ...>>
<<tidIDE id:xyz [[checkbox text|TiddlerName]] ...>>
<<tidIDE id:xyz edit ... >>
<<tidIDE id:xyz edit:here ... >>
<<tidIDE id:xyz edit:TidderName ...>>
}}}
where:
* ''id'' - assign a unique ID to this instance of TidIDE. (default id=current tiddler title or "" if not in a tiddler)
* ''{{{TidderName}}}'' or ''{{{[[checkbox text|TiddlerName]]}}}'' will include the custom tool panel content defined in TiddlerName (and a corresponding labelled checkbox to toggle its display)
* ''edit'' includes tiddler editor/previewer.
**''edit:here'' automatically sets the editor to show the current tiddler contents (if in a tiddler)
**''edit:tiddlertitle'' automatically sets the editor to show the specified tiddler contents
* all parameters are optional. The default panel is "edit:here".
* panel parameters preceded by a "+" are displayed by default. If only one panel specified in the parameters, it is automatically displayed, even if the "+" is omitted.
<<<
!!!!!Example
<<<
{{{<<tidIDE id:example SystemInfo TiddlerTweaker +edit:GettingStarted>>}}}
{{smallform{<<tidIDE id:example SystemInfo TiddlerTweaker +edit:GettingStarted>>}}}
<<<
!!!!!Using the built-in TidIDE editor
<<<
The editor includes a droplist of all tiddlers in the document, sorted alpha-numerically by tiddler title. Shadow tiddlers that have not been customized are added to the end of this list and marked with "(shadow)". Next to the droplist are several buttons:
* ''new'' prompts for a new tiddler title and begins a new editing session
* ''remove'' deletes an existing tiddler (note: shadow tiddlers cannot be removed)
* ''save'' saves changes to the tiddler currently being edited
* ''save as'' saves changes using a new tiddler title
* ''open'' opens the tiddler in the normal ~TiddlyWiki display area
* ''run'' invokes the tiddler as if it was a plugin (i.e., containing javascript code)
* ''preview'' toggles display of the live, key-by-key preview (when [[PreviewPlugin]] is installed)
If a tiddlername was not specified in the macro, select a tiddler from the droplist (or press ''add'') to begin editing. Once a tiddler has been loaded into the editor, you can change it's content, enter or select tags.
!!!!!minor edits
Normally, when you save changes to a tiddler, the created/modified dates and tiddler author are automatically updated. However, it is sometimes useful to make small changes to a tiddler without automatically updating the date/author information. Select the ''minor edits'' checkbox to prevent those values from being //automatically// changed. In addition, this enables the date/author edit fields which allows you to //manually// 'back date' a tiddler or change the author to another name. When the tiddler is saved, the date/author values shown in the edit fields will be used.
!!!!!using the previewer
When [[PreviewPlugin]] is installed, you can use the TidIDE editor's ''preview'' button to toggle the preview display area that shows you what your tiddler changes will look like, //before// committing to those changes. Please refer to the documentation in [[PreviewPlugin]] for more information.
<<<
!!!!!Revisions
<<<
2008.04.24 [1.8.3] fixed 'run' button onclick handler
2007.12.21 [1.8.1] added txtTidIDEMaxEditRows option as custom override for standard core txtMaxEditRows setting
2007.09.27 [1.8.0] split preview functionality into separate stand-alone plugin (see [[PreviewPlugin]]). Moved {{{<<DOMViewer>>}}} macro definition to separate plugin (see [[DOMViewerPlugin]]). Replicated ''run'' button functionality in stand-along plugin (see [[RunTiddlerPlugin]]). Major re-write of documentation
2007.09.13 [1.7.1] removed errant trailing comma from config.macros.tidIDE object definition (fixes IE error)
2007.09.09 [1.7.0] split systemInfo into separate plugin (see [[SystemInfoPlugin]])
2007.09.06 [1.6.3] in handler(), when using tiddler title as default instance ID, replace spaces with underscores to ensure generated form control ID's don't have embedded spaces.
2007.09.03 [1.6.2] in loadPanel(), use store.getTiddlerText() to permit use of shadow tiddlers as custom panels
2006.12.09 [1.6.1] in handler(), allow non-existing tiddler title when processing "edit:title" param
so that new tiddler (or journal) can be created directly from newTiddler, newJournal, or tidIDE macro (without pressing "new" button). Also, set 'edit=text' attribute on text area field so that default content can be initialized from "text:xxx" parameter specified in newTiddler/newJournal macro.
2006.11.28 [1.6.0] added font and size params to set CSS for form controls in editor and system info panels
2006.09.28 [1.5.8] use separate form ID and definition for each panel (as well as checkbox 'selector' form), so that forms in custom panels don't conflict with each other.
2006.08.27 [1.5.7] in handler(), corrected initial display setting for custom 'toolspanel' when '+' prefix has been used for 'defOpen'
2006.08.15 [1.5.6] in handler(), supress header/selectors if only one panel to display. Also, init system_panel as needed.
2006.08.04 [1.5.5] in handler(), fix construction of tiddler list to permit use of apostrophes (') in tiddler names.
2006.05.22 [1.5.4] in setsys(), remove "(cookie)" prefix from selected item text when setting cookie name (was preventing saving of cookie values)
2006.05.17 [1.5.3] in setsys(), call saveOptionsCookie(). Also, set tiddler editor textarea height (%maxrows%) using config.options.txtMaxEditRows
2006.04.30 [1.5.2] documentation update
2006.04.30 [1.5.1] in save(), when performing "save as" behavior, set current tiddler title (f.current) to new title
2006.04.24 [1.5.0] added macro parameters to dynamically configure and assemble HTML for IDE panels. Supports multiple custom panels loaded from tiddlers and {{{[[label|tiddlername]]}}}
2006.04.24 [1.4.6] layout adjustments: move system panel above editor panel and move config setting controls to top of system panel
2006.04.23 [1.4.5] fix HTML so that click on "readonly" checkbox won't change "minor edits" option value.
2006.04.23 [1.4.4] in render(), strip carriage returns (\r) that are added by IE's textarea control. Fixes errors in wikify() of 'block-mode' syntax. Also, defer rendering HTML and DOM preview displays until those options are checked and still more code cleanup
2006.04.23 [1.4.3] init "minor edits" checkbox state from config.options.chkForceMinorEdits value
2006.04.23 [1.4.2] added "TidIDE v#.#.#: " title in front of subsystem checkboxes.
2006.04.23 [1.4.1] added 'readonly' checkbox and handling to editor.
2006.04.23 [1.4.0] implemented 'minor edits' logic, including use of TW AdvancedOptions setting. Replaced separate MDY date input fields with date/time text input fields (using formatted date input).
2006.04.22 [1.3.2] Layout changes: Added editor/system/tools "subsystem" checkboxes at top of panel. Added automatic read-only notice. Moved tools_panel to bottom. Added 'minor edits' checkbox (handler not yet implemented).
2006.04.22 [1.3.1] assorted code cleanup and optimizations
2006.04.22 [1.3.0] added "tools" section via custom-defined TidIDETools tiddler content
2006.04.22 [1.2.2] corrected 'wrap' and 'white-space' CSS for system viewer textarea control so that IE preserves newlines.
2006.04.22 [1.2.1] added checkbox indicators in options droplist. Allows easy preview of boolean state value for chk* options.
2006.04.22 [1.2.0] added options droplist to "system" display and supporting setsys() function to update internal config.options.* values
layout adjustments: consolidate some buttons, general tweaks for spacing, sizes, etc.
2006.04.21 [1.1.1] migrated remaining functionality from ToolkitPlugin (now obsolete).
2006.04.21 [1.1.0] added "system" display and supporting functions
2006.04.21 [1.0.1] added formatHTML() for better HTML display in preview
2006.04.20 [1.0.0] 4:20:00pm official release... renamed from ~TiddlerEditorPlugin to TidIDEPlugin. (pronounced "Tie Dyed"... dude!)
2006.04.20 [0.9.9] added "run" button to dynamically load systemConfig plugins (with warning/confirmation)
2006.04.20 [0.9.8] layout adjustments for narrow displays
2006.04.20 [0.9.7] added HTML viewer to preview display
2006.04.20 [0.9.6] added DOM viewer to preview display
2006.04.19 [0.9.5] improved save() handler so saving 'unnamed' edit does fallback to 'save as' prompt for tiddler name
2006.04.19 [0.9.4] added 'preview status' display field and refresh button. Currently shows preview rendering time and autofreeze notice, if any.
2006.04.19 [0.9.3] correct IE object error by explicitly using "window." scope when referencing addKeyDownHandlers() function definition
2006.04.18 [0.9.2] if TextAreaPlugin is installed, call addKeyDownHandlers() for extended ctrl-F/G and TAB keystrokes in textarea
2006.04.18 [0.9.1] "save as" now presents an "overwriteWarning" message box instead of always rejecting existing tiddler titles
2006.04.18 [0.9.0] added "save as". Use TW standard text for new tiddler title and default text
2006.04.18 [0.8.5] added "display:inline" to input elements to prevent unwanted line breaks between controls when macro is used in EditTemplate definitions
2006.04.18 [0.8.4] added cookie for 'auto-freeze' time limit. Also, added more documentation.
2006.04.17 [0.8.3] added timing wrapper around preview wikify(). Automatically freeze preview display if tiddler rendering exceeds time limit
2006.04.17 [0.8.2] more code cleanup for better 'dirty' flag handling
2006.04.17 [0.8.1] show/hide freeze checkbox when toggling preview display. Also, code cleanup for better 'multiple instance' definition
2006.04.17 [0.8.0] added "freeze" checkbox to toggle 'live update' of preview display. Also, layout/CSS adjustments for better appearance in IE
2006.04.16 [0.7.1] correct month number offset (was 0-11 instead of 1-12)
2006.04.16 [0.7.0] added support for 'dirty' flag, read-only mode and improved alert/confirm/prompt handling
2006.04.16 [0.6.0] created "add/remove" functions. Added handling to trigger autoSave() if option is set.
2006.04.15 [0.5.1] move 'save' logic to separate function, and added handling to create a 'real' tiddler when saving a shadow
2006.04.15 [0.5.0] Initial ALPHA release. Converted from inline script.
<<<
''Moveable Console Panel''
(Borken)
+++^30em^[Launch Shell]<<moveablePanel>>DefautShell
----
<<WASH>>
===
/***
|Name|WashPlugin|
|Created by|ScottElcomb|
|Location|http://projects.psema4.com/wash-se/tw_plus_wash-se.html|
|Version|1.0.2|
|Requires|~TW2.x|
!Description
Adds a Web Application SHell (Simplified Edition) to TiddlyWiki.
!History
* September 16 2008, version 1.0.2:
** Added TidIDE, InlineJavascript, NestedSliders, and RelatedTiddlers Plugins
** Renamed plugin from PluginWASH
** Changed SiteTitle & SiteSubtitle
** Added some "folder" tiddlers (for use with RelatedTiddlersPlugin)
** Added an initial tree command for WASH.
* September 14 2008, version 1.0.1:
** Added the <<WASH>> macro
** Added code to target a tiddler as the container for the WASH panel
** Adjusted CSS position and sizing for embedding into tiddlers
** Added [[jsin/insmod|http://psema4.com/blog/blog1.php/2008/09/13/wash-se-jsin-insmod]] support
** Hacked in some support for tiddlers:
*** Command execution. Tiddler must be tagged 'code'
*** ls lists tiddlers available in window.store. (Shadow tiddlers not included)
*** cat prints the contents of a tiddler available from window.store
* September 7 2008, version 1.0.0:
** Initial version
!Notes
* This plugin provides a basic runtime command line interface to a TiddlyWiki.
* Add the console to any tiddler with the <<WASH>> macro but please note that WASH-SE does not fully support multiple consoles.
!Code
***/
//{{{
window.WASH = function(optsObj) {
this.opts = (optsObj) ? optsObj : {};
this.init = function(optsObj) {
var opts = (optsObj) ? optsObj : {};
var top = (opts.top) ? opts.top : 0;
var left = (opts.left) ? opts.left : 0;
var width = (opts.width) ? opts.width : "98%";
var height = (opts.height) ? opts.height : 400;
// Modified for TiddlyWiki plugin 1.0.1
var panelTarget = (opts.target) ? opts.target : document.getElementsByTagName('body')[0];
if (! panelTarget.tagName) {
if (story && story.getTiddler(opts.target)) {
panelTarget = story.getTiddler(opts.target);
} else {
panelTarget = document.getElementsByTagName('body')[0];
}
}
// END: New for plugin 1.0.1
this.panel = document.createElement('div');
this.stdout = document.createElement('textarea');
this.stdin = document.createElement('input');
this.panel.id = 'PANEL';
this.panel.style.position = 'relative'; // Modified for plugin 1.0.1
this.panel.style.top = top + 'px';
this.panel.style.left = left + 'px';
if (width.match(/%/)) {
this.panel.style.width = width;
} else {
this.panel.style.width = width + 'px';
}
this.panel.style.height = height + 'px';
this.panel.style.padding = '4px';
this.panel.style.backgroundColor = '#ddd';
this.panel.style.border = '2px outset #ddd';
if (opts && opts.show) {
this.panel.style.visibility = 'visible';
} else {
this.panel.style.visibility = 'hidden';
}
this.stdout.id = 'STDOUT';
this.stdout.style.width = '100%';
this.stdout.style.height = (height - 40) + 'px';
this.stdout.style.backgroundColor = '#ddd';
this.stdin.id = 'STDIN';
this.stdin.type = 'text';
this.stdin.style.width = '100%';
this.panel.appendChild(this.stdout);
this.panel.appendChild(this.stdin);
if (panelTarget) { panelTarget.appendChild(this.panel); }
this.panel.component = this;
this.stdin.onkeypress = this.panel.component.keyHandler;
this.print("Welcome to WASH SE, the Web Application SHell - Simplified Edition\n");
this.print("(C)2004,2008 psema4Technologies\n");
this.print("Licensed under the LGPL v2.1\n\n");
this.print("Type ? for help.\n\n");
if (opts && opts.show) { this.stdin.focus(); }
}
this.show = function() {
this.panel.style.visibility = 'visible';
this.stdin.focus();
}
this.hide = function() {
this.panel.style.visibility = 'hidden';
}
this.print = function(buf) {
this.stdout.value += buf;
this.stdout.scrollTop = this.stdout.scrollHeight;
}
this.keyHandler = function(evt) {
// NOTE: In this routine the keyword 'this' points to the element that received the event -
// not the WASH object.
var e = (evt) ? evt : window.event;
if (e.keyCode && e.keyCode === 13) {
var Console = this.parentNode.component;
if (Console) {
Console.exec(Console.stdin.value);
Console.stdin.value = '';
Console.print("\n");
} else {
alert('WASH.keyHandler(): NO CONSOLE!');
}
}
}
this.exec = function(cmdline) {
var argv = cmdline.split(/\s+/);
var cmd = (argv[0]) ? argv[0] : 'NOP';
var args = '';
for (var i=1; i<argv.length; i++) { args += argv[i] + ' '; }
args = args.replace(/\s+$/, '');
if (cmd.toLowerCase() === 'nop') { return; }
this.print(cmdline + "\n");
switch(cmd.toLowerCase()) {
case 'cat':
var microFile = document.getElementById(argv[1]);
if (microFile
&& (microFile.className === 'code'
|| microFile.className === 'data')
&& microFile.childNodes[0].nodeType === 3
) {
var code = microFile.childNodes[0].data + ''
code = code.replace(/</g, '<'); // fix html entities
this.print(code + "\n");
} else { // check for tiddlers...
if (store && store.getTiddler(argv[1])) {
this.print(store.getTiddlerText(argv[1]));
}
}
break;
case 'clear':
this.stdout.value = '';
break;
case 'echo':
this.print(args + "\n");
break;
case 'eval':
var retval = eval(args+'');
if (retval !== undefined) { this.print(retval + "\n"); }
break;
case 'go':
window.Console.print("Going to '" + argv[1] + "'\n");
window.location = argv[1];
break;
case '?':
case 'help':
this.print("WASH Builtins\n\n");
this.print(" [filename] .................. Read and execute (if possible) a microfile\n");
this.print(" cat [filename] .............. Dumps the contents of a microfile\n");
this.print(" clear ....................... Clears the console output\n");
this.print(" echo [text] ................. Echoes [text] to the console output\n");
this.print(" eval [expression] ........... Evaluates a JavaScript [expression]\n");
this.print(" go [url] .................... Go to a new URL. Warning: Replaces this web page!\n");
this.print(" help, ? ..................... Displays the WASH Builtins help screen\n");
this.print(" jsin [file], insmod [file] .. Imports a Javascript [file]\n");
this.print(" ls .......................... Lists microfiles in this HTML document\n");
this.print(" reboot ...................... Reload the current URL. Warning for 'go' applies here too.\n");
break;
case 'jsin':
case 'insmod':
Console.print("loading js script.. " + argv[1] + "\n");
var d=document;
var s=d.createElement('script');
try {
s.type='application/javascript';
s.src= argv[1];
d.getElementsByTagName('head')[0].appendChild(s);
} catch(e) {
Console.print("Error in loading..\n");
}
Console.print("loaded..");
break;
case 'ls':
var files = new Array();
var els = document.getElementsByTagName('div');
this.print("Listing microfiles:\n\n");
for (var i=0; i < els.length; i++) {
if (els[i].className === 'code' || els[i].className === 'data') { files.push(els[i]); }
}
for (var i=0; i < files.length; i++) {
Console.print(" " + files[i].id + "\n");
}
if (store) {
this.print("\nListing tiddlers:\n\n");
store.forEachTiddler(function(t,tiddler) {
Console.print(" " + t + "\n");
});
}
break;
case 'reboot':
window.location = window.location + '';
break;
default:
var microFile = document.getElementById(cmd);
var code = null;
if (microFile) {
if (microFile.className === 'code' && microFile.childNodes[0].nodeType === 3) {
code = microFile.childNodes[0].data + ''
code = code.replace(/</g, '<'); // fix html entities
} else {
this.print("Command not executable.\n");
}
// Check for tiddlers tagged 'code'
} else if (store && store.getTiddler(cmd)) {
var t = store.getTiddler(cmd);
for (var i=0; i<t.tags.length; i++) {
if (t.tags[i].toLowerCase() === 'code') {
code = store.getTiddlerText(cmd);
}
}
if (! code) { this.print("Tiddler not executable.\n"); }
} else {
this.print("Command not found.\n");
}
if (code) {
var retval = eval(code);
if (retval !== undefined) { this.print(retval + "\n"); }
}
}
}
this.init(this.opts);
}
config.macros.WASH = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{
window.Console = new WASH({show:true, target: tiddler.title});
}
};
//}}}
{{centeredTable{
|>|>| !Contents of /bin |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[bin]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[TidIDE]]| Code | <<tiddler NextTiddler with: TidIDE "Open">> |
| [[TidIDE2]]| Code | <<tiddler NextTiddler with: TidIDE2 "Open">> |
| [[WASH-SE]]| Code | <<tiddler NextTiddler with: WASH-SE "Open">> |
| [[WASH-SE2]]| Code | <<tiddler NextTiddler with: WASH-SE2 "Open">> |
| [[describeObject]]| Code | <<tiddler NextTiddler with: describeObject "Open">> |
| [[edit]]| Code | <<tiddler NextTiddler with: edit "Open">> |
| [[movable]]| Code | <<tiddler NextTiddler with: moveable "Open">> |
| [[open]]| Code | <<tiddler NextTiddler with: open "Open">> |
| [[tree]]| Code | <<tiddler NextTiddler with: tree "Open">> |
|fsTableStyle|k
}}}
{{{
var o=null;
var p=null;
if (argv[1]==='-v' && argv[2]) {
// process verbose...
Console.print("Describing '" + argv[2] + "':\n\n");
o = eval(argv[2]);
for (p in o) { Console.print(' '+p+': ' + o[p] + "\n"); }
} else if (argv[1]) {
// or just dump the property and method names...
Console.print("Describing '" + argv[1] + "':\n\n");
o = eval(argv[1]);
for (p in o) { Console.print(' '+p+"\n"); }
} else {
Console.print("Error.\n");
}
}}}
{{{
if (argv[1]) {
var title = argv[1];
try {
story.displayTiddler(null, argv[1], DEFAULT_EDIT_TEMPLATE);
} catch (e) {
Console.print(e.message + "\n");
}
}
}}}
{{centeredTable{
|>|>| !Contents of /etc |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[etc]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[ColorPalette]]| Data | <<tiddler NextTiddler with: DefaultTiddlers "Open">> |
| [[DefaultTiddlers]]| Data | <<tiddler NextTiddler with: DefaultTiddlers "Open">> |
| [[GettingStarted]]| Data | <<tiddler NextTiddler with: GettingStarted "Open">> |
| [[Issues]]| Data | <<tiddler NextTiddler with: [[Issues]] "Open">> |
| [[MainMenu]]| Data | <<tiddler NextTiddler with: MainMenu "Open">> |
| [[SiteSubtitle]]| Data | <<tiddler NextTiddler with: SiteSubtitle "Open">> |
| [[SiteTitle]]| Data | <<tiddler NextTiddler with: SiteTitle "Open">> |
| [[SiteUrl]]| Data | <<tiddler NextTiddler with: SiteURL "Open">> |
| [[StyleSheet]]| Data | <<tiddler NextTiddler with: StyleSheet "Open">> |
| [[StyleSheetColors]]| Data | <<tiddler NextTiddler with: StyleSheetColors "Open">> |
| [[StyleSheetLayout]]| Data | <<tiddler NextTiddler with: StyleSheetLayout "Open">> |
| [[StyleSheetLocale]]| Data | <<tiddler NextTiddler with: StyleSheetLocale "Open">> |
| [[StyleSheetPrint]]| Data | <<tiddler NextTiddler with: StyleSheetPrint "Open">> |
|fsTableStyle|k
}}}
{{centeredTable{
|>|>| !Contents of /var/lib |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[lib]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[EmbedTiddlers]]| Script | <<tiddler NextTiddler with: EmbedTiddlers "Open">> |
| [[InlineJavascriptPlugin]]| Plugin | <<tiddler NextTiddler with: InlineJavascriptPlugin "Open">> |
| [[Jash.css]]| Plugin | <<tiddler NextTiddler with: InlineJavascriptPlugin "Open">> |
| [[Jash.js]]| Plugin | <<tiddler NextTiddler with: InlineJavascriptPlugin "Open">> |
| [[MoveablePanelPlugin]]| Plugin | <<tiddler NextTiddler with: MoveablePanelPlugin "Open">> |
| [[NestedSlidersPlugin]]| Plugin | <<tiddler NextTiddler with: NestedSlidersPlugin "Open">> |
| [[NextTiddler]]| Script | <<tiddler NextTiddler with: NextTiddler "Open">> |
| [[RelatedTiddlersPlugin]]| Plugin | <<tiddler NextTiddler with: RelatedTiddlersPlugin "Open">> |
| [[SplashScreenPlugin]]| Plugin | <<tiddler NextTiddler with: SplashScreenPlugin "Open">> |
| [[StyleSheetShortcuts]]| Plugin | <<tiddler NextTiddler with: StyleSheetShortcuts "Open">> |
| [[TidIDEPlugin]]| Plugin | <<tiddler NextTiddler with: TidIDEPlugin "Open">> |
| [[TidIDEPluginInfo]]| Plugin | <<tiddler NextTiddler with: TidIDEPluginInfo "Open">> |
| [[WashPlugin]]| Plugin | <<tiddler NextTiddler with: WashPlugin "Open">> |
|fsTableStyle|k
}}}
{{centeredTable{
|>|>| !Contents of /usr/local |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[local]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[EmbedTest]]| Code | <<tiddler NextTiddler with: EmbedTest "Open">> |
| [[ImgLinkTest]]| Code | <<tiddler NextTiddler with: ImgLinkTest "Open">> |
| [[JashCommand]]| Code | <<tiddler NextTiddler with: JashCommand "Open">> |
| [[NextTiddlerTest]]| Code | <<tiddler NextTiddler with: NextTiddlerTest "Open">> |
| [[NextTiddlerTest2]]| Code | <<tiddler NextTiddler with: NextTiddlerTest2 "Open">> |
| [[NextTiddlerTest3]]| Code | <<tiddler NextTiddler with: NextTiddlerTest3 "Open">> |
| [[TabsTest]]| Code | <<tiddler NextTiddler with: TabsTest "Open">> |
|fsTableStyle|k
}}}
+++^30em^[panel]<<moveablePanel>>this is a headline for the panel
----
this is a moveable floating panel
with a few lines of text
as an example for you to try...
//note: this line is really long so you can see what happens to word wrapping when you re-size this panel//
===
{{{
if (argv[1]) {
var title = argv[1];
try {
story.displayTiddler(null, argv[1], DEFAULT_VIEW_TEMPLATE);
} catch (e) {
Console.print(e.message + "\n");
}
}
}}}
//{{{
if (! argv[1]) { argv[1] = '/'; }
var start=argv[1];
var pathParts = start.split(/\//);
// Console.print("Found " + pathParts.length + " pathParts!\n");
//if (pathParts[pathParts.length-1] == '') {
// start = '/';
//} else {
// start = pathParts[pathParts.length-1];
//}
var exclude=config.options.txtRelatedTiddlersExclude.readBracketedList();
var callback=null;
var list=config.macros.relatedTiddlers.getList(start,exclude,callback);
var tree=config.macros.relatedTiddlers.getTree(start,exclude,callback);
Console.print("There are "+list.length+" tiddlers related to [["+start+"]]...\n"+tree);
//}}}
<script show>
var start="About";
var exclude=config.options.txtRelatedTiddlersExclude.readBracketedList();
var callback=null;
var list=config.macros.relatedTiddlers.getList(start,exclude,callback);
var tree=config.macros.relatedTiddlers.getTree(start,exclude,callback);
return "There are "+list.length+" tiddlers related to [["+start+"]]...\n"+tree;
</script>
{{centeredTable{
|>|>| !Contents of /usr |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[usr]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[local]]| Folder | <<tiddler NextTiddler with: local "Browse">> |
|fsTableStyle|k
}}}
{{centeredTable{
|>|>| !Contents of /var |h
| .|width:10%; Folder |width:10%; <<tiddler NextTiddler with: [[var]] "Browse">> |
| ..| Folder | <<tiddler NextTiddler with: [[/]] "Browse">> |
| [[lib]]| Folder | <<tiddler NextTiddler with: lib "Browse">> |
|fsTableStyle|k
}}}