Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
<<importTiddlers>>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<!--{{{-->
<div class='header' role='banner' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea' role='main'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/*{{{*/
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]];}

.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]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#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 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}

.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:0 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 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding: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 0;}
.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 0 0 0.5em;}
.tab {margin:0 0 0 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 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.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:0 0.25em; padding:0 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:0 3px 0 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 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.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;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding: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;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->









<<mgtdList startTag:Project title:'Projects with no area' tags:'!Complete' view:Project mode:global
	group:ProjectStatus
	gView:bold
	where:tiddler.hasNoParent('Area')
	>>
<<mgtdList startTag:Action title:'You should give these actions a context' tags:'!Done' view:DoneAction mode:global
	where:tiddler.hasNoParent('Context')
	>>
<<mgtdList startTag:Action title:'Actions with no project' tags:'!Done' view:DoneAction mode:global
	where:tiddler.hasNoParent('Project')
	>>

<<version>>
{{cols2{

{{col{

}}}

{{col{

}}}

}}}















This is a modified template of [[mGSD|http://mgsd.tiddlyspot.com]] hosted in [[Tiddlyspot|http://tiddlyspot.com]].

mGSD is a wiki for the [["Getting Things Done" (GTD)|https://gettingthingsdone.com]] system, based on [[MPTW|http://mptw.tiddlyspot.com/]], and built on [[Classic TiddlyWiki|http://classic.tiddlywiki.com/]] version <<version>>.

Though there are not many changes to the original mGSD theme, this one includes additional "plugins", and the menus on the side bar have changed somewhat to add functionality.

The purpose of this document is not to use it directly as a template, but to provide an example of modifications made to enhance functionality of mGSD.

''IMPORTANT:'' This wiki is based on TiddlyWiki Classic, for which development has stopped. See [[TiddlyWiki|http://www.tiddlywiki.com]] for the new TiddlyWiki application.

This document may be seen in any browser. However, if you want to edit this TiddlyWiki Classic document for your own use, you have two options:
* Windows, Linux, or Mac: [[TiddlyDesktop|https://github.com/Jermolene/TiddlyDesktop]] (some plugins might not work though)
* An old version of Firefox
** Windows: [[Firefox V3.6.11|https://mozilla-firefox-portable.en.uptodown.com/windows/old]]
** Linux: [[Firefox V3.6.15|https://firefox.en.uptodown.com/ubuntu/old]]
** Mac: [[Firefox V3.6.15|https://firefox.en.uptodown.com/mac/old]]
Enter projects and actions here. Click 'create these items' to create them.
Example usage:
{{{
Paint House
.Buy ladder and brushes|Errand
.Choose colours|Home|W
}}}
By default actions are next actions. 
Specify W or F to make them future or Waiting For. You can create multiple projects and project-less actions.

You can also specify area for projects. Order dosn't matter, as there can only be one uniquely named tiddler. The following is valid:
{{{
Paint House|Home Maintenance|Personal
.Buy ladder and brushes|Errand
.Choose colours|W|Home
}}}
To specify multiple projects and tasks, along with project-less actions, the below is an example of one way create two projects with tasks, and then a stand alone action.
{{{
Clean up yard|Personal|Home Maintenance
.Pick up sticks|Weekend
.Bag all the sticks|Weekend
Check out latest SAN offerings|Research|Work
.Read up on all major vendors offerings|Reading
.Call Doug for opinion|Call
.Check budget|Work|F

.Call Tara about tickets
}}}
If you want to add an action to an already existing project, you can specify the project name to do so:
{{{
.Pick up lumber at Home Depot|Build toolshed|Errand
}}}

{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList
	title:'Next Actions'
	startTag:Action tags:'Next && !Done'
	view:ActionProj
	mode:global
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
>>

<<mgtdList
	title:'Waiting Actions'
	startTag:Action
	tags:'[(Waiting For)] && !Done'
	view:ActionProj
	mode:global
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
>>

}}}

{{col{

<<mgtdList
	title:'Future Actions'
	startTag:Action
	tags:'Future && !Done'
	view:ActionProj
	mode:global
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Future'
>>

{{scroll10{

<<mgtdList
	title:'Done Actions'
	startTag:Action
	tags:'Done'
	view:DoneAction
	mode:global
	newButtonTags:'Action Next Done'
	sort:-modified
>>

}}}

}}}

}}}
{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:Action mode:global
	group:Contact
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
	>>

<<mgtdList title:'Waiting Actions' startTag:Action tags:'[(Waiting For)] && !Done' view:Action mode:global
	group:Contact
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
	>>

}}}

{{col{

<<mgtdList title:'Future Actions' startTag:Action tags:'Future && !Done' view:Action mode:global
	group:Contact
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Future'
	>>


{{scroll10{

<<mgtdList title:'Done Actions' startTag:Action tags:'Done' view:DoneAction mode:global
	group:Contact
	gView:bold
	sort:-modified
	newButtonTags:'Action Next Done'
	where:tiddler.hasActiveProject()
	>>

}}}

}}}

}}}
{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
	>>

<<mgtdList title:'Waiting Actions' startTag:Action tags:'[(Waiting For)] && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
	>>

}}}

{{col{

<<mgtdList title:'Future Actions' startTag:Action tags:'Future && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Future'
	>>

{{scroll10{

<<mgtdList title:'Done Actions' startTag:Action tags:'Done' view:DoneAction mode:global
	newButtonTags:'Action Next Done'
	sort:-modified
>>

}}}

}}}

}}}
{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
	>>

<<mgtdList title:'Waiting Actions' startTag:Action tags:'[(Waiting For)] && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
	>>

}}}

{{col{

<<mgtdList title:'Future Actions' startTag:Action tags:'Future && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Future'
	>>


{{scroll10{

<<mgtdList title:'Done Actions' startTag:Action tags:'Done' view:DoneAction mode:global
	group:Project
	gView:bold
	sort:-modified
	newButtonTags:'Action Next Done'
	where:tiddler.hasActiveProject()
	>>

}}}

}}}

}}}
order:1
button:a
buttonLong:active
{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
	>>

}}}

{{col{

<<mgtdList title:'Waiting Actions' startTag:Action tags:'[(Waiting For)] && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
	>>

{{scroll10{

}}}

}}}

}}}
(shows active projects without a next action, sub-project or upcoming tickler)

<<mgtdList startTag:Project title:'You must assign a next action to these projects (or make them into Someday/Maybe)'
	tags:'!Complete && !Someday/Maybe' view:Project mode:global
	where:!tiddler.hasNextActionOrSubProjectOrTickler()
	>>
/***
|Name|AdvancedOptionsPlugin|
|Source|http://www.TiddlyTools.com/#AdvancedOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#AdvancedOptionsPlugin|
|Version|1.2.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.3|
|Type|plugin|
|Description|automatically add plugin-defined options to the [[AdvancedOptions]] shadow tiddler|
!!!!!Usage
<<<
At document startup, this plugin examines each tiddler tagged with <<tag systemConfig>> and looks for a tiddler slice named "Options" whose value refers to a tiddler section (or separate tiddler) that contains an 'advanced options control panel' for configuring that plugin's features and behavior.  For each plugin that contains an "Options" slice, a tabbed entry is automatically created in the [[AdvancedOptions]] shadow tiddler to display that plugin's control panel.

As an optional fallback for backward-compatibility with plugin tiddlers that do not define the "Options" slice, this plugin will also look for a section heading named "Configuration" within those tiddlers, so that older plugins that define this section can automatically have their settings added to the [[AdvancedOptions]] tiddler without requiring the "Options" slice to be added.

This plugin also extends the standard {{{<<option>>}}} macro syntax so you can directly set the internal value of a boolean or text option, without displaying a corresponding checkbox or input field control simply by appending {{{=value}}} syntax to the end of the option ID parameter:
{{{
<<option "txtSomeOption=some text">>
<<option chkSomeOtherOption=true>> OR <<option chkSomeOtherOption=false>>
}}}
Example: {{{<<option chkAnimate=false>>}}}
<<<
!!!!!Configuration
<<<
<<option chkAdvancedOptions>> automatically add plugin-defined options to the [[AdvancedOptions]] shadow tiddler
<<option chkAdvancedOptionsBackstage>> automatically add plugin-defined options to Backstage menu
<<option chkAdvancedOptionsFallback>> use <<option txtAdvancedOptionsFallback>> section as a fallback for plugins that don't define an ~AdvancedOptions slice
//note: these settings only take effect after reloading the document//
<<<
!!!!!Revisions
<<<
2009.07.23 [1.2.0] added support for enhanced {{{<<option id=value>>}}} 'direct assignment' syntax
2008.05.09 [1.1.0] add "options" panel to backstage
2008.04.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.AdvancedOptionsPlugin= {major: 1, minor: 2, revision: 0, date: new Date(2009,7,23)};

if (config.options.chkAdvancedOptions===undefined)
	config.options.chkAdvancedOptions=true;
if (config.options.chkAdvancedOptionsBackstage===undefined)
	config.options.chkAdvancedOptionsBackstage=true;
if (config.options.chkAdvancedOptionsFallback===undefined)
	config.options.chkAdvancedOptionsFallback=true;
if (config.options.txtAdvancedOptionsFallback===undefined)
	config.options.txtAdvancedOptionsFallback="Configuration";
if (config.optionsDesc) config.optionsDesc.chkAdvancedOptions=
	"automatically add plugin-defined options to [[AdvancedOptions]]";
//}}}
//{{{
var items=[];
var fmt="[[%0 ]] [[view options for %0]] [[%1]]\n";
var section=config.options.txtAdvancedOptionsFallback;
var plugins=store.getTaggedTiddlers("systemConfig");
for (var p=0; p<plugins.length; p++) {
	var tid=plugins[p].title;
	var settings=store.getTiddlerSlice(tid,"Options");
	if (!settings && config.options.chkAdvancedOptionsFallback && store.getTiddlerText(tid+"##"+section))
		settings="##"+section; // fallback handling for older plugins
	if (settings&&settings.length) {
		if (settings.substr(0,2)=="##") settings=tid+settings;
		items.push(fmt.format([tid,settings]));
	}
}
if (items.length) config.shadowTiddlers.PluginOptions=
	"!![[Plugin-defined options|PluginManager]]\n>@@text-align:left;<<tabs '' \n"+items.join(' ')+">>@@";
if (config.options.chkAdvancedOptions)
	config.shadowTiddlers.AdvancedOptions+="{{smallform{{{wrap{<<tiddler PluginOptions>>}}}}}}";
//}}}
//{{{
// // add "options" backstage task
if (config.tasks && config.options.chkAdvancedOptionsBackstage) { // for TW2.2b3 or above
	config.tasks.options = {
		text: "options",
		tooltip: "manage plugin-defined option settings",
		content: "{{smallform{{{groupbox{{{wrap{<<tiddler PluginOptions>>}}}}}}\n{{groupbox small {<<options>>}}}}}}"
	}
	config.backstageTasks.splice(config.backstageTasks.indexOf("plugins")+1,0,"options");
}
//}}}
//{{{
config.macros.option.AOPsave_handler=config.macros.option.handler;
config.macros.option.handler=function(place,macroName,params,wikifier,paramString,tiddler) {
	var parts=params[0].split('=');
	if (parts.length==1) return this.AOPsave_handler.apply(this,arguments);
	var id=parts[0]; var val=(id.substr(0,3)=='txt')?parts[1]:(parts[1]=='true');
	config.options[id]=val;
}
//}}}

> Schedule




Change every 3 months
Every month!
Smoke detectors should be of two types, photoelectric (light sensor) and ionization (smoke particles detector).
!!Actions
Done actions older than 14 days.  <<deleteAllTagged 'Delete old actions' 'Action' '' 'Done' 'tiddler.olderThanDays(14)'>>
<<mgtdList title:'Done actions older than 14 days'
	view:DoneAction
	mode:global
	sort:-modified
	startTag:Action
	tags:'Done'
	where:'tiddler.olderThanDays(14)'
	>>
!!Ticklers
Inactive ticklers older than 14 days.  <<deleteAllTagged 'Delete old ticklers' 'Tickler' '' 'Actioned' 'tiddler.olderThanDays(14)'>>
<<mgtdList title:'Inactive ticklers older than 14 days'
	startTag:Tickler
	tags:'Actioned'
	view:Tickler
	mode:global
	sort:-tickleDate
	where:'tiddler.olderThanDays(14)'
	>>
!!Projects
Completed projects older than 14 days. (Delete individually).
<<mgtdList title:'Completed projects older than 14 days'
	mode:global
	sort:-modified
	startTag:Project
	tags:'Complete'
	view:ProjectComplete
	where:'tiddler.olderThanDays(14)'
	>>
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{

  handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,

  handler: function(event,src,title) {
    this.handler_mptw_orig_closeUnsaved(event,src,title);
    if (!story.isDirty(title) && !store.tiddlerExists(title) && !store.isShadowTiddler(title))
      story.closeTiddler(title,true);
    return false;
  }

});

//}}}
!Collect Items
* ...

Name: MptwBlue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

<<saveChanges>>
<<search>>
<<closeAll>>

<<mgtdList
	title:'Complete'
	mode:global
	startTag:Project
	tags:'Complete'
	view:ProjectComplete
	group:day
	gView:bold
	gSort:-title
	newButtonTags:'Project Complete'
	sort:-modified
	>>
<<mgtdList
	title:'Completed by Name'
	mode:global
	startTag:Project
	tags:'Complete'
	view:ProjectComplete
	newButtonTags:'Project Complete'
	>>
<<tiddler 'MgtdSettings'>>
!!Theme
(Currently <<eval {{config.options.txtTheme}}>>)
<<selectTheme>>

{{tiny{
<slider Advanced>
[[modify menu|ConfigMenu]]
[[GTDComponent]]
</slider>
}}}


131002: Sent message to Ed, Paul, and Kerry.
Best time is around 6 PM weekdays

Have not seen him since ages
150123: called on her birthday.
151117: Called her on my birthday

order:2
button:none
buttonLong:daily
<div macro="showWhenTagged 'Project'">[[TagDashboards##Project]]</div>
<div macro="showWhenTagged 'Context'">[[TagDashboards##Context]]</div>
<div macro="showWhenTagged 'Contact'">[[TagDashboards##Contact]]</div>
<div macro="showWhenTagged 'Area'">[[TagDashboards##Area]]</div>
<div macro="showWhenTagged 'Reference'">[[TagDashboards##Reference]]</div>
<div macro="showWhenTagged 'Ticklers Requiring Action'">[[TagDashboards##Ticklers Requiring Action]]</div>
<div macro="showWhenTagged 'Upcoming Ticklers '">[[TagDashboards##Upcoming Ticklers ]]</div>
/***
|''Name:''|DatePickerLibrary|
|''Description:''|DatePicker library for use with macros|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Code Repository:''|http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/libraries/DatePicker.js|
|''Version:''|0.9|
|''Date:''|06/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.3.0|
***/

// /%
//!BEGIN-PLUGIN-CODE
//{{{
function $id(n) {
	return document.getElementById(n);
}

DatePicker = {

	days    : ['S','M','T','W','T','F','S'],
	daysMon : ['M','T','W','T','F','S','S'],

	cells : new Array(42),

	setup : function(){
		var cte = createTiddlyElement;
		var table = this.table = cte(null,"table","datePickerTable");
		table.style.display = 'none';
        document.body.appendChild(table);
		var thead = cte(table,"thead");
		var hRow = cte(thead,"tr");
		hRow.onclick = stopEvent;
		cte(hRow,"td",null,"datePickerNav","<<").onclick = DatePicker.prevm;
		cte(hRow,"td","datePickerMNS",null,null,{colSpan:"5"});
		cte(hRow,"td",null,"datePickerNav",">>",{align:"right"}).onclick=DatePicker.nextm;

		var tbody = cte(table,"tbody","datePickerTableBody");
		var dayRow = cte(tbody,"tr",null,"datePickerDaysHeader");

		for (var i=0; i<this.days.length; i++){
			cte(dayRow,"td",null,null,this.days[i]);
		}
	},

	show : function(el,dateObj,cb) {
		var me = DatePicker;
		var now = me.now = new Date();
		if (!dateObj)
			dateObj = now;
		me.root = el;
		if (cb)
			me.root.datePickerCallback = cb;
		me.scc = { m : now.getMonth(), y : now.getFullYear(), d : now.getDate() };

		Popup.place(el,me.table,{x:0,y:1});


		var cur = [dateObj.getDate(),dateObj.getMonth()+1,dateObj.getFullYear()];

		me.cc = { m : cur[1]-1, y : cur[2] };
		me.sd = { m : cur[1]-1, y : cur[2], d : cur[0] };
		me.fillCalendar(cur[0],me.scc.d,cur[1]-1,cur[2]);
	},

	fillCalendar : function(hd,today,cm,cy) {
		var me = DatePicker;

		var monStart = config.mGTD.getOptChk('WeekStartsMonday');

		var sd = me.now.getDate();
		var td = new Date(cy,cm,1)
		var cd = td.getDay();

		$id('datePickerMNS').innerHTML = td.formatString('MMM YYYY')

		var tbody = $id('datePickerTableBody');
		removeChildren(tbody);
		var dowRow = createTiddlyElement(tbody,"tr",null,"datePickerDowRow");

		for (var d=0;d<=7;d++) {
			// dow headings
			createTiddlyElement(dowRow,"td",null,null,DatePicker[monStart?'daysMon':'days'][d]);
		}

		var days = (new Date(cy, cm+1, 0)).getDate();
		var day = 1;
		for (var j=1;j<=6;j++) { //rows
			var row = createTiddlyElement(tbody,"tr",null,"datePickerDayRow");
			for (var t=1; t<=7; t++) { //cells
				var d = 7 * (j-1) - (-t) + (monStart ? 1 : 0); //id key
				var is_this_month = ((d >= (cd -(-1))) && (d<=cd-(-(days))));
				var dip = ( ((d-cd < sd) && (cm == me.scc.m) && (cy == me.scc.y)) || (cm < me.scc.m && cy == me.scc.y) || (cy < me.scc.y) );
				var htd = ( (hd != '') && (d-cd == hd) );
				var hToday = ( (today != '') && (d-cd == today) && cy == me.scc.y && cm == me.scc.m );
				if (htd)
					_class = 'highlightedDate';
				else if (dip)
					_class = 'oldDate';
				else if (hToday && ! htd)
					_class = 'todayDate';
				else
					_class = 'defaultDate';
				if ((monStart && (t==6||t==7)) || (!monStart && (t == 1 || t == 7))) {
					// weekend
					_class += ' weekend';
				}
				if (!is_this_month) {
					_class += ' otherMonth';
				}
				var cell = createTiddlyElement(row,"td","datePickerDay"+d,_class,(new Date(cy,cm,d-cd)).getDate());
				cell.onmouseover = function(e){addClass(this,'tdover');};
				cell.onmouseout = function(e){removeClass(this,'tdover');};
				cell.onclick = me.selectDate;
				me.cells[d] = new Date(cy,cm,d-cd);
				day++;
			}
			if(day > days + cd)
				break;
		}
	},

	nextm : function() {
		var me = DatePicker;
		me.cc.m += 1;
		if (me.cc.m >= 12) {
			me.cc.m = 0;
			me.cc.y++;
		}
		me.fillCalendar(me.getDayStatus(me.cc.m,me.cc.y),me.scc.d,me.cc.m,me.cc.y);
		return false;
	},

	prevm : function() {
		var me = DatePicker;
		me.cc.m -= 1;
		if (me.cc.m < 0) {
			me.cc.m = 11;
			me.cc.y--;
		}
		me.fillCalendar(me.getDayStatus(me.cc.m,me.cc.y),me.scc.d,me.cc.m,me.cc.y);
		return false;
	},

	getDayStatus : function(ccm,ccy){
		return (ccy == this.sd.y && ccm == this.sd.m)? this.sd.d : '';
	},

	selectDate : function(ev){
		var e = ev ? ev : window.event;
		var me = DatePicker;
		var date = me.cells[resolveTarget(e).id.substring(13,resolveTarget(e).id.length)];
		if (me.root.datePickerCallback && typeof me.root.datePickerCallback == 'function')
			me.root.datePickerCallback(me.root,date);
		$id('datePickerTable').style.display = 'none';
		return false;
	},

	onclick : function(ev){
		$id("datePickerTable").style.display = 'none';
		return false;
	},

	create : function(el,dateObj,cb){
		el.onclick = el.onfocus = function(e){DatePicker.show(el,dateObj,cb);stopEvent(e)};
	},

	css: "table#datePickerTable td.datePickerNav {\n"+
		"    cursor:pointer;\n"+
		"}\n"+
		"\n"+
		".datePickerDaysHeader td {\n"+
		"    text-align:center;\n"+
		"    background:#ABABAB;\n"+
		"    font:12px Arial;\n"+
		"}\n"+
		"\n"+
		".datePickerDayRow td {\n"+
		"    width:18px;\n"+
		"    height:18px;\n"+
		"}\n"+
		"\n"+
		"td#datePickerMNS, td.datePickerNav {\n"+
		"    font:bold 13px Arial;\n"+
		"}\n"+
		"\n"+
		"table#datePickerTable {\n"+
		"    position:absolute;\n"+
		"    border-collapse:collapse;\n"+
		"    background:#FFFFFF;\n"+
		"    border:1px solid #ABABAB;\n"+
		"    display:none;   \n"+
		"}\n"+
		"\n"+
		"table#datePickerTable td{\n"+
		"    padding: 3px;\n"+
		"}\n"+
		"\n"+
		"td#datePickerMNS {\n"+
		"    text-align: center;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td {\n"+
		"    background-color : #C4D3EA;\n"+
		"    cursor : pointer;\n"+
		"    border : 1px solid #6487AE;\n"+
		"    text-align : center;\n"+
		"	font : 10px Arial;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.defaultDate {\n"+
		"	color : #333333;	\n"+
		"	text-decoration : none;   \n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.emptyDate {\n"+
		"    cursor:default; \n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.oldDate {\n"+
		"	color : #ABABAB;\n"+
		"    text-decoration : line-through;\n"+
		"}\n"+
		"tr.datePickerDayRow td.highlightedDate {\n"+
		"    background : #FFF799;\n"+
		"	font-weight : bold;\n"+
		"	color : #333333;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.todayDate {\n"+
		"	font-weight : bold;\n"+
		"	color : red;\n"+
		"}\n"+
		"\n"+
		"table#datePickerTable tr.datePickerDayRow td.tdover {\n"+
		"    background:#fc6;\n"+
		"}",

	init : function(){
		this.setup();
		addEvent(document,'click',DatePicker.onclick);
		config.shadowTiddlers['StyleSheetDatePicker'] = this.css;
		if(store)
			store.addNotification('StyleSheetDatePicker',refreshStyles);
	}
};

DatePicker.init();
//}}}
//!END-PLUGIN-CODE
// %/
[[About]]
[[Active Actions]]
{{cols2{

{{col{

<<mgtdList
	title:'Delegated/Waiting For'
	startTag:Action
	tags:'[(Waiting For)] && !Done'
	view:ActionProj
	mode:global
	where:tiddler.getByIndex("Contact").length > 0'
	group:Contact
	gView:bold
	newButtonTags:'Action [(Waiting For)]'
	>>

}}}

{{col{

<<mgtdList title:'Done' startTag:Action tags:'Done && [(Waiting For)]' view:DoneAction mode:global
	where:tiddler.getByIndex('Contact').length>0
	group:Contact
	gView:bold
	newButtonTags:'Action Done [(Waiting For)]'
	>>

}}}

}}}
/***
|Name|DeleteAllTaggedPlugin|
|Based on|http://ido-xp.tiddlyspot.com/#DeleteAllTaggedPlugin|
|Version|MGTD Hacked|

An adaptation of DeleteDoneTasks (Simon Baird) by Ido Magal
To use this insert {{{<<deleteAllTagged>>}}} into the desired tiddler.

Modified quite a bit by Simon for MonkeyGTD
Now only works with MgtdIndexedTags...

Example usage:
{{{<<deleteAllTagged>>}}}
<<deleteAllTagged>>
***/
//{{{

config.macros.deleteAllTagged = {
	handler: function ( place,macroName,params,wikifier,paramString,tiddler ) {
		var buttonTitle = params[0] ? params[0] : "Delete tiddlers tagged '"+tiddler.title+"'"; // simon's tweak
		var tagToDelete = params[1] ? params[1] : tiddler.title;
		var alsoDeleteThisTiddler = params[2] ? params[2] : "";
		var tagExpr = params[3] ? params[3] : tagToDelete;
		var whereExpr = params[4] ? params[4] : "true";
		createTiddlyButton( place, buttonTitle, "Delete every tiddler tagged with '"+tiddler.title+"'",
			this.deleteAllTagged( tagToDelete, alsoDeleteThisTiddler == "delete", tagExpr, whereExpr ));
	},

	deleteAllTagged: function(tag,deleteMe,tagExpr,whereExpr) {
		return function() {
			var collected = fastTagged(tag).filterByTagExpr('[['+tagExpr+']]').filterByEval(whereExpr).toTitleList();
			if (collected.length == 0) {
				alert( "None found." );
			}
			else {
				if (confirm( "Found these tiddlers:\n'"
						+ collected.join( "', '" ) + "'\n\n\n"
						+ "Are you sure you want to delete these?" )) {
					store.suspendNotifications();
					for ( var i=0;i<collected.length;i++ ) {
						store.removeTiddler( collected[i] );
						story.closeTiddler( collected[i], true );
						displayMessage( "Deleted '"+collected[i]+"'" );
					}
					store.resumeNotifications();
				}
			}
			if (deleteMe) {
				if (confirm("Also delete this tiddler, '"+tag+"'?")) {
					store.removeTiddler( tag );
					story.closeTiddler( tag, true );
					displayMessage( "Deleted '"+tag+"'" );
				}
			}
		}
	}
};

//}}}

/***
|Name|DisableWikiLinksPlugin|
|Source|http://www.TiddlyTools.com/#DisableWikiLinksPlugin|
|Version|1.6.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|selectively disable TiddlyWiki's automatic ~WikiWord linking behavior|
This plugin allows you to disable TiddlyWiki's automatic ~WikiWord linking behavior, so that WikiWords embedded in tiddler content will be rendered as regular text, instead of being automatically converted to tiddler links.  To create a tiddler link when automatic linking is disabled, you must enclose the link text within {{{[[...]]}}}.
!!!!!Usage
<<<
You can block automatic WikiWord linking behavior for any specific tiddler by ''tagging it with<<tag excludeWikiWords>>'' (see configuration below) or, check a plugin option to disable automatic WikiWord links to non-existing tiddler titles, while still linking WikiWords that correspond to existing tiddlers titles or shadow tiddler titles.  You can also block specific selected WikiWords from being automatically linked by listing them in [[DisableWikiLinksList]] (see configuration below), separated by whitespace.  This tiddler is optional and, when present, causes the listed words to always be excluded, even if automatic linking of other WikiWords is being permitted.  

Note: WikiWords contained in default ''shadow'' tiddlers will be automatically linked unless you select an additional checkbox option lets you disable these automatic links as well, though this is not recommended, since it can make it more difficult to access some TiddlyWiki standard default content (such as AdvancedOptions or SideBarTabs)
<<<
!!!!!Configuration
<<<
<<option chkDisableWikiLinks>> Disable ALL automatic WikiWord tiddler links
<<option chkAllowLinksFromShadowTiddlers>> ... except for WikiWords //contained in// shadow tiddlers
<<option chkDisableNonExistingWikiLinks>> Disable automatic WikiWord links for non-existing tiddlers
Disable automatic WikiWord links for words listed in: <<option txtDisableWikiLinksList>>
Disable automatic WikiWord links for tiddlers tagged with: <<option txtDisableWikiLinksTag>>
<<<
!!!!!Revisions
<<<
2008.07.22 [1.6.0] hijack tiddler changed() method to filter disabled wiki words from internal links[] array (so they won't appear in the missing tiddlers list)
2007.06.09 [1.5.0] added configurable txtDisableWikiLinksTag (default value: "excludeWikiWords") to allows selective disabling of automatic WikiWord links for any tiddler tagged with that value.
2006.12.31 [1.4.0] in formatter, test for chkDisableNonExistingWikiLinks
2006.12.09 [1.3.0] in formatter, test for excluded wiki words specified in DisableWikiLinksList
2006.12.09 [1.2.2] fix logic in autoLinkWikiWords() (was allowing links TO shadow tiddlers, even when chkDisableWikiLinks is TRUE).  
2006.12.09 [1.2.1] revised logic for handling links in shadow content
2006.12.08 [1.2.0] added hijack of Tiddler.prototype.autoLinkWikiWords so regular (non-bracketed) WikiWords won't be added to the missing list
2006.05.24 [1.1.0] added option to NOT bypass automatic wikiword links when displaying default shadow content (default is to auto-link shadow content)
2006.02.05 [1.0.1] wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.09 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.DisableWikiLinksPlugin= {major: 1, minor: 6, revision: 0, date: new Date(2008,7,22)};

if (config.options.chkDisableNonExistingWikiLinks==undefined) config.options.chkDisableNonExistingWikiLinks= false;
if (config.options.chkDisableWikiLinks==undefined) config.options.chkDisableWikiLinks=false;
if (config.options.txtDisableWikiLinksList==undefined) config.options.txtDisableWikiLinksList="DisableWikiLinksList";
if (config.options.chkAllowLinksFromShadowTiddlers==undefined) config.options.chkAllowLinksFromShadowTiddlers=true;
if (config.options.txtDisableWikiLinksTag==undefined) config.options.txtDisableWikiLinksTag="excludeWikiWords";

// find the formatter for wikiLink and replace handler with 'pass-thru' rendering
initDisableWikiLinksFormatter();
function initDisableWikiLinksFormatter() {
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="wikiLink"; i++);
	config.formatters[i].coreHandler=config.formatters[i].handler;
	config.formatters[i].handler=function(w) {
		// supress any leading "~" (if present)
		var skip=(w.matchText.substr(0,1)==config.textPrimitives.unWikiLink)?1:0;
		var title=w.matchText.substr(skip);
		var exists=store.tiddlerExists(title);
		var inShadow=w.tiddler && store.isShadowTiddler(w.tiddler.title);
		// check for excluded Tiddler
		if (w.tiddler && w.tiddler.isTagged(config.options.txtDisableWikiLinksTag))
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// check for specific excluded wiki words
		var t=store.getTiddlerText(config.options.txtDisableWikiLinksList);
		if (t && t.length && t.indexOf(w.matchText)!=-1)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// if not disabling links from shadows (default setting)
		if (config.options.chkAllowLinksFromShadowTiddlers && inShadow)
			return this.coreHandler(w);
		// check for non-existing non-shadow tiddler
		if (config.options.chkDisableNonExistingWikiLinks && !exists)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// if not enabled, just do standard WikiWord link formatting
		if (!config.options.chkDisableWikiLinks)
			return this.coreHandler(w);
		// just return text without linking
		w.outputText(w.output,w.matchStart+skip,w.nextMatch)
	}
}

Tiddler.prototype.coreAutoLinkWikiWords = Tiddler.prototype.autoLinkWikiWords;
Tiddler.prototype.autoLinkWikiWords = function()
{
	// if all automatic links are not disabled, just return results from core function
	if (!config.options.chkDisableWikiLinks)
		return this.coreAutoLinkWikiWords.apply(this,arguments);
	return false;
}

Tiddler.prototype.disableWikiLinks_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
	this.disableWikiLinks_changed.apply(this,arguments);
	// remove excluded wiki words from links array
	var t=store.getTiddlerText(config.options.txtDisableWikiLinksList,"").readBracketedList();
	if (t.length) for (var i=0; i<t.length; i++)
		if (this.links.contains(t[i]))
			this.links.splice(this.links.indexOf(t[i]),1);
};
//}}}
[[Active Actions]]
[[Starred Items]]
[[Tickler Dashboard]]
[[Delegated Tasks Dashboard]]
[[Reference Items]]
[[Done Actions]]
[[Contacts|Contact]]

<slider Grouped by Project>
[[Action Dashboard|Action Dashboard by Project]]
[[Next Actions|Next Actions by Project]]
[[Next and Waiting Actions|Next and Waiting Actions by Project]]
</slider>

<slider Grouped by Contact>
[[Tickler Dashboard|Tickler Dashboard by Contact]]
[[Next Actions|Next Actions by Contact]]
[[Next and Waiting Actions|Next and Waiting Actions by Contact]]
[[Action Dashboard|Action Dashboard by Contact]]
</slider>

<slider Grouped by Context>
[[Next Actions|Next Actions by Context]]
[[Starred Next Actions|Starred Next Actions]]
[[Next & Waiting Actions|Next and Waiting Actions by Context]]
[[Next & Waiting (Single Col)|Next and Waiting Actions by Context Single Col]]
[[Action Dashboard|Action Dashboard by Context]]
</slider>

<slider+ Contexts>
<<mgtdList startTag:Action tags:'Next && !Done' groupCountOnly:yes group:Context gView:plain where:tiddler.hasActiveProject()>>
</slider>

<slider All contexts>
<<mgtdList startTag:Context>>
</slider>

<slider Ungrouped>
[[Next Actions]]
[[Next and Waiting Actions]]
[[Action Dashboard]]
</slider>

{{tiny{
<slider Advanced>
[[Markup Cheatsheet]]
[[Mankoff Dash]]
[[modify menu|DoWorkMenu]]
[[GTDComponent]]
</slider>

}}}
<<mgtdList
	title:'Done'
	mode:global
	startTag:Action
	tags:'Done'
	view:DoneAction
	group:day
	gView:DoneAction
	gSort:-title
	newButtonTags:'Action Next Done'
	sort:-modified
	>>



/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{

window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
  window.onClickTag_mptw_orig.apply(this,arguments);
  var tag = this.getAttribute("tag");
  var title = this.getAttribute("tiddler");
  // Thanks Saq, you're a genius :)
  var popup = Popup.stack[Popup.stack.length-1].popup;
  createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
  wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
  return false;
}

//}}}

/***
|Name|FontSizePlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FontSizePlugin|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Resize tiddler text on the fly. The text size is remembered between sessions by use of a cookie.
You can customize the maximum and minimum allowed sizes.
(only affects tiddler content text, not any other text)

Also, you can load a TW file with a font-size specified in the url.
Eg: http://tw.lewcid.org/#font:110

!Demo:
Try using the font-size buttons in the sidebar, or in the MainMenu above.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Then put {{{<<fontSize "font-size:">>}}} in your SideBarOptions tiddler, or anywhere else that you might like.

!Usage
{{{<<fontSize>>}}} results in <<fontSize>>
{{{<<fontSize font-size: >>}}} results in <<fontSize font-size:>>

!Customizing:
The buttons and prefix text are wrapped in a span with class fontResizer, for easy css styling.
To change the default font-size, and the maximum and minimum font-size allowed, edit the config.fontSize.settings section of the code below.

!Notes:
This plugin assumes that the initial font-size is 100% and then increases or decreases the size by 10%. This stepsize of 10% can also be customized.

!History:
*27-07-06, version 1.0 : prevented double clicks from triggering editing of containing tiddler.
*25-07-06,  version 0.9

!Code
***/

//{{{
config.fontSize={};

//configuration settings
config.fontSize.settings =
{
            defaultSize : 100,  // all sizes in %
            maxSize : 200,
            minSize : 40,
            stepSize : 10
};

//startup code
var fontSettings = config.fontSize.settings;

if (!config.options.txtFontSize)
            {config.options.txtFontSize = fontSettings.defaultSize;
            saveOptionCookie("txtFontSize");}
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");

//macro
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{

               var sp = createTiddlyElement(place,"span",null,"fontResizer");
               sp.ondblclick=this.onDblClick;
               if (params[0])
                           createTiddlyText(sp,params[0]);
               createTiddlyButton(sp,"+","increase font-size",this.incFont);
               createTiddlyButton(sp,"=","reset font-size",this.resetFont);
               createTiddlyButton(sp,"–","decrease font-size",this.decFont);
}

config.macros.fontSize.onDblClick = function (e)
{
             if (!e) var e = window.event;
             e.cancelBubble = true;
             if (e.stopPropagation) e.stopPropagation();
             return false;
}

config.macros.fontSize.setFont = function ()
{
               saveOptionCookie("txtFontSize");
               setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
}

config.macros.fontSize.incFont=function()
{
               if (config.options.txtFontSize < fontSettings.maxSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1)+fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.decFont=function()
{

               if (config.options.txtFontSize > fontSettings.minSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1) - fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.resetFont=function()
{

               config.options.txtFontSize=fontSettings.defaultSize;
               config.macros.fontSize.setFont();
}

config.paramifiers.font =
{
               onstart: function(v)
                  {
                   config.options.txtFontSize = v;
                   config.macros.fontSize.setFont();
                  }
};
//}}}
order:4
button:fortnight
buttonLong:fortnightly
order:3
button:f
buttonLong:future

/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.2a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}

Warning: the showWhen and hideWhen macros will blindly eval paramString.
This could be used to execute harmful javascript from a tiddler.

(TODO: Make some effort to sanitize paramString. Perhaps disallow the equals sign?)
***/
//{{{

window.hideWhenLastTest = false;

window.removeElementWhen = function(test,place) {
  window.hideWhenLastTest = test;
  if (test) {
    jQuery(place).empty()
    place.parentNode.removeChild(place);
  }
};

merge(config.macros,{

  hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( eval(paramString), place );
  }},

  showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !eval(paramString), place );
  }},

  hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( tiddler.tags.containsAll(params), place );
  }},

  showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !tiddler.tags.containsAll(params), place );
  }},

  hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( tiddler.tags.containsAny(params), place );
  }},

  showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !tiddler.tags.containsAny(params), place );
  }},

  hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( tiddler.tags.containsAll(params), place );
  }},

  showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !tiddler.tags.containsAll(params), place );
  }},

  hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place );
  }},

  showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place );
  }},

  hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( tiddler.title == params[0], place );
  }},

  showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( tiddler.title != params[0], place );
  }},

  'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    removeElementWhen( !window.hideWhenLastTest, place );
  }}

});

//}}}



Tim suggested FUSION o PARALLEL
/***
|Name:|InstantTimestampPlugin|
|Description:|A handy way to insert timestamps in your tiddler content|
|Version:|1.0.10a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#InstantTimestampPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
If you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list of formats:
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
* !ts or !t at start of line -> !!timestamp
* !ds or !d at start of line -> !!datestamp
(I added the extra ! since that's how I like it. Remove it from translations below if required)
!!Notes
* Change the timeFormat and dateFormat below to suit your preference.
* See also http://mptw2.tiddlyspot.com/#AutoCorrectPlugin
* You could invent other translations and add them to the translations array below.
***/
//{{{

config.InstantTimestamp = {

  // adjust to suit
  timeFormat: 'DD/0MM/YY 0hh:0mm',
  dateFormat: 'DD/0MM/YY',

  translations: [
    [/^!ts?$/img,  "'!!{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
    [/^!ds?$/img,  "'!!{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"],

    // thanks Adapted Cat
    [/\{ts?\}(?!\}\})/ig,"'{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
    [/\{ds?\}(?!\}\})/ig,"'{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"]

  ],

  excludeTags: [
    "noAutoCorrect",
    "noTimestamp",
    "html",
    "CSS",
    "css",
    "systemConfig",
    "systemConfigDisabled",
    "zsystemConfig",
    "Plugins",
    "Plugin",
    "plugins",
    "plugin",
    "javascript",
    "code",
    "systemTheme",
    "systemPalette"
  ],

  excludeTiddlers: [
    "StyleSheet",
    "StyleSheetLayout",
    "StyleSheetColors",
    "StyleSheetPrint"
    // more?
  ]

};

TiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {

  tags = tags ? tags : []; // just in case tags is null
  tags = (typeof(tags) == "string") ? tags.readBracketedList() : tags;
  var conf = config.InstantTimestamp;

  if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {

    var now = new Date();
    var trans = conf.translations;
    for (var i=0;i<trans.length;i++) {
      newBody = newBody.replace(trans[i][0], eval(trans[i][1]));
    }
  }

  // TODO: use apply() instead of naming all args?
  return this.saveTiddler_mptw_instanttimestamp(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created);
}

// you can override these in StyleSheet
setStylesheet(".ts,.ds { font-style:italic; }","instantTimestampStyles");

//}}}
/***
|Name|JumpMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#JumpMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Macro version of the core jump command, that also provides an optional 'jump to top' button.

!Demo:
click the 'j' button in the hoverMenu on the right.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!Usage
{{{<<jump>>}}}<<jump>>
{{{<<jump customlabel customtooltip top>>}}} <<jump customlabel customtooltip top>>
Note: passing the third parameter as top, enables the 'top' button in the dropdown.

!History:
27-07-06, ver1.0

!Code
***/

//{{{
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
        var label = (params[0] && params[0]!=".")? params[0]: 'jump';
        var tooltip = (params[1] && params[1]!=".")? params[1]: 'jump to an open tiddler';
        var top = (params[2] && params[2]=='top') ? true: false;        

        var btn =createTiddlyButton(place,label,tooltip,this.onclick);
        if (top==true)
              btn.setAttribute("top","true")
}

config.macros.jump.onclick = function(e)
{
        if (!e) var e = window.event;
        var theTarget = resolveTarget(e);
        var top = theTarget.getAttribute("top");
	var popup = Popup.create(this);
	if(popup)
		{
                 if(top=="true")
                                {createTiddlyButton(createTiddlyElement(popup,"li"),'Top ↑','Top of TW',config.macros.jump.top);
                                 createTiddlyElement(popup,"hr");}
		
		story.forEachTiddler(function(title,element) {
			createTiddlyLink(createTiddlyElement(popup,"li"),title,true);
			});
                }
	Popup.show(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return false;
}

config.macros.jump.top = function()
{
       window.scrollTo(0,0);
}
//}}}
List of lawyers recommended by friend:
* -
* -
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second.  So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only.  Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{

var MINS  = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS  = 24 * HOURS;

if (!config.lessBackups) {
  config.lessBackups = {
    // comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
    modes: [
      // ["YYYY",  365*DAYS], // one per year for ever
      // ["MMM",   31*DAYS],  // one per month
      ["ddd",   7*DAYS],   // one per weekday
      // ["d0DD",  1*DAYS],   // one per day of month
      // ["h0hh",  24*HOURS], // one per hour
      // ["m0mm",  1*HOURS],  // one per minute
      // ["s0ss",  1*MINS],   // one per second
      ["latest",0]         // always keep last version. (leave this).
    ]
  };
}

window.getSpecialBackupPath = function(backupPath) {

  var now = new Date();

  var modes = config.lessBackups.modes;

  for (var i=0;i<modes.length;i++) {

    // the filename we will try
    var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
        '$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')

    // open the file
    try {
      if (config.browser.isIE) {
        var fsobject = new ActiveXObject("Scripting.FileSystemObject")
        var fileExists  = fsobject.FileExists(specialBackupPath);
        if (fileExists) {
          var fileObject = fsobject.GetFile(specialBackupPath);
          var modDate = new Date(fileObject.DateLastModified).valueOf();
        }
      }
      else {
        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
        file.initWithPath(specialBackupPath);
        var fileExists = file.exists();
        if (fileExists) {
          var modDate = file.lastModifiedTime;
        }
      }
    }
    catch(e) {
      // give up
      return backupPath;
    }

    // expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
    // June file on disk that's more than an month old then it must be stale so overwrite
    // note that "latest" should be always written because the expiration period is zero (see above)
    var expiry = new Date(modDate + modes[i][1]);
    if (!fileExists || now > expiry)
      return specialBackupPath;
  }
}

// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
  return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}

//}}}
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
 major: 1, minor: 1, revision: 0, 
 date: new Date("mar 17, 2007"), 
 source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};

if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};

bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
 if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){ 
 url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
 }
 return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}

<<tabs txtMGTDMore
	"Timeline" "Timeline" TabTimeline
	"MGTD" "Configuration Options" ConfigMenu
	"TW" "TiddlyWiki SideBar" TWSideBar
	>>
<<tabs txtMGTDMain
	"Work" "Do Work" DoWorkMenu
	"Review" "Review" ReviewMenu
	"Process" "Process Inbox" ProcessInboxMenu
	"More..." "More..." MGTDMoreTab
	>>
MPTW is a distribution or edition of TiddlyWiki that includes a standard TiddlyWiki core packaged with some plugins designed to improve usability and provide a better way to organise your information. For more information see http://mptw.tiddlyspot.com/.
[[About]]
This is TiddlyWiki Classic version <<version>>

(Contributed by Ken Mankoff)
{{cols2{


{{col{

<<mgtdList startTag:Action title:'Next' tags:'Next && !Done'
view:Action mode:global
       group:Project
       gView:bold
       newButtonTags:'Action Next'
       where:tiddler.hasActiveProject()
       >>

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !
Done' view:Action mode:global
       group:Project
       gView:bold
       where:tiddler.hasActiveProject()
       newButtonTags:'Action [(Waiting For)]'
       >>


}}}

{{col{

<<mgtdList title:'Starred Actions' startTag:Starred tags:'Action && !
Done' view:ActionProj mode:global
       group:ActionStatus
       gView:bold
       newButtonTags:'Starred Action'
       >>

<<mgtdList title:'Starred Projects' startTag:Starred tags:'Project && !
Complete' view:Project mode:global
       group:ProjectStatus
       gView:bold
       newButtonTags:'Starred Project'
       >>

<<mgtdList title:'Other Starred Items' startTag:Starred tags:'!Project
&& !Action' view:star mode:global
       group:GTDComponent
       gView:bold
       newButtonTags:'Starred'
       >>

!!! Last 30 Modifications
<<timeline "modified" "30" "ddd, YYYY-0MM-0DD">>

}}}

}}}
!Inline Formatting
|!Option|!Syntax|!Output|h
|bold font|{{{''bold''}}}|''bold''|
|italic type|{{{//italic//}}}|//italic//|
|underlined text|{{{__underlined__}}}|__underlined__|
|strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
|superscript text|{{{^^super^^script}}}|^^super^^script|
|subscript text|{{{~~sub~~script}}}|~~sub~~script|
|highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
|preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
|spoiler text|{{{%%Mouseover me!%%}}}|%%Good work!%%|
!Block Elements
!!Headings
{{{
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
}}}
//''Note: The headings can be folded by including {{{<<foldHeadings>>}}} at the bottom of this Tiddler''//
//''See [[Folded Heading Example]]''//
<<<
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
<<<
!!Lists
{{{
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3

# ordered list, level 1
## ordered list, level 2
### ordered list, level 3

; definition list, term
: definition list, description
}}}
<<<
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3

# ordered list, level 1
## ordered list, level 2
### ordered list, level 3

; definition list, term
: definition list, description
<<<
!!Blockquotes
{{{
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3

<<<
blockquote allowing other tags within
<<<
}}}
<<<
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3

> blockquote
<<<
!!Preformatted Text
<html><pre>
{{{
preformatted (e.g. code)
}}}
</pre></html>
<<<
{{{
preformatted (e.g. code)
}}}
<<<
!!Tables
{{{
|CssClass|k
|!heading column 1|!heading column 2|h
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
}}}
''Annotation:''
* The k marker at the end of a row indicates the preceeding cell contains a CSS class name
* The ! marker sets the cell to a column heading
* The h marker at the end of a row makes the headers sortable
* The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
* The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
* Begin a table with the line {{{|editable|k}}} to make editable, click on the "E" to edit.
<<<
|editable|k
| Column A | Column B|h
|These columns are sortable|Click on a header to sort|
|This is also editable|Click on the E to edit|
|This is editable|These are sortable|

|CssClass|k
|!heading column 1|!heading column 2|h
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
<<<
!!Images 
You can either use a Direct Link (url) or HTML code (hosting sites generally provide both).
{{{
    The formatting for Direct Link (url) is:
    [img[url of image goes in here]]

    The formatting for HTML code is:
    <html>HTML code goes in here</html>
}}}
[img[http://upload.wikimedia.org/wikipedia/en/thumb/e/e1/Getting_Things_Done.jpg/200px-Getting_Things_Done.jpg]]

!Hyperlinks
* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>''N.B.:'' In this case, the target can also be any website (i.e. URL).
!Custom Styling
* {{{@@CssProperty:value;CssProperty:value;…@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
* <html><code>{{customCssClass{…}}}</code></html>
* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> … </html>}}}
!Special Markers
* {{{<br>}}} forces a manual line break
* {{{----}}} creates a horizontal ruler
* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
* {{{<<macroName>>}}} calls the respective [[macro|Macros]]
* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.

!!Dates
An always-current datestamp can be entered by using the {{{<<today>>}}} macro. See DateStampPluginInfo for more details on formatting.
To insert a datestamp or timestamp that will be set on first edit and not modified afterwards, use {{{{ts}}}} or {{{{ds}}}}. See InstantTimestampPlugin for more formatting options.
<!--{{{-->
<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>mgsd</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
//{{{ 
config.options.txtFadeTimer = 3000; // 3 seconds 

window.displayMessage=function(text,linkText,fadeTimer) { 
        var e = getMessageDiv(); 
        if(!e) { 
                alert(text); 
                return; 
        } 
        if(linkText) { 
                var link = createTiddlyElement(e,"a",null,null,text); 
                link.href = linkText; 
                link.target = "_blank"; 
        } else { 
                e.appendChild(document.createTextNode(text)); 
        } 
        if(config.options.txtFadeTimer > 0) { 
                setTimeout(clearMessage, 
config.options.txtFadeTimer); 
        } 
} 
//}}}
merge(Array.prototype,{

  each: function(func) {
    for (var i=0;i<this.length;i++)
      func(this[i]);
  },

  // TODO, there is a map in the core now. Is it same as this or different?
  map: function(func) {
    var result = [];
    this.each(function(item) {
      result.push(func(item));
    });
    return result;
  },

  select: function(func) {
    var result = [];
    this.each(function(item) {
      if (func(item))
        result.push(item);
    });
    return result;
  },

  reject: function(func) {
    var result = [];
    this.each(function(item) {
      if (!func(item))
        result.push(item);
    });
    return result;
  }

});

//------------------------------------------

merge(String.prototype,{

  parseTagExpr: function(debug) {

    if (this.trim() == "")
      return "(true)";

    var logicOps = /(!|&&|\|\||\(|\))/g;

    var spaced = this.
      // because square brackets in templates are no good
      // this means you can use [(With Spaces)] instead of [[With Spaces]]
      replace(/\[\(/g," [[").
      replace(/\)\]/g,"]] ").
      // space things out so we can use readBracketedList. tricky eh?
      replace(logicOps," $1 ");


    var expr = "";

    var tokens = spaced.readBracketedList(false); // false means not unique. nice one JR!

    tokens.each(function(tok) {

      if (tok.match(logicOps)) {
        expr += tok;
      }
      else if (tok.match(/^parent:/)) {
        // experimental
        var lookForTagInParent = tok.split(":")[1];
        expr += "tiddler.parents().anyHasTag('"+lookForTagInParent+"')";
      }
      else {
        expr += "tiddler.tags.contains('%0')".format([
            // fix single quote bug. hurrah
            // but still have nasty round bracket bug
            tok.replace(/'/,"\\'")
          ]);
      }
    });

    if (debug)
      alert(expr);

    return '('+expr+')';
  }

});

merge(Tiddler.prototype,{

  matchesEvalExpr: function(evalExpr) {
    var tiddler = this;
    return eval(evalExpr);
  },

  matchesTagExpr: function(tagExpr) {
    return this.matchesEvalExpr(tagExpr.parseTagExpr());
  },

  olderThanDays: function(days) {
    return this.modified.getTime() < (new Date()).getTime() - days*1000*60*60*24;
  }

});

//------------------------------------

merge(Tiddler.prototype,{

  render: function(method,renderOptions) {
    var renderMethod = "render_"+method;
    if (this[renderMethod])
      return this["render_"+method](renderOptions);
    else
      return "*** cant render "+renderMethod+" ***";
  },

  renderUtil: function(formatString,formatValues) {
    return formatString.format(formatValues);
  },

  sorter: function(field) {
    var sortMethod = "sort_"+field;
    if (this[sortMethod])
      return this[sortMethod]();
    else
      return this[field];
  },

  sorterUtil: function(otherTiddler,method) {
    var desc = false;

    if (method.substring(0,1) == "-") {
      desc = true;
      method = method.substring(1);
    }

    if (this.sorter(method) > otherTiddler.sorter(method))
      return (desc ? -1 : +1);
    else if (this.sorter(method) < otherTiddler.sorter(method))
      return (desc ? +1 : -1);
    else
      return 0;
  }

});

merge(String.prototype,{
  sorterUtil: function(otherTiddler,method) {

    var t1 = store.getTiddler(this);
    var t2 = store.getTiddler(otherTiddler);

    if (method.substring(0,1) == "-") {
      desc = true;
    }

    if (t1 && t2)
      return t1.sorterUtil(t2,method);
    // this part is a little flakey but I'm aiming to
    // put the None heading last in all cases
    else if (t2)
      return +1;
    else if (t1)
      return -1;
    else {
      // neither exist as tiddlers might as well compare strings
      if (this < otherTiddler)
        return (desc ? +1 : -1);
      else if (this > otherTiddler)
        return (desc ? -1 : +1);
      else
        return 0;
    }
  }
});

//------------------------------------------

merge(Array.prototype,{

  // returns a hash
  groupBy_hash: function(func) {
    var result = {};
    var leftOverGroup = '__NONE__';
    this.each(function(item) {
      var groups = func(item);
      if (groups.length > 0) {
        groups.each(function(group) {
          if (!result[group])
            result[group] = [];
          result[group].push(item);
        });
      }
      else {
        if (!result[leftOverGroup])
          result[leftOverGroup] = [];
        result[leftOverGroup].push(item);
      }
    });
    return result;
  },

  // returns an array of arrays, like Hash#sort in ruby
  groupBy: function(func,itemSort,groupSort) {

    if (!itemSort) itemSort = "title";
    if (!groupSort) groupSort = "-title";

    var result = this.groupBy_hash(func);
    var sortedResult = [];
    for (var g in result)
      sortedResult.push([g,result[g].sort(function(a,b){return a.sorterUtil(b,itemSort);})]);
    return sortedResult.sort(function(a,b){return a[0].sorterUtil(b[0],groupSort);});
  },

  // for convenience since it's mostly what we want
  groupByTag: function(tag,itemSort,groupSort) {
    return this.groupBy(function(t){return t.getByIndex(tag);},itemSort,groupSort);
  }

});

//------------------------------------------

// for lists of tiddlers
merge(Array.prototype,{

  filterByEval: function(evalExpr) {
    return this.select(function(t) {
      return t.matchesEvalExpr(evalExpr);
    });
  },

  filterByTagExpr: function(tagExpr) {
    return this.filterByEval(tagExpr.parseTagExpr());
  },

  filterGroupsByEval: function(evalExpr) {
    // presumes the group name is a tiddler
    return this.select(function(tGroup) {
      var tiddler = store.getTiddler(tGroup[0]);
      return tiddler && tiddler.matchesEvalExpr(evalExpr);
    });
  },

  filterGroupsByTagExpr: function(tagExpr) {
    return this.filterGroupsByEval(tagExpr.parseTagExpr());
  },

  render: function(renderMethod,renderOptions) {
    return this.map(function(tiddler){
      return tiddler.render(renderMethod,renderOptions);
    }).join("\n");
  },

  renderGrouped: function(listRenderMethod,headingRenderMethod,noneHeading,renderOptions,groupCountOnly,nbTags) {
    // do I ever use renderOptions??
    // this lost some elegance when I shoehorned the groupCountOnly part in. todo refactor
    // then lost some more with the nbTags addition...
    // might need some reworking
    var result = "";
    this.each(function(g) {
      var groupName = g[0];
      var groupItems = g[1];

      var showCount = "";
      if (groupCountOnly && groupCountOnly != "")
        showCount = groupItems.length > 0 ? " ("+groupItems.length+")" : "";

      var makeHeading = (groupCountOnly&&groupCountOnly!="") ? "" : "!!";
      var newButtonMarkup = "";

      // this sucks
      if (nbTags && nbTags != '') {
        newButtonMarkup = " "+config.macros.mgtdList.getNewButton(nbTags + " [["+groupName+"]]");
      }

      if (groupName == "__NONE__") {
        result = result + makeHeading + "{{noneHeading{[[("+(noneHeading?noneHeading:"No "+headingRenderMethod)+")]]}}}"+showCount+"\n";
      }
      else {
        var gTiddler = store.getTiddler(groupName);
        if (gTiddler) {
          result = result + makeHeading+gTiddler.render(headingRenderMethod)+showCount+newButtonMarkup+"\n";
        }
        else {
          result = result + makeHeading+"[["+groupName+"]]"+showCount+newButtonMarkup+"\n";
        }
      }
      if (!groupCountOnly || groupCountOnly == "")
        result = result + groupItems.render(listRenderMethod,renderOptions) + "\n";
    });

    if (groupCountOnly && groupCountOnly != "")
      result = result.replace(/\n$/,''); // hack. remove trailing linefeed

    return result;
  },

  tiddlerSort: function(sortBy) {
    return this.sort(function(a,b) { return a.sorterUtil(b,sortBy); });
  },

  toTitleList: function() {
    return this.map(function(t){return t.title;});
  }


});

//------------------------------------------


config.options.txtTheme = 'MonkeyGTDTheme';

if (!config.mGTD) config.mGTD = {};

config.mGTD.specialTags = [
  "Action",
  "Project",
  "Area",
  //"Realm",
  "Context",
  "View",
  "Tickler",
  "Reference",
  "Contact"
];

config.mGTD.tagsToIndex = [
  "Action",   // needed for action dependencies
  "Project",
  "Area",
  "Realm",
  "Context",
  "ActionStatus",
  "TicklerStatus",
  "ProjectStatus",
  "GTDComponent",
  "Sidebar",
  "Contact",
  "TicklerRepeatType"
];

config.mgtdVersion = "3.1.9";

config.macros.mgtdVersion={handler:function(place){wikify(config.mgtdVersion,place);}};

config.toggleTagAlwaysTouchModDate = true; // see ToggleTagPlugin



config.shadowTiddlers.SiteTitle = 'mGSD';
config.shadowTiddlers.SiteSubtitle = 'the tiddlywiki powered gtd system formerly known as MonkeyGTD';

config.mGTD.getOptChk = function(option) { return store.fetchTiddler('MgtdSettings').tags.contains(option); }
config.mGTD.getOptTxt = function(fieldName) { return store.fetchTiddler('MgtdSettings').fields[fieldName.toLowerCase()]; }
config.mGTD.setOptTxt = function(fieldName,fieldValue) { store.fetchTiddler('MgtdSettings').fields[fieldName.toLowerCase()] = fieldValue; }

// from tiddlytools.com/#CoreTweaks, thanks Eric
window.coreWikify = wikify;
window.wikify = function(source,output,highlightRegExp,tiddler)
{
  if (source) arguments[0]=source.replace(/\\\\\n/mg,"<br>");
  coreWikify.apply(this,arguments);
}

readOnly = false;
showBackstage = true;

merge(Date.prototype,{
  addDay:       function(n) { this.setDate(  this.getDate()      + n    ); },
  addWeek:      function(n) { this.setDate(  this.getDate()      + n*7  ); },
  addFortnight: function(n) { this.setDate(  this.getDate()      + n*14 ); },
  addMonth:     function(n) { this.setMonth( this.getMonth()     + n    ); },
  addYear:      function(n) { this.setYear(  this.getFullYear()  + n    ); }
});
// it works in view mode, that's why we can't just use edit macro
merge(config.macros, {
  mgtdEditField: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      var fieldName = params[0];
      var useTiddler = tiddler;
      if (params[1])
        useTiddler = store.fetchTiddler(params[1]);
      var curVal = useTiddler.fields[fieldName] || '';
      var editBox = createTiddlyElement(place,'input',null,'editBox');
      editBox.value = curVal;
      var callback = function(){
        useTiddler.fields[fieldName] = this.value;
        useTiddler.touch(); // see MgtdDateUtils
      }
      editBox.onchange = callback;
    }
  }
});
function wikifiedMessage(message) {
  wikify(message,getMessageDiv());
}

merge(config.macros,{

  help: {

    handler: function (place,macroName,params,wikifier,paramString,tiddler) {
      createTiddlyButton(place,"?","help",function() {
        var useThis = params[0]?params[0]:tiddler.title;
        var help = store.getTiddlerText("MonkeyGTDHelp##"+useThis);
        help = help?help:"//No help for <nowiki>"+useThis+"</nowiki>//";
        var helpContent = "{{help{\n''[[MonkeyGTD Documentation|http://www.tiddlywiki.org/wiki/MonkeyGTD]]''\n" +
          "!<nowiki>" + useThis + "</nowiki>\n" +
          help + "\n\n" +
          "[[More...|http://www.tiddlywiki.org/wiki/MonkeyGTD/"+useThis+"]]" +
          "\n}}}\n" +
          "";

        // doesn't work at all. I have no idea how to use TW popups apparently ...
        //var popup = Popup.create(place,"div","popupTiddler");
        //wikify(helpContent,popup,null,tiddler);
        //Popup.show();

        // stick with this for now
        clearMessage();
        wikifiedMessage(helpContent);

        return false;
      });
    }
  }

});
config.indexedTags = {

  // will be populated with our tag lists
  tagLists: {},

  // will be populated with our tag indexes
  indexes: {},

  // will be populated with the tags that need indexing
  tagsToIndex: [],

  saveTiddlerHijack: function(title,newTitle,newBody,modifier,modified,tags,fields) {
    var before = store.getTiddler(title);
    var oldTags = before ? [].concat(before.tags) : null;  // concat so we get a dup

    store.suspendNotifications();
    var result = this.saveTiddler_orig_indexedTags(title,newTitle,newBody,modifier,modified,tags,fields);
    var newTags = store.getTiddler(newTitle).tags;

    config.indexedTags.updateTagLists(title,oldTags,newTitle,newTags);
    config.indexedTags.updateIndexes(title,newTitle,newTags);

    store.resumeNotifications();
    store.notify(title,true);

    return result;
  },

  removeTiddlerHijack: function(title) {
    var before = store.getTiddler(title);
    var oldTags = before ? [].concat(before.tags) : null;  // concat so we get a dup

    store.suspendNotifications();
    this.removeTiddler_orig_indexedTags(title);

    config.indexedTags.updateTagLists(title,oldTags);
    config.indexedTags.updateIndexes(title);

    store.resumeNotifications();
    store.notify(title,true);
  },

  setTiddlerTagHijack: function(title,status,tag) {

    clearMessage(); // unrelated to indexedTags but....

    var before = store.getTiddler(title);
    var oldTags = before ? [].concat(before.tags) : null;  // concat so we get a dup

    store.suspendNotifications();
    this.setTiddlerTag_orig_indexedTags(title,status,tag);

    var after = store.getTiddler(title);
    var newTags = after ? after.tags : null;

    config.indexedTags.updateTagLists(title,oldTags,title,newTags);
    config.indexedTags.updateIndexes(title,title,newTags);

    store.resumeNotifications();
    store.notify(title,true);

  },

  updateTagLists: function(title,oldTags,newTitle,newTags) {
    if (oldTags)
      oldTags.each(function(tagName) {
        if (!config.indexedTags.tagLists[tagName])
          config.indexedTags.tagLists[tagName] = []; // fixes TiddlerEncryption/MTS, thanks Patrick Ohly.
        config.indexedTags.tagLists[tagName].remove(title);
      });
    if (newTags)
      newTags.each(function(tagName) {
        if (!config.indexedTags.tagLists[tagName])
          config.indexedTags.tagLists[tagName] = [];
        config.indexedTags.tagLists[tagName].pushUnique(newTitle);
      });
  },

  updateIndexes: function(title,newTitle,newTags) {
    delete config.indexedTags.indexes[title];
    if (newTags) {
      config.indexedTags.indexes[newTitle] = {};
      config.indexedTags.tagsToIndex.each(function(tagToIndex) {
        config.indexedTags.indexes[newTitle][tagToIndex] = [];
        newTags.each(function(tag) {
          if (config.indexedTags.tagLists[tagToIndex] && config.indexedTags.tagLists[tagToIndex].contains(tag)) {
            config.indexedTags.indexes[newTitle][tagToIndex].pushUnique(tag);
          }
        });
      });
    }
  },

  initTagLists: function() {
    store.getTags().map(function(pair) { return pair[0]; }).each(function(t) {
      config.indexedTags.tagLists[t] = store.getTaggedTiddlers(t).map(function(tt) { return tt.title; });
    });
  },

  initIndexes: function() {
    store.forEachTiddler(function(title,tiddler) {
      config.indexedTags.updateIndexes(title,title,tiddler.tags);
    });
  },

  dump: function() {
    alert(this.indexes["Buy petrol for mower"]["Project"]);
    alert(this.indexes["Buy petrol for mower"]["Realm"]);
  },

  tiddlerMethods: {
    getByIndex: function(tag) {
      return config.indexedTags.indexes[this.title][tag];
    },

    hasParent: function(tag) {
      return this.getByIndex(tag).length > 0
    },

    hasNoParent: function(tag) {
      return !this.hasParent(tag);
    },

    hasActiveProject: function() {
      var projs = this.getByIndex("Project");

      if (projs.length == 0)
        // no project but we will say it's active
        // because otherwise it will not show up anywhere
        return true;

      for (var i=0;i<projs.length;i++)
        if (
          (config.indexedTags.indexes[projs[i]]['ProjectStatus'].contains('Active'))
          &&
          !store.fetchTiddler(projs[i]).tags.contains('Complete') // seems stupid
          )
          return true;
      return false;
    },

    hasStarredProject: function() {
      // similar to hasActiveProject
      // thanks to Bernhardt Rainer
      var projs = this.getByIndex("Project");

      if (projs.length == 0)
        return false;

      for (var i=0;i<projs.length;i++)
        if (
          (config.indexedTags.indexes[projs[i]]['ProjectStatus'].contains('Starred'))
          &&
          !store.fetchTiddler(projs[i]).tags.contains('Complete') // seems stupid
          )
          return true;
      return false;
    },

    getAreasForAction: function() {
      // we will go to some trouble to permit actions in multiple areas
      // either explicitly or via their project...
      // also permit multiple projects......
      // explicit:
      var result = [];
      result = result.concat(this.getByIndex("Area"));
      // implicit (via project/s):
      var projs = this.getByIndex("Project");
      for (var i=0;i<projs.length;i++)
        result = result.concat(store.fetchTiddler(projs[i]).getByIndex("Area"));
      return result;
    },

    hasNextAction: function() {
      var children = fastTagged(this.title).filterByTagExpr('Action && !Done && (Next || [(Waiting For)])');
      return children.length > 0;
    },

    hasTickler: function() {
      var children = fastTagged(this.title).filterByTagExpr('Tickler && !Actioned');
      return children.length > 0;
    },

    hasSubProject: function() {
      var children = fastTagged(this.title).filterByTagExpr('Project && !Complete && Active');
      return children.length > 0;
    },

    hasNextActionOrSubProject: function() {
      return (this.hasSubProject() || this.hasNextAction());
    },

    hasNextActionOrSubProjectOrTickler: function() {
      return (this.hasSubProject() || this.hasNextAction() || this.hasTickler());
    }
  },

  globalMethods: {
    fastTagged: function(tag) {
      var list = config.indexedTags.tagLists[tag];
      return (list?list:[]).map(function(t){return store.getTiddler(t);});
    }
  },

  init: function(tagsToIndex) {

    merge(window,this.globalMethods);
    merge(Tiddler.prototype,this.tiddlerMethods);

    this.tagsToIndex = tagsToIndex;
    this.initTagLists();
    this.initIndexes();

    TiddlyWiki.prototype.saveTiddler_orig_indexedTags = TiddlyWiki.prototype.saveTiddler;
    TiddlyWiki.prototype.removeTiddler_orig_indexedTags = TiddlyWiki.prototype.removeTiddler;
    TiddlyWiki.prototype.setTiddlerTag_orig_indexedTags = TiddlyWiki.prototype.setTiddlerTag;
    TiddlyWiki.prototype.saveTiddler = this.saveTiddlerHijack;
    TiddlyWiki.prototype.removeTiddler = this.removeTiddlerHijack;
    TiddlyWiki.prototype.setTiddlerTag = this.setTiddlerTagHijack;

  }
};

config.indexedTags.init(config.mGTD.tagsToIndex);
merge(Tiddler.prototype,{
  // doesn't belong here..
  ticklerIsActive: function() {
    var defaultHourToActivate = 5; // fixme put elsewhere
    var hourToActivate = config.mGTD.getOptTxt('tickleractivatehour') || defaultHourToActivate;
    var nowTime = new Date();
    nowTime.setHours(nowTime.getHours() - hourToActivate); // i'm confused because of UTC versus local. I think mgtd_date is UTC. But has hh:mm:ss is 00:00:00 in local time
    // a tickler without a date is active now. so please add a date to your ticklers. thanks Arkady Grudzinsky
    return (!this.fields.mgtd_date || nowTime.convertToYYYYMMDDHHMM() >= this.fields.mgtd_date );
  },

  // Contributed by Michael Scherer
  ticklerWillBeActiveWithin: function(numDays) {
    // Ignore ticklers without date
    if (!this.fields.mgtd_date)
      return false;

    var nowTime = new Date();

    // Respect user settings (see tickerIsActive())
    var defaultHourToActivate = 5; // fixme put elsewhere
    var hourToActivate = config.mGTD.getOptTxt('tickleractivatehour') || defaultHourToActivate;
    if (nowTime.getHours() < hourToActivate) {
      // Too early in the morning, go back one day.
      nowTime.setDate(nowTime.getDate() - 1);
    }

    // Start tomorrow
    startTime = new Date(nowTime.getFullYear(), nowTime.getMonth(), nowTime.getDate() + 1);
    // End in numDays days
    endTime = new Date(nowTime.getFullYear(), nowTime.getMonth(), nowTime.getDate() + 1 + numDays);

    return (startTime.convertToYYYYMMDDHHMM() <= this.fields.mgtd_date && endTime.convertToYYYYMMDDHHMM() > this.fields.mgtd_date);
  }
});

merge(config.macros,{

  ticklerAlert: {
    handler: function (place,macroName,params,wikifier,paramString,tiddler) {
      var realmFilter = '';
      if (!config.mGTD.getOptChk('AlertsIgnoreRealm'))
        realmFilter = ' && tiddler.tags.containsAny(config.macros.mgtdList.getActiveRealms())';
      var theList = fastTagged('Tickler').
            filterByTagExpr('!Actioned').
                filterByEval('tiddler.ticklerIsActive()'+realmFilter);
      if (theList.length > 0) {
        var blinker = createTiddlyElement(place,'blink');
        wikify('{{ticklerAlert{[[*ticklers*|Ticklers Requiring Action]]}}}',blinker,null,tiddler);
      }
    }
  },
  mgtdList: {

    getActiveRealms: function() {
      return store.fetchTiddler("MgtdSettings").getByIndex("Realm");
    },

    noActiveRealmMessage: function() {
      // this doesn't work like it ought to?????
      if (this.getActiveRealms().length == 0) {
        //clearMessage();
        displayMessage("Error: No active realms. Please activate at least one realm.");
      }
    },

    getRealm: function(tiddlerTitle) {

      // if we're in a project inherit the realm from the project
      var inTiddler = store.fetchTiddler(tiddlerTitle);
      if (inTiddler && inTiddler.tags.contains('Project')) {
        // get the realm from the project
        return inTiddler.getByIndex('Realm');
      }

      // otherwise use the active realm
      var active = config.macros.mgtdList.getActiveRealms();

      if (active.length == 1) {
        return active[0];
      }
      else if (active.length == 0) {
        var fudge = fastTagged('Realm')[0].title;  // this is a little bit random but they should be seeing the warning by now and fixing it
        return fudge;
      }
      else {
        // if there's more than one active realm use a slice to get the realm priority and choose the highest one
        // TODO, make this prettier
        var toBeat = "zzzzzzz";
        var soFar = active[0];
        for (var i=0;i<active.length;i++) {
          var pri = store.getTiddlerSlice(active[i],"priority");
          if (pri && pri < toBeat) {
            toBeat = pri;
            soFar = active[i];
          }
        }
        return soFar;
      }
    },

    getNewButton: function(tags,extraTags) {
      if (typeof tags != 'string')
        tags = String.encodeTiddlyLinkList(tags);
      return '<<newSavedTiddler label:+ tag:"'+tags+'">>'; // newSavedTiddler wants tags in one param?
    },

    getNewButton: function(tags,extraTags) {
      if (typeof tags != 'string')
        tags = String.encodeTiddlyLinkList(tags);
      return '<<newSavedTiddler prompt:"Enter name for new %1:" tooltip:"Create a new %1" label:"+" tag:"%0">>'.format([
          tags, // newSavedTiddler wants tags in one param?
          tags.readBracketedList()[0] // just show first tag in prompt and tooltip. it's the important one
        ]);
    },


    handler: function (place,macroName,params,wikifier,paramString,tiddler) {

      this.noActiveRealmMessage();

      var pp = paramString.parseParams("tags",null,true);

      // title of the list
      var title = getParam(pp,"title","");

      // local means only look at tiddlers tagged with this tiddler
      // global means look at every tiddler
      var tagMode = getParam(pp,"mode","local");

      // optional. ignored unless mode global. specify for speed gains
      var startTag = getParam(pp,"startTag");

      // eg, "Next && !Done"
      var tagExpr = getParam(pp,"tags","");

      // additional filter. gets eval'ed
      var whereExpr = getParam(pp,"where","");

      // group by another tag
      var groupBy = getParam(pp,"group","");

      // group by count only mode
      var groupCountOnly = getParam(pp,"groupCountOnly","");

      // filter the groups by tag expr
      var gTagExpr = getParam(pp,"gTag","");

      // or eval'ed expression
      var gWhereExpr = getParam(pp,"gWhere","");

      // how to render list items
      var viewType = getParam(pp,"view","plain");

      // how to render headings
      var gViewType = getParam(pp,"gView",groupBy);

      // if there are tiddlers who aren't grouped then give them this title
      // mainly used to label future actions...
      var leftoverTitle = getParam(pp,"leftoverTitle","No "+groupBy);

      // if set to "yes" then we ignore the realm and show everthing
      var ignoreRealm = getParam(pp, "ignoreRealm","");

      // sort items
      var sortBy = getParam(pp,"sort","title");

      // sort groups
      var gSortBy = getParam(pp,"gSort","title");

      // new button
      var newButton = getParam(pp,"newButton",""); // not using
      var newButtonTags = getParam(pp,"newButtonTags","");

      // don't show empty list
      var dontShowEmpty = getParam(pp,"dontShowEmpty","");

      newButtonTags = newButtonTags.replace(/\[\(/g," [[").replace(/\)\]/g,"]] "); // change [(..)] to [[..]]

      if (!startTag)
        if (tagMode != "global")
          startTag = tiddler.title;

      var listRefreshContainer = createTiddlyElement(place,"div");

      // TODO one big attribute?
      listRefreshContainer.setAttribute("refresh","macro");
      listRefreshContainer.setAttribute("macroName",macroName);

      listRefreshContainer.setAttribute("title",title);
      listRefreshContainer.setAttribute("startTag",startTag);
      listRefreshContainer.setAttribute("tagMode",tagMode);
      listRefreshContainer.setAttribute("tagExpr",tagExpr);
      listRefreshContainer.setAttribute("groupBy",groupBy);
      listRefreshContainer.setAttribute("groupCountOnly",groupCountOnly);
      listRefreshContainer.setAttribute("gTagExpr",gTagExpr);
      listRefreshContainer.setAttribute("whereExpr",whereExpr);
      listRefreshContainer.setAttribute("gWhereExpr",gWhereExpr);
      listRefreshContainer.setAttribute("sortBy",sortBy);
      listRefreshContainer.setAttribute("gSortBy",gSortBy);
      listRefreshContainer.setAttribute("viewType",viewType);
      listRefreshContainer.setAttribute("gViewType",gViewType);
      listRefreshContainer.setAttribute("ignoreRealm",ignoreRealm);
      listRefreshContainer.setAttribute("leftoverTitle",leftoverTitle);
      listRefreshContainer.setAttribute("newButton",newButton);
      listRefreshContainer.setAttribute("newButtonTags",newButtonTags);
      if (tiddler)
        listRefreshContainer.setAttribute("tiddlerTitle",tiddler.title);
      listRefreshContainer.setAttribute("dontShowEmpty",dontShowEmpty);

      this.refresh(listRefreshContainer);
    },

    refresh: function(place) {

      removeChildren(place);

      var title = place.getAttribute("title");
      var startTag = place.getAttribute("startTag");
      var tagMode = place.getAttribute("tagMode");
      var tagExpr = place.getAttribute("tagExpr");
      var groupBy = place.getAttribute("groupBy");
      var groupCountOnly = place.getAttribute("groupCountOnly");
      var gTagExpr = place.getAttribute("gTagExpr");
      var whereExpr = place.getAttribute("whereExpr");
      var gWhereExpr = place.getAttribute("gWhereExpr");
      var sortBy = place.getAttribute("sortBy");
      var gSortBy = place.getAttribute("gSortBy");
      var viewType = place.getAttribute("viewType");
      var gViewType = place.getAttribute("gViewType");
      var ignoreRealm = place.getAttribute("ignoreRealm");
      var leftoverTitle = place.getAttribute("leftoverTitle");
      var newButton = place.getAttribute("newButton");
      var newButtonTags = place.getAttribute("newButtonTags");
      var tiddlerTitle = place.getAttribute("tiddlerTitle");
      var dontShowEmpty = place.getAttribute("dontShowEmpty");

      var wikifyThis = "";

      wikifyThis += "{{mgtdList{\n";

            if (title != "")
          wikifyThis += "!"+title

      var nbTags;
      if (newButtonTags != '') {
        nbTags = [
            newButtonTags,                                  // the tags specified in the macro params
            '[['+config.macros.mgtdList.getRealm(tiddlerTitle)+']]',    // the realm. always want a realm
            (tagMode=='global'?'':'[['+tiddlerTitle+']]')   // if not global, then the add tiddler we're in, new here style
          ].join(' ');


        var nbList = nbTags.readBracketedList();

        var nbExtra = nbTags;

        // also we want an area. another hack. darn you subprojects.. :)
        if (nbList.contains('Project') && !nbList.containsAny(fastTagged('Area').toTitleList())) {
          var foo = store.fetchTiddler(tiddlerTitle).getByIndex('Area');
          if (foo.length > 0) {
            nbExtra += ' [[' + foo[0] + ']]';
          }
        }

        if (nbList.contains('Project') && !nbList.containsAny(fastTagged('ProjectStatus').toTitleList())) {
          // stupid hack for subprojects list in project dashboards
          // don't want to create a project with no status
          // this is the hack:
          nbExtra += ' Active';
        }

        // same hack thing for actions
        if (nbList.contains('Action') && !nbList.containsAny(fastTagged('ActionStatus').toTitleList())) {
          nbExtra += ' Next';
        }

        wikifyThis += this.getNewButton(nbExtra);
        // but still use nbTags later on in group headings...

      }


            if (title != "" || newButton != "")
          wikifyThis += "\n";

      wikifyThis += "{{innerList{\n";

      var checkForContent = wikifyThis;

      var theList = [];
      if (startTag && startTag != 'undefined'/* this sucks */) {
        theList = fastTagged(startTag);
      }
      else {
        // why so hard to get an array of all tiddlers?
        store.forEachTiddler(function(t_title,t_tiddler) { theList.push(t_tiddler); });
      }


      if (tagExpr != "") theList = theList.filterByTagExpr(tagExpr);
      if (whereExpr != "") theList = theList.filterByEval(whereExpr);

      if (ignoreRealm != "yes") {
        var activeRealms = config.macros.mgtdList.getActiveRealms();
        theList = theList.select(function(t) {
          var realm = t.getByIndex("Realm");
          return (
            realm.length == 0 ||  // so something with no realm shows up
            realm.containsAny(activeRealms)
          );
        });
      }

            if (groupBy == "day") {
                // experimental. changing a tag doesn't update modified so
                // this isn't as useful
                theList = theList.groupBy(function(t){return [t.modified.formatString('YYYY-0MM-0DD')];});
        wikifyThis += theList.renderGrouped(viewType,gViewType,leftoverTitle);
            }
      else if (groupBy != "") {
        theList = theList.groupByTag(groupBy,sortBy,gSortBy);
        if (gTagExpr != "") theList = theList.filterGroupsByTagExpr(gTagExpr);
        if (gWhereExpr != "") theList = theList.filterGroupsByEval(gWhereExpr);
        wikifyThis += theList.renderGrouped(viewType,gViewType,leftoverTitle,null,groupCountOnly,nbTags);
      }
      else {
        theList = theList.tiddlerSort(sortBy);
        wikifyThis += theList.render(viewType);
      }

      var emptyList = false;
      if (wikifyThis == checkForContent) {
        emptyList = true;
        wikifyThis += "{{none{none}}}";
      }

      wikifyThis += "}}}\n";
      wikifyThis += "}}}\n";

      if (!(dontShowEmpty == "yes" && emptyList))
        wikify(wikifyThis,place,null,tiddler);

    }
  }

});
Deleted at the bottom of MgtdList:

			forceReflow(); // fixes rendering issues. (but probably doubles up rendering time??)

merge(config.macros,{
  processInbox: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var shortHand = {
        Action: {
          'W': 'Waiting For',
          'N': 'Next',
          'F': 'Future',
          'S': 'Starred'
        },
        Project: {
          'A': 'Active',
          'SM': 'Someday/Maybe',
          'S': 'Starred'
        }
      };

      wikify("Quick add projects and actions (See [[About Quick Add]] for more info):\n",place);
      var pi = createTiddlyElement(place,"textarea",null,"piBox");

      wikify("\n",place);

      var a1 = createTiddlyCheckbox(place,"Open created projects",true,null);
      a1.id = 'piShowProjects';

      var a2 = createTiddlyCheckbox(place,"Open created actions",true,null);
      a2.id = 'piShowActions';

      wikify("\n",place);

      var btn = createTiddlyButton(place,"quick add now","create these items",function(e) {
        var lines = pi.value.split("\n");
        var currentProject = "";
        var displayThese = [];

        for (var i=0;i<lines.length;i++) {

          var fields_and_text = lines[i].trim().split(/[|;]{2}/); // anything after || is to become tiddler content


          var fields = fields_and_text[0].trim().split(/[|;]/);
          var tiddlerText = fields_and_text[1];


          if (!fields[0] || fields[0].trim() == "") {
            currentProject = "";
          }
          else {

            var title = fields.shift();
            //alert(title);

            // add the realm
            fields.push(config.macros.mgtdList.getRealm());

            if (title.substr(0,1) != '.') {

              //alert("project "+title);

              currentProject = title;

              if (document.getElementById('piShowProjects').checked)
                displayThese.push(title);

              fields.push("Project"); // make it a project
              //fields.push("Active"); // make it active

              if (!fields.containsAny(['SM','A']))
                fields.push('A');

              fields = fields.map(function(f) {
                if (shortHand['Project'][f])
                  return shortHand['Project'][f];
                else
                  return f;
              });

              if (store.tiddlerExists(title))
                alert("Warning: '"+title+"' already exists, did not create");
              else
                store.saveTiddler(
                  title,title,
                  tiddlerText ? tiddlerText : "", // content
                  config.options.txtUserName,
                  new Date(),
                  fields, // tags
                  null // extra fields
                );
            }
            else {
              //alert("action "+title);

              // default to next actions
              if (!fields.containsAny(['N','F','W']))
                fields.push('N');

              fields = fields.map(function(f) {
                if (shortHand['Action'][f])
                  return shortHand['Action'][f];
                else
                  return f;
              });

              //alert("action "+title);
              title = title.trim();
              title = title.replace(/^\.+/,'');

              // If the action is already existing
              // let's presume that we want to create it as a unique action.
              // Use some code from NewMeansNewPlugin.
              if (config.macros.newTiddler.getName)
                title = config.macros.newTiddler.getName(title);

              if (document.getElementById('piShowActions').checked)
                displayThese.push(title);

              fields.push("Action"); // make it an action
              if (currentProject.trim() != "")
                fields.push(currentProject); // make it in this project

              // these should be configurable
              var automagicContexts = {
                'Call':'call',
                'Errand':'buy'
              };
              for (amc in automagicContexts) {
                var checkExists = store.fetchTiddler(amc);
                var startString = automagicContexts[amc];
                if (title.substr(0,startString.length).toLowerCase() == startString && checkExists && checkExists.hasTag('Context')) {
                  fields.push(amc);
                }
              }

              if (store.tiddlerExists(title))
                alert("Warning: '"+title+" already exists, did not create");
              else
                store.saveTiddler(
                  title,title,
                  tiddlerText ? tiddlerText : "", // content
                  config.options.txtUserName,
                  new Date(),
                  fields, // tags
                  null // extra fields
                );
            }
          }
        }

        for (var ii=0;ii<displayThese.length;ii++)
          story.displayTiddler("bottom",displayThese[ii]);

        displayMessage("Quick add items created");

        // Clear the quick add text area and close the slider. (jQuery anyone?)
        jQuery(pi).val('');
        jQuery(pi).closest('.sliderPanel').hide();

        return false;
      }); // end of createTiddlyButton

      // A button to clear the textarea
      createTiddlyButton(place,"clear","Clear text",function(){ jQuery(pi).val(''); });

      // A button to close the slider
      createTiddlyButton(place,"close","Close Quick Add",function(){ jQuery(pi).closest('.sliderPanel').hide(); });

    }
  }
});
!!Options
Show tickler alerts regardless of realm settings.
<<toggleTag AlertsIgnoreRealm MgtdSettings>>

Actions can have multiple contexts. 
<<toggleTag MultipleContexts MgtdSettings>>

Show full area name next to actions in action lists instead of just [A].
<<toggleTag FullAreaInActionLists MgtdSettings>>

Show full project name next to actions in action lists instead of just [P].
<<toggleTag FullProjectInActionLists MgtdSettings>>

Show full contact name next to actions in action lists instead of just [C].
<<toggleTag FullContactInActionLists MgtdSettings>>

Week should start on Monday in calendar popups.
<<toggleTag WeekStartsMonday MgtdSettings>>

Enter the date format for ticklers.
Tickler date format:<<mgtdEditField ticklerdateformat MgtdSettings>>
(see [[Date Formats|http://tiddlywiki.org/wiki/Date_Formats]]) 

Enter the date format for 'new journal'.
Journal date format:<<mgtdEditField newjournaldateformat MgtdSettings>>
(see [[Date Formats|http://tiddlywiki.org/wiki/Date_Formats]]) 

Hour that ticklers should become active on their tickler date. (0 = Midnight, 12 = Midday)
Tickler activate hour:<<mgtdEditField tickleractivatehour MgtdSettings>>
<<saveAndReload>> <<tiddler RefreshPageDisplay with: "Refresh Page">> <<fontSize "Font Size:">>
// requires MgtdIndexedTags for the fastTagged and getByIndex methods
// TODO make these usable without MgtdIndexedTags if it doesn't exist

merge(Tiddler.prototype,{


  addTag: function(tag) {
    store.setTiddlerTag(this.title,true,tag);
  },

  removeTag: function(tag) {
    store.setTiddlerTag(this.title,false,tag);
  },

  setTagFromGroup: function(tagGroup,tag) {
    var tagList = fastTagged(tagGroup);

    // it goes slow if you don't do this
    store.suspendNotifications();

    // remove all the tags in the group
    for (var i=0;i<tagList.length;i++)
      this.removeTag(tagList[i].title);

    // add the one selected
    if (tag)
      this.addTag(tag);

    // touch the modified date so we can sort usefully
    this.modified = new Date();

    // resume notification and notify
    store.resumeNotifications();
    store.notify(this.title,true);
  },

  toggleTag: function(tag) {
    store.setTiddlerTag(this.title,!this.hasTag(tag),tag);
    // touch the modified date
    this.modified = new Date();
  },

  hasTag: function(tag) {
    return this.tags.contains(tag);
  },

  getParent: function(tag) {
    return this.getByIndex(tag);
  },

  // experimental
  getGrandParent: function(parentTag,grandParentTag) {
    // eg tiddler.getGrandParent('Project','Area') ??
    var result = [];
    this.getByIndex(parentTag).each(function(parentTiddler){
      // because can be multiple
      store.fetchTiddler(parentTiddler).getByIndex(grandParentTag).each(function(grandParentTiddler){
        result.push(grandParentTiddler);
      });
    });
    return result;
  },

  // experimental. does this belong elsewhere?
  actionInArea: function(area) {
    //return this.getParent(area).contains(area) || this.getGrandParent('Project','Area').contains(area);
    return this.getGrandParent('Project','Area').contains(area);
  },

//-----------------------------------

  // experimental. try action dependencies

  actionsDependantOnThisAction: function() {
    return fastTagged(this.title).filterByTagExpr("Action && (Future || Next) && !Done");
  },

  autoNextAnyWaitingActions: function() {
    // XXX exactly what each am I using here?
    // because it looks like this gets munged
    // inside the each function. this makes me think
    // i'm not using the each i think i'm using
    // eek.
    var thisTiddler = this;
    this.actionsDependantOnThisAction().each(function(t){
      if (thisTiddler.hasTag('Done')) {
        if (t.actionCanBecomeNext()) {
          // we still have to check because it might have multiple dependencies
          if (!t.hasTag('Next')) {
            t.setTagFromGroup('ActionStatus','Next');
            displayMessage('Setting dependent action "' + t.title + '" to Next');
          }
        }
      }
      else {
        // this is because what if we go in reverse, ie untick the done checkbox
        // also why we need Future || Next in actionsDependantOnThisAction
        // don't need to check anything because any one dependency is enough to trigger going back to Future
        if (!t.hasTag('Future')) {
          t.setTagFromGroup('ActionStatus','Future');
          displayMessage('Setting dependent action "' + t.title + '" to Future');
        }
      }
    });
  },

  actionGetDependencies: function() {
    // an action with a parent action
    // we will take to mean that the parent action
    // must be done before this action
    // can become a next action
    return this.getParent('Action');
  },

  actionCanBecomeNext: function() {
    var result = true;
    this.actionGetDependencies().each(function(t){
      if (!store.fetchTiddler(t).hasTag('Done')) {
        // an action this action depends on is not done
        result = false;
      }
    });
    return result;
  },

//-----------------------------------

  hasParent: function(tag) {
    return this.getParent(tag).length > 0;
  },

  realmMismatchWithParent: function(tag) {
    var myRealm = this.getParent('Realm')[0];

    if (!myRealm)
      return true; // no realm, should be fixed..

    var myParent = this.getParent(tag)[0];
    if (!myParent)
      return false; // nothing to be mismatched with

    var parentTiddler = store.fetchTiddler(this.getParent(tag)[0]);
    if (!parentTiddler)
      return true; // doubt it would ever happen but...

    parentRealm = parentTiddler.getParent('Realm')[0]; // we assume one realm only...
    if (!parentRealm)
      return true;

    return parentRealm != myRealm;
  }

});

merge(config.macros,{

  singleToggleTag: {

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var pp = paramString.parseParams("tag",null,true);

      if (!tiddler)
        tiddler = store.getTiddler(getParam(pp,"title"));

      var tag = getParam(pp,"tag");
      var t = store.fetchTiddler(tag);

      var title = getParam(pp,"title",tiddler.title);


      var actOnTiddler = store.getTiddler(title);

      var label = store.getTiddlerSlice(t.title,"button");
      var labelOff = store.getTiddlerSlice(t.title,"buttonOff");

      // dreadful hack
      if (tag == "Starred")
        label = config.mGTD.data.unicodeStar;

      var autoClass = "button " + t.title.replace(/[\/ ]/g,'')

      if (!label) label = t.title;
      if (!labelOff) labelOff = label;


      var curState = actOnTiddler.hasTag(tag);

      var cl = createTiddlyButton(place, curState?label:labelOff, t.title, function(e) {
          actOnTiddler.toggleTag(tag);
          return false;
        },
        autoClass + " " + (curState ? "on" : "off")
        );
    }

  },

  groupOfSingleToggleTags: {

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var pp = paramString.parseParams("tag",null,true);

      var useCheckbox = getParam(pp,"useCheckbox","");

      if (!tiddler)
        tiddler = store.getTiddler(getParam(pp,"title"));

      var tag = getParam(pp,"tag");

      var title = getParam(pp,"title",tiddler.title);
      var refresh = getParam(pp,"refresh"); // stupid bit for pagetemplate hack

      var includeNew = getParam(pp,"includeNew","yes"); // default on for the moment..

      var actOnTiddler = store.getTiddler(title);

      //// TODO: refactor. (This realm filtering is copy/pasted this from multiSelectTag...)
      //the extra || condition below should take care of contexts now. so actually you can have realm specific contexts if you want
      var thisRealm = tiddler.getParent('Realm')[0];
      var filterRealm = "";
      if (thisRealm && tag != "Realm") { // && tag != "Context") {
        // only want to see things in my realm (or things that don't have a realm...)
        filterRealm += "(tiddler.tags.contains('"+thisRealm.replace(/'/g,"\\'")+"') || !tiddler.hasParent('Realm'))";
      }

      var getValues = fastTagged(tag).filterByEval(filterRealm == '' ? 'true' : filterRealm).sort(function(a,b){
        return a.sorterUtil(b,"orderSlice");
      });

      getValues.each(function(t) {

        var label = store.getTiddlerSlice(t.title,"button");
        var autoClass = "button " + t.title.replace(/[\/ ]/g,'')

        if (!label)
          label = t.title;

        if (useCheckbox == "yes") {
          // checkbox style toggle tags
          wikify("<<toggleTag [["+t.title+"]] [["+tiddler.title+"]] ->>[["+label+"]]&nbsp;" ,place,null,tiddler);
        }
        else {
          // button style toggle tags
          var cl = createTiddlyButton(place, label, t.title, function(e) {
              actOnTiddler.toggleTag(t.title);
              if (refresh == "page")
                refreshPageTemplate();
              return false;
            },
            autoClass + " " + (actOnTiddler.getByIndex(tag).contains(t.title) ? "on" : "off")
            );
        }
       });

       if (includeNew) {
        // add a button to create...
        createTiddlyButton(place, "+", "New "+tag+"...", function(e) {
            var newItemTitle = config.macros.multiSelectTag.createNewItem(tag);
            if (newItemTitle)
              actOnTiddler.addTag(newItemTitle);
            if (tag == "Realm")
              refreshPageTemplate();
            return false;
          },
          tag == "Realm"?"button off":"button" // the class so it looks right in the top menu
        );
       }
    }

  },

  multiToggleTag: {

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var pp = paramString.parseParams("tag",null,true);

      if (!tiddler)
        tiddler = store.getTiddler(getParam(pp,"title"));

      var tag = getParam(pp,"tag");

      var refresh = getParam(pp,"refresh"); // stupid bit for pagetemplate hack
      var longVersion = getParam(pp,"longVersion");

      var title = getParam(pp,"title",tiddler.title);
      var actOnTiddler = store.getTiddler(title);

      var getValues = fastTagged(tag).sort(function(a,b){
        return a.sorterUtil(b,"orderSlice");
      });


      getValues.each(function(t) {
        var label = store.getTiddlerSlice(t.title,longVersion?"buttonLong":"button");

        var extraClass = store.getTiddlerSlice(t.title,"buttonClass");
        var autoClass = (extraClass ? extraClass : "") + " button " + t.title.replace(/[\/ ]/g,'')
        if (!label) label = t.title;
        var cl = createTiddlyButton(place, label, t.title, function(e) {
            actOnTiddler.setTagFromGroup(tag,t.title);
            if (refresh == "page")
              refreshPageTemplate();
            return false;
          },
          autoClass + " " + (actOnTiddler.getByIndex(tag).contains(t.title) ? "on" : "off")
          );
      });

    }
  },

  multiSelectTag: {

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var pp = paramString.parseParams("tag",null,true);

      if (!tiddler)
        tiddler = store.getTiddler(getParam(pp,"title"));

      var tag = getParam(pp,"tag");
      var refresh = getParam(pp,"refresh"); // stupid bit for pagetemplate hack

      var allowNone = getParam(pp,"allowNone");

      var includeNew = getParam(pp,"includeNew","yes"); // default on for the moment..

      var title = getParam(pp,"title",tiddler.title);
      var actOnTiddler = store.getTiddler(title);

      var selectOptions = [];

      if (allowNone)
        selectOptions.push({name: null, caption:'-'});// TODO this doesn't work right?

      if (includeNew)
        selectOptions.push({name: '__new__', caption:'New '+tag+'...'});

      var getValues = fastTagged(tag).sort(function(a,b){
        return a.sorterUtil(b,"orderSlice");
      });


      // a few automagic filters should make life easier

      var thisRealm = tiddler.getParent('Realm')[0];

      var filterRealm = "";
      var filterComplete = "";

      //the extra || condition below should take care of contexts now. so actually you can have realm specific contexts if you want
      if (thisRealm && tag != "Realm") { // && tag != "Context") {
        // only want to see things in my realm (or things that don't have a realm...)
        filterRealm += "(tiddler.tags.contains('"+thisRealm.replace(/'/g,"\\'")+"') || !tiddler.hasParent('Realm'))";
      }

      if (tag == "Project") {
        // only want to see active projects
        filterComplete += "!tiddler.tags.contains('Complete')";
      }

      // Big thanks to Kralik and whoever wrote this: http://tiddlywiki.org/wiki/MonkeyGTD/Customization_Guide/Waiting_Actions
      if (tag == "Action") {
        // only want to see active actions; actions only show other actions in same project (or no project)
        if (tiddler.hasParent('Project')) {
          // XXX slightly broken for actions with multiple projects. But i can live with it..
          // note: getParent returns an array
          filterComplete += "(!tiddler.tags.contains('Done') && tiddler.tags.contains('"+tiddler.getParent('Project')[0].replace(/'/g,"\\'")+"'))";
        }
        else {
          filterComplete += "(!tiddler.tags.contains('Done') && !tiddler.hasParent('Project'))";
        }

      }

      var filterExpr = "true";

      if (filterRealm != "" && filterComplete != "") {
        filterExpr = filterRealm + " && " + filterComplete;
      }
      else if (filterRealm !=  "") {
        filterExpr = filterRealm;
      }
      else if (filterComplete !=  "") {
        filterExpr = filterComplete;
      }
      // ...yuck

      // exclude ourselves (needed now for action dependencies)
      filterExpr = "((" + filterExpr + ") && (tiddler.title != '" + tiddler.title.replace(/'/g,"\\'") + "'))";

      var currentVal = tiddler.getParent(tag)[0];
      if (currentVal && currentVal != '') {
        // prevent weirdness if the current value isn't in the list
        // eg an action in a completed project
        filterExpr = "(" + filterExpr + ") || tiddler.title == '" + currentVal.replace(/'/g,"\\'") + "'";

      }
      if (tag == "Project" && tiddler.hasTag('Project')) {
        // special case: don't let a project be a subproject of itself
        filterExpr = "(" + filterExpr + ") && tiddler.title != '" + tiddler.title.replace(/'/g,"\\'") + "'";
      }

      // okay now do the filtering
      getValues = getValues.filterByEval(filterExpr);

      getValues.each(function(t) {
        var useTitle = store.getTiddlerSlice(t.title,"button");
        if (!useTitle) useTitle = t.title;
        if (useTitle.length > 50) useTitle = useTitle.substr(0,50) + "...";
        selectOptions.push({name: t.title, caption:useTitle});
      });

      var dd = createTiddlyDropDown(place, function(e) {
          var selectedItem = selectOptions[this.selectedIndex].name;
          if (selectedItem == '__new__') {
            // User is creating a new item on the fly via the dropdown
            var realm = null;
            if (tag != "Realm") {
              // Keep from double tagging in silly ways. Don't want realms to have a realm...
              if (actOnTiddler.hasParent('Realm')) {
                realm = actOnTiddler.getParent('Realm')[0]; // getParent returns array. use first realm
              }
              else {
                realm = config.macros.mgtdList.getRealm();
              }
            }
            selectedItem = config.macros.multiSelectTag.createNewItem(tag, realm);
          }

          // if selectedItem is null this works to remove any
          actOnTiddler.setTagFromGroup(tag,selectedItem);

          // Once again, big thanks to Kralik and whoever wrote this: http://tiddlywiki.org/wiki/MonkeyGTD/Customization_Guide/Waiting_Actions
          // automatically make dependent actions future
          if (tag == "Action") {
            if (selectedItem == null) {
              actOnTiddler.setTagFromGroup("ActionStatus", "Next");
            }
            else {
              actOnTiddler.setTagFromGroup("ActionStatus", "Future");
            }
          }

          if (refresh == "page")
            refreshPageTemplate();

          return false;
        },
        selectOptions,
        actOnTiddler.getByIndex(tag)[0]
      );

    },

    // want to reuse this...
    createNewItem: function(tag, realm) {
      var selectedItem = prompt("Enter name for new "+tag+":","");
      if (selectedItem) {
        selectedItem = config.macros.newTiddler.getName(selectedItem); // from NewMeansNewPlugin
        var tags = [];
        tags.push(tag); // make it into the thing you want
        if (realm) // make sure it's got a realm unless it IS a realm
          tags.push(realm);
        if (tag == "Project")
          tags.push("Active"); // if it's a project then make it active...
        if (tag == "Action")
          tags.push("Next"); // if it's an action then make it next...
        store.saveTiddler(selectedItem,selectedItem,"",config.options.txtUserName,new Date(),tags);
      }
      return selectedItem;
    }


  },

  multiCheckboxTag: {

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {

      var pp = paramString.parseParams("tag",null,true);

      if (!tiddler)
        tiddler = store.getTiddler(getParam(pp,"title"));

      var tag = getParam(pp,"tag");

      var title = getParam(pp,"title",tiddler.title);
      var actOnTiddler = store.getTiddler(title);

      var getValues = fastTagged(tag).sort(function(a,b){
        return a.sorterUtil(b,"orderSlice");
      });

      var output = "";
      getValues.each(function(t) {
        output += "<<toggleTag [[%0]] [[%1]] [[%0]]>>".format([
          t.title,
          actOnTiddler.title
        ]);
      });

      wikify(output,place,null,tiddler);

    }
  },

  // these don't really belong here but never mind..
  convertToFromTickler: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      if (tiddler.tags.contains('Tickler')) {

        createTiddlyButton(place, "make action", "make this tickler into a next action", function(e) {
            store.suspendNotifications();
            tiddler.removeTag("Tickler");
            tiddler.addTag("Action");
            tiddler.removeTag("Done");
            tiddler.setTagFromGroup("ActionStatus","Next");
            store.resumeNotifications();
            store.notify(tiddler.title,true);
            return false;
          });

        createTiddlyButton(place, "make project", "make this tickler into an active project", function(e) {
            store.suspendNotifications();
            tiddler.removeTag("Tickler");
            tiddler.addTag("Project");
            tiddler.removeTag("Complete");
            tiddler.setTagFromGroup("ProjectStatus",'Active');
            store.resumeNotifications();
            store.notify(tiddler.title,true);
            return false;
          });
      }
      if (tiddler.tags.containsAny(['Action','Project'])) {
        createTiddlyButton(place, "make tickler", "make this item into a tickler", function(e) {
            store.suspendNotifications();
            if (tiddler.hasTag("Project")) {
              // a little trick. it makes any actions associated with this project disappear from action lists
              // thanks to Jorge A. Ramos M.
              tiddler.setTagFromGroup("ProjectStatus",'Someday/Maybe');
            }
            tiddler.removeTag("Action");
            tiddler.removeTag("Project");
            tiddler.addTag("Tickler");
            if (!tiddler.tags.containsAny(['Daily','Weekly','Monthly','Yearly'])) {
              // thanks Kyle Baker
              tiddler.addTag("Once");
            }
            store.resumeNotifications();
            store.notify(tiddler.title,true);
            return false;
          });
      }
    }
  },

  convertActionToSubProj: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      if (tiddler.tags.contains('Action')) {

        createTiddlyButton(place, "make project", "make this action into a project", function(e) {
            store.suspendNotifications();
            tiddler.removeTag("Action");
            tiddler.removeTag("Next");
            tiddler.removeTag("Future");
            tiddler.removeTag("Waiting For");
            tiddler.removeTag("Done");
            tiddler.addTag("Project");
            tiddler.addTag("Active");
            store.resumeNotifications();
            store.notify(tiddler.title,true);
            return false;
          });

      }
    }
  },


  convertActionToReference: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      if (tiddler.tags.contains('Action')) {

        createTiddlyButton(place, "make reference", "make this action into a reference item", function(e) {
            store.suspendNotifications();
            tiddler.removeTag("Action");
            tiddler.removeTag("Next");
            tiddler.removeTag("Future");
            tiddler.removeTag("Waiting For");
            tiddler.removeTag("Done");
            tiddler.addTag("Reference");
            store.resumeNotifications();
            store.notify(tiddler.title,true);
            return false;
          });

      }
    }
  },


  linkToParent: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      var label = params[1] ? params[1] : '>>';
      var useTiddler = params[2] ? store.fetchTiddler(params[2]) : tiddler;
      var links = useTiddler.getByIndex(params[0]);
      var output = "";
      for (var i=0;i<links.length;i++)
        output += ( (i==0?'':' ') + "[[%1|%0]]".format([links[i], label == 'title' ? '['+links[i]+']' : label]) );
      if (output != "")
        wikify(output,place,null,useTiddler);
    }
  },

  // doesn't belong here since it's not a tag thing..
  deleteTiddler: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      var tiddlerToDelete = params[0];
      if (store.tiddlerExists(tiddlerToDelete)) {
        createTiddlyButton(place, '\u00d7', 'Delete tiddler '+tiddlerToDelete, function(e) {
          var deleteIt = true;
          if (config.options.chkConfirmDelete)
            deleteIt = confirm(config.commands.deleteTiddler.warning.format([tiddlerToDelete]));
          if (deleteIt) {
            story.closeTiddler(tiddlerToDelete);
            store.removeTiddler(tiddlerToDelete);
          }
          return false;
        },'deleteTiddlerButton');
      }
    }
  },

  // contributed by ByteDoc
  showNotesIcon: {

    imageData: "data:image/gif;base64,R0lGODlhDgAOAKU3AHJcM21cQnFhRYBkLXVlSHdoS3hpTH5sQXxtUYpvNMeKCcuRD9CZBdKbGuCbAM+iEtWkHtmmELiqgb+tgeSsPMCwgt6wLMOyhMa1hd22O+m2OM68iuK/QOy8UdHBjOzEKdfGk/XJKujJVPbNZP7RNezRdvTTZf3SbP/Zc/HejPXkfP/jfvfln//ogv7uiPjvsv/1j/v1x///mf//qv/72v//xP//zP///////////////////////////////////yH5BAEKAD8ALAAAAAAOAA4AAAZ6QJBw6PFsNheJEkSz1Z7QKAIUm1mv2BkC85J5v2CZ4cKCmc9omKGScrnfcFdhUmrZ7/hWQdJRrf6AgQQSGRwZFg8mgX+DIgwhHwwcKyiVlQISIxYRJCENlpaYJ5oLDg4WKCeWARKqJxoQEAoQFB22rAe5CQkDvb0AwEEAOw==",

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      var useTiddler = params[0] ? store.fetchTiddler(params[0]) : tiddler;
      if (useTiddler.text != "") {
        var safeNoteContent = wikifyPlain(useTiddler.title).trim().replace(/[\[\]\|]/g,'');
        var noteOutput = (safeNoteContent == "") ?
          "{{showNotesIcon{[img[%0]]}}}".format([config.macros.showNotesIcon.imageData]) :
          "{{showNotesIcon{[img[%1|%0]]}}}".format([config.macros.showNotesIcon.imageData,safeNoteContent]);
        var output = (config.browser.isIE ?  "(n)" : noteOutput); // because IE doesn't support data urls
        wikify(output,place,null,useTiddler);
      }
    }
  }

});

TiddlyWiki.prototype.setTiddlerTag_orig_SequencedActionPlugin_mgtd3 = TiddlyWiki.prototype.setTiddlerTag;
TiddlyWiki.prototype.setTiddlerTag = function(title,status,tag) {
  // Thanks Carsten Thiele
  var returnVal = this.setTiddlerTag_orig_SequencedActionPlugin_mgtd3(title,status,tag);
  var tiddler = this.fetchTiddler(title);
  if (tiddler && tag == 'Done' && tiddler.hasTag('Action')) { // not doing ticklers yet...
    tiddler.autoNextAnyWaitingActions();
  }
  return returnVal;
}


setStylesheet(["",
".button.off {font-weight:bold;border-color:#eee;background:#fff;color:#ccc;margin:0px;font-size:100%}",
".button.on {font-weight:bold;border-color:#444;background:#888;color:#fff;margin:0px;font-size:100%}",
".button.tiny { font-size:75%; }",
// TODO move this css elsewhere
"#realmSelector .button.off {margin:0 0.5em;padding:0 1em;border:2px solid #aaa;background:#eee;color:#333;}", // actually reversed, ie off is "on"
"#realmSelector .button.on {margin:0 0.5em;padding:0 1em;border:2px solid #999;background:#999;color:#ccc;}", // actually reversed, ie off is "on"

// TODO put into styles instead of here?
// actions
".viewer .Next.button.on {border-color:#55c;background:#cfa;color:#4a4;}",
".viewer .WaitingFor.button.on {border-color:#b84;background:#fdb;color:#b84;}",
".viewer .Future.button.on {border-color:#48b;background:#bdf;color:#48b;}",

// projects
".viewer .Active.button.on {border-color:#55c;background:#cfa;color:#4a4;}",
".viewer .SomedayMaybe.button.on {border-color:#48b;background:#bdf;color:#48b;}",

// ticklers
".viewer .Enabled.button.on {border-color:#55c;background:#cfa;color:#4a4;}",
".viewer .Disabled.button.on {border-color:#b84;background:#fdb;color:#b84;}",

".viewer .Starred.button {padding:0;font-size:100%;}",
".viewer .Starred.button.on {border-color:#fff;background:#fff;color:#f80;}",
".viewer .Starred.button.off {border-color:#fff;background:#fff;color:#ddd;}",

""].join("\n"),"tTag");

//}}}
URL: http://mgsd.tiddlyspot.com/upgrade.html
// won't be overwritten by updates

 // eg:

//// config.options.txtTheme = 'MonkeyGTDPrint3x5';
merge(config.macros, {
  eval: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      wikify(eval(paramString),place,null,tiddler);
    }
  }
});
Fix these manually. These have either no realm or a different realm to their parent.
{{cols2{

{{col{

<<mgtdList
	title:'Action/Project mismatch'
	startTag:Action
	view:star
	mode:global
	ignoreRealm:yes
	where:"tiddler.realmMismatchWithParent('Project')"
	group:Project
	gView:bold
	>>

}}}

{{col{

<<mgtdList
	title:'Projects/Area mismatch'
	startTag:Project
	view:star
	mode:global
	ignoreRealm:yes
	where:"tiddler.realmMismatchWithParent('Area')"
	group:Area
	gView:bold
	>>


<<mgtdList
	title:'Subproject/parent project mismatch'
	startTag:Project
	view:star
	mode:global
	ignoreRealm:yes
	where:"tiddler.realmMismatchWithParent('Project')"
	>>


}}}

}}}
/%
This is the contents of the help you get when you click the question mark button
%/

!Project
A [[Project|Projects Dashboard]] is made up of sub-projects, [[Action|Next and Waiting Actions]] items, and [[Reference Items]]. A project should have a defined set of tasks or actions (that may change) and when these tasks are done the project is done. If a project has no defined finish, consider calling it an [[Area]], and then make terminable projects in the area.

!Action
An [[Action|Next and Waiting Actions]] is a single task that can be completed at one point in time. If an action is more complex than this, considering making it a [[subproject|Subprojects]], or storing information in the action notes area. Using the [[CheckboxPlugin| http://www.tiddlytools.com/#CheckboxPlugin]] you can hid sub-actions inside an action.

!Tickler
A [[tickler|Tickler Dashboard]] is an [[Action|Next and Waiting Actions]] with a date attached. For example, if you need to call someone as part of a [[Project|Projects Dashboard]], that should be an action. But if you need to call someone on a specific day, then make it a [[tickler|Tickler Dashboard]] and MonkeyGTD will remind you on the day that you need to call them.

Example: The Health area contains a Dentist project with Actions Schedule Dentist, Go To Dentist and File Reimbursement. The latter two are Waiting while Schedule Dentist is Next. Once you call and schedule it, select the Go To Dentist Action, set it to Next, and then choose Make Tickler and set a date for the day of (or the day before) your appointment.

!View
No help yet for View

!Context
No help yet for Context

!Area
An [[Area]] is similar to a project, but it has no possible completion. Areas contain projects.

Example: The Health area might contain the project ''Run Marathon'', and the ''Household'' area might contain projects like ''Sell House'' and ''Buy House'' and ''Plant Garden'', each of which might have sub-projects.

!Realm
Realms are the top of the MonkeyGTD hierarchy. Realms contain Areas. Areas contain Projects. A Realm is a large-scale division of all the Areas, Projects, and Actions that might be placed into a GTD context.

!Reference
No help yet for Reference



!Action Dashboard
This Dashboard is the place where you can get an overview of your next actions.  

!Action Dashboard by Project
This Dashboard is the place where you can get an overview of your next actions organised by Project. Note that when doing work you shouldn't be really be using this view. You should be focussed on context rather than project.

!Action Dashboard by Context
This Dashboard is the place where you can get an overview of your next actions organised by Context. This might be too cluttered if you have a lot of actions.  If you know you are in a particular context consider just clicking the context to focus on that context.

!Next Actions
No help yet for Next Actions

!Next Actions by Context
No help yet for Next Actions by Context

!Next Actions by Project
No help yet for Next Actions by Project

!Projects Dashboard
No help yet for Projects Dashboard

!Projects Dashboard by Area
No help yet for Projects Dashboard by Area

!Next and Waiting Actions
No help yet for Next and Waiting Actions

!Next and Waiting Actions by Context
No help yet for Next and Waiting Actions by Context

!Next and Waiting Actions by Project
No help yet for Next and Waiting Actions by Project

!Done Actions
No help yet for Done Actions

!Active Projects With No Next Action
No help yet for Active Projects With No Next Action

!Quick Add
No help yet for Quick Add

!About Quick Add
No help yet for About Quick Add

!Tickler Dashboard
No help yet for Tickler Dashboard

!Ticklers Requiring Action
No help yet for Ticklers Requiring Action

!Reference Items
No help yet for Reference Items

!Starred Items
No help yet for Starred Items

|Name|MonkeyGTD Narrow|
|Description|MonkeyGTD Theme for Narrow Screens|
|PageTemplate|MonkeyGTDTheme##PageTemplate|
|StyleSheet|MonkeyGTDNarrow##StyleSheet|
|ViewTemplate|MonkeyGTDTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|

!StyleSheet
/*{{{*/

[[MonkeyGTDTheme##StyleSheet]]

/* give a little less space for menu */
#sidebar { width: 16em; /* instead of 16em */ }
#displayArea { margin-right:15.7em; /* instead of 15.7em */ }
#sidebarTabs .tabContents { width:15em; /* instead of 15em */ }

.txtMGTDMain .tab {
	font-size:80%!important;
}
.txtMGTDMain .tabContents {
	font-size:90%;
}


[[StyleSheet]]

/*}}}*/

|Name|MonkeyGTD Print 3x5|
|Description|MonkeyGTD Theme for Printing 3x5 Cards|
|PageTemplate|MonkeyGTDTheme##PageTemplate|
|StyleSheet|MonkeyGTDPrint3x5##StyleSheet|
|ViewTemplate|MonkeyGTDTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|

!StyleSheet
/*{{{*/

[[MonkeyGTDTheme##StyleSheet]]

[[MonkeyGTDTheme##Printing3x5Styles]]

[[StyleSheet]]

/*}}}*/


|Name|MonkeyGTD|
|Description|MonkeyGTD Theme|
|PageTemplate|MonkeyGTDTheme##PageTemplate|
|StyleSheet|MonkeyGTDTheme##StyleSheet|
|ViewTemplate|MonkeyGTDTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|

!ViewTemplate
<!--{{{-->
<div macro="showWhen tiddler.tags.containsAny(config.mGTD.specialTags)">
	[[MonkeyGTDTheme##ViewTemplateToolbar]]
	<div class='titleContainer viewer'>[[TitleButtonsSelector]]</div>
	<div macro="showWhenTaggedAny Reference View">
		<!--- just make it look like a normal tiddler --->
		<div class='viewer' macro='view text wikified'></div>
	</div>
	<div macro="else">
		<div macro="showWhen tiddler.text != ''">
			<div class='viewer'>Notes:</div>
			<div class='viewer postityellow' macro='view text wikified'></div>
		</div>
	</div>
	<div class='viewer'>[[DashboardSelector]]</div>
</div>
<div macro="hideWhen tiddler.tags.containsAny(config.mGTD.specialTags)">
	<!--- use standard template for non gtd tiddlers --->
	[[MptwTheme##ViewTemplate]]
</div>
<!--}}}-->

!ViewTemplateToolbar
<!--{{{-->
<!-- it's identical to Mptw at present except add Reference tag to new journal and new tiddler. will probably tweak it more later. -->
<div class='toolbar'>
	<span macro="showWhenTagged systemConfig">
		<span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>
	</span>
	<span macro="showWhenTagged systemTheme"><span macro="applyTheme"></span></span>
	<span macro="showWhenTagged systemPalette"><span macro="applyPalette"></span></span>
	<span macro="showWhen tiddler.tags.contains('css') || tiddler.title == 'StyleSheet'"><span macro="refreshAll"></span></span>
	<span style="padding:1em;"></span>
	<span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler > fields syncing permalink references jump'></span>
	<span macro='tiddler RefreshTiddler'></span>
	<span macro='jump goto customtooltip top'></span>
	<span macro='newHere label:"new here" tag:Reference'></span>
	<span macro='newJournalHere {{config.mGTD.getOptTxt("newjournaldateformat")?config.mGTD.getOptTxt("newjournaldateformat"):"DD-mmm-YY 0hh:0mm"}} tag:Reference'></span>
		<span macro="showWhenTagged Action"><span macro="newSavedTiddler title:'new dependent action' label:'new dependent action' tag:{{'Action Future [['+config.macros.mgtdList.getRealm()+']] [['+tiddler.getParent('Context')+']] [['+tiddler.getParent('Project')+']] [['+tiddler.title+']]'}}"></span></span>
</div>
<!--}}}-->

!Subtitle
<!--{{{-->
<span class='subtitle'>
	Updated
	<span macro='view modified date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>)
</span>
<!--}}}-->

!PageTemplate
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
	<div style="float:right" id='searchBox' macro="search Search..."></div>
	<div class='header2'>mGSD
		<span style="font-size:75%;font-weight:normal;color:[[ColorPalette::PrimaryLight]];" macro="mgtdVersion"></span>
		<span style="font-size:55%;font-weight:normal;color:[[ColorPalette::PrimaryLight]];">beta</span>
	</div>
</div>
<div macro='gradient vert [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryDark]]'>
	<div style="float:right" id="toggleSideBar"><span macro="toggleSideBar"></span></div>
	<div class='mtoolbar'>
	<div>
	<span class="label">REALM</span><span id='arealmSelector' macro="groupOfSingleToggleTags tag:Realm title:MgtdSettings refresh:page"></span>
	<span id='ticklerAlert' refresh='content' tiddler='TicklerAlert' force="true"></span>
	<span id='newButtons' refresh='content' tiddler='NewButtons'></span>
	</div>
	</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
	<div id='sidebarOptions'>
		<span macro="saveChanges"></span>
		<span macro="closeAll"></span>
		<span macro="showWhen store.tiddlerExists('TspotSidebar')||store.isShadowTiddler('TspotSidebar')"><span refresh='content' tiddler='TspotSidebar'></span></span>
		<span macro="showWhen store.tiddlerExists('MgtdSidebarExtra')"><span refresh='content' tiddler='MgtdSidebarExtra'></span></span>
</div>
	<div id='sidebarTabs' refresh='content' force='true' tiddler='MGTDSidebar'></div>
</div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->

!SidebarMenus
<!--{{{-->
<!--- not using --->
<div id='twsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('TW')">
	<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
	<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='twsidebar' macro="hideWhen store.fetchTiddler('MgtdSettings').tags.contains('TW')">
	<div id='sidebarOptions'>
		<span macro="showWhen store.tiddlerExists('TspotSidebar')||store.isShadowTiddler('TspotSidebar')"><span refresh='content' tiddler='TspotSidebar'></span></span>
		<span refresh='content' tiddler='CommonMenu'></span>
	</div>
</div>
<div id='monkeygtdsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('Do Work')">
	<div class="menu" refresh='content' tiddler='DoWorkMenu'></div>
</div>
<div id='monkeygtdsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('Review')">
	<div class='menu' refresh='content' tiddler='ReviewMenu'></div>
</div>
<div id='monkeygtdsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('Process Inbox')">
	<div class='menu' refresh='content' tiddler='ProcessInboxMenu'></div>
</div>
<!---
<div id='monkeygtdsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('Collect Items')">
	<div class='menu' refresh='content' tiddler='CollectItemsMenu'></div>
</div>
--->
<div id='monkeygtdsidebar' macro="showWhen store.fetchTiddler('MgtdSettings').tags.contains('Config')">
	<div class='menu' refresh='content' tiddler='ConfigMenu'></div>
</div>
<!--}}}-->

!Printing3x5Styles
/*{{{*/
@media print {

.cols3 .col {width: 100%; float:none;}
.cols2 .col {width: 100%; float:none;}

.titleContainer {text-align:center;}

/* LAYOUT ELEMENTS
========================================================== */
*
{
 margin: 0;
 padding: 0;

}

body {
 background: #fff;
 color: #000;
 font-size: 6.2pt;
 font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica,
Verdana, Arial, sans-serif;

}

img {
 max-width: 2.5in;
 max-height: 4.5in;

}

.tiddler {
 margin: 0 0 2em 0;
 border-top: 1px solid #000;
 page-break-before: always;

}

.tiddler:first-child {
 page-break-before: avoid;

}

p, blockquote, ul, li, ol, dt, dd, dl, table
{
 margin: 0 0 .3em 0;

}

h1, h2, h3, h4, h5, h6
{
 margin: .2em 0;

}

h1
{
 font-size: 1.5em;

}

h2
{
 font-size: 1.3em;

}

h3
{
 font-size: 1.25em;

}

h4
{
 font-size: 1.15em;

}

h5
{
 font-size: 1.1em;

}

blockquote
{
 margin: .6em;
 padding-left: .6em;
 border-left: 1px solid #ccc;

}

ul
{
 list-style-type: circle;

}

li
{
 margin: .1em 0 .1em 2em;
 line-height: 1.4em;

}

table
{
 border-collapse: collapse;
 font-size: 1em;

}

hr {
 border: none;
 border-top: dotted 1px #777;
 height: 1px;
 color: #777;
 margin: .6em 0;
}

}/* end @media print */

/*}}}*/


!StyleSheet
/*{{{*/

[[MptwTheme##StyleSheet]]



.header2 {
	background:url(http://randomibis.com/images/monkeygtd/logo-trans.gif) no-repeat -15px 2px transparent;
	padding:5px;
	padding-left:80px;
	color:white;
	font-size:1.3em;
	font-weight:bold;
}

#backstageShow { color:[[ColorPalette::PrimaryLight]] ! important; }

/* the png is superior due to alpha transparency. but IE can't do it */
/* html>body .header2 {background-image:url(http://randomibis.com/images/monkeygtd/logo-trans.png)} */
/* try this trick (also firefox only)... */
html>body .header2 {
	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABxBAMAAABM2hLHAAAAA3NCSVQICAjb4U/gAAAAMFBMVEX///////////////////////////////////////////////////////////////9Or7hAAAAAEHRSTlMAESIzRFVmd4iZqrvM3e7/dpUBFQAAAAlwSFlzAAGaAAABmgABJU9lCwAAABZ0RVh0Q3JlYXRpb24gVGltZQAwMy8xNS8wNszogUoAAAAldEVYdFNvZnR3YXJlAE1hY3JvbWVkaWEgRmlyZXdvcmtzIE1YIDIwMDSHdqzPAAAEIElEQVR4nK1Yz2sTURB+2SZtYm2o+OtS6x7Vg/UgSBVtD16k0Fbw5o/oH1CiHkSM2uKpIJL642wDevLQRlARRFMPejSKoCJIbD1oVXxYq7Umu+Pb3azNzpudpOB3eM2+fkzn+2be5k2FINDydhu1TeK0SELlRINkA/6kAeybjbHj4OFVeyPsDYtDHv1zI8mnPvjR/zTALuTbqmyoTzbk4ECVbNVnJ6z2dJW9WJ+d/C12+5k8rWvLwJyInPXIEmbNOuzilBAxj713AirHWLIBg0KsqOxS5IowzoF9g2MnbLW0LYhxgAX1qY9PvtPhdM0Z8sSl287z+hLMhtc0Na2W4efKx+pGdAK+hiZfyKulONazsKREJX+FJqtKChGRvZPTNZt9Ep6Q7LiTQbO92nFmCZskfDIJ9obfamktr0AtEi3Cl/06OzWjluSvPb9whpfAuqCxi47I1PfJx/gXkYPSvoecN2SvEDvlSzmI2Sr5EvQGd1ybS9YZi6rfOsxOOiJLL7FIDy2WGdxIfVfLEWsUR3HRhk+HK7JZAslWnR9Ak8fa8u01lcnkVPA5wZ1bQx4NbnQukDwPcRsZlZ5h2ElNZI5hh4gMQWEq+EwXpQoDUDfwInGo9DTJ8+B2fi1KOYadQn5FeZH54DMvErd8Jz5etUjglh/mRCaxSLaSbufXoAm477AiFllhyAb2aytXSfdFXYthrl07tUqOMWzcFFFeZC74vDyRdSqJNthKap3Ptis+3v9RpHa8t/5k2JrILNuumki2kstqV+xXHZEoFFtJ7XjzlcSh2EriUHwlcajWZYncyFVS82v4PcPGIiNsJbHImP3fRGp+se2qhcq+YNiaX6URho39ioIZTtb8ChG5y700an510SLfZRxiaxltZ99T5OY50Z8j/JIjFLs1L+J53a8YLTJpX1g5pkSiUCtxZh4ODEFhmxKJQnXNU+TIR7GvTITKPqfYLeryskr3S8vMQ5vt3nKxX1pmHgYycMe5uKNQmv0eMqJbmurijr7e94S26xolEk+N42S7RkbdH5pf8jjF7ij3Oz01jvyKATkrnTcflh2RKFRIJe+L+YwznZjB7R6ykuKBMG8RIrO0JekbMfXS6fmBt+nBJwGgTtgkbgo1+JR7CfqOU47Io3jbuA7WSY180flHhFZJhcgh/b8OTRW4rDqLnP83l+B1MEo0360EDmCRHtY9g3LgRdCxaApCpP+XVfK1E+r5QrmdEuljKDBejxqZdtFCiPSxUy6N101wTRDDUy1qx+tuORUq0o84AZZ/b14/os8VCBE1Xl/996QNTxr6wL7rJ68NTzpU8m9M7yMrsoq1j6DiJY+HJxJqvPZePHVE+ugD58WjDU9h2CRV8nF85Q5FrAhfDuMrdzhU8sDd3hHUEck1zhZiO1Gbv3NR7MzF6giHAAAAAElFTkSuQmCC)
}

.headerShadow, .headerForeground {
	padding:0;
}

.mtoolbar { padding:0.1em; padding-top:0.5em;}
.mtoolbar .button { margin-left:0.5em; padding:0.2em 0.3em; margin:0.2em 0.3em;  }
.mtoolbar .button.off {background-color:[[ColorPalette::TertiaryMid]]!important; color:black; font-weight:normal;border-color:[[ColorPalette::PrimaryDark]];}
.mtoolbar .button.on {background-color:[[ColorPalette::TertiaryLight]]; color:black; border-color:[[ColorPalette::PrimaryDark]];} 

.mtoolbar .button {
	-moz-border-radius-topleft: 0.5em;
	-moz-border-radius-topright: 0.5em;
}

#newButtons { padding-left:3em; }
#newButtons br { display:none; }
#newButtons .button { background-color:transparent; color:white; border-color:transparent; }

.txtMGTDMain .tabContents {
	font-size:120%;
}

.txtMGTDMore .tabContents {
	font-size:90%;
}

.tabContents .sliderButton {
	font-size:120%;
	background-color:[[ColorPalette::TertiaryLight]];
}



.mtoolbar .label { font-size:80%; color:[[ColorPalette::PrimaryLight]]; padding:0.5em;}


#displayArea {
	margin: 1em 15.7em 0em 1em; /* use the freed up space */
}

#sidebar, #sidebarOptions
	width:18em;
}

#sidebarTabs {
	width:100%;
}

#mainMenu { display:none; }

#sidebar .menu a {
	font-size:140%;
}

#sidebar .menu ul {
	padding-left:2em;
	padding-top:0;
	margin-top:0;
}
#sidebar .menu h1,
#sidebar .menu h2
{
	color:[[ColorPalette::PrimaryDark]];
	margin:0;
	padding:0;
	margin-top:0.25em;
}
#sidebar .menu h1 {
	font-size:180%;
}
#sidebar .menu h2 {
	font-size:140%;
	margin-left:0.5em;
}


.viewer table.twocol,
.viewer table.threecol {
	border-style:none ! important;
	border-collapse:no-collapse;
	width:100%;
	padding:0; margin:0;
}

.viewer table.twocol td,
.viewer table.threecol td {
	border-style:none ! important;
	vertical-align:top;
	padding-right:1em;
}

.viewer table.twocol tr,
.viewer table.threecol tr {
	border-style:none ! important;
}

.viewer table.twocol td {
	width:50%;
}
.viewer table.threecol td {
	width:33%;
}


.mgtdList h1 {
	border-bottom:1px solid #aaa;
	color:#444;
	font-size:110%;
	margin:0;
	padding:0;
}

.mgtdList h1 br {
	display:none;
}

.mgtdList h1 .button {
	border-color:transparent;
	font-weight:bold;
	font-size:110%;
}

.mgtdList h1 .button:hover {
	border-color:#999;
}

.mgtdList h2 {
	border-style:none!important;
	font-size:100%;
	margin:0; padding:0;
	margin-top:0.7em;
	margin-left:-0.2em;
	color:#444;
}

.mgtdList h2 .button {
	border-style:none!important;
}

.mgtdList {
	padding:0;
	padding-right:1em;
}

.mgtdList .innerList {
	padding:0.5em 1em 0em 1em;
}

.tabContents .sliderPanel {
	margin-left:2em;
}
.txtMGTDMain .mgtdList .innerList {
	font-size:80%;
	padding-left:0em;
}

.tabContents li {
	margin-left:2em;
}


.mgtdList .plain { padding-left:1em; }

#sidebar .mgtdList .plain { padding-left:0em; }
#sidebar .tabContents .sliderPanel { margin-left:1em; }
#sidebar .sliderPanel .mgtdList .plain { padding-left:0em; }
#sidebar .mgtdList .noneHeading .tiddlyLink { font-weight:normal!important; }

/* TODO why not just make it all of them... */
.mgtdList .action .tiddlyLinkExisting,
.mgtdList .plain .tiddlyLinkExisting,
.mgtdList .tickler .tiddlyLinkExisting,
.mgtdList .project .tiddlyLinkExisting
{
	font-weight: normal ! important;
}

/* TODO why not just make it all of them... */
.mgtdList .action .tiddlyLink,
.mgtdList .plain .tiddlyLink,
.mgtdList .tickler .tiddlyLink,
.mgtdList .project .tiddlyLink
{
	font-weight: normal ! important;
}

.mgtdList .button {
	font-weight: normal;
	margin:1px;
}

body {
	background: [[ColorPalette::TertiaryLight]];
}

.title { font-size:150%; color:black; }

#monkeygtdsidebar h1 {
	font-size:120%; color:green;
}

.none { color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }

.postityellow {
	background-color:#ffa;
	border:2px solid #dd8;
	padding-left:1em;
	padding-bottom:0.5em;
}
.postityellow h1,
.postityellow h2,
.postityellow h3,
.postityellow h4
{
	border-style:none;
}

#sidebar .sliderButton { font-weight:bold; padding-left:0.25em; }
#sidebar .sliderPanel ul { margin-bottom:0px; }
#sidebar .sliderPanel li { font-weight:medium; font-size:90%; }

#sidebar .mgtdList .innerList .tiddlyLink {
	font-size:120%;
}

.innerList h3 {
    font-size:80%;
    margin:0; padding:0;
    
}

#newButtons .sliderPanel {
	background-color:[[ColorPalette::TertiaryMid]];
	margin-top:4px;
	padding:1em;
	border-top:2px solid #444;
	border-bottom:2px solid #444;
}

#newButtons .sliderPanel br {
	display:inline;
}

#newButtons .sliderPanel .button {
	font-weight:bold;
	color:black
	border:1px solid black;
	background-color:#666;
}

.piBox {
	width:95%;
	height:8em;
}

.smaller { font-size: 85%; }

.scroll10 .innerList {
	overflow:auto;
	height:12em;
}

.dateBox {
	/* TODO make prettier */
	font-weight:medium; font-size:120%; margin:0.1em; background-color:#ffd;
	border:1px solid #ccc;
	background-color:#fff;
	text-align:center;
	width:10em;
}
.mgtdList .dateBox { font-weight:medium; font-size:100%; }

#ticklerAlert br { display:none; }

.ticklerAlert { padding-left:3em; }
.ticklerAlert .tiddlyLink { color:white; }

/* give a little more space for menu */
#sidebar { width: 21em; /* instead of 16em */ }
#displayArea { margin-right:20.7em; /* instead of 15.7em */ }
#sidebarTabs .tabContents { width:94%; /*16.5em;  instead of 15em */ } /* this seems silly */

#messageArea .help { width:40em; font-size:90%; }

#searchBox {
	position:absolute;
	top: 2px;
	right: 7em;
	z-index:200;
	/* make room for backstage link? */
}
#searchBox .button {
	display:none;
}

.tabContents .button {
	display:block;
}
.tabContents .li .button {
	display:inline; /* hack to make for quickopentags in tabTags look right... */
}
.tabContents li .button {
	display:inline; /* hack to make for quickopentags in tabTags look right... */
}

.txtMGTDMain .tab {
	font-size:120%;
}

.projLink .tiddlyLinkExisting, .projLink {
	font-weight:normal;
	color:[[ColorPalette::TertiaryDark]];
}

.projLinkFull .tiddlyLinkExisting, .projLinkFull {
	font-weight:normal;
	color:[[ColorPalette::TertiaryDark]];
	font-size:90%;
}

/* ============= new div based columns ================= */
.col {
  float: left;
  vertical-align:top;
}

.cols3, .cols2 {
	overflow: auto; /* contains floats. tnx FND */
}

/* IE not doing these right :( */
/* .cols3>br, .col>br { display:none; } */

/* so try this instead. it's annoying and will mean you have trouble 
with brs in non-mgtdlist content. .normal might help */
.cols2 br, .cols3 br  { display:none; }
.mgtdList br, .normal { display:block!important; }
.col .mgtdList { margin-bottom:1.5em; } /* since we're no longer seeing the brs... */

.cols3 .col {
  width: 33%;
}
.cols2 .col {
  width: 49%; /* 50% makes IE put them under each other */
}
.clear {
  clear: left;
}
/* ============= */

#toggleSideBar {
	margin-top:0.5em;
	margin-right:0.5em;
}
.button.HideSideBarButton {
	color:[[ColorPalette::PrimaryLight]];
	border-style:none;
	font-weight:bold;
	font-size:80%;
	padding:0em 1em;
	background-color:[[ColorPalette::PrimaryMid]];
	-moz-border-radius: 0.5em;
}

/* applicable for any printing. (moved from the 3x5 section) */
@media print {

	.viewer .tiddlyLink,
	.mgtdList .tiddlyLink,
	.tiddlyLink
	  { color:black ! important; }

	#sidebar, .mtoolbar, .header2, #toggleSideBar, #backstageArea,
	#backstageButton, #searchBox, .subtitle, .button
	  {display: none !important;}

	#displayArea {margin: 0;}
	#contentWrapper .chkOptionInput {border:0; width:0.25cm;}
	.titleContainer {border-bottom: 1px dotted #000;}

	.scroll10 .innerList { height:auto; overflow:visible; }

}


.controls {
	margin: auto;
	margin:0; padding:0;
}
.controls tr, .controls td, .controls {
	border-style:none!important;
	border-collapse:no-collapse;
}

.controls {
	clear:right;
	padding:0.5em;
	margin-top:1em;
	padding-bottom:0.5em;
}

.controlstint {
	background-color:#f0f0f0;
	border:1px solid #ccc!important; 
}

.toolbar .button {
	border-style:none!important;
}

.controls .subtitle {
	margin-left:0;
	padding-left:0;
}

.controls .button {
	background-color:#fff;
}

.controls .label {
	color:#888; font-size:90%;
}

.controls .floatleft {
	padding-right:1em;
	float:left;
}

.controls .floatright {
	padding-left:1em;
	float:right;
}


.controls .clearleft { clear:left; }
.controls .clearright { clear:right; }
.controls .clearboth { clear:both; }

.controls .button.on {
	background-color:#555; border-style:none!important;
}

.controlstint .button.Starred.off,
.controlstint .button.Starred.on
{ background-color:#f0f0f0; border-style:none!important;}

.unboldLinks .tiddlyLink {
	font-weight:normal;
}

.smaller select { font-size:90%; }

.buttonsLikeLinks .button {
	border-style:none!important;
	background:transparent;
	color:#008;
}

.buttonsLikeLinks .button:hover {
	text-decoration:underline;
}

.deleteTiddlerButton {
	color: #a66; font-weight:bold; margin-right:0.4em; margin-left:0.1em; 
}

.tiny {
	font-size:80%;  /* lazy */
}

/* make the icon fit in a bit better */
.showNotesIcon img {
	vertical-align:middle;
	margin-right: 1px;
}

/* for user styles */
[[StyleSheet]]

/*}}}*/

order:5
button:month
buttonLong:monthly

Name: MptwBlack
Background: #000
Foreground: #fff
PrimaryPale: #333
PrimaryLight: #555
PrimaryMid: #888
PrimaryDark: #aaa
SecondaryPale: #111
SecondaryLight: #222
SecondaryMid: #555
SecondaryDark: #888
TertiaryPale: #222
TertiaryLight: #666
TertiaryMid: #888
TertiaryDark: #aaa
Error: #300

Name: MptwBlue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

//{{{
// Pretty sure this is incomplete and experimental
// TODO: Fix it or remove it.

(function($){

merge(config.macros,{
  mptwCollapse: {
    handler: function(place,macroName,params) {
      createTiddlyButton(place, params[0] == '+' ? '\u25AD' : '\u25AC', 'collapse/uncollapse', function(){
        $(story.findContainingTiddler(place)).toggleClass('collapsed');
      });
    }
  }
});

/* this doesn't work unless you have a modified ViewTempate */
config.shadowTiddlers["MptwCollapsePluginStyles"] = ""
  +".collapsed .uncollapsedView { display:none;       }"
  +".collapsedView              { display:none;       }"
  +".collapsed .collapsedView   { display:block;      }"
  +".tiddler.collapsed          { padding-bottom:1em; }"
  +".tiddler.collapsed .title   { font-size:100%;     }"
;

store.addNotification("MptwCollapsePluginStyles",refreshStyles);

})(jQuery);

//}}}
/***
|Name:|MptwConfigPlugin|
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
***/
//{{{
var originalReadOnly = readOnly;
var originalShowBackstage = showBackstage;

config.options.chkHttpReadOnly = false;  // means web visitors can experiment with your site by clicking edit
readOnly = false;                        // needed because the above doesn't work any more post 2.1 (??)
showBackstage = true;                    // show backstage for same reason

config.options.chkInsertTabs = true;     // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = "";  // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = "";    // don't need message when creating a new tiddler

config.options.chkSaveBackups = true;         // do save backups
config.options.txtBackupFolder = 'twbackup';  // put backups in a backups folder

config.options.chkAutoSave = (window.location.protocol == "file:"); // do autosave if we're in local file

config.mptwVersion = "2.7.3";

config.macros.mptwVersion={handler:function(place){wikify(config.mptwVersion,place);}};

if (config.options.txtTheme == '')
  config.options.txtTheme = 'MptwTheme';

// add to default GettingStarted
config.shadowTiddlers.GettingStarted += "\n\nSee also [[MPTW]].";

// add select theme and palette controls in default OptionsPanel
config.shadowTiddlers.OptionsPanel = config.shadowTiddlers.OptionsPanel.replace(/(\n\-\-\-\-\nAlso see \[\[AdvancedOptions\]\])/, "{{select{<<selectTheme>>\n<<selectPalette>>}}}$1");

// these are used by ViewTemplate
config.mptwDateFormat = 'DD/MM/YY';
config.mptwJournalFormat = 'Journal DD/MM/YY';

//}}}
Name: MptwGreen
Background: #fff
Foreground: #000
PrimaryPale: #9b9
PrimaryLight: #385
PrimaryMid: #031
PrimaryDark: #020
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

Name: MptwRed
Background: #fff
Foreground: #000
PrimaryPale: #eaa
PrimaryLight: #c55
PrimaryMid: #711
PrimaryDark: #500
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

|Name|MptwRounded|
|Description|Mptw Theme with some rounded corners (Firefox only)|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|PageTemplate|MptwTheme##PageTemplate|
|StyleSheet|##StyleSheet|

!StyleSheet
/*{{{*/

[[MptwTheme##StyleSheet]]

.tiddler,
.sliderPanel,
.button,
.tiddlyLink,
.tabContents
{ -moz-border-radius: 1em; }

.tab {
	-moz-border-radius-topleft: 0.5em;
	-moz-border-radius-topright: 0.5em;
}
#topMenu {
	-moz-border-radius-bottomleft: 2em;
	-moz-border-radius-bottomright: 2em;
}

/*}}}*/

Name: MptwSmoke
Background: #fff
Foreground: #000
PrimaryPale: #aaa
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88

|Name|MptwStandard|
|Description|Mptw Theme with the default TiddlyWiki PageLayout and Styles|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
Name: MptwTeal
Background: #fff
Foreground: #000
PrimaryPale: #B5D1DF
PrimaryLight: #618FA9
PrimaryMid: #1a3844
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #f8f8f8
TertiaryLight: #bbb
TertiaryMid: #999
TertiaryDark: #888
Error: #f88
|Name|MptwTheme|
|Description|Mptw Theme including custom PageLayout|
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|

http://mptw.tiddlyspot.com/#MptwTheme ($Rev: 1829 $)

!PageTemplate
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
	<div class='headerShadow'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
	</div>
	<div class='headerForeground'>
		<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
		<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
	</div>
</div>
<!-- horizontal MainMenu -->
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<!-- original MainMenu menu -->
<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->
<div id='sidebar'>
	<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
	<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->

!ViewTemplate
<!--{{{-->
<div class="uncollapsedView">
[[MptwTheme##ViewTemplateToolbar]]

<div class="tagglyTagged" macro="tags"></div>

<div class='titleContainer'>
	<span class='title' macro='view title'></span>
	<span macro="miniTag"></span>
</div>

<div class='subtitle'>
	(updated <span macro='view modified date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>
	by <span macro='view modifier link'></span>)
	<!--
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>)
	-->
</div>

<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">
	<div class='viewer'><pre macro='view text'></pre></div>
</div>
<div macro="else">
	<div class='viewer' macro='view text wikified'></div>
</div>

<div class="tagglyTagging" macro="tagglyTagging"></div>
</div>
<div class="collapsedView">
	<span class='toolbar'>
		<span macro='toolbar closeTiddler'></span>
		<span macro='mptwCollapse +'></span>
	</span>
	<span class='title' macro='view title'></span>
</div>

<!--}}}-->

!ViewTemplateToolbar
<!--{{{-->
<div class='toolbar'>
	<span macro="showWhenTagged systemConfig">
		<span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>
	</span>
	<span macro="showWhenTagged systemTheme"><span macro="applyTheme"></span></span>
	<span macro="showWhenTagged systemPalette"><span macro="applyPalette"></span></span>
	<span macro="showWhen tiddler.tags.contains('css') || tiddler.title == 'StyleSheet'"><span macro="refreshAll"></span></span>
	<span style="padding:1em;"></span>
	<span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler > fields syncing permalink references jump'></span> <span macro='tiddler RefreshTiddler'></span> <span macro='newHere label:"new here"'></span>
	<span macro='newJournalHere {{config.mptwJournalFormat?config.mptwJournalFormat:"MM/0DD/YY"}}'></span>
	<!--span macro='mptwCollapse -'></span-->
</div>
<!--}}}-->

!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar +saveTiddler saveCloseTiddler closeOthers -cancelTiddler cancelCloseTiddler deleteTiddler"></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div macro='annotations'></div>
<div class="editLabel">Content</div><div class="editor" macro="edit text"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>
<!--}}}-->

!StyleSheet
/*{{{*/

/* a contrasting background so I can see where one tiddler ends and the other begins */
body {
	background: [[ColorPalette::TertiaryLight]];
}

/* sexy colours and font for the header */
.headerForeground {
	color: [[ColorPalette::PrimaryPale]];
}
.headerShadow, .headerShadow a {
	color: [[ColorPalette::PrimaryMid]];
}

/* separate the top menu parts */
.headerForeground, .headerShadow {
	padding: 1em 1em 0;
}

.headerForeground, .headerShadow {
	font-family: 'Trebuchet MS', sans-serif;
	font-weight:bold;
}
.headerForeground .siteSubtitle {
	color: [[ColorPalette::PrimaryLight]];
}
.headerShadow .siteSubtitle {
	color: [[ColorPalette::PrimaryMid]];
}

/* make shadow go and down right instead of up and left */
.headerShadow {
	left: 1px;
	top: 1px;
}

/* prefer monospace for editing */
.editor textarea, .editor input {
	font-family: 'Consolas', monospace;
	background-color:[[ColorPalette::TertiaryPale]];
}


/* sexy tiddler titles */
.title {
	font-size: 250%;
	color: [[ColorPalette::PrimaryLight]];
	font-family: 'Trebuchet MS', sans-serif;
}

/* more subtle tiddler subtitle */
.subtitle {
	padding:0px;
	margin:0px;
	padding-left:1em;
	font-size: 90%;
	color: [[ColorPalette::TertiaryMid]];
}
.subtitle .tiddlyLink {
	color: [[ColorPalette::TertiaryMid]];
}

/* a little bit of extra whitespace */
.viewer {
	padding-bottom:3px;
}

/* don't want any background color for headings */
h1,h2,h3,h4,h5,h6 {
	background-color: transparent;
	color: [[ColorPalette::Foreground]];
}

/* give tiddlers 3d style border and explicit background */
.tiddler {
	background: [[ColorPalette::Background]];
	border-right: 2px [[ColorPalette::TertiaryMid]] solid;
	border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;
	margin-bottom: 1em;
	padding:1em 2em 2em 1.5em;
}

/* make options slider look nicer */
#sidebarOptions .sliderPanel {
	border:solid 1px [[ColorPalette::PrimaryLight]];
}

/* the borders look wrong with the body background */
#sidebar .button {
	border-style: none;
}

/* this means you can put line breaks in SidebarOptions for readability */
#sidebarOptions br {
	display:none;
}
/* undo the above in OptionsPanel */
#sidebarOptions .sliderPanel br {
	display:inline;
}

/* horizontal main menu stuff */
#displayArea {
	margin: 1em 15.7em 0em 1em; /* use the freed up space */
}
#topMenu br {
	display: none;
}
#topMenu {
	background: [[ColorPalette::PrimaryMid]];
	color:[[ColorPalette::PrimaryPale]];
}
#topMenu {
	padding:2px;
}
#topMenu .button, #topMenu .tiddlyLink, #topMenu a {
	margin-left: 0.5em;
	margin-right: 0.5em;
	padding-left: 3px;
	padding-right: 3px;
	color: [[ColorPalette::PrimaryPale]];
	font-size: 115%;
}
#topMenu .button:hover, #topMenu .tiddlyLink:hover {
	background: [[ColorPalette::PrimaryDark]];
}

/* make 2.2 act like 2.1 with the invisible buttons */
.toolbar {
	visibility:hidden;
}
.selected .toolbar {
	visibility:visible;
}

/* experimental. this is a little borked in IE7 with the button 
 * borders but worth it I think for the extra screen realestate */
.toolbar { float:right; }

/* fix for TaggerPlugin. from sb56637. improved by FND */
.popup li .tagger a {
   display:inline;
}

/* makes theme selector look a little better */
#sidebarOptions .sliderPanel .select .button {
  padding:0.5em;
  display:block;
}
#sidebarOptions .sliderPanel .select br {
	display:none;
}

/* make it print a little cleaner */
@media print {
	#topMenu {
		display: none ! important;
	}
	/* not sure if we need all the importants */
	.tiddler {
		border-style: none ! important;
		margin:0px ! important;
		padding:0px ! important;
		padding-bottom:2em ! important;
	}
	.tagglyTagging .button, .tagglyTagging .hidebutton {
		display: none ! important;
	}
	.headerShadow {
		visibility: hidden ! important;
	}
	.tagglyTagged .quickopentag, .tagged .quickopentag {
		border-style: none ! important;
	}
	.quickopentag a.button, .miniTag {
		display: none ! important;
	}
}

/* get user styles specified in StyleSheet */
[[StyleSheet]]

/*}}}*/

|Name|MptwTrim|
|Description|Mptw Theme with a reduced header to increase useful space|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|StyleSheet|MptwTheme##StyleSheet|
|PageTemplate|##PageTemplate|

!PageTemplate
<!--{{{-->

<!-- horizontal MainMenu -->
<div id='topMenu' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<span refresh='content' tiddler='SiteTitle' style="padding-left:1em;font-weight:bold;"></span>:
<span refresh='content' tiddler='MainMenu'></span>
</div>
<div id='sidebar'>
	<div id='sidebarOptions'>
		<div refresh='content' tiddler='SideBarOptions'></div>
		<div style="margin-left:0.1em;"
			macro='slider chkTabSliderPanel SideBarTabs {{"tabs \u00bb"}} "Show Timeline, All, Tags, etc"'></div>
	</div>
</div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlerDisplay'></div>
</div>

/***
|Description:|A place to put your config tweaks so they aren't overwritten when you upgrade MPTW|
See http://www.tiddlywiki.org/wiki/Configuration_Options for other options you can set. In some cases where there are clashes with other plugins it might help to rename this to zzMptwUserConfigPlugin so it gets executed last.
***/
//{{{

// example: set your preferred date format
//config.mptwDateFormat = 'MM/0DD/YY';
//config.mptwJournalFormat = 'Journal MM/0DD/YY';

// example: set the theme you want to start with
//config.options.txtTheme = 'MptwRoundTheme';

// example: switch off autosave, switch on backups and set a backup folder
//config.options.chkSaveBackups = true;
//config.options.chkAutoSave = false;
//config.options.txtBackupFolder = 'backups';

// uncomment to disable 'new means new' functionality for the new journal macro
//config.newMeansNewForJournalsToo = false;

//}}}
Calgary International Airport
Main Terminal
Across from U.S. Departures
2nd Floor departure level
2000 Airport Road North East
Calgary, AB, 
T2E 6W5
Monday to Sunday: 8:00 a.m. to 5:00 p.m.
http://www.cbsa-asfc.gc.ca/prog/nexus/paper-papier-eng.html
403-292-5421
https://goes-app.cbp.dhs.gov/

<<newSavedTiddler title:'new Action' label:'+ action' tag:{{'Action Next [['+config.macros.mgtdList.getRealm()+']]'}}>>
<<newSavedTiddler title:'new Project' label:'+ project' tag:{{'Project Active [['+config.macros.mgtdList.getRealm()+']]'}}>>
/%<<newSavedTiddler title:'new Tickler' label:'+ tickler' tag:{{'Tickler Once [['+config.macros.mgtdList.getRealm()+']]'}}>>
%/<<calendarPopup '+ tickler' 'new Tickler'>>/% <-- experimental %/
<<newSavedTiddler title:'new Reference Item' label:'+ reference' tag:{{'Reference [['+config.macros.mgtdList.getRealm()+']]'}}>>
<slider quick add>
<<processInbox>>
</slider>
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
  newHere: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
    }
  },
  newJournalHere: {
    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
    }
  }
});

//}}}
/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1.1a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{

// change this or set config.newMeansNewForJournalsToo it in MptwUuserConfigPlugin
if (config.newMeansNewForJournalsToo == undefined) config.newMeansNewForJournalsToo = true;

String.prototype.getNextFreeName = function() {
  numberRegExp = / \(([0-9]+)\)$/;
  var match = numberRegExp.exec(this);
  if (match) {
  var num = parseInt(match[1]) + 1;
    return this.replace(numberRegExp," ("+num+")");
  }
  else {
    return this + " (1)";
  }
}

config.macros.newTiddler.checkForUnsaved = function(newName) {
  var r = false;
  story.forEachTiddler(function(title,element) {
    if (title == newName)
      r = true;
  });
  return r;
}

config.macros.newTiddler.getName = function(newName) {
  while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
    newName = newName.getNextFreeName();
  return newName;
}


config.macros.newTiddler.onClickNewTiddler = function()
{
  var title = this.getAttribute("newTitle");
  if(this.getAttribute("isJournal") == "true") {
    title = new Date().formatString(title.trim());
  }

  // ---- these three lines should be the only difference between this and the core onClickNewTiddler
  if (config.newMeansNewForJournalsToo || this.getAttribute("isJournal") != "true")
    title = config.macros.newTiddler.getName(title);

  var params = this.getAttribute("params");
  var tags = params ? params.split("|") : [];
  var focus = this.getAttribute("newFocus");
  var template = this.getAttribute("newTemplate");
  var customFields = this.getAttribute("customFields");
  if(!customFields && !store.isShadowTiddler(title))
    customFields = String.encodeHashMap(config.defaultCustomFields);
  story.displayTiddler(null,title,template,false,null,null);
  var tiddlerElem = story.getTiddler(title);
  if(customFields)
    story.addCustomFields(tiddlerElem,customFields);
  var text = this.getAttribute("newText");
  if(typeof text == "string")
    story.getTiddlerField(title,"text").value = text.format([title]);
  for(var t=0;t<tags.length;t++)
    story.setTiddlerTag(title,tags[t],+1);
  story.focusTiddler(title,focus);
  return false;
};

//}}}
config.macros.newSavedTiddler={};
config.macros.newSavedTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	if (readOnly) {
		return false;
	}
	var p = paramString.parseParams("anon",null,true,false,false);
	var label = getParam(p,"label","NewSavedTiddler");
	var tooltip = getParam(p,"tooltip","");
	//
	// if no tooltip specified, try prompt, title, label
	//
	if (!tooltip) {
		var tPrompt = getParam(p,"prompt","");
		var title  = getParam(p,"title","");
		var label  = getParam(p,"label","");
		if (tPrompt) {
			tooltip = tPrompt;
		}
		else if (title) {
			tooltip = 'Create a ' + title;
		}
		else if (label) {
			tooltip = 'Create a ' + label;
		}
		else {
			tooltip = 'Create a new saved tiddler';
		}
	}
	var btn = createTiddlyButton(place,label,tooltip,this.onClick);
	btn.params = paramString;
	return false;
};

config.macros.newSavedTiddler.onClick = function(e) {
	var p = this.params.parseParams("anon",null,true,false,false);
	var titlePrompt = getParam(p,"prompt","");
	//
	// if no titlePrompt for the popup, try using the title or label fields
	// to personalize the prompt
	//
	if (!titlePrompt) {
		var titleT = getParam(p,"title","");
		var labelT = getParam(p,"label","");
		if (titleT) {
			titlePrompt = 'Enter name for ' + titleT + ":";
		}
		else if (labelT) {
			titlePrompt = 'Enter name for ' + labelT + ":";
		}
		else {
			// default prompt
			titlePrompt = 'Enter name for new tiddler:';
		}
	}
	var title = prompt(titlePrompt,"");
	if (title) {
		if (typeof config.macros.newTiddler.getName == "function")  {
			title = config.macros.newTiddler.getName(title); // from NewMeansNewPlugin
		}
		var text = getParam(p,"text","");
		var tags = getParam(p,"tag","");
		var fields = getParam(p,"fields","").decodeHashMap();
		tags = tags.replace(/\[\(/g,'[[');
		tags = tags.replace(/\)\]/g,']]');

                // Oveek: a fix for TiddlyWeb
                // http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/edff49f9a9e9f47b/e02cb3c4ba88f819?pli=1
                merge(fields, config.defaultCustomFields, true); 

		var tiddler = store.saveTiddler(title,title,text,config.options.txtUserName,new Date(),tags,fields);
		autoSaveChanges(null,[tiddler]);
		story.displayTiddler(this,title);
	}
	return false;
}

order:1
button:n
buttonLong:next
<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:ActionProj mode:global
	where:tiddler.hasActiveProject()
	newButtonTags:'Action Next'
>>
<<mgtdList title:'Next Actions by Contact' startTag:Action tags:'Next && !Done' view:ActionProj mode:global
	group:Contact
	gView:bold
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
>>
<<mgtdList title:'Next Actions by Context' startTag:Action tags:'Next && !Done' view:ActionProj mode:global
	group:Context
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
>>
<<mgtdList startTag:Action tags:'Next && !Done' view:Action mode:global
	group:Project
	gView:bold
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>
{{cols2{

{{col{

<<mgtdList startTag:Action title:'Next' tags:'Next && !Done' view:ActionProj mode:global
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>

}}}

{{col{

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !Done' view:ActionProj mode:global
	newButtonTags:'Action [(Waiting For)]'
	where:tiddler.hasActiveProject()
	>>

}}}

}}}
{{cols2{

{{col{

<<mgtdList startTag:Action title:'Next' tags:'Next && !Done' view:ActionProj mode:global
	group:Contact
	gView:bold
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>

}}}

{{col{

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !Done' view:ActionProj mode:global
	group:Contact
	gView:bold
	newButtonTags:'Action [(Waiting For)]'
	where:tiddler.hasActiveProject()
	>>


}}}

}}}
{{cols2{

{{col{

<<mgtdList startTag:Action title:'Next' tags:'Next && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>

}}}

{{col{

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !Done' view:ActionProj mode:global
	group:Contact
	gView:bold
	newButtonTags:'Action [(Waiting For)]'
	where:tiddler.hasActiveProject()
	>>


}}}

}}}
<<mgtdList startTag:Action title:'Next' tags:'Next && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !Done' view:ActionProj mode:global
	group:Context
	gView:Context
	newButtonTags:'Action [(Waiting For)]'
	where:tiddler.hasActiveProject()
	>>
{{cols2{

{{col{

<<mgtdList startTag:Action title:'Next' tags:'Next && !Done' view:Action mode:global
	group:Project
	gView:bold
	newButtonTags:'Action Next'
	where:tiddler.hasActiveProject()
	>>

}}}

{{col{

<<mgtdList startTag:Action title:'Waiting' tags:'[(Waiting For)] && !Done' view:Action mode:global
	group:Project
	gView:bold
	where:tiddler.hasActiveProject()
	newButtonTags:'Action [(Waiting For)]'
	>>

}}}

}}}


order:1
button:none
buttonLong:one time
<<tiddler TspotOptions>>These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]
----
{{select{<<selectTheme>> <<selectPalette>>}}} [[Tiddler Tweaker]]
[[Timeline]]
----
[[AdvancedOptions]]

/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
	major: 1, minor: 0, revision: 2, 
	date: new Date("Apr 19, 2007"),
	source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
	coreVersion: '2.2.0 (Beta 5)'
};

config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");

merge(config.macros.option.types, {
	'pas': {
		elementType: "input",
		valueField: "value",
		eventName: "onkeyup",
		className: "pasOptionInput",
		typeValue: config.macros.option.passwordInputType,
		create: function(place,type,opt,className,desc) {
			// password field
			config.macros.option.genericCreate(place,'pas',opt,className,desc);
			// checkbox linked with this password "save this password on this computer"
			config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);			
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
		},
		onChange: config.macros.option.genericOnChange
	}
});

merge(config.optionHandlers['chk'], {
	get: function(name) {
		// is there an option linked with this chk ?
		var opt = name.substr(3);
		if (config.options[opt]) 
			saveOptionCookie(opt);
		return config.options[name] ? "true" : "false";
	}
});

merge(config.optionHandlers, {
	'pas': {
 		get: function(name) {
			if (config.options["chk"+name]) {
				return encodeCookie(config.options[name].toString());
			} else {
				return "";
			}
		},
		set: function(name,value) {config.options[name] = decodeCookie(value);}
	}
});

// need to reload options to load passwordOptions
loadOptionsCookie();

/*
if (!config.options['pasPassword'])
	config.options['pasPassword'] = '';

merge(config.optionsDesc,{
		pasPassword: "Test password"
	});
*/
//}}}
order:1
priority:1

150115: Scheduled for 150122
150122: Held lunch
151130: Held coffee | leaving company; will send résumé

/***
Prettify
***/
/*{{{*/
body {
	font-size: 0.9em;
	margin-bottom: 4em;
}

.tiddler .viewer {
	font-size: 0.9em;
}

/*}}}*/
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
  var diff = (((new Date()).getTime() - this.getTime()) / 1000);
  var day_diff = Math.floor(diff / 86400);

  if (isNaN(day_diff))      return "";
  else if (diff < 0)        return "in the future";
  else if (diff < 60)       return "just now";
  else if (diff < 120)      return "1 minute ago";
  else if (diff < 3600)     return Math.floor(diff/60) + " minutes ago";
  else if (diff < 7200)     return "1 hour ago";
  else if (diff < 86400)    return Math.floor(diff/3600) + " hours ago";
  else if (day_diff == 1)   return "Yesterday";
  else if (day_diff < 7)    return day_diff + " days ago";
  else if (day_diff < 14)   return  "a week ago";
  else if (day_diff < 31)   return Math.ceil(day_diff/7) + " weeks ago";
  else if (day_diff < 62)   return "a month ago";
  else if (day_diff < 365)  return "about " + Math.ceil(day_diff/31) + " months ago";
  else if (day_diff < 730)  return "a year ago";
  else                      return Math.ceil(day_diff/365) + " years ago";
}

Date.prototype.formatString_orig_mptw = Date.prototype.formatString;

Date.prototype.formatString = function(template) {
  return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}

// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)';
config.mptwDateFormat = 'pppp';

//}}}
[[Quick Add]]
''<<newSavedTiddler title:'new Next Action' label:'new next action' tag:{{'Action Next [['+config.macros.mgtdList.getRealm()+']]'}}>>/%/%
%/<<newSavedTiddler title:'new Waiting Action' label:'new waiting action' tag:{{'Action [(Waiting For)] [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Future Action' label:'new future action' tag:{{'Action Future [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Project' label:'new active project' tag:{{'Project Active [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Someday/Maybe Project' label:'new someday project' tag:{{'Project Someday/Maybe [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
<<newSavedTiddler title:'new Tickler' label:'new tickler' tag:{{'Tickler Once [['+config.macros.mgtdList.getRealm()+']]'}}>>
%/<<calendarPopup 'new tickler' 'new Tickler'>>/% <-- experimental
%/<<newSavedTiddler title:'new Reference Item' label:'new reference' tag:{{'Reference [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/
<<newSavedTiddler title:'new Contact' label:'new contact' tag:{{'Contact [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Context' label:'new context' tag:{{'Context [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Area' label:'new area' tag:{{'Area [['+config.macros.mgtdList.getRealm()+']]'}}>>/%
%/<<newSavedTiddler title:'new Realm' label:'new realm' tag:{{'Realm [['+config.macros.mgtdList.getRealm()+']]'}}>>''
!!Recent
<<mgtdList mode:global tags:'Project || Action' view:plain sort:-modified >>

{{tiny{
<slider Advanced>
[[modify menu|ProcessInboxMenu]]
[[GTDComponent]]
</slider>
}}}


{{cols2{

{{col{

<<mgtdList title:'Active Projects' startTag:Project tags:'Active && !Complete' view:ProjectArea mode:global
	newButtonTags:'Project Active'
	>>

}}}

{{col{

<<mgtdList title:'Someday/Maybe Projects' startTag:Project tags:'Someday/Maybe && !Complete' view:ProjectArea mode:global
	newButtonTags:'Project Someday/Maybe'
	>>


{{scroll10{
<<mgtdList title:'Completed Projects' startTag:Project tags:'Complete' view:ProjectComplete mode:global>>
}}}

}}}

}}}
{{cols2{

{{col{

<<mgtdList title:'Active Projects' startTag:Project tags:'Active && !Complete' view:Project mode:global
	group:Area
	gView:bold
	newButtonTags:'Project Active'
	>>

}}}

{{col{

<<mgtdList title:'Someday/Maybe Projects' startTag:Project tags:'Someday/Maybe && !Complete' view:Project mode:global
	group:Area
	gView:bold
	newButtonTags:'Project Someday/Maybe'
	>>

{{scroll10{
<<mgtdList title:'Completed Projects' startTag:Project tags:'Complete' view:ProjectComplete mode:global
	group:Area
	gView:bold
	newButtonTags:'Project Active Complete'
	>>

}}}

}}}


}}}
<<mgtdList title:'Dashboard of Projects with Notes'
	mode:global
	startTag:Notes
	tags:'Notes'
	view:plain
	newButtonTags:'Notes'
	>>
<<processInbox>>
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {

  dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?

  createTagButton: function(place,tag,excludeTiddler) {
    // little hack so we can do this: <<tag PrettyTagName|RealTagName>>
    var splitTag = tag.split("|");
    var pretty = tag;
    if (splitTag.length == 2) {
      tag = splitTag[1];
      pretty = splitTag[0];
    }

    var sp = createTiddlyElement(place,"span",null,"quickopentag");
    createTiddlyText(createTiddlyLink(sp,tag,false),pretty);

    var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
                        config.views.wikified.tag.tooltip.format([tag]),onClickTag);
    theTag.setAttribute("tag",tag);
    if (excludeTiddler)
      theTag.setAttribute("tiddler",excludeTiddler);
        return(theTag);
  },

  miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
    var tagged = store.getTaggedTiddlers(tiddler.title);
    if (tagged.length > 0) {
      var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
                          config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
      theTag.setAttribute("tag",tiddler.title);
      theTag.className = "miniTag";
    }
  },

  allTagsHandler: function(place,macroName,params) {
    var tags = store.getTags(params[0]);
    var filter = params[1]; // new feature
    var ul = createTiddlyElement(place,"ul");
    if(tags.length == 0)
      createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
    for(var t=0; t<tags.length; t++) {
      var title = tags[t][0];
      if (!filter || (title.match(new RegExp('^'+filter)))) {
        var info = getTiddlyLinkInfo(title);
        var theListItem =createTiddlyElement(ul,"li");
        var theLink = createTiddlyLink(theListItem,tags[t][0],true);
        var theCount = " (" + tags[t][1] + ")";
        theLink.appendChild(document.createTextNode(theCount));
        var theDropDownBtn = createTiddlyButton(theListItem," " +
          config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
        theDropDownBtn.setAttribute("tag",tags[t][0]);
      }
    }
  },

  // todo fix these up a bit
  styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag ",
" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
" { border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
" { margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
" /* looks better in right justified main menus */",
" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }",
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
    ""].join("\n"),

  init: function() {
    // we fully replace these builtins. can't hijack them easily
    window.createTagButton = this.createTagButton;
    config.macros.allTags.handler = this.allTagsHandler;
    config.macros.miniTag = { handler: this.miniTagHandler };
    config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
    store.addNotification("QuickOpenTagStyles",refreshStyles);
  }
}

config.quickOpenTag.init();

//}}}



/***
|Name|RearrangeTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#RearrangeTiddlersPlugin|
|Version|2.0.0|
|Author|Eric Shulman|
|OriginalAuthor|Joe Raii|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|drag tiddlers by title to re-order story column display|

adapted from: http://www.cs.utexas.edu/~joeraii/dragn/#Draggable
changes by ELS:
* hijack refreshTiddler() instead of overridding createTiddler()
* find title element by className instead of elementID
* set cursor style via code instead of stylesheet
* set tooltip help text
* set tiddler "position:relative" when starting drag event, restore saved value when drag ends
* update 2006.08.07: use getElementsByTagName("*") to find title element, even when it is 'buried' deep in tiddler DOM elements (due to custom template usage)
* update 2007.03.01: use apply() to invoke hijacked core function
* update 2008.01.13: only hijack core function once.  (allows for dynamic loading of plugin via bookmarklet)
* update 2008.10.19: added onclick popup menu with 'move to top' and 'move to bottom' commands
* update 2010.11.30: use story.getTiddler()
***/
//{{{

if (Story.prototype.rearrangeTiddlersHijack_refreshTiddler===undefined) {
Story.prototype.rearrangeTiddlersHijack_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template)
{
	this.rearrangeTiddlersHijack_refreshTiddler.apply(this,arguments);
	var theTiddler = this.getTiddler(title); if (!theTiddler) return;
	var theHandle;
	var children=theTiddler.getElementsByTagName("*");
	for (var i=0; i<children.length; i++) if (hasClass(children[i],"title")) { theHandle=children[i]; break; }
	if (!theHandle) return theTiddler;

	Drag.init(theHandle, theTiddler, 0, 0, null, null);
	theHandle.style.cursor="move";
	theHandle.title="drag title to re-arrange tiddlers, click for more options..."
	theTiddler.onDrag = function(x,y,myElem) {
		if (this.style.position!="relative")
			{ this.savedstyle=this.style.position; this.style.position="relative"; }
		y = myElem.offsetTop;
		var next = myElem.nextSibling;
		var prev = myElem.previousSibling;
		if (next && y + myElem.offsetHeight > next.offsetTop + next.offsetHeight/2) { 
			myElem.parentNode.removeChild(myElem);
			next.parentNode.insertBefore(myElem, next.nextSibling);//elems[pos+1]);
			myElem.style["top"] = -next.offsetHeight/2+"px";
		}
		if (prev && y < prev.offsetTop + prev.offsetHeight/2) { 
			myElem.parentNode.removeChild(myElem);
			prev.parentNode.insertBefore(myElem, prev);
			myElem.style["top"] = prev.offsetHeight/2+"px";
		}
	};
	theTiddler.onDragEnd = function(x,y,myElem) {
		myElem.style["top"] = "0px";
		if (this.savedstyle!=undefined)
			this.style.position=this.savedstyle;
	};
	theHandle.onclick=function(ev) {
		ev=ev||window.event;
		var p=Popup.create(this); if (!p) return;
		var b=createTiddlyButton(createTiddlyElement(p,"li"),
			"\u25B2 move to top of column ","move this tiddler to the top of the story column",
			function() {
				var t=story.getTiddler(this.getAttribute("tid"));
				t.parentNode.insertBefore(t,t.parentNode.firstChild); // move to top of column
				window.scrollTo(0,ensureVisible(t));
				return false;
			});
		b.setAttribute("tid",title);
		var b=createTiddlyButton(createTiddlyElement(p,"li"),
			"\u25BC move to bottom of column ","move this tiddler to the bottom of the story column",
			function() {
				var t=story.getTiddler(this.getAttribute("tid"));
				t.parentNode.insertBefore(t,null); // move to bottom of column
				window.scrollTo(0,ensureVisible(t));
				return false;
			});
		b.setAttribute("tid",title);
		Popup.show();
		ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); return(false);
	};
	return theTiddler;
}
}

/**************************************************
 * dom-drag.js
 * 09.25.2001
 * www.youngpup.net
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Drag = {
	obj:null,

	init:
	function(o, oRoot, minX, maxX, minY, maxY) {
		o.onmousedown = Drag.start;
		o.root = oRoot && oRoot != null ? oRoot : o ;
		if (isNaN(parseInt(o.root.style.left))) o.root.style.left="0px";
		if (isNaN(parseInt(o.root.style.top))) o.root.style.top="0px";
		o.minX = typeof minX != 'undefined' ? minX : null;
		o.minY = typeof minY != 'undefined' ? minY : null;
		o.maxX = typeof maxX != 'undefined' ? maxX : null;
		o.maxY = typeof maxY != 'undefined' ? maxY : null;
		o.root.onDragStart = new Function();
		o.root.onDragEnd = new Function();
		o.root.onDrag = new Function();
	},

	start:
	function(e) {
		var o = Drag.obj = this;
		e = Drag.fixE(e);
		var y = parseInt(o.root.style.top);
		var x = parseInt(o.root.style.left);
		o.root.onDragStart(x, y, Drag.obj.root);
		o.lastMouseX = e.clientX;
		o.lastMouseY = e.clientY;
		if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
		if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
		if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
		if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
		document.onmousemove = Drag.drag;
		document.onmouseup = Drag.end;
		Drag.obj.root.style["z-index"] = "10";
		return false;
	},

	drag:
	function(e) {
		e = Drag.fixE(e);
		var o = Drag.obj;
		var ey = e.clientY;
		var ex = e.clientX;
		var y = parseInt(o.root.style.top);
		var x = parseInt(o.root.style.left);
		var nx, ny;
		if (o.minX != null) ex = Math.max(ex, o.minMouseX);
		if (o.maxX != null) ex = Math.min(ex, o.maxMouseX);
		if (o.minY != null) ey = Math.max(ey, o.minMouseY);
		if (o.maxY != null) ey = Math.min(ey, o.maxMouseY);
		nx = x + (ex - o.lastMouseX);
		ny = y + (ey - o.lastMouseY);
		Drag.obj.root.style["left"] = nx + "px";
		Drag.obj.root.style["top"] = ny + "px";
		Drag.obj.lastMouseX = ex;
		Drag.obj.lastMouseY = ey;
		Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
		return false;
	},

	end:
	function() {
		document.onmousemove = null;
		document.onmouseup = null;
		Drag.obj.root.style["z-index"] = "0";
		Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style["left"]), parseInt(Drag.obj.root.style["top"]), Drag.obj.root);
		Drag.obj = null;
	},

	fixE:
	function(e) {
		if (typeof e == 'undefined') e = window.event;
		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
		return e;
	}
};
//}}}
<<recentChanges 30>>
/***
|Name|RecentChangesPlugin|
|Source|http://www.TiddlyTools.com/#RecentChangesPlugin|
|Version|2.2.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|display droplist of recently changed tiddlers with goto, edit, and preview buttons|
!!!!!Usage
<<<
The {{{<<recentChanges>>}}} macro displays a droplist of all tiddlers that have been changed within the last N days (default=10 days).  
{{{
<<recentChanges>>
<<recentChanges #ofdays summary noEdit previewheight previewclass>>
}}}
where:
* #ofdays specifies the time limit for listing changed tiddlers.  Use 0 (zero) to list all tiddlers in the document.
* ''summary'' is an optional keyword that outputs only the summary text (without the droplist or buttons)
* ''noEdit'' is an optional keyword that hides the 'edit' button
* previewheight is a CSS height measurement and sets the FIXED height of the tiddler preview area (default is 15em)
* previewclass is any CSS classname, and can be used to apply custom styles to the preview area (default is to use the standard 'viewer' class)
<<<
!!!!!Examples
<<<
{{smallform{
{{{<<recentChanges>>}}}
<<recentChanges>>
{{{<<recentChanges 30 summary>>}}}
<<recentChanges 30 summary>>

{{{<<recentChanges 30 noedit 10em groupbox>>}}}
<<recentChanges 30 noedit 10em groupbox>>
}}}
<<<
!!!!!Revisions
<<<
2009.09.07 [2.2.1] fixed typo in shadow definition
2009.07.02 [2.2.0] added optional 'noedit' keyword to hide 'edit' button
2008.07.01 [2.1.0] added optional 'summary' keyword for simple text output
2008.05.01 [2.0.1] fixup for titles with double-quotes
2007.07.26 [2.0.0] re-written as plugin
2006.10.02 [1.0.0] initial release (as inline script ShowRecentChanges)
<<<
!!!!!Code
***/
//{{{
version.extensions.RecentChangesPlugin= {major: 2, minor: 2, revision: 1, date: new Date(2009,9,7)};

config.shadowTiddlers.RecentChanges='<<recentChanges>>';

config.macros.recentChanges = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var days=10; if (!isNaN(params[0])) days=parseInt(params[0]); // time limit in days (use 0 for all tiddlers)
		var summary=params[1]&&params[1].toLowerCase()=='summary'; if (summary) params.shift();
		var noedit=params[1]&&params[1].toLowerCase()=='noedit'; if (noedit) params.shift();
		var height='15em'; if (params[1]) height=params[1]; // preview area fixed height
		var previewclass='viewer'; if (params[2]) previewclass=params[2]; // preview area CSS class
		var tiddlers=store.getTiddlers('modified','excludeLists').reverse();
		var count=tiddlers.length;
		if (days) {
			var timelimit=(new Date()).getTime()-86400000*days;
			for (var count=0; count<tiddlers.length && tiddlers[count].modified>timelimit; count++);
		}
		var s=count+' tiddlers have changed since ';
		s+=new Date(timelimit).formatString('DDD, MMM DDth YYYY 0hh:0mm');
		s+=' ('+days+' days ago)';
		if (summary)
			{ wikify(s,place); return; }
		var opts='<option value="">'+s+'</option>';
		for (var i=0; i<count; i++) { var t=tiddlers[i];
			opts+='<option value="'+t.title.replace(/"/g,"&#x22;")+'">';
			opts+=t.modified.formatString('YYYY.0MM.0DD 0hh:0mm')+' - '+t.title;
			opts+='</option>';
		}
		var h=store.getTiddlerText('RecentChangesPlugin##html')
		h=h.replace(/%options%/,opts);
		h=h.replace(/%listwidth%/,noedit?79.5:69.5);
		h=h.replace(/%noedit%/,noedit?'none':'inline');
		createTiddlyElement(place,'div').innerHTML=h;
		var preview=createTiddlyElement(place,'div',null,previewclass);
		preview.style.display='none';
		preview.style.whiteSpace='normal';
		preview.style.overflow='auto';
		preview.style.height=height;
	}
}
//}}}
/***
//{{{
!html
<form><select size=1 name="list" style="width:%listwidth%%"
	onchange="this.form.goto.disabled=this.form.edit.disabled=this.form.preview.disabled=!this.value.length;
		var target=this.parentNode.parentNode.nextSibling; removeChildren(target);
		if (!this.value.length)
			{ target.style.display='none'; this.form.preview.value='preview'; }
		else if (target.style.display=='block') {
			wikify('<'+'<tiddler [['+this.value+']]>'+'>',target);
			target.style.display='block';
			this.form.preview.value='done';
		}
">%options%</select><!--
--><input type="button" name="goto" value="goto" disabled title="view selected tiddler" style="width:10%"
	onclick="var target=this.parentNode.parentNode.nextSibling; removeChildren(target);
		target.style.display='none'; this.form.preview.value='preview';
		story.displayTiddler(story.findContainingTiddler(this),this.form.list.value);
"><input type="button" name="edit" value="edit" disabled title="edit selected tiddler" style="width:10%;display:%noedit%"
	onclick="var target=this.parentNode.parentNode.nextSibling; removeChildren(target);
		target.style.display='none'; this.form.preview.value='preview';
		story.displayTiddler(story.findContainingTiddler(this),this.form.list.value,DEFAULT_EDIT_TEMPLATE);
"><input type="button" name="preview" value="preview" disabled title="show/hide tiddler preview" style="width:10%"
	onclick="var target=this.parentNode.parentNode.nextSibling;
		if (this.value=='preview') {
			removeChildren(target);
			wikify('<'+'<tiddler [['+this.form.list.value+']]>'+'>',target);
			target.style.display=this.form.list.value.length?'block':'none'; this.value='done';
		} else {
			removeChildren(target);
			target.style.display='none'; this.value='preview';
		}
"></form>
!end
//}}}
***/
 

{{cols2{

{{col{

<<mgtdList title:'Reference Items For Active Projects' tag:Reference startTag:Reference view:plain mode:global
	group:Project
	gView:bold
	newButtonTags:'Reference'
	where:tiddler.hasActiveProject()
	>>

}}}

{{col{

<<mgtdList title:'Other Reference Items' tag:Reference startTag:Reference view:plain mode:global
	group:Project
	gView:bold
	newButtonTags:'Reference'
	where:!tiddler.hasActiveProject()
	>>

}}}

}}}
/%
!info
|Name|RefreshPageDisplay|
|Source|http://www.TiddlyTools.com/#RefreshPageDisplay|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|create a link to redraw all page elements without restarting|
Usage
<<<
{{{
<<tiddler RefreshPageDisplay>>
<<tiddler RefreshPageDisplay with: label>>
}}}
<<<
Example
<<<
{{{<<tiddler RefreshPageDisplay with: "click me">>}}}
<<tiddler RefreshPageDisplay##show with: "click me">>
<<<
!end
!show
<html><nowiki><a href="javascript:;" title="Redisplay current page content WITHOUT RESTARTING!"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	story.forEachTiddler(function(t,e){story.refreshTiddler(t,null,true)});
	refreshDisplay();
 	return false;"
>$1</a></html>
!end
%/<<tiddler {{var src='RefreshPageDisplay'; src+(tiddler&&tiddler.title==src?'##info':'##show')}}
	with: {{'$1'=='$'+'1'?'refresh page display':'$1'}}>>
/%
!info
|Name|RefreshTiddler|
|Source|http://www.TiddlyTools.com/#RefreshTiddler|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|create a link to force an immediate refresh of the current tiddler|
Usage
<<<
{{{
<<tiddler RefreshTiddler>>
<<tiddler RefreshTiddler with: label tip>>
}}}
<<<
Example
<<<
{{{<<tiddler RefreshTiddler with: "click me">>}}}
<<tiddler RefreshTiddler##show with: "click me">>
content displayed at <<today 0hh:0mm:0ss>>
<<<
!end
!show
<html><nowiki><a href="javascript:;" title="$2"
onclick="
	var here=story.findContainingTiddler(this);
	if (here) story.refreshTiddler(here.getAttribute('tiddler'),null,true);
	return false;
">$1</a></html>
!end
%/<<tiddler {{var src='RefreshTiddler'; src+(tiddler&&tiddler.title==src?'##info':'##show')}}
	with:	{{'$1'!='$'+'1'?'$1':'refresh'}}
		{{'$2'!='$'+'2'?'$2':'redisplay current tiddler content'}}
>>

/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {

  prompts: {
    rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
    remove: "Remove the tag '%0' from %1 tidder%2?"
  },

  removeTag: function(tag,tiddlers) {
    store.suspendNotifications();
    for (var i=0;i<tiddlers.length;i++) {
      store.setTiddlerTag(tiddlers[i].title,false,tag);
    }
    store.resumeNotifications();
    store.notifyAll();
  },

  renameTag: function(oldTag,newTag,tiddlers) {
    store.suspendNotifications();
    for (var i=0;i<tiddlers.length;i++) {
      store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
      store.setTiddlerTag(tiddlers[i].title,true,newTag);  // add new
    }
    store.resumeNotifications();
    store.notifyAll();
  },

  storeMethods: {

    saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

    saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created,creator) {
      if (title != newTitle) {
        var tagged = this.getTaggedTiddlers(title);
        if (tagged.length > 0) {
          // then we are renaming a tag
          if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
            config.renameTags.renameTag(title,newTitle,tagged);

          if (!this.tiddlerExists(title) && newBody == "")
            // dont create unwanted tiddler
            return null;
        }
      }
      return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created,creator);
    },

    removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,

    removeTiddler: function(title) {
      var tagged = this.getTaggedTiddlers(title);
      if (tagged.length > 0)
        if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
          config.renameTags.removeTag(title,tagged);
      return this.removeTiddler_orig_renameTags(title);
    }

  },

  init: function() {
    merge(TiddlyWiki.prototype,this.storeMethods);
  }
}

config.renameTags.init();

//}}}

[[Projects Dashboard]]
[[Dashboard by Area|Projects Dashboard by Area]]
[[With No Next Action|Active Projects With No Next Action]]
[[With No Tickler|Someday Projects With No Tickler]]
[[Completed by Date|Completed Projects]]
[[Completed by Name|Completed Projects by Name]]
[[Someday, Maybe and Future|Someday, Maybe and Future]]
[[Sub-projects Dashboard|Subprojects]]
[[Projects Notes]]
[[Recent Changes]]

<slider+ Areas>
<<mgtdList startTag:Project tags:'Active && !Complete' groupCountOnly:yes group:Area gView:plain>>
</slider>

<slider All areas>
<<mgtdList startTag:Area>>
</slider>

{{tiny{
<slider Advanced>
[[modify menu|ReviewMenu]]
[[GTDComponent]]
[[Mismatched Realms]]
[[Cleanup]]
</slider>
}}}

/***
|Name|SaveAndReloadMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SaveAndReloadMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button to save and reload TW. Useful if you are testing code and dont have AutoSave enabled.

!Demo:
{{{<<saveAndReload>>}}}<<saveAndReload>>

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!History:
*24-07-06: ver 1.0

!Code
***/
//{{{
config.macros.saveAndReload={};
config.macros.saveAndReload.handler= function(place,macroName,params,wikifier,paramString,tiddler)
{
        var label = params[0]||"Save & Reload";
        var tooltip = params[1]||"Save & reload";
        createTiddlyButton(place,label,tooltip,this.onclick);
}
config.macros.saveAndReload.onclick= function()
{
       saveChanges();
       window.location.reload( false );
}
//}}}
/***
|Name:|SaveCloseTiddlerPlugin|
|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these add them to the commands in ToolbarCommands under EditToolbar,
or in the MptwTheme tiddler under EditTemplate.
***/
//{{{
merge(config.commands,{

  saveCloseTiddler: {
    text: 'done/close',
    tooltip: 'Save changes to this tiddler and close it',
    handler: function(ev,src,title) {
      var closeTitle = title;
      var newTitle = story.saveTiddler(title,ev.shiftKey);
      if (newTitle)
        closeTitle = newTitle;
      return config.commands.closeTiddler.handler(ev,src,closeTitle);
    }
  },

  cancelCloseTiddler: {
    text: 'cancel/close',
    tooltip: 'Undo changes to this tiddler and close it',
    handler: function(ev,src,title) {
      // the same as closeTiddler now actually
      return config.commands.closeTiddler.handler(ev,src,title);
    }
  }

});

//}}}
/***
|Name:|SelectThemePlugin|
|Description:|Lets you easily switch theme and palette|
|Version:|1.0.1a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#SelectThemePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
* Borrows largely from ThemeSwitcherPlugin by Martin Budden http://www.martinswiki.com/#ThemeSwitcherPlugin
* Theme is cookie based. But set a default by setting config.options.txtTheme in MptwConfigPlugin (for example)
* Palette is not cookie based. It actually overwrites your ColorPalette tiddler when you select a palette, so beware.
!Usage
* {{{<<selectTheme>>}}} makes a dropdown selector
* {{{<<selectPalette>>}}} makes a dropdown selector
* {{{<<applyTheme>>}}} applies the current tiddler as a theme
* {{{<<applyPalette>>}}} applies the current tiddler as a palette
* {{{<<applyTheme TiddlerName>>}}} applies TiddlerName as a theme
* {{{<<applyPalette TiddlerName>>}}} applies TiddlerName as a palette
***/
//{{{

config.macros.selectTheme = {
  label: {
    selectTheme:"select theme",
    selectPalette:"select palette"
  },
  prompt: {
    selectTheme:"Select the current theme",
    selectPalette:"Select the current palette"
  },
  tags: {
    selectTheme:'systemTheme',
    selectPalette:'systemPalette'
  }
};

config.macros.selectTheme.handler = function(place,macroName)
{
  var btn = createTiddlyButton(place,this.label[macroName],this.prompt[macroName],this.onClick);
  // want to handle palettes and themes with same code. use mode attribute to distinguish
  btn.setAttribute('mode',macroName);
};

config.macros.selectTheme.onClick = function(ev)
{
  var e = ev ? ev : window.event;
  var popup = Popup.create(this);
  var mode = this.getAttribute('mode');
  var tiddlers = store.getTaggedTiddlers(config.macros.selectTheme.tags[mode]);
  // for default
  if (mode == "selectPalette") {
    var btn = createTiddlyButton(createTiddlyElement(popup,'li'),"(default)","default color palette",config.macros.selectTheme.onClickTheme);
    btn.setAttribute('theme',"(default)");
    btn.setAttribute('mode',mode);
  }
  for(var i=0; i<tiddlers.length; i++) {
    var t = tiddlers[i].title;
    var name = store.getTiddlerSlice(t,'Name');
    var desc = store.getTiddlerSlice(t,'Description');
    var btn = createTiddlyButton(createTiddlyElement(popup,'li'), name?name:t, desc?desc:config.macros.selectTheme.label['mode'], config.macros.selectTheme.onClickTheme);
    btn.setAttribute('theme',t);
    btn.setAttribute('mode',mode);
  }
  Popup.show();
  return stopEvent(e);
};

config.macros.selectTheme.onClickTheme = function(ev)
{
  var mode = this.getAttribute('mode');
  var theme = this.getAttribute('theme');
  if (mode == 'selectTheme')
    story.switchTheme(theme);
  else // selectPalette
    config.macros.selectTheme.updatePalette(theme);
  return false;
};

config.macros.selectTheme.updatePalette = function(title)
{
  if (title != "") {
    store.deleteTiddler("ColorPalette");
    if (title != "(default)")
      store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),
          config.options.txtUserName,undefined,"");
    refreshAll();
    if(config.options.chkAutoSave)
      saveChanges(true);
  }
};

config.macros.applyTheme = {
  label: "apply",
  prompt: "apply this theme or palette" // i'm lazy
};

config.macros.applyTheme.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
  var useTiddler = params[0] ? params[0] : tiddler.title;
  var btn = createTiddlyButton(place,this.label,this.prompt,config.macros.selectTheme.onClickTheme);
  btn.setAttribute('theme',useTiddler);
  btn.setAttribute('mode',macroName=="applyTheme"?"selectTheme":"selectPalette"); // a bit untidy here
}

config.macros.selectPalette = config.macros.selectTheme;
config.macros.applyPalette = config.macros.applyTheme;

config.macros.refreshAll = { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
  createTiddlyButton(place,"refresh","refresh layout and styles",function() { refreshAll(); });
}};

//}}}
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.7|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Show tiddlers one at a time with automatic permalink, or always open tiddlers at top/bottom of page.|
This plugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one tiddler displayed at a time.
!!!!!Documentation
>see [[SinglePageModePluginInfo]]
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}.
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2010.11.30 2.9.7 use story.getTiddler()
2008.10.17 2.9.6 changed chkSinglePageAutoScroll default to false
| Please see [[SinglePageModePluginInfo]] for previous revision details |
2005.08.15 1.0.0 Initial Release.  Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts.
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageModePlugin= {major: 2, minor: 9, revision: 7, date: new Date(2010,11,30)};
//}}}
//{{{
config.paramifiers.SPM = { onstart: function(v) {
	config.options.chkSinglePageMode=eval(v);
	if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
		config.lastURL = window.location.hash;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
} };
//}}}
//{{{
if (config.options.chkSinglePageMode==undefined)
	config.options.chkSinglePageMode=false;
if (config.options.chkSinglePagePermalink==undefined)
	config.options.chkSinglePagePermalink=true;
if (config.options.chkSinglePageKeepFoldedTiddlers==undefined)
	config.options.chkSinglePageKeepFoldedTiddlers=false;
if (config.options.chkSinglePageKeepEditedTiddlers==undefined)
	config.options.chkSinglePageKeepEditedTiddlers=false;
if (config.options.chkTopOfPageMode==undefined)
	config.options.chkTopOfPageMode=false;
if (config.options.chkBottomOfPageMode==undefined)
	config.options.chkBottomOfPageMode=false;
if (config.options.chkSinglePageAutoScroll==undefined)
	config.options.chkSinglePageAutoScroll=false;
//}}}
//{{{
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
	if (!config.options.chkSinglePageMode)
		{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
	if (config.lastURL == window.location.hash) return; // no change in hash
	var tids=decodeURIComponent(window.location.hash.substr(1)).readBracketedList();
	if (tids.length==1) // permalink (single tiddler in URL)
		story.displayTiddler(null,tids[0]);
	else { // restore permaview or default view
		config.lastURL = window.location.hash;
		if (!tids.length) tids=store.getTiddlerText("DefaultTiddlers").readBracketedList();
		story.closeAllTiddlers();
		story.displayTiddlers(null,tids);
	}
}


if (Story.prototype.SPM_coreDisplayTiddler==undefined)
	Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
	var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
	var tiddlerElem=story.getTiddler(title); // ==null unless tiddler is already displayed
	var opt=config.options;
	var single=opt.chkSinglePageMode && !startingUp;
	var top=opt.chkTopOfPageMode && !startingUp;
	var bottom=opt.chkBottomOfPageMode && !startingUp;
	if (single) {
		story.forEachTiddler(function(tid,elem) {
			// skip current tiddler and, optionally, tiddlers that are folded.
			if (	tid==title
				|| (opt.chkSinglePageKeepFoldedTiddlers && elem.getAttribute("folded")=="true"))
				return;
			// if a tiddler is being edited, ask before closing
			if (elem.getAttribute("dirty")=="true") {
				if (opt.chkSinglePageKeepEditedTiddlers) return;
				// if tiddler to be displayed is already shown, then leave active tiddler editor as is
				// (occurs when switching between view and edit modes)
				if (tiddlerElem) return;
				// otherwise, ask for permission
				var msg="'"+tid+"' is currently being edited.\n\n";
				msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
				if (!confirm(msg)) return; else story.saveTiddler(tid);
			}
			story.closeTiddler(tid);
		});
	}
	else if (top)
		arguments[0]=null;
	else if (bottom)
		arguments[0]="bottom";
	if (single && opt.chkSinglePagePermalink && !config.browser.isSafari) {
		window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitle") + " - " + title;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
	if (tiddlerElem && tiddlerElem.getAttribute("dirty")=="true") { // editing... move tiddler without re-rendering
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		if (!isTopTiddler && (single || top))
			tiddlerElem.parentNode.insertBefore(tiddlerElem,tiddlerElem.parentNode.firstChild);
		else if (bottom)
			tiddlerElem.parentNode.insertBefore(tiddlerElem,null);
		else this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	} else
		this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	var tiddlerElem=story.getTiddler(title);
	if (tiddlerElem&&opt.chkSinglePageAutoScroll) {
		// scroll to top of page or top of tiddler
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		var yPos=isTopTiddler?0:ensureVisible(tiddlerElem);
		// if animating, defer scroll until after animation completes
		var delay=opt.chkAnimate?config.animDuration+10:0;
		setTimeout("window.scrollTo(0,"+yPos+")",delay); 
	}
}

if (Story.prototype.SPM_coreDisplayTiddlers==undefined)
	Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function() {
	// suspend single/top/bottom modes when showing multiple tiddlers
	var opt=config.options;
	var saveSPM=opt.chkSinglePageMode; opt.chkSinglePageMode=false;
	var saveTPM=opt.chkTopOfPageMode; opt.chkTopOfPageMode=false;
	var saveBPM=opt.chkBottomOfPageMode; opt.chkBottomOfPageMode=false;
	this.SPM_coreDisplayTiddlers.apply(this,arguments);
	opt.chkBottomOfPageMode=saveBPM;
	opt.chkTopOfPageMode=saveTPM;
	opt.chkSinglePageMode=saveSPM;
}
//}}}
/***
|Name|SinglePageModePluginInfo|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for SinglePageModePlugin|
Normally, as you click on the links in TiddlyWiki, more and more tiddlers are displayed on the page. The order of this tiddler display depends upon when and where you have clicked. Some people like this non-linear method of reading the document, while others have reported that when many tiddlers have been opened, it can get somewhat confusing.  SinglePageModePlugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one item displayed at a time.
!!!!!Usage
<<<
When the plugin is enabled, only one tiddler will be displayed at a time and the browser window's titlebar is updated to include the current tiddler title.  The browser's location URL is also updated with a 'permalink' for the current tiddler so that it is easier to create a browser 'bookmark' for the current tiddler.  Alternatively, even when displaying multiple tiddlers //is// permitted, you can still reduce the potential for confusion by forcing  tiddlers to always open at the top (or bottom) of the page instead of being displayed following the tiddler containing the link that was clicked.
<<<
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* {{block{
The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}. You can also use {{{SPM:expression}}}, where 'expression' is any javascript statement that evaluates to true or false.  This allows you to create hard-coded links in other documents that can selectively enable/disable the use of this option based on various programmatic conditions, such as the current username. For example, using
&nbsp;&nbsp;&nbsp;{{{#SPM:config.options.txtUserName!="SomeName"}}}
enables 'one tiddler at a time' display for all users //other than// "~SomeName")}}}
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2008.10.17 2.9.6 changed chkSinglePageAutoScroll default to false
2008.06.12 2.9.5 corrected 'scroll to top of page' logic in auto-scroll handling
2008.06.11 2.9.4 added chkSinglePageKeepEditedTiddlers option
2008.06.05 2.9.3 in displayTiddler(), bypass single/top/bottom mode handling if startingUp.  Allows multiple tiddlers to be displayed during startup processing (e.g., #story:DefaultTiddlers), even if single/top/bottom mode is enabled.
2008.04.18 2.9.2 in displayTiddler() and checkLastURL(), handling for Unicode in tiddler titles (remove explicit conversion between Unicode and UTF, as this is apparently done automatically by encode/decodeURIComponent, resulting in double-encoding!
2008.04.08 2.9.1 don't automatically add options to AdvancedOptions shadow tiddler
2008.04.02 2.9.0 in displayTiddler(), when single-page mode is in use and a tiddler is being edited, ask for permission to save-and-close that tiddler, instead of just leaving it open.
2008.03.29 2.8.3 in displayTiddler(), get title from tiddler object (if needed).  Fixes errors caused when calling function passes a tiddler *object* instead of a tiddler *title*
2008.03.14 2.8.2 in displayTiddler(), if editing specified tiddler, just move it to top/bottom of story *without* re-rendering (prevents discard of partial edits).
2008.03.06 2.8.1 in paramifier handler, start 'checkURL' timer if chkSinglePageMode is enabled
2008.03.06 2.8.0 added option, {{{config.options.chkSinglePageKeepFoldedTiddlers}}}, so folded tiddlers won't be closed when using single-page mode.  Also, in checkURL(), if hash is a ''permaview'' (e.g., "#foo bar baz"), then display multiple tiddlers rather than attempting to display "foo bar baz" as a single tiddler
2008.03.05 2.7.0 added support for "SPM:" URL paramifier
2008.03.01 2.6.0 in hijack of displayTiddler(), added 'title' argument to closeAllTiddlers() so that target tiddler isn't closed-and-reopened if it was already displayed.  Also, added config.options.chkSinglePageAutoScrolloption to bypass automatic 'scroll into view' logic (note: core still does it's own ensureVisible() handling)
2007.12.22 2.5.3 in checkLastURL(), use decodeURIComponent() instead of decodeURI so that tiddler titles with commas (and/or other punctuation) are correctly handled.
2007.10.26 2.5.2 documentation cleanup
2007.10.08 2.5.1 in displayTiddler(), when using single-page or top-of-page mode, scrollTo(0,0) to ensure that page header is in view.
2007.09.13 2.5.0 for TPM/BPM modes, don't force tiddler to redisplay if already shown.  Allows transition between view/edit or collapsed/view templates, without repositioning displayed tiddler.
2007.09.12 2.4.0 added option to disable automatic permalink feature.  Also, Safari is now excluded from permalinking action to avoid bug where tiddlers don't display after hash is updated.
2007.03.03 2.3.1 fix typo when adding BPM option to AdvancedOptions (prevented checkbox from appearing)
2007.03.03 2.3.0 added support for BottomOfPageMode (BPM) based on request from DaveGarbutt
2007.02.06 2.2.3 in Story.prototype.displayTiddler(), use convertUnicodeToUTF8() for correct I18N string handling when creating URL hash string from tiddler title (based on bug report from BidiX)
2007.01.08 2.2.2 use apply() to invoke hijacked core functions
2006.07.04 2.2.1 in hijack for displayTiddlers(), suspend TPM as well as SPM so that DefaultTiddlers displays in the correct order.
2006.06.01 2.2.0 added chkTopOfPageMode (TPM) handling
2006.02.04 2.1.1 moved global variable declarations to config.* to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2005.12.27 2.1.0 hijack displayTiddlers() so that SPM can be suspended during startup while displaying the DefaultTiddlers (or #hash list).  Also, corrected initialization for undefined SPM flag to "false", so default behavior is to display multiple tiddlers
2005.12.27 2.0.0 Update for TW2.0
2005.11.24 1.1.2 When the back and forward buttons are used, the page now changes to match the URL.  Based on code added by Clint Checketts
2005.10.14 1.1.1 permalink creation now calls encodeTiddlyLink() to handle tiddler titles with spaces in them
2005.10.14 1.1.0 added automatic setting of window title and location bar ('auto-permalink').  feature suggestion by David Dickens.
2005.10.09 1.0.1 combined documentation and code in a single tiddler
2005.08.15 1.0.0 Initial Release
<<<
a customized theme
mGSD1
http://mgsd1.tiddlyspot.com

(You might want to these Someday/Maybe projects a tickler to remind you to review them at some point in the future)

<<mgtdList startTag:Project title:'Someday/Maybe projects without a tickler'
  tags:'!Complete && Someday/Maybe' view:Project mode:global
  where:!tiddler.hasTickler()
>>
{{cols2{

{{col{

<<mgtdList title:'Someday/Maybe Projects' startTag:Project tags:'Someday/Maybe && !Complete' view:ProjectArea mode:global
	newButtonTags:'Project Someday/Maybe'
	>>

}}}

{{col{

<<mgtdList title:'Future Actions not in Projects' startTag:Action tags:'Future && !Done' view:Action mode:global
	group:Context
	gView:Context
	newButtonTags:'Action Future'
	where:!tiddler.hasParent('Project')
	>>


}}}

}}}
order:2
button:s/m
buttonLong:someday/maybe
{{cols2{

{{col{

<<mgtdList title:'Someday/Maybe Projects' startTag:Project tags:'Someday/Maybe && !Complete' view:ProjectArea mode:global
	newButtonTags:'Project Someday/Maybe'
	>>

}}}

{{col{

<<mgtdList title:'Future Actions not in Projects' startTag:Action tags:'Future && !Done' view:Action mode:global
	group:Context
	gView:Context
	newButtonTags:'Action Future'
	where:!tiddler.hasParent('Project')
	>>


}}}

}}}


{{cols2{

{{col{

<<mgtdList title:'Starred Actions' startTag:Starred tags:'Action && !Done' view:ActionProj mode:global
	group:ActionStatus
	gView:bold
	newButtonTags:'Starred Action'
	>>

<<mgtdList title:'Starred Done Actions' startTag:Starred tags:'Done' view:DoneAction mode:global
	newButtonTags:'Starred Action Done'
	>>

}}}

{{col{

<<mgtdList title:'Starred Projects' startTag:Starred tags:'Project && !Complete' view:Project mode:global
	group:ProjectStatus
	gView:bold
	newButtonTags:'Starred Project'
	>>

<<mgtdList title:'Completed Projects' startTag:Starred tags:'Project && Complete' view:ProjectComplete mode:global
	newButtonTags:'Starred Project Complete'
	>>

<<mgtdList title:'Other Starred Items' startTag:Starred tags:'!Project && !Action' view:star mode:global
	group:GTDComponent
	gView:bold
	newButtonTags:'Starred'
	>>

}}}


}}}
<<mgtdList title:'Starred Next Actions by Context' startTag:Action tags:'Next && !Done && Starred' view:ActionProj mode:global
	group:Context
	newButtonTags:'Action Next Starred'
	where:tiddler.hasActiveProject()
>>
/***
|Name|StorySaverPlugin|
|Source|http://www.TiddlyTools.com/#StorySaverPlugin|
|Documentation|http://www.TiddlyTools.com/#StorySaverPluginInfo|
|Version|1.8.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Requires|MarkupPostBody|
|Description|documentation for [[StorySaverPlugin]]|
Automatically saves a list of currently viewed tiddlers (the "story") in a local cookie, {{{txtSavedStory}}} and then opens those tiddlers when the document is subsequently reloaded, allowing you to quickly resume working with the document from the same place you left off!! The plugin also defines {{{<<saveStory>>}}} and {{{<<openStory>>}}} macros that allow you to quickly save/re-display stories stored in tiddlers, using simple, one-click command links or droplists.
!!!!!Usage
<<<
If a document URL does not contain a paramifier (i.e., a "#..." suffix), then the saved story cookie (if any) will be used //as if// it had been entered as a permaview (e.g., a "#tiddler tiddler tiddler..." suffix on the URL), bypassing the [[DefaultTiddlers]] definition.  This behavior is automatically applied whenever the plugin is installed in your document.  You can enable/disable the automatic cookie-based StorySaver feature by using the checkbox below:
><<option chkSaveStory>> enable StorySaverPlugin
>//usage:// {{{<<option chkSaveStory>>}}}
You can also temporarily //bypass// the redisplay of a saved story ''without disabling the StorySaver cookie'' by including a trailing "#" at the end of the document URL.  This will cause your document to be loaded into the browser without displaying //any// initial tiddlers at all.  Alternatively, you can enter {{{#story:storyname}}} on the end of the URL (e.g., {{{#story:DefaultTiddlers}}}) to display any specific saved story, regardless of the value of the cookie-based saved story.

__''saveStory macro:''__
The {{{<<saveStory>>}}} macro lets you write the list of currently viewed tiddlers to a specified tiddler name (e.g., DefaultTiddlers, MyFavorites, etc.).  Tiddlers containing saved stories are automatically tagged with <<tag story>>, so that they can be recognized by the {{{<<storyViewer>>}}} macro (see [[StoryViewerPlugin]]).  The syntax for the {{{<<saveStory>>}}} macro is:
{{{
<<saveStory storyname label tooltip tag tag tag...>>
}}}
*''storyname''<br>is the target tiddler in which to save the current story.  If you use the keyword, ''ask'', in place of the tiddlername, you will be prompted to enter a tiddler title when saving the story (default: DefaultTiddlers).
*''label'' and ''tooltip''<br>are the link text and mouseover guide-text
*''tag tag tag...'' (optional)<br>are extra tags that are added when saving a story tiddler (in addition to the default<<tag story>>tag).

__''openStory macro:''__
To redisplay a saved story, the {{{<<openStory>>}}} macro can be used to embed either a droplist of all saved stories, or a link for a specified story.  Selecting from the droplist or clicking the link opens the corresponding set of tiddlers.  
{{{
<<openStory list tagValue>>
<<openStory popup label tooltip tagValue>>
<<openStory storyname label tooltip fold>>
}}}
*''list''<br>shows a droplist of all saved stories, plus additional commands/viewing options.  Selecting a story opens the corresponding tiddlers.
*''popup''<br>shows a popup display containing a list of all saved stories, plus additional commands/viewing options.  Selecting a story opens the corresponding tiddlers.  ''label'' and ''tooltip'' are optional and provide alternative display text and mouseover help text, respectively.
*''storyname''<br>is a tiddler containing a saved story.  //Note: You can also use a tag value as a storyname, in which case the story view will be composed of all tiddlers tagged with the specified tag value.//
*''label''<br>is the command link text (default: "open story: %0", where %0 is replaced by the storyname).
*''tooltip''<br>is the command mouseover guide-text (default: "open the set of tiddlers listed in: '%0'"),
*''tagValue'' (optional, default='story')<br>specifies an alternative tag value to match when listing story tiddlers.  Note: if MatchTagsPlugin is installed, you can also use a compound //boolean tag expression//, enclosed within doubled square brackets.
*''fold''<br>If this optional keyword is present, the story tiddlers are initially 'folded' using [[CollapsedTemplate]] instead of the usual [[ViewTemplate]] (see [[CollapseTiddlersPlugin]]).

__''excludeStory tag:''__
Any tiddlers tagged with<<tag excludeStory>>will be automatically omitted when creating new story tiddlers with {{{<<saveStory>>}}}.  Similarly, if a tiddler that is part of a saved story is tagged with<<tag excludeStory>>, it will not be displayed when that story is opened via {{{<<openStory>>}}}.

__''PermaView command link enhancement:''__
In order to further aide in saving/restoring the list of tiddlers currently being viewed, the core {{{<<permaview>>}}} command has been enhanced, so its link value always includes the current story view tiddler list as a paramifier in the URL.  This let you quickly use the browser's right-click menu directly on the permalink command text to "bookmark this link...".  Depending upon your system, you may also be able to drag the 'permaview' link directly from the page and drop it onto your desktop to create an instant permaview-bearing URL shortcut icon.
<<<
!!!!!Examples
<<<
*{{{<<saveStory TestStory "save a test story">>}}}<br>{{smallform{<<saveStory TestStory "save a test story">>}}}
*{{{<<openStory TestStory>>}}}<br><<openStory TestStory>>
*{{{<<openStory list>>}}}<br>{{smallform{<<openStory list>>}}}
*{{{<<openStory popup label tooltip>>}}}<br>{{smallform{<<openStory popup>>}}}
<<<
!!!!!Configuration
<<<
<<option chkSaveStory>> use automatic story cookie (reopens tiddlers on startup)
<<option chkStoryAllowAdd>>include 'add a story' command in droplist/popup
<<option chkStoryFold>>fold story tiddlers when opening a story (see [[CollapseTiddlersPlugin]])
<<option chkStoryClose>>close other tiddlers when opening a story
<<option chkStoryTop>>open story tiddlers at top of column
<<option chkStoryBottom>>open story tiddlers at bottom of column
<<<
!!!!!Revisions
<<<
2009.10.20 1.8.3 fix handling for 'add' item in popup menu
2009.08.29 1.8.2 added 'return false' to all button handlers to fix IE page-transition error
2009.08.23 1.8.1 fixed 'excludeStory' handling for links to missing tiddlers
2009.08.20 1.8.0 added 'excludeStory' tag handling
2009.07.27 1.7.1 corrected test for {{{chkStoryAllowAdd}}} when rendering //list// output
2009.07.27 1.7.0 added options: {{{chkStoryAllowAdd=true}}}, {{{chkStoryTop=true}}}, and {{{chkStoryBottom=false}}}.  Also, autoscroll to first tiddler in story
2009.07.26 1.6.0 added optional 'extratags' param to {{{<<saveStory>>}}} and 'tagfilter' to {{{<<openStory>>}}}
2009.07.06 1.5.1 in setTiddler(), use pushUnique() to avoid double 'story' tag
2009.04.24 1.5.0 added optional 'fold' param to {{{<<openStory StoryName ...>>}}} macro
2008.09.07 1.4.3 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.07.11 1.4.2 in confirmExit(), corrected bracketing for titles containing spaces
2008.03.10 [*.*.*] plugin size reduction: documentation moved to [[StorySaverPluginInfo]]
2008.01.01 1.4.1 sort list of stories alphabetically
2008.01.01 1.4.0 added popup option
2007.12.31 1.3.1 instead of readBracketedList(), use internal tiddler.links[] to retrieve story list from tiddler content. Allows more flexible formatting of story tiddler content: anything content that is not a tiddler link is automatically filtered out of the list.
2007.10.23 1.3.0 split {{{<<storyViewer>>}}} macro definition into stand-alone [[StoryViewerPlugin]] to allow separate installation of story saving vs. story viewing features.
2007.10.21 1.2.0 added {{{<<openStory>>}}} and {{{<<storyViewer>>}}} macros.
2007.10.20 1.1.0 in setTiddler(), automatically add "story" tag to saved story tiddlers
2007.10.18 1.0.1 added default initialization for chkSaveStory option value.  Also, in setTiddler(), call displayTiddler() after saving story to ensure that altered tiddler is shown to the user.
2007.10.05 1.0.0 initial release.   Moved [[SetDefaultTiddlers]] inline script and rewrote as a {{{<<saveStory>>}}} macro.  Moved permaview "mouseover HREF" enhancement from [[CoreTweaks]].
<<<

table#datePickerTable td.datePickerNav {
    cursor:pointer;
}

.datePickerDaysHeader td {
    text-align:center;
    background:#ABABAB;
    font:100% Arial;
}

/*
.datePickerDayRow td {
    width:18px;
    height:18px;
}
*/

td#datePickerMNS, td.datePickerNav {
    font-weight:bold;
}

table#datePickerTable {
    position:absolute;
    /* border-collapse:collapse; */
    background:#FFFFFF;
    border:1px solid #000;
    display:none;
}

table#datePickerTable td {
    padding: 3px;
}

td#datePickerMNS {
    text-align: center;
}

tr.datePickerDayRow td {
    background-color : #FFF;
    cursor : pointer;
    border : 1px solid #FFF;
    text-align : center;
	font-size:100%;
}

tr.datePickerDayRow td.defaultDate {
	color : #000;
	text-decoration : none;
}

tr.datePickerDayRow td.weekend {
	color:#797!important;
}

tr.datePickerDowRow td {
	color:#555;
	text-align:center;
	font-size:80%;
}

tr.datePickerDayRow td.emptyDate {
    cursor:default;
}

tr.datePickerDayRow td.oldDate {
	color : #ABABAB;
    text-decoration : line-through;
}

tr.datePickerDayRow td.otherMonth {
	color : #ccc!important;
}

tr.datePickerDayRow td.weekend.otherMonth {
	color : #ddd!important;
}

tr.datePickerDayRow td.highlightedDate {
    background-color : #fcc;
	font-weight : bold;
	border:1px solid #622;
}
tr.datePickerDayRow td.highlightedDate.tdover {
	color : #000;
}

tr.datePickerDayRow td.todayDate {
	font-weight : bold;
	color : red;
}

table#datePickerTable tr.datePickerDayRow td.tdover {
    background:#fc6;
}

This isn't very good but it might be of some use. It's the best attempt we have at showing a list of subprojects.
<<mgtdList title:'Subprojects' startTag:Project tags:'Project && !Complete' view:Project mode:global
	where:tiddler.hasParent('Project')
	group:Project
	gView:bold
	newButtonTags:'Project Active'
	leftoverTitle:'(Projects that aren't subprojects)
	>>
/***
|Name|SystemInfoPlugin|
|Source|http://www.TiddlyTools.com/#SystemInfoPlugin|
|Version|1.7.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|view system internal data and settings|
~TidIDE (//prounounced "Tie Dyed"//) - ''Tid''dlyWiki ''I''ntegrated ''D''evelopment ''E''nvironment - tools for ~TiddlyWiki authors and editors.  

You can use the {{{<<systemInfo>>}}} control panel to view a variety of system internal data and functions, and view/modify ''all'' of ~TiddlyWiki's internal config.option.* settings.  NOTE: Non-default config.options are stored in cookies and are retrieved whenever the TW document is loaded into a browser; however, ''core TW functions and custom-defined plugins can explicitly ignore or reset any locally-stored cookie values and use their own, internally-defined values'' instead.  As a result, changes to these may be completely ignored, or may only have an effect during the current TW document "session" (i.e., until the TW document is reloaded), even though a persistent cookie value has been saved.
!!!!!Usage/Example
<<<
{{{<<systemInfo>>}}}
{{smallform{<<systemInfo>>}}}
<<<
!!!!!Revisions
<<<
''2007.10.31 [1.7.1]'' code reduction: when filling globals droplist, instead of using a large, static "global exclusion list", simply skip global *functions*, while still listing all other global properties, including key TW internal objects such as "config".
''2007.09.09 [1.7.0]'' split from TidIDEPlugin
|please see [[TidIDEPluginInfo]] for additional revision details|
''2006.04.15 [0.5.0]'' Initial ALPHA release. Converted from inline script.
<<<
!!!!!Code
***/
//{{{
version.extensions.SystemInfoPlugin= {major: 1, minor: 7, revision: 1, date: new Date(2006,10,31)};
config.shadowTiddlers.SystemInfo="<<systemInfo>>";
config.macros.systemInfo = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var span=createTiddlyElement(place,"span")
		span.innerHTML=this.html;
		this.getsys(span.getElementsByTagName("form")[0]); // initialize form
	},
	getsys: function(f) {
		f.sysview.value="";

		// OPTIONS
		while (f.sys_opts.options.length > 1) { f.sys_opts.options[1]=null; } // clear list
		f.config_view.value="";  // clear edit field
		var cookies = { };
		if (document.cookie != "") {
			var p = document.cookie.split("; ");
			for (var i=0; i < p.length; i++) {
				var pos=p[i].indexOf("=");
				if (pos==-1)
					cookies[p[i]]="";
				else
					cookies[p[i].substr(0,pos)]=unescape(p[i].slice(pos+1));
			}
		}
		var c=1;
		var opt=new Array(); for (var i in config.options) opt.push(i); opt.sort();
		for(var i=0; i<opt.length; i++) {
			if ((opt[i].substr(0,3)=="txt")||(opt[i].substr(0,3)=="chk")) {
				var txt = (opt[i].substr(0,3)=="chk"?("["+(config.options[opt[i]]?"x":"_")+"] "):"")+opt[i]+(cookies[opt[i]]?" (cookie)":"");
				var val = config.options[opt[i]];
				f.sys_opts.options[c++]=new Option(txt,val,false,false);
			}
		}

		// STYLESHEETS
		while (f.sys_styles.options.length > 1) { f.sys_styles.options[1]=null; } // clear list
		var c=1;
		var styles=document.getElementsByTagName("style");
		for(var i=0; i < styles.length; i++) {
			var id=styles[i].getAttribute("id"); if (!id) id="(default)";
			var txt=id;
			var val="/* stylesheet:"+txt+" */\n"+styles[i].innerHTML;
			f.sys_styles.options[c++]=new Option(txt,val,false,false);
		}

		// SHADOWS
		while (f.sys_shadows.options.length > 1) { f.sys_shadows.options[1]=null; } // clear list
		var c=1;
		for(var s in config.shadowTiddlers) f.sys_shadows.options[c++]=new Option(s,config.shadowTiddlers[s],false,false);

		// NOTIFICATIONS
		while (f.sys_notify.options.length > 1) { f.sys_notify.options[1]=null; } // clear list
		var c=1;
		for (var i=0; i<store.namedNotifications.length; i++) {
			var n = store.namedNotifications[i];
			var fn = n.notify.toString();
			fn = fn.substring(fn.indexOf("function ")+9,fn.indexOf("{")-1);
			var txt=(n.name?n.name:"any change")+"="+fn;
			var val="/* notify: "+txt+" */\n"+n.notify.toString();
			f.sys_notify.options[c++]=new Option(txt,val,false,false);
		}

		// MACROS
		while (f.sys_macros.options.length > 1) { f.sys_macros.options[1]=null; } // clear list
		var c=1;
		var macros=new Array(); for (var m in config.macros) macros.push(m); macros.sort();
		for(var i=0; i < macros.length; i++)
			f.sys_macros.options[c++]=new Option(macros[i],this.showObject(config.macros[macros[i]]),false,false);

		// COMMANDS
		while (f.sys_commands.options.length > 1) { f.sys_commands.options[1]=null; } // clear list
		var c=1;
		for(var cmd in config.commands)
			f.sys_commands.options[c++]=new Option(cmd,this.showObject(config.commands[cmd]),false,false);

		// FORMATTERS
		while (f.sys_formatters.options.length > 1) { f.sys_formatters.options[1]=null; } // clear list
		var c=1;
		for(var i=0; i < config.formatters.length; i++)
			f.sys_formatters.options[c++]=new Option(config.formatters[i].name,this.showObject(config.formatters[i]),false,false);

		// PARAMIFIERS
		while (f.sys_params.options.length > 1) { f.sys_params.options[1]=null; } // clear list
		var c=1;
		for(var param in config.paramifiers)
			f.sys_params.options[c++]=new Option(param,this.showObject(config.paramifiers[param]),false,false);

		// GLOBALS
		//global variables and functions (excluding most DOM and ~TiddyWiki core definitions)://
		while (f.sys_globals.options.length > 1) { f.sys_globals.options[1]=null; } // clear list
		if (config.browser.isIE) return; // BYPASS - 8/16/2006 // DON'T LIST GLOBALS IN IE... throws object error - WFFL
		try {
			var c=1;
			for (var v in window) if ((typeof window[v])!='function') {
				var t=window[v];
				if ((typeof window[v])=='object') {
					var t='';
					for (var p in window[v]) {
						t+=((typeof window[v][p])!='function')?('['+typeof window[v][p]+'] '+p):p;
						t+=((typeof window[v][p])!='function')?('='+window[v][p]):'';
						t+='\n';
					}
				}
				f.sys_globals.options[c++]=new Option(((typeof window[v])!='function')?('['+typeof window[v]+'] '+v):v,t,false,false);
			}	
		}
		catch(e) { ; }
	},
	setsys: function(f) {
		if (f.sys_opts.selectedIndex==0) return; // heading - do nothing
		var name=f.sys_opts.options[f.sys_opts.selectedIndex].text.replace(/\[[Xx_]\] /,'').replace(/ \(cookie\)/,'')
		var value=f.config_view.value;
		config.options[name]=value;
		saveOptionCookie(name);
		f.sys_opts.options[f.sys_opts.selectedIndex].value=value;
		return;
	},
	showObject: function(o) { // generate formatted output for displaying object references
		var t="";
		for (var p in o) {
			if (typeof o[p]=="function") {
				t+="- - - - - - - - - - "+p+" - - - - - - - - - -\n";
				t+=o[p].toString();
				t+="\n- - - - - - - - - - END: "+p+" - - - - - - - - - -\n";
			}
			else
				t+='['+typeof o[p]+'] '+p+": "+o[p]+"\n";
		}
		return t;
	},
	html: "\
	<form style='display:inline;margin:0;padding:0;'> \
		<!-- configurable options --> \
		<table style='width:100%;border:0;padding:0;margin:0'><tr style='border:0;padding:0;margin:0'> \
		<td style='width:30%;border:0;padding:0;margin:0'> \
			<select size=1 name='sys_opts' style='width:100%;' \
				onchange='this.form.config_view.value=this.value'> \
				<option value=\"\">config.options.*</option> \
			</select> \
		</td><td style='width:50%;border:0;padding:0;margin:0;'> \
			<input type=text name='config_view' size=60 style='width:99%;' value=''> \
		</td><td style='width:20%;white-space:nowrap;border:0;padding:0;margin:0;'> \
			<input type=button style='width:50%;' value='set option' title='save this TiddlyWiki option value' \
				onclick='config.macros.systemInfo.setsys(this.form);config.macros.systemInfo.getsys(this.form);'><!-- \
			--><input type=button style='width:50%;' value='refresh' title='retrieve current options and system values' \
				onclick='this.form.sysview.style.display=\"none\"; config.macros.systemInfo.getsys(this.form);'> \
		</td></tr><tr style='border:0;padding:0;margin:0'><td colspan=3 \
				style='white-space:nowrap;width:100%;border:0;padding:0;margin:0'> \
			<!-- system objects --> \
			<select size=1  name='sys_styles' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">stylesheets...</option> \
			</select><select size=1  name='sys_shadows' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">shadows...</option> \
			</select><select size=1  name='sys_notify' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">notifications...</option> \
			</select><select size=1  name='sys_globals' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">globals...</option> \
			</select><br><select size=1  name='sys_macros' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">macros...</option> \
			</select><select size=1  name='sys_commands' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">commands...</option> \
			</select><select size=1  name='sys_formatters' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">formatters...</option> \
			</select><select size=1  name='sys_params' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">paramifiers...</option> \
			</select> \
			<!-- system value display area --> \
			<span style='white-space:normal;'><textarea id='sysview' name=sysview cols=60 rows=12 \
				onfocus='this.select()' style='width:99.5%;height:16em;display:none'></textarea></span> \
		</td></tr></table> \
	</form>"
}
//}}}
<<tiddler SideBarOptions>>
<<tiddler SideBarTabs>>
<<allTags excludeLists>>
<<tabs txtMoreTab "Tags" "All Tags" TabAllTags "Miss" "Missing tiddlers" TabMoreMissing "Orph" "Orphaned tiddlers" TabMoreOrphans "Shad" "Shadowed tiddlers" TabMoreShadowed>>
<<allTags excludeLists [a-z]>>
/***
|Name|TableOfContentsPlugin|
|Source|http://www.TiddlyTools.com/#TableOfContentsPlugin|
|Documentation|http://www.TiddlyTools.com/#TableOfContentsPluginInfo|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|replace the standard tabbed contents list with a scrolling listbox|
When there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.  The TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.
!!!!!Documentation
>see [[TableOfContentsPluginInfo]]
!!!!!Configuration
<<option chkTOCShow>> display table of contents listbox
<<option chkTOCIncludeHidden>> include tiddlers tagged with <<tag excludeLists>> in listbox
listbox shows <<option txtTOCListSize>> lines, sorted by <<option txtTOCSortBy>>
!!!!!Revisions
<<<
2008.04.09 [2.4.3] restored config.options.chkTOCShow and onClickTOCMenu() handler
|please see [[TableOfContentsPluginInfo]] for additional revision details|
2005.06.13 [1.0.0] Initial Release (as adaptation - predates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.TableOfContentsPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2008,4,9)};
//}}}

// // 1.2.x compatibility
//{{{
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}

//{{{
// define defaults for cookie-based option values
if (config.options.txtTOCSortBy==undefined)	config.options.txtTOCSortBy="modified";
if (config.options.txtTOCListSize==undefined)	config.options.txtTOCListSize=19;
if (config.options.chkTOCShow==undefined)	config.options.chkTOCShow=true;
if (config.options.chkTOCIncludeHidden==undefined)	config.options.chkTOCIncludeHidden=false;

// define macro "tableOfContents" to render controls
config.macros.tableOfContents = { label: "contents" };
config.macros.tableOfContents.cmdMax=8; // index of maximum command item

config.macros.tableOfContents.css = '\
.TOC { padding:0.5em 1em 0.5em 1em; }\
.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\
.TOCList { width: 100%; font-size:8pt; margin:0em; }\
';

config.macros.tableOfContents.html = '\
<div style="text-align:right">\
	<span style="float:left">\
	<a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\
		onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\
	</span>\
	<a href="JavaScript:;" id="TOCSmaller" style="display:inline"\
		onclick="resizeTOC(this)" title="reduce list size">&#150;</a>\
	<a href="JavaScript:;" id="TOCLarger"style="display:inline"\
		onclick="resizeTOC(this)" title="increase list size">+</a>\
	<a href="JavaScript:;" id="TOCMaximize"style="display:inline"\
		onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\
</div>\
';

config.macros.tableOfContents.handler = function(place,macroName,params) { 
	var parsedParams = new Array();
	parsedParams['label']=this.label;
	parsedParams['inline']=false;
	while (params.length>0) {
		if (params[0]=="label:none") parsedParams['label']="";
		else if (params[0].substr(0,6)=="label:") parsedParams['label']=params[0].substr(6);
		if (params[0].substr(0,7)=="prompt:") parsedParams['prompt']=params[0].substr(7);
		if (params[0].substr(0,8)=="padding:")parsedParams['padding']=params[0].substr(8);
		if (params[0].substr(0,7)=="margin:") parsedParams['margin']=params[0].substr(7);
		if (params[0].substr(0,5)=="sort:")   parsedParams['sortby']=params[0].substr(5);
		if (params[0].substr(0,5)=="date:")   parsedParams['date']=params[0].substr(5);
		if ((params[0]=="size:auto")||(params[0]=="size:0")) parsedParams['autosize']=true;
		else if (params[0] && (params[0].substr(0,5)=="size:")) parsedParams['requestedSize']=params[0].substr(5);
		if (params[0].substr(0,6)=="width:") parsedParams['width']=params[0].substr(6);
		if (params[0]=="hidelist") parsedParams['hidelist']=true;
		if (params[0]=="inline")   parsedParams['inline']=true;
		if (params[0]=="-title")   parsedParams['hide_title']=true;
		if (params[0]=="-date")    parsedParams['hide_date']=true;
		if (params[0]=="-author")  parsedParams['hide_author']=true;
		if (params[0]=="-creator") parsedParams['hide_creator']=true;
		if (params[0]=="-tags")    parsedParams['hide_tags']=true;
		if (params[0]=="-missing") parsedParams['hide_missing']=true;
		if (params[0]=="-orphans") parsedParams['hide_orphans']=true;
		if (params[0]=="-shadows") parsedParams['hide_shadows']=true;
		params.shift(); 
	}
	setStylesheet(config.macros.tableOfContents.css,"tableOfContents");
	var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)
	if (parsedParams['margin'])	{ newTOC.style.margin=parsedParams['margin']; }
	if (parsedParams['padding'])	{ newTOC.style.padding=parsedParams['padding']; }
	if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);
	var newTOCList=createTOCList(newTOC,parsedParams)
	refreshTOCList(newTOCList);
	store.addNotification(null,reloadTOCLists);	// reload listbox after every tiddler change
}

// IE needs explicit global scoping for functions/vars called from browser events
window.onChangeTOCList=onChangeTOCList;
window.onClickTOCList=onClickTOCList;
window.onDblClickTOCList=onDblClickTOCList;
window.reloadTOCLists=reloadTOCLists;
window.refreshTOCList=refreshTOCList;
window.onClickTOCMenu=onClickTOCMenu;
window.resizeTOC=resizeTOC;
	
function createTOCList(place,params) {
	var list = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])
	list.params=params;
	list.onchange=onChangeTOCList;
	list.onclick=onClickTOCList;
	list.ondblclick=onDblClickTOCList;
	list.onkeyup=onKeyUpTOCList;
	list.style.display=config.options.chkTOCShow ? "block" : "none" ;
	list.sortBy=config.options.txtTOCSortBy;
	list.dateFormat="DD MMM YYYY";
	list.requestedSize=config.options.txtTOCListSize;
	list.expandall=false;
	list.cmdMax=config.macros.tableOfContents.cmdMax;
	if (params['hide_title'])   list.cmdMax--;
	if (params['hide_date'])    list.cmdMax--;
	if (params['hide_author'])  list.cmdMax--;
	if (params['hide_creator']) list.cmdMax--;
	if (params['hide_tags'])    list.cmdMax--;
	if (params['hide_missing']) list.cmdMax--;
	if (params['hide_orphans']) list.cmdMax--;
	if (params['hide_shadows']) list.cmdMax--;
	if (params['sortby'])       { list.sortBy=params['sortby']; list.noSortCookie=true; }
	if (params['date'])         { list.dateFormat=params['date']; }
	if (params['autosize'])     { list.autosize=true; list.noSizeCookie=true; }
	if (params['requestedSize']){ list.requestedSize=params['requestedSize']; list.noSizeCookie=true; }
	if (params['width'])        { list.style.width=params['width']; }
	if (params['hidelist'])     { list.style.display ="none" ; list.noShowCookie=true; }
	if (params['expandall'])    { list.expandall=true; }
	return list;
}

function onChangeTOCList() {
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((this.size==1)&&(thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	refreshTOCList(this);
	return false;
}
function onClickTOCList(e) {
	if (!e) var e = window.event;
	if (this.size==1) return; // don't toggle display for droplist
	if (e.shiftKey) { this.expandall=!this.expandall; refreshTOCList(this);}
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return true;
}
function onDblClickTOCList(e) {
	if (!e) var e = window.event;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function onKeyUpTOCList(e) {
	if (!e) var e = window.event;
	if (e.keyCode!=13) return true;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function reloadTOCLists() {
	var all=document.all? document.all.tags("select") : document.getElementsByTagName("select");
	for (var i=0; i<all.length; i++)
		if (all[i].className=="TOCList")
			{ all[i].selectedIndex=-1; refreshTOCList(all[i]); }
}
 
function refreshTOCList(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;
	var showHidden = config.options.chkTOCIncludeHidden && !(config.options.chkHttpReadOnly && readOnly);

	if (selectedIndex==0) sortBy=list.sortBy;	// "nnn tiddlers" heading - use previous sort order
	else if (selectedIndex<=list.cmdMax)sortBy=list.value;
	else { if (list.options[list.selectedIndex].value=='') expandTOC(list); return; }

	list.sortBy = sortBy; // save current sort order
	if (!list.noSortCookie) { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }

	// get the list of tiddlers
	var tiddlers = [];
	switch (sortBy) {
		case "missing":	tiddlers=store.getMissingLinks(); break;
		case "tags": tiddlers=store.getTags(); break;
		case "orphans":	tiddlers=store.getOrphans(); break;
		case "shadows": for (var t in config.shadowTiddlers) tiddlers.push(t); tiddlers.sort();	break;
		default: tiddlers=store.getTiddlers(sortBy=='creator'?'modifier':sortBy,showHidden?'':'excludeLists'); break;
	}

	// clear current listbox contents
	while (list.length > 0) { list.options[0] = null; }
	list.saved=null;

	// add heading and control items to list
	var i=0;
	var theHeading=tiddlers.length+' tiddlers:';
	if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';
	if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';
	if (sortBy=='tags')    theHeading=tiddlers.length+' tags:';
	if (sortBy=='shadows') theHeading=tiddlers.length+' shadow tiddlers:';
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var sel=">";
	list.options[i++]=new Option(theHeading,'');
	function headerOpt(txt,val) { return new Option(((sortBy==val)?sel:indent)+' ['+txt+']',val); }
	if (!list.params['hide_title'])   list.options[i++]=headerOpt('by title','title');
	if (!list.params['hide_date'])    list.options[i++]=headerOpt('by date','modified');
	if (!list.params['hide_author'])  list.options[i++]=headerOpt('by author','modifier');
	if (!list.params['hide_creator']) list.options[i++]=headerOpt('by creator','creator');
	if (!list.params['hide_tags'])    list.options[i++]=headerOpt('by tags','tags');
	if (!list.params['hide_missing']) list.options[i++]=headerOpt('missing','missing');
	if (!list.params['hide_orphans']) list.options[i++]=headerOpt('orphans','orphans');
	if (!list.params['hide_shadows']) list.options[i++]=headerOpt('shadows','shadows');
	// output the tiddler list
	switch(sortBy) {
		case "title":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title);
			break;
		case "modified":
		case "modifier":
		case "creator":
			if (sortBy=="modified") tiddlers.reverse(); // show newest first
			if (sortBy=="creator") { // sort by custom field with fallback value
				tiddlers.sort(function (a,b) {
					var v1=a.fields.creator||a.modifier;
					var v2=b.fields.creator||b.modifier;
					return (v1==v2)?0:(v1>v2?1:-1);
				});
			}
			var lastSection = "";
			for (var t = 0; t < tiddlers.length; t++){
				var tiddler = tiddlers[t];
				var theSection = "";
				var m=tiddler.modified;
				if (sortBy=="modified") theSection=m.getFullYear()+'.'+(m.getMonth()+1)+'.'+m.getDate();
				if (sortBy=="modifier") theSection = tiddler.modifier;
				if (sortBy=="creator") theSection=tiddler.fields['creator']||tiddler.modifier;
				if (theSection != lastSection) {
					lastSection = theSection;
					if (sortBy=="modified") theSection = m.formatString(list.dateFormat);
					list.options[i++] = new Option('+ '+theSection,"");
				}
				list.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title);
			}
			expandTOC(list);
			break;
		case "tags":
			// tagged tiddlers, by tag
			var tagcount=0;
			var lastTag = null;
			for (var t = 0; t < tiddlers.length; t++) {  // actually a list of tags, not tiddlers... 
				var theTag = tiddlers[t][0]; var tid=store.getTiddler(theTag);
				if (tid && tid.isTagged('excludeLists')) continue; // skip excluded tags
				var temp = store.getTaggedTiddlers(theTag);
				var tagged=[]; for (var q=0; q<temp.length; q++) // hide excluded tiddlers
					if (!temp[q].isTagged('excludeLists')) tagged.push(temp[q]); 
				if (tagged.length) { tagcount++;
					list.options[i++]=new Option('+ '+theTag+" ("+tagged.length+")","");
					for(var r=0; r<tagged.length; r++)
						list.options[i++]=
							new Option(indent+indent+tagged[r].title,tagged[r].title);
				}
			}
			// count untagged tiddlers
			var temp = store.getTiddlers("title");
			var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;
			// create 'pseudo-tag' listing untagged tiddlers (if any)
			if (c>0) {
				list.options[i++] = new Option("+ untagged ("+c+")","");
				for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)
					list.options[i++] = new
						Option(indent+indent+temp[r].title,temp[r].title);
			}
			list.options[0].text=tagcount+' tags:';
			expandTOC(list);
			break;
		case "missing": case "orphans": case "shadows":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t],tiddlers[t]);
			break;
	}
	list.selectedIndex=selectedIndex; // select current control item
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// show/hide branch of TOCList based on current selection
function expandTOC(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;

	// don't collapse/expand list for alpha-sorted "flatlist" TOC contents
	// or list control items
	if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="shadows")) return;
	if ((selectedIndex>0)&&(selectedIndex<=list.cmdMax)) return;

	// get current selected text/value and cache the 
	// complete list.  Then clear the current list contents
	var theText = list.options[selectedIndex].text;
	var theValue = list.options[selectedIndex].value;
	if (!list.saved) {
		list.saved=new Array();
		for (var i=0;i<list.length;i++) list.saved[i]=list.options[i];
	}
	while (list.length > 0) { list.options[0] = null; }

	// put back heading items until item text matches current selected heading
	var i=0;
	for (var t=0; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||(opt.value=='')||(i<=list.cmdMax)) list.options[i++] = opt;
		if (opt.text==theText) break;
	}
	selectedIndex=i-1;	// this is the NEW index of the current selected heading
	// put back items with value!='' until value==''
	for ( t++; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value!='') list.options[i++] = opt;
		if (opt.value=='') break;
	}
	// put back remaining items with value==''
	for ( ; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value=='') list.options[i++] = opt;
	}
	list.selectedIndex = selectedIndex;
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// these functions process clicks on the 'control links' that are displayed above the listbox
function getTOCListFromButton(which) {
	var list = null;
	switch (which.id) {
		case 'TOCMenu':
			var theSiblings = which.parentNode.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;
			break;
		case 'TOCSmaller': case 'TOCLarger': case 'TOCMaximize':
			var theSiblings = which.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;
			break;
	}
	for (var k=0; k<theSiblings.length; k++)
		if (theSiblings[k].className=="TOCList") { list=theSiblings[k]; break; }
	return list;
}
function onClickTOCMenu(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var opening = list.style.display=="none";
	if(config.options.chkAnimate) anim.startAnimating(new Slider(list,opening,false,"none"));
	else list.style.display = opening ? "block" : "none" ;
	if (!list.noShowCookie) { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }
	return(false);
}
function resizeTOC(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var size = list.size;
	if (list.style.display=="none")	// make sure list is visible
		if(config.options.chkAnimate) anim.startAnimating(new Slider(list,true,false,"none"));
		else list.style.display = "block" ;
	switch (which.id) {
		case 'TOCSmaller':	// decrease current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size==1)	break;
			size -= 1;	// shrink by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCLarger':	// increase current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size>=list.options.length)	break;
			size += 1;	// grow by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCMaximize':	// toggle autosize
			list.autosize  = (list.size!=list.options.length);
			list.size = (list.autosize)?list.options.length:list.requestedSize;
			break;
	}
	if (!list.noSizeCookie && !list.autosize)
		{ config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }
}
//}}}
|Name|TableOfContentsPluginInfo|
|Source|http://www.TiddlyTools.com/#TableOfContentsPlugin|
|Documentation|http://www.TiddlyTools.com/#TableOfContentsPluginInfo|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|documentation for TableOfContentsPlugin|
When there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.  This plugin replaces the standard tabs with a listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.
!!!!!Usage
<<<
{{{
<<tableOfContents label:... sort:... date:... size:...
	width:... padding:... margin:... prompt:... inline hidelist
	-title -date -author -creator -tags -missing -orphans -shadows
}}}
*''label:text'' (default="contents")<br>the text that appears above the listbox.
*''sort:fieldtype''<br>sets the initial display order for items in the listbox.  'fieldtype' is one of: ''title, modified, modifier, creator, tags, missing, orphans,'' or ''shadows''.
*''date:format''<br>format for dates in listbox display, using TiddlyWiki date formatting (e.g. "DDD, MMM DD YYY")
*''size:nnn'' (default=1)<br>the initial number of lines to display in the listbox.  If size=1, a droplist is created, otherwise a fixed-size listbox is created.  You can use "size:0" or "size:auto" to display a varible-height listbox that automatically adjusts to fit the current list contents without scrolling.
*''width:...'' (default=100%)<br>the width of the listbox/droplist, using CSS units cm, px, em, or %.  You can also use a ".TOCList" custom CSS class definition to override the built-in CSS declarations for the listbox.
*''padding:...''<br>sets listbox CSS padding style
*''margin:...''<br>sets listbox CSS margin style
*''prompt:...''<br>sets non-selectable prompt text that is displayed as the first line of the listbox //(note: this feature is not supported by the listbox control on all browsers)//.  Let's you include a short text message (such as "select a tiddler"), even when displaying a compact single-line droplist.
*''inline''<br>By default, the listbox is rendered inside a {{{<div>}}} element.  This keyword causes the plugin to use a {{{<span>}}} instead, allowing for more flexible 'inline' placement when embedded within other content.
*''hidelist''<br>when present, only the listbox label and size controls will be appear when first displayed.  Clicking the label toggles the listbox display.
*''-title, -date, -author, -creator, -tags, -missing, -orphans, -shadows''<br>Omits the indicated list command item and corresponding listbox content.  
Select (or double-click) a title from the listbox to open a tiddler, or select a 'command' items to set the order and type of tiddlers that are shown in the list:
*''[by title]''<br>displays all tiddlers in the document in alphanumeric order
*''[by date/author/creator/tags]''<br>displays indented sections, sorted accordingly, with headings (indicated by a '+') that can be expanded, one at a time, to view the list of tiddlers in that section. You can also ''shift-click'' on a section heading expand/collapse all sections at once.
*''[missing]''<br>displays tiddlers that have been referenced within the document but do not yet exist.
*''[orphans]''<br>displays tiddlers that do exist in the document but have not been referenced by a link from anywhere else within the document.
*''[shadows]''<br>displays special default/fallback tiddlers that are used by TiddlyWiki to configure built-in features and add-on macros/extensions.
The ''size of the listbox can be adjusted'' so you can view more (or less) tiddler titles at one time.  Select ''[-]'' to reduce the size by one line, ''[+]'' to increase the size by one line, or ''[=]'' to autosize the list to fit the current contents (toggles on/off). //Note: If the listbox is reduced to a single line, it displayed as a droplist instead of a fixed-sized listbox.//  You can ''show/hide the entire listbox'' by selecting the "contents" label that appears above the listbox.
<<<
!!!!!Configuration
<<option chkTOCShow>> display table of contents listbox
<<option chkTOCIncludeHidden>> include tiddlers tagged with <<tag excludeLists>> in listbox
listbox shows <<option txtTOCListSize>> lines, sorted by <<option txtTOCSortBy>>
!!!!!Parameters
<<<
<<<
!!!!!Examples
<<<
{{{<<tableOfContents "label:all tiddlers" sort:title width:40% size:1>>}}}
<<tableOfContents "label:all tiddlers" sort:title width:40% size:1>>
{{{<<tableOfContents "label:by date" sort:modified size:1 width:40%>>}}}
<<tableOfContents "label:by date" sort:modified size:1 width:40%>>
{{{<<tableOfContents "label:tagged tiddlers" sort:tags size:1 width:40%>>}}}
<<tableOfContents "label:tagged tiddlers" sort:tags size:1 width:40%>>
{{{<<tableOfContents "label:shadow tiddlers" sort:shadows size:1 width:40%>>}}}
<<tableOfContents "label:shadow tiddlers" sort:shadows size:1 width:40%>>
<<<
!!!!!Revisions
<<<
2008.04.09 2.4.3 restored config.options.chkTOCShow and onClickTOCMenu() handler
2008.04.07 2.4.2 added "Configuration" section and removed config.options.chkTOCShow and onClickTOCMenu() handler
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.25 2.4.1 code cleanup and performance improvements
2007.12.25 2.4.0 renamed 'system' section to 'shadows' (and no longer list plugins, etc. in that section).  Also, added 'by creator' sort order (with fallback to 'modifier' if 'creator' custom field is undefined). Thanks to RA for suggestion and code tweaks.
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.03.22 2.3.2 in refreshTOCLists(), when sorting by date, use convertToLocalYYYYMMDDHHMM() instead of formatString() to compare dates for 'section headings' and only use formatString() when actually generating the section heading date display.  Improves performance significantly for date sorted listbox, especially in documents with hundreds of tiddlers.  Suggestion by AndreasHoefler.
2007.03.21 2.3.1 in refreshTOCLists(), only get list of 'select' elements, instead of scanning through all elements (saves significant time during refresh events.  Suggestion by AndreasHoefler.
2006.11.27 2.3.0 added ability to omit sections from listbox via macro params (e.g., "-date -tags", etc.).  Based on request from DavidWinfield.
2006.05.21 2.2.7 added onkeyup handling for enter key (=view selected tiddler, equivalent to double-click)
2006.02.14 2.2.6 FF1501 fix: add 'var r' and 'var k' to unintended global variable declarations in refreshTOCList() and getTOCListFromButton().  Thanks for report from AndreasHoefler.
2006.02.04 2.2.5 add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2005.12.21 2.2.2 in onClickTOCList() and onDblClickTOCList(), prevent mouse events from 'bubbling' up to other handlers
2005.10.30 2.2.1 in refreshTOCList(), fixed calculation of "showHidden" to check for 'readOnly' (i.e., "via HTTP") flag.  Based on a report from LyallPearce
2005.10.30 2.2.0 hide tiddlers tagged with 'excludeLists' (with option to override, i.e., "include hidden tiddlers")
2005.10.09 2.1.0 combined documentation and code in a single tiddler
added click toggle for expand-all vs. show-one-branch
2005.08.07 2.0.0 major re-write to not use static ID values for listbox controls, so that multiple macro instances can exist without corrupting each other or the DOM.  Moved HTML and CSS definitions into plugin code instead of using separate tiddlers.  Added macro parameters for label, sort, date, size, width, hidelist and showtabs
2005.08.03 1.0.3 added "showtabs" optional parameter
2005.07.27 1.0.2 core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet().  Added show/hide toggle (click on 'contents' link)
2005.07.23 1.0.1 added parameter checks and corrected addNotification() usage
2005.07.20 1.0.0 Initial Release
<<<
!Project
<!--{{{-->
<div class="cols3">

<div class="col">

	[[TagDashboards##Ticklers Requiring Action]]

	<div macro="mgtdList title:'Next Actions' tags:'Action && Next && !Done' view:Action
		ignoreRealm:yes
		group:Context
		gView:Context
		newButtonTags:'Action Next'
		"></div>

	<div macro="mgtdList title:'Waiting Actions by Person' tags:'Action && [(Waiting For)] && !Done' view:Action
		ignoreRealm:yes
		group:Contact
		gView:bold
		newButtonTags:'Action [(Waiting For)]'
		"></div>

</div>
<div class="col">

	<div macro="mgtdList title:'Active Subprojects' tags:'Project && !Complete' view:Project
		ignoreRealm:yes
		group:ProjectStatus
		gView:bold
		newButtonTags:'Project'
		"></div>

	<div macro="mgtdList title:'Completed Subprojects' tags:'Project && Complete' view:ProjectComplete
		ignoreRealm:yes
		newButtonTags:'Project Active Complete'
		dontShowEmpty:yes
		"></div>

	<div macro="mgtdList title:'Future Actions' tags:'Action && Future && !Done' view:Action
		ignoreRealm:yes
		group:Context
		gView:Context
		newButtonTags:'Action Future'
		"></div>


</div>
<div class="col">

	[[TagDashboards##Upcoming Ticklers]]

	<div macro="mgtdList title:'Reference Items' tags:'Reference' view:plain newButtonTags:'Reference' 
		ignoreRealm:yes
		"></div>

	<div macro="mgtdList title:'Done Actions' tags:'Action && Done' view:DoneAction
		ignoreRealm:yes
		newButtonTags:'Action Done Next'
		dontShowEmpty:yes
		sort:-modified
		"></div>

</div>

</div>
<!--}}}-->


!Context
<!--{{{-->
<div class="cols2">

<div class="col">

	<div macro="mgtdList title:'Next' tags:'Action && Next && !Done' view:ActionProj
		newButtonTags:'Action Next'
		where:tiddler.hasActiveProject()||!tiddler.hasParent('Project')
		"></div>

</div>
<div class="col">

	<div macro="mgtdList title:'Waiting' tags:'Action && [(Waiting For)] && !Done' view:ActionProj
		newButtonTags:'Action [(Waiting For)]'
		where:tiddler.hasActiveProject()||!tiddler.hasParent('Project')
		"></div>

	<div macro="mgtdList title:'Future' tags:'Action && Future && !Done' view:ActionProj
		newButtonTags:'Action Future'
		where:tiddler.hasActiveProject()||!tiddler.hasParent('Project')
		"></div>

</div>

</div>
<!--}}}-->


!Contact
<!--{{{-->
<div class="cols2">

<div class="col">

	<div macro="mgtdList title:'Delegated Actions' tags:'Action && !Done && [(Waiting For)]' view:ActionProj
		ignoreRealm:yes
		newButtonTags:'Action [(Waiting For)]'
		"></div>

	<div macro="mgtdList title:'Associated Actions' tags:'Action && !Done && ![(Waiting For)]' view:ActionProj
		ignoreRealm:yes
		group:ActionStatus
		gView:bold
		newButtonTags:'Action'
		"></div>


</div>
<div class="col">

	<div macro="mgtdList title:'Associated Projects' tags:'Project && !Complete' view:Project
		ignoreRealm:yes
		group:ProjectStatus
		gView:bold
		newButtonTags:'Project'
		"></div>

	<div macro="mgtdList title:'Associated Ticklers' tags:'Tickler && !Actioned' view:Tickler
		ignoreRealm:yes
		newButtonTags:'Tickler Once'
		sort:tickleDate
		"></div>

	<div macro="mgtdList title:'Done Actions' tags:'Action && Done' view:DoneAction
		ignoreRealm:yes
		newButtonTags:Done
		"></div>

	<div macro="mgtdList title:'Completed Projects' tags:'Project && Complete' view:ProjectComplete
		ignoreRealm:yes
		newButtonTags:'Project'
		"></div>

</div>

</div>
<!--}}}-->


!Area
<!--{{{-->
<div class="cols3">

<div class="col">
	<div macro="mgtdList title:'Active Projects' tags:'Project && !Complete && !Someday/Maybe' view:Project newButtonTags:'Project Active'
		ignoreRealm:yes
		"></div>

	<!--
	for those who wanted actions in their area view
	comment the following out if you don't want it

	NB under construction, doesn't work at all...

	<div macro="mgtdList title:'Next Actions'
		mode:global
		startTag:Action
		tags:'!Done'
		group:ActionStatus
		gView:bold
		newButtonTags:'Action'
		view:Action
		where:{{'tiddler.actionInArea('+tiddler.title+')'}}
		ignoreRealm:yes
		"></div>
	-->
	
</div>
<div class="col">
	<div macro="mgtdList title:'Someday/Maybe Projects' tags:'Project && !Complete && Someday/Maybe' view:Project newButtonTags:'Project Someday/Maybe'
		ignoreRealm:yes
		"></div>
</div>
<div class="col">
	<div macro="mgtdList title:'Actions (without a project)'
		tags:'Action && !Done'
		view:Action
		newButtonTags:'Action' 
		group:ActionStatus
		gView:bold
		ignoreRealm:yes
		"></div>
	<div macro="mgtdList title:'Completed Projects' tags:'Project && Complete' view:ProjectComplete newButtonTags:'Project Someday/Maybe' 
		ignoreRealm:yes
		"></div>
</div>

</div>
<!--}}}-->


!Reference
<!--{{{-->
<div class="tagglyTagging" macro="tagglyTagging"></div><!--- this makes me happy :) --->
<!--}}}-->


!Ticklers Requiring Action
<!--{{{-->
<!--- included by other sections --->
<div macro="mgtdList title:'Ticklers Requiring Action' tags:'Tickler && !Actioned' view:Tickler newButtonTags:'Tickler Once'
	ignoreRealm:yes
	dontShowEmpty:yes
	where:'tiddler.ticklerIsActive()'
	sort:tickleDate
	"></div>
<!--}}}-->


!Upcoming Ticklers 
<!--{{{-->
<!--- included by other sections --->
<div macro="mgtdList title:'Upcoming Ticklers' tags:'Tickler && !Actioned' view:Tickler newButtonTags:'Tickler Once'
	ignoreRealm:yes
	where:'!tiddler.ticklerIsActive()'
	sort:tickleDate
	"></div>
<!--}}}-->



/***
|Name|TaggedTemplateTweakInfo|
|Source|http://www.TiddlyTools.com/#TaggedTemplateTweak|
|Documentation|http://www.TiddlyTools.com/#TaggedTemplateTweakInfo|
|Version|1.6.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for TaggedTemplateTweak|
This plugin extends the core function, story.chooseTemplateForTiddler(), so that any given tiddler can be viewed and/or edited using alternatives to the standard tiddler templates.  To select alternative templates, a 'template prefix' is determined by using the tiddler's title or matching a tag value or using a value stored in a custom tiddler field.  
!!!!!Usage
<<<
*The plugin first attempts to use the tiddler's //title// as a prefix added to the standard TiddlyWiki template titles, [[ViewTemplate]] and [[EditTemplate]] (i.e., ''TiddlerNameViewTemplate'' and ''TiddlerNameEditTemplate'').  This allows you to associate a custom template with a specific tiddler, without needing to add any special tags or custom field values to that individual tiddler.  
*You can also define a tiddler's template prefix by using a //custom tiddler field// named 'template'.  If no corresponding template was found using the tiddler's title, then the tiddler's 'template' field value, if present, will be used as a prefix (e.g., if template='SomeThing', then [[SomeThingViewTemplate]] will be applied).
*If no template is found using the either the title or 'template' field, then each of the tiddler's tags is tried as a template prefix, until a corresponding template, if any, is found.  For example, any tiddlers that are tagged with ''<<tag media>>'' could find alternative templates named [[mediaViewTemplate]] and [[mediaEditTemplate]].
*If you using a systemTheme, the plugin will also tries adding the currently selected theme name (specified by {{{config.options.txtTheme}}}) to the template name (e.g. ''[[SomeTheme##MediaViewTemplate]]'') so that the alternative template definitions can be contained as //sections// within a single systemTheme tiddler.
*Lastly, if no alternative template is found at all, the standard [[ViewTemplate]] or [[EditTemplate]] definition as determined by the TiddlyWiki core handler is used.
Notes:
*You can redefine the //name// of the custom field used to store the template prefix.  For example, to use the name of a TiddlyWeb server-side 'bag' as a prefix (so that tiddlers from separate bags can have different appearances), add the following to a tiddler tagged with<<tag systemConfig>>:{{block{
{{{
config.options.txtTemplateTweakFieldname='server.bag'; // use TiddlyWeb bag name as prefix
}}}
}}}
*To permit use of templates that have proper WikiWord tiddler titles (e.g., [[MediaViewTemplate]] and [[MediaEditTemplate]]), the plugin also attempts to use a capitalized form of the tag value (e.g., ''Media'') as a prefix.  //This capitalization is for comparison purposes only and will not alter the actual tag values that are stored in the tiddler.//
<<<
!!!!!Examples
<<<
|Sample tiddler| tag | view template | edit template |
|[[MediaSample - QuickTime]]| <<tag media>> | [[MediaViewTemplate]] | [[MediaEditTemplate]] |
|[[MediaSample - Windows]]| <<tag media>> | [[MediaViewTemplate]] | [[MediaEditTemplate]] |
|[[CDSample]]| <<tag CD>> | [[CDViewTemplate]] | [[CDEditTemplate]] |
|<<newTiddler label:"create new task..." title:SampleTask tag:task text:"Type some text and then press DONE to view the task controls">> | <<tag task>> | [[TaskViewTemplate]] | [[EditTemplate]] |

//(note: if these samples are not present in your document, please visit// http://www.TiddlyTools.com/ //to view these sample tiddlers on-line)//
<<<
!!!!!Revisions
<<<
2009.09.02 1.6.1 apply field-based template (if any) *before* tag-based template
2009.07.31 1.6.0 added support for using custom field value as prefix
2009.05.04 1.5.2 check for tiddler exist *after* title-as-prefix (allows shadow tiddlers to use custom templates)
2009.01.06 1.5.1 reversed logic so that title-as-prefix takes precedence over tag-matched prefix
2008.12.18 1.5.0 added handling for using tiddler //title// as prefix (e.g., {{{SomeTiddlerViewTemplate}}}) 
2008.08.29 1.4.1 corrected handling for tiddlers with no matching tagged template when non-default theme is in effect (e.g., use "MyTheme##ViewTemplate").
2008.05.15 1.4.0 support use of *shadow* tagged templates (e.g., [[DiscussionViewTemplate]] created by [[DiscussionPlugin]])
2008.05.10 1.3.0 corrected handling for determining core template when using theme with sections
2008.05.01 1.2.5 added support for tagged templates stored as sections in a theme
2008.04.01 1.2.0 added support for using systemTheme section-based template definitions (requested by Phil Hawksworth)
2008.01.22 [*.*.*] plugin size reduction - documentation moved to [[TaggedTemplateTweakInfo]]
2007.06.23 1.1.0 re-written to use automatic 'tag prefix' search instead of hard coded check for each tag.  Allows new custom tags to be used without requiring code changes to this plugin.
2007.06.11 1.0.0 initial release
<<<
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.3.2a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{

merge(String.prototype,{

  parseTagExpr: function(debug) {

    if (this.trim() == "")
      return "(true)";

    var anyLogicOp = /(!|&&|\|\||\(|\))/g;
    var singleLogicOp = /^(!|&&|\|\||\(|\))$/;

    var spaced = this.
      // because square brackets in templates are no good
      // this means you can use [(With Spaces)] instead of [[With Spaces]]
      replace(/\[\(/g," [[").
      replace(/\)\]/g,"]] ").
      // space things out so we can use readBracketedList. tricky eh?
      replace(anyLogicOp," $1 ");

    var expr = "";

    var tokens = spaced.readBracketedList(false); // false means don't uniq the list. nice one JR!

    for (var i=0;i<tokens.length;i++)
      if (tokens[i].match(singleLogicOp))
        expr += tokens[i];
      else
        expr += "tiddler.tags.contains('%0')".format([tokens[i].replace(/'/,"\\'")]); // fix single quote bug. still have round bracket bug i think

    if (debug)
      alert(expr);

    return '('+expr+')';
  }

});

merge(TiddlyWiki.prototype,{
  getTiddlersByTagExpr: function(tagExpr,sortField) {

    var result = [];

    var expr = tagExpr.parseTagExpr();

    store.forEachTiddler(function(title,tiddler) {
      if (eval(expr))
        result.push(tiddler);
    });

    if(!sortField)
      sortField = "title";

    result.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});

    return result;
  }
});

config.taggly = {

  // for translations
  lingo: {
    labels: {
      asc:        "\u2191", // down arrow
      desc:       "\u2193", // up arrow
      title:      "title",
      modified:   "modified",
      created:    "created",
      show:       "+",
      hide:       "-",
      normal:     "normal",
      group:      "group",
      commas:     "commas",
      sitemap:    "sitemap",
      numCols:    "cols\u00b1", // plus minus sign
      label:      "Tagged as '%0':",
      exprLabel:  "Matching tag expression '%0':",
      excerpts:   "excerpts",
      descr:      "descr",
      slices:     "slices",
      contents:   "contents",
      sliders:    "sliders",
      noexcerpts: "title only",
      noneFound:  "(none)"
    },

    tooltips: {
      title:      "Click to sort by title",
      modified:   "Click to sort by modified date",
      created:    "Click to sort by created date",
      show:       "Click to show tagging list",
      hide:       "Click to hide tagging list",
      normal:     "Click to show a normal ungrouped list",
      group:      "Click to show list grouped by tag",
      sitemap:    "Click to show a sitemap style list",
      commas:     "Click to show a comma separated list",
      numCols:    "Click to change number of columns",
      excerpts:   "Click to show excerpts",
      descr:      "Click to show the description slice",
      slices:     "Click to show all slices",
      contents:   "Click to show entire tiddler contents",
      sliders:    "Click to show tiddler contents in sliders",
      noexcerpts: "Click to show entire title only"
    },

    tooDeepMessage: "* //sitemap too deep...//"
  },

  config: {
    showTaggingCounts: true,
    listOpts: {
      // the first one will be the default
      sortBy:     ["title","modified","created"],
      sortOrder:  ["asc","desc"],
      hideState:  ["show","hide"],
      listMode:   ["normal","group","sitemap","commas"],
      numCols:    ["1","2","3","4","5","6"],
      excerpts:   ["noexcerpts","excerpts","descr","slices","contents","sliders"]
    },
    valuePrefix: "taggly.",
    excludeTags: ["excludeLists","excludeTagging"],
    excerptSize: 50,
    excerptMarker: "/%"+"%/",
    siteMapDepthLimit: 25
  },

  getTagglyOpt: function(title,opt) {
    var val = store.getValue(title,this.config.valuePrefix+opt);
    return val ? val : this.config.listOpts[opt][0];
  },

  setTagglyOpt: function(title,opt,value) {
    // create it silently if it doesn't exist
    if (!store.tiddlerExists(title)) {
      store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");

      // <<tagglyTagging expr:"...">> creates a tiddler to store its display settings
      // Make those tiddlers less noticeable by tagging as excludeSearch and excludeLists
      // Because we don't want to hide real tags, check that they aren't actually tags before doing so
      // Also tag them as tagglyExpression for manageability
      // (contributed by RA)
      if (!store.getTaggedTiddlers(title).length) {
        store.setTiddlerTag(title,true,"excludeSearch");
        store.setTiddlerTag(title,true,"excludeLists");
        store.setTiddlerTag(title,true,"tagglyExpression");
      }
    }

    // if value is default then remove it to save space
    return store.setValue(title, this.config.valuePrefix+opt, value == this.config.listOpts[opt][0] ? null : value);
  },

  getNextValue: function(title,opt) {
    var current = this.getTagglyOpt(title,opt);
    var pos = this.config.listOpts[opt].indexOf(current);
    // supposed to automagically don't let cols cycle up past the number of items
    // currently broken in some situations, eg when using an expression
    // lets fix it later when we rewrite for jquery
    // the columns thing should be jquery table manipulation probably
    var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
    var newPos = (pos + 1) % limit;
    return this.config.listOpts[opt][newPos];
  },

  toggleTagglyOpt: function(title,opt) {
    var newVal = this.getNextValue(title,opt);
    this.setTagglyOpt(title,opt,newVal);
  },

  createListControl: function(place,title,type) {
    var lingo = config.taggly.lingo;
    var label;
    var tooltip;
    var onclick;

    if ((type == "title" || type == "modified" || type == "created")) {
      // "special" controls. a little tricky. derived from sortOrder and sortBy
      label = lingo.labels[type];
      tooltip = lingo.tooltips[type];

      if (this.getTagglyOpt(title,"sortBy") == type) {
        label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
        onclick = function() {
          config.taggly.toggleTagglyOpt(title,"sortOrder");
          return false;
        }
      }
      else {
        onclick = function() {
          config.taggly.setTagglyOpt(title,"sortBy",type);
          config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
          return false;
        }
      }
    }
    else {
      // "regular" controls, nice and simple
      label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
      tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
      onclick = function() {
        config.taggly.toggleTagglyOpt(title,type);
        return false;
      }
    }

    // hide button because commas don't have columns
    if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
      createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
  },

  makeColumns: function(orig,numCols) {
    var listSize = orig.length;
    var colSize = listSize/numCols;
    var remainder = listSize % numCols;

    var upperColsize = colSize;
    var lowerColsize = colSize;

    if (colSize != Math.floor(colSize)) {
      // it's not an exact fit so..
      upperColsize = Math.floor(colSize) + 1;
      lowerColsize = Math.floor(colSize);
    }

    var output = [];
    var c = 0;
    for (var j=0;j<numCols;j++) {
      var singleCol = [];
      var thisSize = j < remainder ? upperColsize : lowerColsize;
      for (var i=0;i<thisSize;i++)
        singleCol.push(orig[c++]);
      output.push(singleCol);
    }

    return output;
  },

  drawTable: function(place,columns,theClass) {
    var newTable = createTiddlyElement(place,"table",null,theClass);
    var newTbody = createTiddlyElement(newTable,"tbody");
    var newTr = createTiddlyElement(newTbody,"tr");
    for (var j=0;j<columns.length;j++) {
      var colOutput = "";
      for (var i=0;i<columns[j].length;i++)
        colOutput += columns[j][i];
      var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
      wikify(colOutput,newTd);
    }
    return newTable;
  },

  createTagglyList: function(place,title,isTagExpr) {
    switch(this.getTagglyOpt(title,"listMode")) {
      case "group":  return this.createTagglyListGrouped(place,title,isTagExpr); break;
      case "normal": return this.createTagglyListNormal(place,title,false,isTagExpr); break;
      case "commas": return this.createTagglyListNormal(place,title,true,isTagExpr); break;
      case "sitemap":return this.createTagglyListSiteMap(place,title,isTagExpr); break;
    }
  },

  getTaggingCount: function(title,isTagExpr) {
    // thanks to Doug Edmunds
    if (this.config.showTaggingCounts) {
      var tagCount = config.taggly.getTiddlers(title,'title',isTagExpr).length;
      if (tagCount > 0)
        return " ("+tagCount+")";
    }
    return "";
  },

  getTiddlers: function(titleOrExpr,sortBy,isTagExpr) {
    return isTagExpr ? store.getTiddlersByTagExpr(titleOrExpr,sortBy) : store.getTaggedTiddlers(titleOrExpr,sortBy);
  },

  getExcerpt: function(inTiddlerTitle,title,indent) {
    if (!indent)
      indent = 1;

    var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
    var t = store.getTiddler(title);

    if (t && displayMode == "excerpts") {
      var text = t.text.replace(/\n/," ");
      var marker = text.indexOf(this.config.excerptMarker);
      if (marker != -1) {
        return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
      }
      else if (text.length < this.config.excerptSize) {
        return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
      }
      else {
        return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
      }
    }
    else if (t && displayMode == "contents") {
      return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
    }
    else if (t && displayMode == "sliders") {
      return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
    }
    else if (t && displayMode == "descr") {
      var descr = store.getTiddlerSlice(title,'Description');
      return descr ? " {{excerpt{" + descr  + "}}}" : "";
    }
    else if (t && displayMode == "slices") {
      var result = "";
      var slices = store.calcAllSlices(title);
      for (var s in slices)
        result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
      return result ? "\n{{excerpt excerptIndent{\n" + result  + "}}}" : "";
    }
    return "";
  },

  notHidden: function(t,inTiddler) {
    if (typeof t == "string")
      t = store.getTiddler(t);
    return (!t || !t.tags.containsAny(this.config.excludeTags) ||
        (inTiddler && this.config.excludeTags.contains(inTiddler)));
  },

  // this is for normal and commas mode
  createTagglyListNormal: function(place,title,useCommas,isTagExpr) {

    var list = config.taggly.getTiddlers(title,this.getTagglyOpt(title,"sortBy"),isTagExpr);

    if (this.getTagglyOpt(title,"sortOrder") == "desc")
      list = list.reverse();

    var output = [];
    var first = true;
    for (var i=0;i<list.length;i++) {
      if (this.notHidden(list[i],title)) {
        var countString = this.getTaggingCount(list[i].title);
        var excerpt = this.getExcerpt(title,list[i].title);
        if (useCommas)
          output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
        else
          output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");

        first = false;
      }
    }

    return this.drawTable(place,
      this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
      useCommas ? "commas" : "normal");
  },

  // this is for the "grouped" mode
  createTagglyListGrouped: function(place,title,isTagExpr) {
    var sortBy = this.getTagglyOpt(title,"sortBy");
    var sortOrder = this.getTagglyOpt(title,"sortOrder");

    var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

    if (sortOrder == "desc")
      list = list.reverse();

    var leftOvers = []
    for (var i=0;i<list.length;i++)
      leftOvers.push(list[i].title);

    var allTagsHolder = {};
    for (var i=0;i<list.length;i++) {
      for (var j=0;j<list[i].tags.length;j++) {

        if (list[i].tags[j] != title) { // not this tiddler

          if (this.notHidden(list[i].tags[j],title)) {

            if (!allTagsHolder[list[i].tags[j]])
              allTagsHolder[list[i].tags[j]] = "";

            if (this.notHidden(list[i],title)) {
              allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
                    + this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";

              leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers

            }
          }
        }
      }
    }

    var allTags = [];
    for (var t in allTagsHolder)
      allTags.push(t);

    var sortHelper = function(a,b) {
      if (a == b) return 0;
      if (a < b) return -1;
      return 1;
    };

    allTags.sort(function(a,b) {
      var tidA = store.getTiddler(a);
      var tidB = store.getTiddler(b);
      if (sortBy == "title") return sortHelper(a,b);
      else if (!tidA && !tidB) return 0;
      else if (!tidA) return -1;
      else if (!tidB) return +1;
      else return sortHelper(tidA[sortBy],tidB[sortBy]);
    });

    var leftOverOutput = "";
    for (var i=0;i<leftOvers.length;i++)
      if (this.notHidden(leftOvers[i],title))
        leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";

    var output = [];

    if (sortOrder == "desc")
      allTags.reverse();
    else if (leftOverOutput != "")
      // leftovers first...
      output.push(leftOverOutput);

    for (var i=0;i<allTags.length;i++)
      if (allTagsHolder[allTags[i]] != "")
        output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);

    if (sortOrder == "desc" && leftOverOutput != "")
      // leftovers last...
      output.push(leftOverOutput);

    return this.drawTable(place,
        this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
        "grouped");

  },

  // used to build site map
  treeTraverse: function(title,depth,sortBy,sortOrder,isTagExpr) {

    var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

    if (sortOrder == "desc")
      list.reverse();

    var indent = "";
    for (var j=0;j<depth;j++)
      indent += "*"

    var childOutput = "";

    if (depth > this.config.siteMapDepthLimit)
      childOutput += indent + this.lingo.tooDeepMessage + "\n";
    else
      for (var i=0;i<list.length;i++)
        if (list[i].title != title)
          if (this.notHidden(list[i].title,this.config.inTiddler))
            childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder,false);

    if (depth == 0)
      return childOutput;
    else
      return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
  },

  // this if for the site map mode
  createTagglyListSiteMap: function(place,title,isTagExpr) {
    this.config.inTiddler = title; // nasty. should pass it in to traverse probably
    var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"),isTagExpr);
    return this.drawTable(place,
        this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
        "sitemap"
        );
  },

  macros: {
    tagglyTagging: {
      handler: function (place,macroName,params,wikifier,paramString,tiddler) {
        var parsedParams = paramString.parseParams("tag",null,true);
        var refreshContainer = createTiddlyElement(place,"div");

        // do some refresh magic to make it keep the list fresh - thanks Saq
        refreshContainer.setAttribute("refresh","macro");
        refreshContainer.setAttribute("macroName",macroName);

        var tag = getParam(parsedParams,"tag");
        var expr = getParam(parsedParams,"expr");

        if (expr) {
          refreshContainer.setAttribute("isTagExpr","true");
          refreshContainer.setAttribute("title",expr);
          refreshContainer.setAttribute("showEmpty","true");
        }
        else {
          refreshContainer.setAttribute("isTagExpr","false");
          if (tag) {
                refreshContainer.setAttribute("title",tag);
            refreshContainer.setAttribute("showEmpty","true");
          }
          else {
                refreshContainer.setAttribute("title",tiddler.title);
            refreshContainer.setAttribute("showEmpty","false");
          }
        }
        this.refresh(refreshContainer);
      },

      refresh: function(place) {
        var title = place.getAttribute("title");
        var isTagExpr = place.getAttribute("isTagExpr") == "true";
        var showEmpty = place.getAttribute("showEmpty") == "true";
        jQuery(place).empty()
        addClass(place,"tagglyTagging");
        var countFound = config.taggly.getTiddlers(title,'title',isTagExpr).length
        if (countFound > 0 || showEmpty) {
          var lingo = config.taggly.lingo;
          config.taggly.createListControl(place,title,"hideState");
          if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
            createTiddlyElement(place,"span",null,"tagglyLabel",
                isTagExpr ? lingo.labels.exprLabel.format([title]) : lingo.labels.label.format([title]));
            config.taggly.createListControl(place,title,"title");
            config.taggly.createListControl(place,title,"modified");
            config.taggly.createListControl(place,title,"created");
            config.taggly.createListControl(place,title,"listMode");
            config.taggly.createListControl(place,title,"excerpts");
            config.taggly.createListControl(place,title,"numCols");
            config.taggly.createTagglyList(place,title,isTagExpr);
            if (countFound == 0 && showEmpty)
              createTiddlyElement(place,"div",null,"tagglyNoneFound",lingo.labels.noneFound);
          }
        }
      }
    }
  },

  // todo fix these up a bit
  styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active  {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
"  margin-bottom:0.5em; }",
".tagglyTagging .indent1  { margin-left:3em;  }",
".tagglyTagging .indent2  { margin-left:4em;  }",
".tagglyTagging .indent3  { margin-left:5em;  }",
".tagglyTagging .indent4  { margin-left:6em;  }",
".tagglyTagging .indent5  { margin-left:7em;  }",
".tagglyTagging .indent6  { margin-left:8em;  }",
".tagglyTagging .indent7  { margin-left:9em;  }",
".tagglyTagging .indent8  { margin-left:10em; }",
".tagglyTagging .indent9  { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
".tagglyNoneFound { margin-left:2em; color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }",
"/*}}}*/",
    ""].join("\n"),

  init: function() {
    merge(config.macros,this.macros);
    config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
    store.addNotification("TagglyTaggingStyles",refreshStyles);
  }
};

config.taggly.init();

//}}}

/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin

// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed

***/
//{{{
config.formatters.unshift( {
  name: "inlinesliders",
  // match: "\\+\\+\\+\\+|\\<slider",
  match: "\\<slider",
  // lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
  lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
  handler: function(w) {
    this.lookaheadRegExp.lastIndex = w.matchStart;
    var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
    if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
      var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
      var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
      panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
      wikify(lookaheadMatch[3],panel);
      w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
    }
   },
   onClickSlider : function(e) {
    if(!e) var e = window.event;
    var n = this.nextSibling;
    n.style.display = (n.style.display=="none") ? "block" : "none";
    return false;
  }
});

//}}}


{{cols2{

{{col{

<<tiddler 'Ticklers Requiring Action'>>

<<mgtdList title:'Upcoming Ticklers (next 7 days)'
       startTag:Tickler
       tags:'!Actioned'
       view:Tickler
       mode:global
       newButtonTags:'Tickler Once'
       where:'tiddler.ticklerWillBeActiveWithin(7)'
       sort:'tickleDate'
       dontShowEmpty:yes
       ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>

<<mgtdList title:'Upcoming Ticklers'
	startTag:Tickler
	tags:'!Actioned'
	view:Tickler
	mode:global
	newButtonTags:'Tickler Once'
    where:'(!tiddler.fields.mgtd_date || !tiddler.ticklerIsActive()) && !tiddler.ticklerWillBeActiveWithin(7)'
	sort:'tickleDate'
	ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>


}}}

{{col{

<<mgtdList
	title:'Old Ticklers'
	startTag:Tickler
	tags:'Actioned'
	view:Tickler
	mode:global
	newButtonTags:'Tickler Actioned Once'
>>

}}}

}}}
{{cols2{

{{col{


<<mgtdList
    title:'Ticklers Requiring Action Grouped'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Contact
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'tiddler.ticklerIsActive()'
    sort:'tickleDate'
    dontShowEmpty:yes
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>

<<mgtdList
    title:'Upcoming Ticklers Grouped (next 7 days)'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Contact
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'tiddler.ticklerWillBeActiveWithin(7)'
    sort:'tickleDate'
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>

}}}

{{col{

<<mgtdList
    title:'Upcoming Ticklers Grouped'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Contact
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'(!tiddler.fields.mgtd_date || !tiddler.ticklerIsActive()) && !tiddler.ticklerWillBeActiveWithin(7)'
    sort:'tickleDate'
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>


}}}

}}}
{{cols2{

{{col{


<<mgtdList
    title:'Ticklers Requiring Action Grouped'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Project
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'tiddler.ticklerIsActive()'
    sort:'tickleDate'
    dontShowEmpty:yes
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>

<<mgtdList
    title:'Upcoming Ticklers Grouped (next 7 days)'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Project
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'tiddler.ticklerWillBeActiveWithin(7)'
    sort:'tickleDate'
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>

}}}

{{col{

<<mgtdList
    title:'Upcoming Ticklers Grouped'
    startTag:Tickler
    tags:'!Actioned'
    view:Tickler
    group:Project
    gView:bold
    mode:global
    newButtonTags:'Tickler Enabled Once'
    where:'(!tiddler.fields.mgtd_date || !tiddler.ticklerIsActive()) && !tiddler.ticklerWillBeActiveWithin(7)'
    sort:'tickleDate'
    ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>


}}}

}}}
<<ticklerAlert>>
<<mgtdList
	title:'Ticklers Requiring Action'
	startTag:Tickler
	tags:'!Actioned'
	view:Tickler
	mode:global
	newButtonTags:'Tickler Enabled Once'
	where:'tiddler.ticklerIsActive()'
	sort:'tickleDate'
	dontShowEmpty:yes
	ignoreRealm:{{config.mGTD.getOptChk('AlertsIgnoreRealm')?'yes':''}}
>>
<<systemInfo>> <<tiddlerTweaker>>
/***
|''Name:''|TiddlerNotesPlugin|
|''Description:''|Add notes to tiddlers without modifying the original content|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#TiddlerNotesPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|26/10/07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|

!!Concept:
*The TiddlerNotesPlugin allows you to add notes to tiddlers, without needing to edit the original tiddler. This means that your original content will remain unaltered, and if you update it in the future, you won’t lose your notes. Notes are stored in separate tiddlers, but can be viewed and edited from within the original tiddler.
*For a tiddler titled "~MySlide", the notes are by default saved in a tiddler titled "~MySlide-Notes" and is given a tag of "Notes". The suffix and tags of the notes tiddlers are customizable. You can have one or multiple notes per tiddlers. So it is possible to have for example, teacher's notes and student's notes in the same file.
*Notes can be configured to start off blank, or pre-filled with the contents of the original tiddler.

!!Usage:
*{{{<<notes>>}}} is the simplest usage form.
* additional optional parameters include:
**{{{heading:}}} the heading to use for the notes box
**{{{tag:}}} the tag to be given to the notes tiddler
**{{{suffix:}}} the suffix to be used when naming the notes tiddler
* a full macro call could look like: {{{<<notes heading:"My Notes" tag:"NoteTiddlers" suffix:"Comments">>}}}
* To avoid adding {{{<<notes>>}}} to each tiddler you want notes for, you could add the macro call to the ViewTemplate
** below the line {{{<div class='viewer' macro='view text wikified'></div>}}} add the following line: <br> {{{<div class='viewer' macro='notes'></div>}}}
** Used in combination with the ~HideWhenPlugin or ~PublisherPlugin, you could have notes be shown only for tiddlers with specific tags. The ~PublisherPlugin would allow you for instance to only have the ~TeachersNotes visible to the teacher, and the ~StudentsNotes for the same tiddler visible to the Student.

!!Configuration
*<<option chkPrefillNotes>> Enable to pre-fill notes with the original tiddler's contents

!!Demo:
* [[MySlide]]

***/
// /%
//!BEGIN-PLUGIN-CODE

if (!config.options.chkPrefillNotes)
	config.options.chkPrefillNotes = false;
	
function createTiddlyElement(theParent,theElement,theID,theClass,theText,attribs)
{
	var e = document.createElement(theElement);
	if(theClass != null)
		e.className = theClass;
	if(theID != null)
		e.setAttribute("id",theID);
	if(theText != null)
		e.appendChild(document.createTextNode(theText));
	if(attribs){
		for(var n in attribs){
			e.setAttribute(n,attribs[n]);
		}
	}
	if(theParent != null)
		theParent.appendChild(e);
	return e;
}

function createTiddlyButton(theParent,theText,theTooltip,theAction,theClass,theId,theAccessKey,attribs)
{
	var theButton = document.createElement("a");
	if(theAction) {
		theButton.onclick = theAction;
		theButton.setAttribute("href","javascript:;");
	}
	if(theTooltip)
		theButton.setAttribute("title",theTooltip);
	if(theText)
		theButton.appendChild(document.createTextNode(theText));
	if(theClass)
		theButton.className = theClass;
	else
		theButton.className = "button";
	if(theId)
		theButton.id = theId;
	if(attribs){
		for(var n in attribs){
			e.setAttribute(n,attribs[n]);
		}
	}
	if(theParent)
		theParent.appendChild(theButton);
	if(theAccessKey)
		theButton.setAttribute("accessKey",theAccessKey);
	return theButton;
}

config.macros.notes={
	
	cancelWarning: "Are you sure you want to abandon changes to your notes for '%0'?",
	editLabel: "edit notes",
	editTitle: "double click to edit",
	saveLabel: "save notes",
	saveTitle: "double click to save",
	cancelLabel: "cancel",
	heading: "Notes",
	suffix: "Notes",
	tag: "Notes",
	
	saveNotes: function(ev){
		e = ev? ev : window.event;
		var theTarget = resolveTarget(e);
		if (theTarget.nodeName.toLowerCase() == "textarea")
			return false;
		var title = story.findContainingTiddler(theTarget).getAttribute("tiddler");
		story.setDirty(title,false);
		var box = document.getElementById("notesContainer"+title);
		var textarea = document.getElementById("notesTextArea"+title);
		if(textarea.getAttribute("oldText")!=textarea.value && !hasClass(theTarget,"cancelNotesButton")){
			var suffix = box.getAttribute("suffix");
			var t = store.getTiddler(title+"-"+suffix);
			store.saveTiddler(title+"-"+suffix,title+"-"+suffix,textarea.value,config.options.txtUserName,new Date(),t?t.tags:box.getAttribute("tag"),t?t.fields:{});
		}
		story.refreshTiddler(title,1,true);
		autoSaveChanges(true);
		return false;
	},
	
	editNotes: function(box,tiddler){
		removeChildren(box);
		story.setDirty(tiddler,true);
		box.title = this.saveTitle;
		box.ondblclick = this.saveNotes;
		createTiddlyButton(box,this.cancelLabel,this.cancelLabel,this.saveNotes,"cancelNotesButton");
		createTiddlyButton(box,this.saveLabel,this.saveLabel,this.saveNotes,"saveNotesButton");
		wikify("!!"+box.getAttribute("heading")+"\n",box);
		addClass(box,"editor");
		var wrapper1 = createTiddlyElement(null,"fieldset",null,"fieldsetFix");
		var wrapper2 = createTiddlyElement(wrapper1,"div");
		var e = createTiddlyElement(wrapper2,"textarea","notesTextArea"+tiddler);
		var v = store.getValue(tiddler+"-"+box.getAttribute("suffix"),"text");
		if(!v) 
			v = config.options.chkPrefillNotes? store.getValue(tiddler,"text"):'';
		e.value = v;
		e.setAttribute("oldText",v);
		var rows = 10;
		var lines = v.match(/\n/mg);
		var maxLines = Math.max(parseInt(config.options.txtMaxEditRows),5);
		if(lines != null && lines.length > rows)
			rows = lines.length + 5;
		rows = Math.min(rows,maxLines);
		e.setAttribute("rows",rows);
		box.appendChild(wrapper1);
	},
	
	editNotesButtonOnclick: function(e){
		var title = story.findContainingTiddler(this).getAttribute("tiddler");
		var box = document.getElementById("notesContainer"+title);
		config.macros.notes.editNotes(box,title);
		return false;
	},
	
	ondblclick : function(ev){
		e = ev? ev : window.event;
		var theTarget = resolveTarget(e);
		var title = story.findContainingTiddler(theTarget).getAttribute("tiddler");
		var box = document.getElementById("notesContainer"+title);
		config.macros.notes.editNotes(box,title);
		e.cancelBubble = true;
		if(e.stopPropagation) e.stopPropagation();
		return false;
	},
	
	handler : function(place,macroName,params,wikifier,paramString,tiddler){
		
		params = paramString.parseParams("anon",null,true,false,false);
		var heading = getParam(params,"heading",this.heading);
		var tag = getParam(params,"tag",this.tag);
		var suffix = getParam(params,"suffix",this.suffix);
		var box = createTiddlyElement(place,"div","notesContainer"+tiddler.title,"TiddlerNotes",null,{"source":tiddler.title,params:paramString,heading:heading,tag:tag,suffix:suffix});
		createTiddlyButton(box,this.editLabel,this.editLabel,this.editNotesButtonOnclick,"editNotesButton");
		wikify("!!"+heading+"\n",box);
		box.title=this.editTitle;
		box.ondblclick = this.ondblclick;
		wikify("<<tiddler [["+tiddler.title+"-"+suffix+"]]>>",box);
	}		
};

Story.prototype.old_notes_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,unused){
	if(story.isDirty(title)) {
		if(!confirm(config.macros.notes.cancelWarning.format([title])))
			return false;
	}
	return this.old_notes_closeTiddler.apply(this,arguments);
}

setStylesheet(".TiddlerNotes {\n"+ " background:#eee;\n"+ " border:1px solid #ccc;\n"+ " padding:10px;\n"+ " margin:15px;\n"+ "}\n"+ "\n"+ ".cancelNotesButton,.editNotesButton, .saveNotesButton {\n"+ " float:right;\n"+ " border:1px solid #ccc;\n"+ " padding:2px 5px;\n"+ "}\n"+ "\n"+ ".saveNotesButton{\n"+ " margin-right:0.5em;\n"+ "}\n"+ "\n"+ ".TiddlerNotes.editor textarea{\n"+ " border:1px solid #ccc;\n"+ "}","NotesPluginStyles");
//!END-PLUGIN-CODE
// %/
/***
|Name|TiddlerPasswordPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerPasswordPlugin|
|Documentation|http://www.TiddlyTools.com/#TiddlerPasswordPluginInfo|
|Version|1.1.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|block viewing of tiddler content by prompting for a password before content is displayed|
This plugin blocks viewing of specific tiddler content by prompting for a NON-SECURE, UNENCRYPTED password before the tiddler is displayed.  If the correct password is not entered, the tiddler is automatically closed.  The process does not prevent tiddler content from being viewed directly from the TiddlyWiki source file's storeArea, nor does it encrypt the tiddler content in any way.  Because it is relatively simple to bypass and/or disable the password prompting process, this macro should be thought of as a "latch" rather than a "lock" on a given tiddler.
!!!!!Documentation
> see [[TiddlerPasswordPluginInfo]]
!!!!!Installation Notes
<<<
''As soon as you have installed this plugin, you should change the default admin password in [[TiddlerPasswordPluginConfig]].''  Note: the configuration tiddler is password-protected to prevent the admin password from being viewed (and/or modified) unless the current password is provided.  By default, the admin password is set to "admin".
<<<
!!!!!Revisions
<<<
2008.03.10 [*.*.*] plugin size reduction - documentation moved to [[TiddlerPasswordPluginInfo]]
2007.09.13 [1.1.3] adjusted wording of "cancelMsg" text so it can apply to either view-mode or edit-mode activities, and documented usage in ViewTemplate/EditTemplate.
| Please see [[TiddlerPasswordPluginInfo]] for previous revision details |
2006.12.02 [1.0.0] initial release - converted from GetTiddlerPassword inline script
<<<
!!!!!Code
***/
//{{{
version.extensions.TiddlerPasswordPlugin= {major: 1, minor: 1, revision: 3, date: new Date(2007,9,13)};

config.macros.getTiddlerPassword = {
	msg: "Please enter a password to view '%0'",
	defaultText: "enter password here",
	retryMsg: "'%0' is not the correct password for '%1'.  Please try again:",
	cancelMsg: "Sorry, you cannot access '%0' without a valid password.",
	thanksMsg: "Thank you, your password has been accepted.",
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var title=tiddler?tiddler.title:here.getAttribute("tiddler");
		var who=here.getAttribute("logID");
		var userPass=params[0]?params[0]:""; if (userPass=='-') userPass="";
		var msg=params[1]?params[1]:this.msg;
		if (who==userPass||who==this.adminPass) return; // already 'logged in'?
		var who=prompt(msg.format([title]),this.defaultText); // ask for ID
		while (who && who!=userPass && who!=this.adminPass) // not correct ID?
			who=prompt(this.retryMsg.format([who,title]),this.defaultText); // ask again
		if (who==userPass||who==this.adminPass) // correct ID? mark tiddler logged in...
			{ here.setAttribute("logID",who); alert(this.thanksMsg); }
		else // incorrect ID (e.g., entry cancelled by user)...
			{ story.closeTiddler(here.getAttribute("tiddler")); alert(this.cancelMsg.format([title])); }
	}
}
// default admin password (may be overridden in TiddlerPasswordPluginConfig)
if (config.macros.getTiddlerPassword.adminPass==undefined)
	config.macros.getTiddlerPassword.adminPass="admin";
//}}}
// // Tiddler Admin Password Configuration... <<getTiddlerPassword>> /% rest of tiddler will not be displayed without password... %/
//{{{
config.macros.getTiddlerPassword.adminPass="admin";
//}}}
// {{small{NOTE: after changing the password, save-and-reload the document for the change to take effect}}} //
/***
|Name|TiddlerPasswordPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerPasswordPlugin|
|Documentation|http://www.TiddlyTools.com/#TiddlerPasswordPluginInfo|
|Version|1.1.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|documentation for TiddlerPasswordPlugin|
This plugin blocks viewing of specific tiddler content by prompting for a NON-SECURE, UNENCRYPTED password before the tiddler is displayed.  If the correct password is not entered, the tiddler is automatically closed.  The process does not prevent tiddler content from being viewed directly from the TiddlyWiki source file's storeArea, nor does it encrypt the tiddler content in any way.  Because it is relatively simple to bypass and/or disable the password prompting process, this macro should be thought of as a "latch" rather than a "lock" on a given tiddler.
!!!!!Usage
<<<
in tiddler content:
>{{{<<getTiddlerPassword>>}}} 
>{{{<<getTiddlerPassword password>>}}}
>{{{<<getTiddlerPassword password "prompt message">>}}}
>{{{<<getTiddlerPassword - "prompt message">>}}}
in ViewTemplate or EditTemplate:
>{{{<span macro='getTiddlerPassword ...'></span>}}}

Place the {{{<<getTiddlerPassword>>}}} or {{{<span macro='getTiddlerPassword ...'></span>}}} macro at the beginning of your tiddler content, ViewTemplate and/or EditTemplate.  The macro prompts for a password until either A) the correct password is entered or B) the user presses the cancel button from the prompt box, in which case the tiddler is automatically closed so it cannot be viewed/edited.  If a valid password is input, it will be remembered only until the user closes the tiddler.  Each time the tiddler is opened, the password must be re-entered.

The optional ''password'' parameter provides a "user-level" password for the tiddler in which the macro occurs.  If no user password is provided, then only the admin-level password (see below) will be accepted.  

By default, the prompt message reads: "Please enter a password to view '%0'" (where the %0 is automatically replaced by the name of the tiddler in which the macro occurs)  To change this text, enter an additional macro parameter, following the user password.
>Note: because the prompt text is likely to contain spaces, you should always enclose it in quotes (or use {{{[[...]]}}} if it contains quotes).  In addition, to enter an alternative prompt without providing a user-level password, use "-" as a //placeholder// for the password parameter.
* You can set a hard-coded admin password (see below) to define a "universal passkey" that will grant access to all tiddlers protected by this script, regardless of the individual password used on each protected tiddler.
* If you embed one or more password-protected tiddlers within another tiddler (by using the {{{<<tiddler TiddlerName>>}}} macro) the user will be prompted to provide the appropriate password for the EACH protected tiddler contained in the tiddler being rendered.
<<<
!!!!!Installation Notes
<<<
''As soon as you have installed this plugin, you should change the default admin password in [[TiddlerPasswordPluginConfig]].''  Note: the configuration tiddler is password-protected to prevent the admin password from being viewed (and/or modified) unless the current password is provided.  By default, the admin password is set to "admin".
<<<
!!!!!Revisions
<<<
2008.03.10 [*.*.*] plugin size reduction - documentation moved to [[TiddlerPasswordPluginInfo]]
2007.09.13 1.1.3 adjusted wording of "cancelMsg" text so it can apply to either view-mode or edit-mode activities, and documented usage in ViewTemplate/EditTemplate.
2007.05.06 1.1.2 changed admin password tiddler name from TiddlerPasswordConfig to TiddlerPasswordPluginConfig so it will be processed AFTER the plugin's default initialization
2007.02.22 1.1.1 updated documentation for using custom prompt text
2007.01.01 1.1.0 added optional param for using custom prompt text 
2006.12.03 1.0.1 handler() uses passed-in 'tiddler.title' (if any), so that title of included protected tiddlers can be correctly displayed (instead of showng title of containing tiddler)
2006.12.02 1.0.0 initial release - converted from GetTiddlerPassword inline script
<<<
// for sorting tiddlers

merge(Tiddler.prototype,{

  sort_tickleDate: function() {
    return this.fields['mgtd_date'] || 'ZZZZZZZZ'; // i think that's enought to make undated tiddlers sort to the end
  },

  sort_orderSlice: function() {
    var orderSlice = store.getTiddlerSlice(this.title,"order");
    return orderSlice ? orderSlice : this.title; // so if there's no slice we get sorting by title
  },

  sort_prioritySlice: function() {
    var orderSlice = store.getTiddlerSlice(this.title,"priority");
    return orderSlice ? orderSlice : this.title; // so if there's no slice we get sorting by title
  }

});
/***
|Name|TiddlerTweakerPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerTweakerPlugin|
|Version|2.4.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|select multiple tiddlers and modify author, created, modified and/or tag values|
~TiddlerTweaker is a 'power tool' for TiddlyWiki authors.  Select multiple tiddlers from a listbox and 'bulk modify' the creator, author, created, modified and/or tag values of those tiddlers using a compact set of form fields.  The values you enter into the fields simultaneously overwrite the existing values in all tiddlers you have selected.
!!!!!Usage
<<<
{{{<<tiddlerTweaker>>}}}
{{smallform{<<tiddlerTweaker>>}}}
By default, any tags you enter into the TiddlerTweaker will //replace// the existing tags in all the tiddlers you have selected.  However, you can also use TiddlerTweaker to quickly filter specified tags from the selected tiddlers, while leaving any other tags assigned to those tiddlers unchanged:
>Any tag preceded by a '+' (plus) or '-' (minus), will be added or removed from the existing tags //instead of replacing the entire tag definition// of each tiddler (e.g., enter '-excludeLists' to remove that tag from all selected tiddlers.  When using this syntax, care should be taken to ensure that //every// tag is preceded by '+' or '-', to avoid inadvertently overwriting any other existing tags on the selected tiddlers.  (note: the '+' or '-' prefix on each tag value is NOT part of the tag value, and is only used by TiddlerTweaker to control how that tag value is processed)
Important Notes:
* TiddlerTweaker is a 'power user' tool that can make changes to many tiddlers at once.  ''You should always have a recent backup of your document (or 'save changes' just *before* tweaking the tiddlers), just in case you accidentally 'shoot yourself in the foot'.''
* The date and author information on any tiddlers you tweak will ONLY be updated if the corresponding checkboxes have been selected.  As a general rule, after using TiddlerTweaker, always ''//remember to save your document//'' when you are done, even though the tiddler timeline tab may not show any recently modified tiddlers.
* Selecting and updating all tiddlers in a document can take a while.  Your browser may warn about an 'unresponsive script'.  Usually, if you allow it to continue, it should complete the processing... eventually.  Nonetheless, be sure to save your work before you begin tweaking lots of tiddlers, just in case something does get stuck.
<<<
!!!!!Revisions
<<<
2011.01.21 2.4.5 auto-selection: use "-" for untagged tiddlers.  Also, added 'opened', 'invert'
2009.09.15 2.4.4 added 'edit' button. moved html definition to separate section
2009.09.13 2.4.3 in settiddlers(), convert backslashed chars (\n\b\s\t) in replacement text
2009.06.26 2.4.2 only add brackets around tags containing spaces
2009.06.22 2.4.1 in setFields(), add brackets around all tags shown tweaker edit field
2009.03.30 2.4.0 added 'sort by modifier'
2009.01.22 2.3.0 added support for text pattern find/replace
2008.10.27 2.2.3 in setTiddlers(), fixed Safari bug by replacing static Array.concat(...) with new Array().concat(...)
2008.09.07 2.2.2 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.12 2.2.1 replace built-in backstage tweak task with tiddler tweaker control panel (moved from BackstageTweaks)
2008.01.13 2.2.0 added 'auto-selection' links: all, changed, tags, title, text
2007.12.26 2.1.0 added support for managing 'creator' custom field (see [[CoreTweaks]])
2007.11.01 2.0.3 added config.options.txtTweakerSortBy for cookie-based persistence of list display order preference setting.
2007.09.28 2.0.2 in settiddlers() and deltiddlers(), added suspend/resume notification handling (improves performance when operating on multiple tiddlers)
2007.08.03 2.0.1 added shadow definition for [[TiddlerTweaker]] tiddler for use as parameter references with {{{<<tiddler>>, <<slider>> or <<tabs>>}}} macros.
2007.08.03 2.0.0 converted from inline script
2006.01.01 1.0.0 initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.TiddlerTweakerPlugin= {major: 2, minor: 4, revision: 5, date: new Date(2011,1,21)};

// shadow tiddler
config.shadowTiddlers.TiddlerTweaker='<<tiddlerTweaker>>';

// defaults
if (config.options.txtTweakerSortBy==undefined) config.options.txtTweakerSortBy='modified';

// backstage task
if (config.tasks) { // for TW2.2b3 or above
	config.tasks.tweak.tooltip='review/modify tiddler internals: dates, authors, tags, etc.';
	config.tasks.tweak.content='{{smallform small groupbox{<<tiddlerTweaker>>}}}';
}

// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

config.macros.tiddlerTweaker = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var span=createTiddlyElement(place,'span');
		span.innerHTML=store.getTiddlerText('TiddlerTweakerPlugin##html');
		this.init(span.getElementsByTagName('form')[0],config.options.txtTweakerSortBy);
	},
	init: function(f,sortby) { // set form controls
		if (!f) return; // form might not be rendered yet...
		while (f.list.options[0]) f.list.options[0]=null; // empty the list
		var tids=store.getTiddlers(sortby);
		if (sortby=='size') // descending order
			tids.sort(function(a,b) {return a.text.length > b.text.length ? -1 : (a.text.length == b.text.length ? 0 : +1);});
		var who='';
		for (i=0; i<tids.length; i++) { var t=tids[i];
			var label=t.title; var value=t.title;
			switch (sortby) {
				case 'modified':
				case 'created':
					var t=tids[tids.length-i-1]; // reverse order
					var when=t[sortby].formatString('YY.0MM.0DD 0hh:0mm ');
					label=when+t.title;
					value=t.title;
					break;
				case 'size':
					label='['+t.text.length+'] '+label;
					break;
				case 'modifier':
				case 'creator':
					if (who!=t[sortby]) {
						who=t[sortby];
						f.list.options[f.list.length]=new Option('by '+who+':','',false,false);
					}
					label='\xa0\xa0\xa0'+label; // indent
					break;
			}
			f.list.options[f.list.length]=new Option(label,value,false,false);
		}
		f.title.value=f.who.value=f.creator.value=f.tags.value='';
		f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value='';
		f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value='';
		f.stats.disabled=f.set.disabled=f.del.disabled=f.edit.disabled=f.display.disabled=true;
		f.settitle.disabled=false;
		config.options.txtTweakerSortBy=sortby;
		f.sortby.value=sortby; // sync droplist
		if (sortby!='modified') saveOptionCookie('txtTweakerSortBy');
		else removeCookie('txtTweakerSortBy');
	},
	enablefields: function(here) { // enables/disables inputs based on #items selected
		var f=here.form; var list=f.list;
		var c=0; for (i=0;i<list.length;i++) if (list.options[i].selected) c++;
		if (c>1) f.title.disabled=true;
		if (c>1) f.settitle.checked=false;
		f.set.disabled=(c==0);
		f.del.disabled=(c==0);
		f.edit.disabled=(c==0);
		f.display.disabled=(c==0);
		f.settitle.disabled=(c>1);
		f.stats.disabled=(c==0);
		var msg=(c==0)?'select tiddlers':(c+' tiddler'+(c!=1?'s':'')+' selected');
		here.previousSibling.firstChild.firstChild.nextSibling.innerHTML=msg;
		if (c) clearMessage(); else displayMessage('no tiddlers selected');
	},
	setfields: function(here) { // set fields from first selected tiddler
		var f=here.form;
		if (!here.value.length) {
			f.title.value=f.who.value=f.creator.value=f.tags.value='';
			f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value='';
			f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value='';
			return;
		}
		var tid=store.getTiddler(here.value); if (!tid) return;
		f.title.value=tid.title;
		f.who.value=tid.modifier;
		f.creator.value=tid.fields['creator']||''; // custom field - might not exist
		f.tags.value=tid.tags.map(function(t){return String.encodeTiddlyLink(t)}).join(' ');
		var c=tid.created; var m=tid.modified;
		f.cm.value=c.getMonth()+1;
		f.cd.value=c.getDate();
		f.cy.value=c.getFullYear();
		f.ch.value=c.getHours();
		f.cn.value=c.getMinutes();
		f.mm.value=m.getMonth()+1;
		f.md.value=m.getDate();
		f.my.value=m.getFullYear();
		f.mh.value=m.getHours();
		f.mn.value=m.getMinutes();
	},
	selecttiddlers: function(here,callback) {
		var f=here; while (f&&f.nodeName.toLowerCase()!='form')f=f.parentNode;
		for (var t=f.list.options.length-1; t>=0; t--)
			f.list.options[t].selected=callback(f.list.options[t]);
		config.macros.tiddlerTweaker.enablefields(f.list);
		return false;
	},
	settiddlers: function(here) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		var cdate=new Date(f.cy.value,f.cm.value-1,f.cd.value,f.ch.value,f.cn.value);
		var mdate=new Date(f.my.value,f.mm.value-1,f.md.value,f.mh.value,f.mn.value);
		if (tids.length>1 && !confirm('Are you sure you want to update these tiddlers:\n\n'+tids.join(', '))) return;
		store.suspendNotifications();
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			var title=!f.settitle.checked?tid.title:f.title.value;
			var who=!f.setwho.checked?tid.modifier:f.who.value;
			var text=tid.text;
			if (f.replacetext.checked) {
				var r=f.replacement.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
				text=text.replace(new RegExp(f.pattern.value,'mg'),r);
			}				
			var tags=tid.tags;
			if (f.settags.checked) { 
				var intags=f.tags.value.readBracketedList();
				var addtags=[]; var deltags=[]; var reptags=[];
				for (i=0;i<intags.length;i++) {
					if (intags[i].substr(0,1)=='+')
						addtags.push(intags[i].substr(1));
					else if (intags[i].substr(0,1)=='-')
						deltags.push(intags[i].substr(1));
					else
						reptags.push(intags[i]);
				}
				if (reptags.length)
					tags=reptags;
				if (addtags.length)
					tags=new Array().concat(tags,addtags);
				if (deltags.length)
					for (i=0;i<deltags.length;i++)
						{ var pos=tags.indexOf(deltags[i]); if (pos!=-1) tags.splice(pos,1); }
			}
			if (!f.setcdate.checked) cdate=tid.created;
			if (!f.setmdate.checked) mdate=tid.modified;
			store.saveTiddler(tid.title,title,text,who,mdate,tags,tid.fields);
			if (f.setcreator.checked) store.setValue(tid.title,'creator',f.creator.value); // set creator
			if (f.setcdate.checked) tid.assign(null,null,null,null,null,cdate); // set create date
		}
		store.resumeNotifications();
		this.init(f,f.sortby.value);
	},
	displaytiddlers: function(here,edit) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0; i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		story.displayTiddlers(story.findContainingTiddler(f),tids,edit?DEFAULT_EDIT_TEMPLATE:null);
	},
	deltiddlers: function(here) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		if (!confirm('Are you sure you want to delete these tiddlers:\n\n'+tids.join(', '))) return;
		store.suspendNotifications();
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			if (tid.tags.contains('systemConfig')) {
				var msg=tid.title+' is tagged with systemConfig.'
					+'\n\nRemoving this tiddler may cause unexpected results.  Are you sure?';
				if (!confirm(msg)) continue;
			}
			store.removeTiddler(tid.title);
			story.closeTiddler(tid.title);
		}
		store.resumeNotifications();
		this.init(f,f.sortby.value);
	},
	stats: function(here) {
		var f=here.form; var list=f.list; var tids=[]; var out=''; var tot=0;
		var target=f.nextSibling;
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			out+='[['+tid.title+']] '+tid.text.length+'\n'; tot+=tid.text.length;
		}
		var avg=tot/tids.length;
		out=tot+' bytes in '+tids.length+' selected tiddlers ('+avg+' bytes/tiddler)\n<<<\n'+out+'<<<\n';
		removeChildren(target);
		target.innerHTML="<hr><font size=-2><a href='javascript:;' style='float:right' "
			+"onclick='this.parentNode.parentNode.style.display=\"none\"'>close</a></font>";
		wikify(out,target);
		target.style.display='block';
	}
};
//}}}
/***
//{{{
!html
<style>
.tiddlerTweaker table,
.tiddlerTweaker table tr,
.tiddlerTweaker table td
	{ padding:0;margin:0;border:0;white-space:nowrap; }
</style><form class='tiddlerTweaker'><!--
--><table style="width:100%"><tr valign="top"><!--
--><td style="text-align:center;width:99%;"><!--
	--><font size=-2><div style="text-align:left;"><span style="float:right"><!--
	-->&nbsp; <a href="javascript:;" 
		title="select all tiddlers"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return opt.value.length;
		});">all</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers currently displayed in the story column"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return story.getTiddler(opt.value);
		});">opened</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers that are new/changed since the last file save"
		onclick="var lastmod=new Date(document.lastModified);
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tid=store.getTiddler(opt.value);
				return tid&&tid.modified>lastmod;
			});
		">changed</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers with at least one matching tag"
		onclick="var t=prompt('Enter space-separated tags (match one or more).  Use \x22-\x22 to match untagged tiddlers');
			if (!t||!t.length) return false;
			var tags=t.readBracketedList();
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tid=store.getTiddler(opt.value);
				return tid&&tags[0]=='-'?!tid.tags.length:tid.tags.containsAny(tags);
			});
		">tags</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers whose titles include matching text"
		onclick="var t=prompt('Enter a title (or portion of a title) to match');
			if (!t||!t.length) return false;
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				return opt.value.indexOf(t)!=-1;
			});
		">titles</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers containing matching text"
		onclick="var t=prompt('Enter tiddler text (content) to match');
			if (!t||!t.length) return false;
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tt=store.getTiddlerText(opt.value,'');
				return tt.indexOf(t)!=-1;
			});
		">text</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="reverse selection of all list items"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return !opt.selected;
		});">invert</a><!--
	--></span><span>select tiddlers</span><!--
	--></div><!--
	--></font><select multiple name=list size="11" style="width:99.99%" 
		title="use click, shift-click and/or ctrl-click to select multiple tiddler titles" 
		onclick="config.macros.tiddlerTweaker.enablefields(this)" 
		onchange="config.macros.tiddlerTweaker.setfields(this)"><!--
	--></select><br><!--
	-->show<input type=text size=1 value="11" 
		onchange="this.form.list.size=this.value; this.form.list.multiple=(this.value>1);"><!--
	-->by<!--
	--><select name=sortby size=1 
		onchange="config.macros.tiddlerTweaker.init(this.form,this.value)"><!--
	--><option value="title">title</option><!--
	--><option value="size">size</option><!--
	--><option value="modified">modified</option><!--
	--><option value="created">created</option><!--
	--><option value="modifier">modifier</option><!--
	--></select><!--
	--><input type="button" value="refresh" 
		onclick="config.macros.tiddlerTweaker.init(this.form,this.form.sortby.value)"<!--
	--> <input type="button" name="stats" disabled value="totals..." 
		onclick="config.macros.tiddlerTweaker.stats(this)"><!--
--></td><td style="width:1%"><!--
	--><div style="text-align:left"><font size=-2>&nbsp;modify values</font></div><!--
	--><table style="width:100%;"><tr><!--
	--><td style="padding:1px"><!--
		--><input type=checkbox name=settitle unchecked 
			title="allow changes to tiddler title (rename tiddler)" 
			onclick="this.form.title.disabled=!this.checked">title<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=title size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setcreator unchecked 
			title="allow changes to tiddler creator" 
			onclick="this.form.creator.disabled=!this.checked">created by<!--
	--></td><td style="padding:1px;"><!--
		--><input type=text name=creator size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setwho unchecked 
			title="allow changes to tiddler author" 
			onclick="this.form.who.disabled=!this.checked">modified by<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=who size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setcdate unchecked 
			title="allow changes to created date" 
			onclick="var f=this.form;
				f.cm.disabled=f.cd.disabled=f.cy.disabled=f.ch.disabled=f.cn.disabled=!this.checked"><!--
		-->created on<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=cm size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=cd size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=cy size=4 style="width:3em;padding:0;text-align:center" disabled><!--
		--> at <input type=text name=ch size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> : <input type=text name=cn size=2 style="width:2em;padding:0;text-align:center" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setmdate unchecked 
			title="allow changes to modified date" 
			onclick="var f=this.form;
				f.mm.disabled=f.md.disabled=f.my.disabled=f.mh.disabled=f.mn.disabled=!this.checked"><!--
		-->modified on<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=mm size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=md size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=my size=4 style="width:3em;padding:0;text-align:center" disabled><!--
		--> at <input type=text name=mh size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> : <input type=text name=mn size=2 style="width:2em;padding:0;text-align:center" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=replacetext unchecked
			title="find/replace matching text" 
			onclick="this.form.pattern.disabled=this.form.replacement.disabled=!this.checked">replace text<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=pattern size=15 value="" style="width:40%" disabled 
			title="enter TEXT PATTERN (regular expression)"> with<!--
		--><input type=text name=replacement size=15 value="" style="width:40%" disabled 
			title="enter REPLACEMENT TEXT"><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=settags checked 
			title="allow changes to tiddler tags" 
			onclick="this.form.tags.disabled=!this.checked">tags<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=tags size=35 value="" style="width:98%" 
			title="enter new tags or use '+tag' and '-tag' to add/remove tags from existing tags"><!--
	--></td></tr></table><!--
	--><div style="text-align:center"><!--
	--><nobr><input type=button name=display disabled style="width:24%" value="display" 
		title="show selected tiddlers"
		onclick="config.macros.tiddlerTweaker.displaytiddlers(this,false)"><!--
	--> <input type=button name=edit disabled style="width:23%" value="edit" 
		title="edit selected tiddlers"
		onclick="config.macros.tiddlerTweaker.displaytiddlers(this,true)"><!--
	--> <input type=button name=del disabled style="width:24%" value="delete" 
		title="remove selected tiddlers"
		onclick="config.macros.tiddlerTweaker.deltiddlers(this)"><!--
	--> <input type=button name=set disabled style="width:24%" value="update" 
		title="update selected tiddlers"
		onclick="config.macros.tiddlerTweaker.settiddlers(this)"></nobr><!--
	--></div><!--
--></td></tr></table><!--
--></form><span style="display:none"><!--content replaced by tiddler "stats"--></span>
!end
//}}}
***/
 
// for displaying tiddlers in lists

// idea: use <<tiddler with:?>>

if (!config.mGTD) config.mGTD = {};

config.mGTD.data = {
  starOn:    'data:image/gif;base64,R0lGODlhDwAPAMQfAF9h4RYVnZeQJC0u0lRQU42R6P/7Fv74L05NrRkZxi4tW52XXv71D8nAIWxnjnRxr3NuMJKOluXbBe7kCa2x7UFD1vPoB77D8Jqe6n6B5tvTUr62BMrP8lJPh1xbuv///yH5BAEAAB8ALAAAAAAPAA8AAAWD4CeOWQKMaDpESepi3tFlLgpExlK9RT9ohkYi08N8KhWP8nEwMBwIDyJRSTgO2CaDYcBOCAlMgtDYmhmTDSFQ+HAqgbLZIlAMLqiKw7m1EAYuFQsGEhITEwItKBc/EgIEAhINAUYkCBIQAQMBEGonIwAKa21iCgo7IxQDFRQjF1VtHyEAOw==',
  starOff:   'data:image/gif;base64,R0lGODlhDwAPALMPAP///8zj++r7/7vb/rHW/tPt/9Lk+qzT/rbY/sHh/8Te/N7q+Nzy/7nY/djn+f///yH5BAEAAA8ALAAAAAAPAA8AAARg8MkZjpo4k0KyNwlQBB42MICAfEF7APDRBsYzIEkewGKeDI1DgUckMg6GTdFIqC0QgyUgQVhgGkOi4OBBCJYdzILAywIGNcoOgCAQvowBRpE4kgzCQgPjQCAcEwsNTRIRADs=',

  unicodeStar: "\u2605" // "black star"
};


merge(Tiddler.prototype,{

  render_Action: function() { return this.renderUtil(
    '{{action{'+
    '<<toggleTag Done [[%0]] ->>'+
    '<<multiToggleTag tag:ActionStatus title:[[%0]]>>'+
    //'<<multiSelectTag tag:Project title:[[%0]]>>'+
    //'<<multiCheckboxTag tag:ActionStatus title:[[%0]]>>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    ' &nbsp;[[%0]] '+
    '<<deleteTiddler [[%0]]>>'+
    '}}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}',
    [
      this.title
    ]
  );},

  render_Tickler: function() {
    var repeatType = this.getByIndex('TicklerRepeatType');
    var doneControl = "";
    if (repeatType.length == 0 || repeatType.contains('Once')) {
      // show normal done checkbox
      doneControl = '<<toggleTag Actioned [[%0]] ->>';
    }
    else if (repeatType.contains('Daily'))       { doneControl = '<<addDay [[%0]]>>' }
    else if (repeatType.contains('Weekly'))      { doneControl = '<<addWeek [[%0]]>>' }
    else if (repeatType.contains('Fortnightly')) { doneControl = '<<addFortnight [[%0]]>>' }
    else if (repeatType.contains('Monthly'))     { doneControl = '<<addMonth [[%0]]>>' }
    else if (repeatType.contains('Yearly'))      { doneControl = '<<addYear [[%0]]>>' }

    var pLink = "";
    if (config.mGTD.getOptChk('FullContactInActionLists')) {
      pLink += "{{projLinkFull{<<linkToParent Project [[title]] [[%0]]>>}}}".format([this.title]);
    }
    else {
      pLink += "{{projLink{<<linkToParent Project '[P]' [[%0]]>>}}}".format([this.title]);
    }

    return this.renderUtil(
    '{{tickler{'+
        '%1'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    '<<dateChooser [[%0]]>>'+
    '&nbsp;[[%0]]'+
    '<<deleteTiddler [[%0]]>>'+
    '}}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}'+
    ' %2',
    [
      this.title,
            doneControl.format([this.title]),
      pLink
    ]
  );},

  render_Project: function() { return this.renderUtil(
    '{{project{'+
    '<<toggleTag Complete [[%0]] ->>'+
    '<<multiToggleTag tag:ProjectStatus title:[[%0]]>>'+
    //'<<multiSelectTag tag:Project title:[[%0]]>>'+
    //'<<multiCheckboxTag tag:ActionStatus title:[[%0]]>>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    ' &nbsp;[[%0]] }}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}'+
    "{{projLink{<<linkToParent Project '[P]' [[%0]]>>}}}"+
    "{{projLink{<<linkToParent Contact '[C]' [[%0]]>>}}}"+
    "",
    [
      this.title
    ]
  );},

  render_ProjectArea: function() {
    var aLink = "";
      return this.renderUtil(
    '{{project{'+
    '<<toggleTag Complete [[%0]] ->>'+
    '<<multiToggleTag tag:ProjectStatus title:[[%0]]>>'+
    //'<<multiSelectTag tag:Project title:[[%0]]>>'+
    //'<<multiCheckboxTag tag:ActionStatus title:[[%0]]>>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    ' &nbsp;[[%0]] }}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}'+
    "{{projLink{<<linkToParent Area    '[A]' [[%0]]>>}}}"+
    "{{projLink{<<linkToParent Project '[P]' [[%0]]>>}}}"+
    "{{projLink{<<linkToParent Contact '[C]' [[%0]]>>}}}"+
    "",
    [
      this.title,
      aLink
    ]
  );},


  render_ProjectBare: function() { return this.renderUtil(
    '{{project{'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    '&nbsp;[[%0]] }}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}',
    [
      this.title
    ]
  );},

  render_ProjectComplete: function() { return this.renderUtil(
    '{{project{'+
    '<<toggleTag Complete [[%0]] ->>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    '&nbsp;[[%0]] }}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}',
    [
      this.title
    ]
  );},


  render_ActionProj: function() {

    // actually it's not going to be easy to have
    // an action in more than one project
    // but just in case....
    var pLink = "";
    if (config.mGTD.getOptChk('FullAreaInActionLists')) {
      pLink += "{{projLinkFull{<<linkToParent Area [[title]] [[%0]]>>}}}".format([this.title]);
    }
    else {
      pLink += "{{projLink{<<linkToParent Area '[A]' [[%0]]>>}}}".format([this.title]);
    }

    if (config.mGTD.getOptChk('FullProjectInActionLists')) {
      pLink += "{{projLinkFull{<<linkToParent Project [[title]] [[%0]]>>}}}".format([this.title]);
    }
    else {
      pLink += "{{projLink{<<linkToParent Project '[P]' [[%0]]>>}}}".format([this.title]);
    }

    if (config.mGTD.getOptChk('FullContactInActionLists')) {
      pLink += "{{projLinkFull{<<linkToParent Contact [[title]] [[%0]]>>}}}".format([this.title]);
    }
    else {
      pLink += "{{projLink{<<linkToParent Contact '[C]' [[%0]]>>}}}".format([this.title]);
    }

    return this.renderUtil(
    '{{action{'+
    '<<toggleTag Done [[%0]] ->>'+
    '<<multiToggleTag tag:ActionStatus title:[[%0]]>>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    ' &nbsp;[[%0]]'+
    '<<deleteTiddler [[%0]]>>'+
    '}}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}'+
    ' %1',
    [
      this.title,
      pLink
    ]
  );},

  render_DoneAction: function() { return this.renderUtil(
    '{{action{'+
    '<<toggleTag Done [[%0]] ->>'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    ' [[%0]] '+
    '<<deleteTiddler [[%0]]>>'+
    '}}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}',
    [
      this.title
    ]
  );},

  render_ProjectHeading: function() { return this.renderUtil(
    '{{project{'+
    '[[%0]] '+
    '<<toggleTag Complete [[%0]] ->>'+
    '@@font-size:80%;<<multiToggleTag tag:ProjectStatus title:[[%0]]>>@@'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    '}}}',
    [
      this.title
    ]
  );},

  render_Context: function() { return this.renderUtil(
    '[[%0]]',
    [
      this.title
    ]
  );},

  render_plain: function() { return this.renderUtil(
    '{{plain{[[%0]]}}}',
    [
      this.title
    ]
  );},

  render_star: function() { return this.renderUtil(
    '{{plain{'+
    '<<singleToggleTag tag:Starred title:[[%0]]>>'+
    '[[%0]]}}}'+
    '{{notesLink{<<showNotesIcon [[%0]]>>}}}',
    [
      this.title
    ]
  );},


  // TODO. this seems stupid
  render_bold: function() { return this.renderUtil(
    "[[%0]]",
    [
      this.title
    ]
  );}


});
|width:400px; !By modified date |width:400px; !By date created |
|vertical-align:top;padding-left:20px;<<timeline "modified">>|vertical-align:top;padding-left:20px;<<timeline "created">>|
!Project
<!--{{{-->
<div class="projectcontrols controls controlstint">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Project"></span><span macro="help Project"></span>
 </div>
 <div>
  <span macro="toggleTag Complete . -"></span>
  <span class='title' macro='view title'></span>
  <span macro="miniTag"></span>
  <span macro="linkToParent Area '[A]'"></span>
  <span macro="linkToParent Project '[P]'"></span>
  <span macro="singleToggleTag tag:Starred"></span>
  [[MonkeyGTDTheme##Subtitle]]
 </div>
 <div macro="hideWhenTagged Complete" style="padding-top:0.25em;padding-bottom:0.25em;">
  <span macro="multiToggleTag ProjectStatus longVersion:on"></span>
 </div>
 <div>
  <div class="floatright" macro="convertToFromTickler"><br/></div>
  <div class="floatright" macro="deleteAllTagged 'delete project' '' 'delete'"><br/></div>
  <div class="floatleft"><span class="label">Area:</span><br><span macro="multiSelectTag Area allowNone:on"></span><span macro="linkToParent Area"></span></div>
  <div class="floatleft"><span class="label">Subproject of</span>:<br><span macro="multiSelectTag Project allowNone:on"></span><span macro="linkToParent Project"></span></div>
  <div class="floatleft"><span class="label">Associated contact</span>:<br><span macro="multiSelectTag Contact allowNone:on"></span><span macro="linkToParent Contact"></span></div>
  <div class="clearboth"></div>
 </div>
</div>
<!--}}}-->

!Action
<!--{{{-->
<div class="actioncontrols controls controlstint">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Action"></span><span macro="help Action"></span>
 </div>
 <div>
  <span macro="toggleTag Done . -"></span>
  <span class='title' macro='view title'></span>
  <span macro="miniTag"></span>
  <span macro="linkToParent Area '[A]'"></span>
  <span macro="linkToParent Project '[P]'"></span>
  <span macro="singleToggleTag tag:Starred"></span>
  [[MonkeyGTDTheme##Subtitle]]
 </div>
 <div macro="hideWhenTagged Done" style="padding-top:0.25em;padding-bottom:0.25em;">
  <span macro="multiToggleTag ActionStatus longVersion:on"></span>
 </div>
 <div macro="showWhen config.mGTD.getOptChk('MultipleContexts')">
  <span class="label">Context:</span><br/><span class="unboldLinks" macro="groupOfSingleToggleTags Context useCheckbox:yes"></span>
 </div>
 <div>
  <div class="floatright" macro="convertToFromTickler"><br/></div>
  <div class="floatright" macro="convertActionToSubProj"><br/></div>
  <div class="floatright" macro="convertActionToReference"><br/></div>
  <div class="floatleft" macro="else"><span class="label">Context:</span><br/><span macro="multiSelectTag Context allowNone:on"></span><span macro="linkToParent Context"></span></div>
  <div class="floatleft"><span class="label">Project:</span><br/><span macro="multiSelectTag Project allowNone:on"></span><span macro="linkToParent Project"></span></div>
  <div macro="hideWhen tiddler.hasParent('Project')" class="floatleft"><span class="label">Area:</span><br><span macro="multiSelectTag Area allowNone:on"></span><span macro="linkToParent Area"></span></div>
  <div class="floatleft">
   <span macro="hideWhenTaggedAny 'Waiting For' 'Done'" class="label">Associated contact:</span>
   <span macro="else" class="label">Delegated to/waiting on:</span><br>
   <span macro="multiSelectTag Contact allowNone:on"></span><span macro="linkToParent Contact"></span>
  </div>
  <br style="clear:left"/>
  <div class="floatleft">
    <span class="label">Depends on:</span><br/><span macro="multiSelectTag Action allowNone:on"></span><span macro="linkToParent Action"></span>
   <!-- fixme. broken in 2.4.1 but works in 2.4.3?: <span macro="newSavedTiddler title:'new dependent action' label:'+ dependent action' tag:{{'Action Future [['+config.macros.mgtdList.getRealm()+']] [['+tiddler.getParent('Context')+']] [['+tiddler.getParent('Project')+']] [['+tiddler.title +']]'}}"></span> -->
  </div>
  <div class="clearboth"></div>
 </div>
</div>
<!--}}}-->

!Tickler
<!--{{{-->
<div class="ticklercontrols controls controlstint">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Tickler"></span><span macro="help Tickler"></span>
 </div>
 <div>
  <span macro="showWhen tiddler.tags.contains('Once') || !tiddler.hasParent('TicklerRepeatType')">
   <span macro="toggleTag Actioned . -"></span>
  </span>
  <span macro="showWhenTagged 'Daily'"   ><span macro="addDay"></span></span>
  <span macro="showWhenTagged 'Weekly'"  ><span macro="addWeek"></span></span>
  <span macro="showWhenTagged 'Fortnightly'"  ><span macro="addFortnight"></span></span>
  <span macro="showWhenTagged 'Monthly'" ><span macro="addMonth"></span></span>
  <span macro="showWhenTagged 'Yearly'"  ><span macro="addYear"></span></span>
  <span class='title' macro='view title'></span>
  <span macro="linkToParent Area '[A]'"></span>
  <span macro="linkToParent Project '[P]'"></span>
  <span macro="singleToggleTag tag:Starred"></span>
  [[MonkeyGTDTheme##Subtitle]]
 </div>
 <div macro="hideWhenTagged Actioned" style="padding-top:0.25em;padding-bottom:0.25em;">
  <span macro="multiToggleTag TicklerRepeatType longVersion:on"></span>
 </div>
 <div>
  <div class="floatleft"><span class="label">Tickler date:</span><br/><span macro="dateChooser"></span></div>
  <div class="floatleft buttonsLikeLinks"><br>
   <span macro="addDay"></span>
   <span macro="addWeek"></span>
   <span macro="addMonth"></span>
   <span macro="addYear"></span>
  </div>
  <div class="clearboth"></div>
 </div>
 <div>
  <div class="floatright" macro="convertToFromTickler"><br/></div>
  <div class="floatleft"><span class="label">Project:</span><br/><span macro="multiSelectTag Project allowNone:on"></span><span macro="linkToParent Project"></span></div>
  <div macro="hideWhen tiddler.hasParent('Project')" class="floatleft"><span class="label">Area:</span><br><span macro="multiSelectTag Area allowNone:on"></span><span macro="linkToParent Area"></span></div>
  <div class="floatleft"><span class="label">Associated contact</span>:<br><span macro="multiSelectTag Contact allowNone:on"></span><span macro="linkToParent Contact"></span></div>
  <div class="clearboth"></div>
 </div>
</div>
<!--}}}-->

!View
<!--{{{-->
<div class="viewcontrols controls">
 <div>
  <span class='title' macro='view title'></span><span macro="help"></span>
 </div>
</div>
<!--}}}-->

!Context
<!--{{{-->
<div class="contextcontrols controls">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Context"></span><span macro="help Context"></span>
 </div>
 <div>
  <span class='title' macro='view title'></span>
  <span macro="miniTag"></span>
  <span macro="singleToggleTag tag:Starred"></span>
 </div>
</div>
<!--}}}-->

!Area
<!--{{{-->
<div class="areacontrols controls">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Area"></span><span macro="help Area"></span>
 </div>
 <div>
  <span class='title' macro='view title'></span>
  <span macro="miniTag"></span>
  <span macro="singleToggleTag tag:Starred"></span>
 </div>
</div>
<!--}}}-->

!Realm
<!--{{{-->
<div class="realmcontrols controls">
 <div style="float:right;" class="smaller">
  <span macro="tag Realm"></span><span macro="help Realm"></span>
 </div>
 <div>
  <span class='title' macro='view title'></span>
 </div>
</div>
<!--}}}-->

!Reference
<!--{{{-->
<div class="referencecontrols controls controlstint">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Reference"></span><span macro="help Reference"></span>
 </div>
 <div>
  <span class='title' macro='view title'></span>
  <span macro="linkToParent Area '[A]'"></span>
  <span macro="linkToParent Project '[P]'"></span>
  <span macro="singleToggleTag tag:Starred"></span>
  [[MonkeyGTDTheme##Subtitle]]
 </div>
 <div>
  <div class="floatleft"><span class="label">Project:</span><br><span macro="multiSelectTag Project allowNone:on"></span><span macro="linkToParent Project"></span></div>
  <div macro="hideWhen tiddler.hasParent('Project')" class="floatleft"><span class="label">Area:</span><br><span macro="multiSelectTag Area allowNone:on"></span><span macro="linkToParent Area"></span></div>
 </div>
 <div class="clearboth"></div>
 <div style="padding-top:1em;">
  Double click or click "edit" to edit. Use "new here" to make sub item.
 </div>
</div>
<!--}}}-->

!Contact
<!--{{{-->
<div class="contactcontrols controls">
 <div style="float:right;" class="smaller">
  <span class="label">Realm:</span><span macro="multiSelectTag Realm allowNone:on"></span>
  <span macro="tag Contact"></span><span macro="help Contact"></span>
 </div>
 <div>
  <span class='title' macro='view title'></span>
  <span macro="miniTag"></span>
  <span macro="singleToggleTag tag:Starred"></span>
  [[MonkeyGTDTheme##Subtitle]]
 </div>
</div>
<!--}}}-->

<div macro="showWhenTagged 'Project'">[[TitleButtons##Project]]</div>
<div macro="showWhenTagged 'Action'">[[TitleButtons##Action]]</div>
<div macro="showWhenTagged 'Tickler'">[[TitleButtons##Tickler]]</div>
<div macro="showWhenTagged 'View'">[[TitleButtons##View]]</div>
<div macro="showWhenTagged 'Context'">[[TitleButtons##Context]]</div>
<div macro="showWhenTagged 'Area'">[[TitleButtons##Area]]</div>
<div macro="showWhenTagged 'Realm'">[[TitleButtons##Realm]]</div>
<div macro="showWhenTagged 'Reference'">[[TitleButtons##Reference]]</div>
<div macro="showWhenTagged 'Contact'">[[TitleButtons##Contact]]</div>
// Created by Saq. Taken from tw.lewcid.org

config.macros.toggleSideBar={};

config.macros.toggleSideBar.settings={
         styleHide :  "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
         styleShow : " ",
         arrow1: "<<",
         arrow2: ">>"
         //arrow1: "�",
         //arrow2: "�"
};

config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
          var tooltip= params[1]||'toggle sidebar';
          var mode = (params[2] && params[2]=="hide")? "hide":"show";
          var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
          var label= (params[0]&&params[0]!='.')?params[0]+" "+arrow:arrow;
          var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
          if (mode == "hide")
             { 
             (document.getElementById("sidebar")).setAttribute("toggle","hide");
              setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
             }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
          var sidebar = document.getElementById("sidebar");
          var settings = config.macros.toggleSideBar.settings;
          if (sidebar.getAttribute("toggle")=='hide')
             {
              setStylesheet(settings.styleShow,"ToggleSideBarStyles");
              sidebar.setAttribute("toggle","show");
              this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
              }
          else
              {    
               setStylesheet(settings.styleHide,"ToggleSideBarStyles");
               sidebar.setAttribute("toggle","hide");
               this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
              }

     return false;
}

/***
|Name:|ToggleTagPlugin|
|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0a|
|Date:|27-Jun-2011|
|Source:|http://mptw.tiddlyspot.com/#ToggleTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)
* TouchMod flag - if non empty then touch the tiddlers mod date. Note, can set config.toggleTagAlwaysTouchModDate to always touch mod date
!!Examples
|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
!!Notes
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
* Should convert to use named params
***/
//{{{

if (config.toggleTagAlwaysTouchModDate == undefined) config.toggleTagAlwaysTouchModDate = false;

merge(config.macros,{

  toggleTag: {

    createIfRequired: true,
    shortLabel: "[[%0]]",
    longLabel: "[[%0]] [[%1]]",

    handler: function(place,macroName,params,wikifier,paramString,tiddler) {
      var tiddlerTitle = tiddler ? tiddler.title : '';
      var tag   = (params[0] && params[0] != '.') ? params[0] : "checked";
      var title = (params[1] && params[1] != '.') ? params[1] : tiddlerTitle;
      var defaultLabel = (title == tiddlerTitle ? this.shortLabel : this.longLabel);
      var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
      var touchMod = (params[3] && params[3] != '.') ? params[3] : "";
      label = (label == '-' ? '' : label); // dash means no label
      var theTiddler = (title == tiddlerTitle ? tiddler : store.getTiddler(title));
      var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
        if (!store.tiddlerExists(title)) {
          if (config.macros.toggleTag.createIfRequired) {
            var content = store.getTiddlerText(title); // just in case it's a shadow
            store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
          }
          else
            return false;
        }
        if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
            theTiddler.modified = new Date();
        store.setTiddlerTag(title,this.checked,tag);
        return true;
      });
    }
  }
});

//}}}

|~ViewToolbar|<<tiddler RefreshTiddler>> closeTiddler closeOthers +editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
| tiddlyspot password:|<<option pasUploadPassword>>|
| site management:|<<upload http://mgsd1.tiddlyspot.com/store.cgi index.html . .  mgsd1>>//(requires tiddlyspot password)//<br>[[control panel|http://mgsd1.tiddlyspot.com/controlpanel]], [[download (go offline)|http://mgsd1.tiddlyspot.com/download]]|
| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{

// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'aaac';

// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too

// disable autosave in d3
if (window.location.protocol != "file:")
	config.options.chkGTDLazyAutoSave = false;

// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
	SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
	SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
	OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
	DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
	MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}

// create some shadow tiddler content
merge(config.shadowTiddlers,{

'TspotOptions':[
 "tiddlyspot password:",
 "<<option pasUploadPassword>>",
 ""
].join("\n"),

'TspotControls':[
 "| tiddlyspot password:|<<option pasUploadPassword>>|",
 "| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
 "| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),

'WelcomeToTiddlyspot':[
 "This document is a ~TiddlyWiki from tiddlyspot.com.  A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below.  Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
 "<<tiddler TspotControls>>",
 "See also GettingStarted.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick.  You can make changes and save them locally without being connected to the Internet.  When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]].  Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help.  If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site.  Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),

'TspotSidebar':[
 "<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n")

});
//}}}
<<upload http://mgsd1.tiddlyspot.com/store.cgi index.html . .  mgsd1>><html><a href='http://mgsd1.tiddlyspot.com/download' class='button'>download</a></html>
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 23/12/2015 10:08:57 | ChiefEditor | [[mgsd1.html|file:///C:/Users/arciniea/Dropbox/Apps/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . | ok |
| 23/12/2015 10:11:46 | ChiefEditor | [[mgsd1.html|file:///C:/Users/arciniea/Dropbox/Apps/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . |
| 04/01/2018 11:54:42 | ChiefEditor | [[mgsd1.html|file:///E:/DropboxA/Apps/Quine/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . | failed |
| 04/01/2018 11:55:09 | ChiefEditor | [[mgsd1.html|file:///E:/DropboxA/Apps/Quine/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . | failed |
| 04/01/2018 11:55:34 | ChiefEditor | [[mgsd1.html|file:///E:/DropboxA/Apps/Quine/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . | failed |
| 04/01/2018 11:55:49 | ChiefEditor | [[mgsd1.html|file:///E:/DropboxA/Apps/Quine/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . | ok |
| 15/01/2018 14:59:18 | YourName | [[mgsd1.html|file:///E:/DropboxA/Apps/Quine/TWSync/mgsd1.html]] | [[store.cgi|http://mgsd1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://mgsd1.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 3,
	date: new Date("Feb 24, 2008"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0'
};

//
// Environment
//

if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;	// true to activate both in Plugin and UploadService
	
//
// Upload Macro
//

config.macros.upload = {
// default values
	defaultBackupDir: '',	//no backup
	defaultStoreScript: "store.php",
	defaultToFilename: "index.html",
	defaultUploadDir: ".",
	authenticateUser: true	// UploadService Authenticate User
};
	
config.macros.upload.label = {
	promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
	promptParamMacro: "Save and Upload this TiddlyWiki in %0",
	saveLabel: "save to web", 
	saveToDisk: "save to disk",
	uploadLabel: "upload"	
};

config.macros.upload.messages = {
	noStoreUrl: "No store URL in parmeters or options",
	usernameOrPasswordMissing: "Username or password missing"
};

config.macros.upload.handler = function(place,macroName,params) {
	if (readOnly)
		return;
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (params[0]) {
		prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0], 
			(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
	} else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};

config.macros.upload.action = function(params)
{
		// for missing macro parameter set value from options
		if (!params) params = {};
		var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
		var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
		var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
		var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
		var username = params[4] ? params[4] : config.options.txtUploadUserName;
		var password = config.options.pasUploadPassword; // for security reason no password as macro parameter	
		// for still missing parameter set default value
		if ((!storeUrl) && (document.location.toString().substr(0,4) == "http")) 
			storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
		if (storeUrl.substr(0,4) != "http")
			storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
		if (!toFilename)
			toFilename = bidix.basename(window.location.toString());
		if (!toFilename)
			toFilename = config.macros.upload.defaultToFilename;
		if (!uploadDir)
			uploadDir = config.macros.upload.defaultUploadDir;
		if (!backupDir)
			backupDir = config.macros.upload.defaultBackupDir;
		// report error if still missing
		if (!storeUrl) {
			alert(config.macros.upload.messages.noStoreUrl);
			clearMessage();
			return false;
		}
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			alert(config.macros.upload.messages.usernameOrPasswordMissing);
			clearMessage();
			return false;
		}
		bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password); 
		return false; 
};

config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir) 
{
	if (!storeUrl)
		return null;
		var dest = bidix.dirname(storeUrl);
		if (uploadDir && uploadDir != '.')
			dest = dest + '/' + uploadDir;
		dest = dest + '/' + toFilename;
	return dest;
};

//
// uploadOptions Macro
//

config.macros.uploadOptions = {
	handler: function(place,macroName,params) {
		var wizard = new Wizard();
		wizard.createWizard(place,this.wizardTitle);
		wizard.addStep(this.step1Title,this.step1Html);
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		markList.parentNode.insertBefore(listWrapper,markList);
		wizard.setValue("listWrapper",listWrapper);
		this.refreshOptions(listWrapper,false);
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
		else
			uploadCaption = config.macros.upload.label.uploadLabel;
		
		wizard.setButtons([
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
				
			]);
	},
	options: [
		"txtUploadUserName",
		"pasUploadPassword",
		"txtUploadStoreUrl",
		"txtUploadDir",
		"txtUploadFilename",
		"txtUploadBackupDir",
		"chkUploadLog",
		"txtUploadLogMaxLine"		
	],
	refreshOptions: function(listWrapper) {
		var opts = [];
		for(i=0; i<this.options.length; i++) {
			var opt = {};
			opts.push();
			opt.option = "";
			n = this.options[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
			opts.push(opt);
		}
		var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
		for(n=0; n<opts.length; n++) {
			var type = opts[n].name.substr(0,3);
			var h = config.macros.option.types[type];
			if (h && h.create) {
				h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
			}
		}
		
	},
	onCancel: function(e)
	{
		backstage.switchTab(null);
		return false;
	},
	
	wizardTitle: "Upload with options",
	step1Title: "These options are saved in cookies in your browser",
	step1Html: "<input type='hidden' name='markList'></input><br>",
	cancelButton: "Cancel",
	cancelButtonPrompt: "Cancel prompt",
	listViewTemplate: {
		columns: [
			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
			{name: 'Option', field: 'option', title: "Option", type: 'String'},
			{name: 'Name', field: 'name', title: "Name", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
};

//
// upload functions
//

if (!bidix.upload) bidix.upload = {};

if (!bidix.upload.messages) bidix.upload.messages = {
	//from saving
	invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
	backupSaved: "Backup saved",
	backupFailed: "Failed to upload backup file",
	rssSaved: "RSS feed uploaded",
	rssFailed: "Failed to upload RSS feed file",
	emptySaved: "Empty template uploaded",
	emptyFailed: "Failed to upload empty template file",
	mainSaved: "Main TiddlyWiki file uploaded",
	mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
	//specific upload
	loadOriginalHttpPostError: "Can't get original file",
	aboutToSaveOnHttpPost: 'About to upload on %0 ...',
	storePhpNotFound: "The store script '%0' was not found."
};

bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
	var callback = function(status,uploadParams,original,url,xhr) {
		if (!status) {
			displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
			return;
		}
		if (bidix.debugMode) 
			alert(original.substr(0,500)+"\n...");
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
			alert(config.messages.invalidFileError.format([localPath]));
			return;
		}
		bidix.upload.uploadRss(uploadParams,original,posDiv);
	};
	
	if(onlyIfDirty && !store.isDirty())
		return;
	clearMessage();
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
		saveChanges();
	}
	// get original
	var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
	var originalPath = document.location.toString();
	// If url is a directory : add index.html
	if (originalPath.charAt(originalPath.length-1) == "/")
		originalPath = originalPath + "index.html";
	var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
	var log = new bidix.UploadLog();
	log.startUpload(storeUrl, dest, uploadDir,  backupDir);
	displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

bidix.upload.uploadRss = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		if(status) {
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
			bidix.upload.uploadMain(params[0],params[1],params[2]);
		} else {
			displayMessage(bidix.upload.messages.rssFailed);			
		}
	};
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		var rssString = generateRss();
		// no UnicodeToUTF8 conversion needed when location is "file" !!!
		if (document.location.toString().substr(0,4) != "file")
			rssString = convertUnicodeToUTF8(rssString);	
		bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
	} else {
		bidix.upload.uploadMain(uploadParams,original,posDiv);
	}
};

bidix.upload.uploadMain = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		var log = new bidix.UploadLog();
		if(status) {
			// if backupDir specified
			if ((params[3]) && (responseText.indexOf("backupfile:") > -1))  {
				var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
				displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
			}
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
			store.setDirty(false);
			log.endUpload("ok");
		} else {
			alert(bidix.upload.messages.mainFailed);
			displayMessage(bidix.upload.messages.mainFailed);
			log.endUpload("failed");			
		}
	};
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);
	bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};

bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
	var localCallback = function(status,params,responseText,url,xhr) {
		url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
		if (xhr.status == 404)
			alert(bidix.upload.messages.storePhpNotFound.format([url]));
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			alert(responseText);
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
			alert(responseText);
		if (responseText.charAt(0) != '0')
			status = null;
		callback(status,params,responseText,url,xhr);
	};
	// do httpUpload
	var boundary = "---------------------------"+"AaB03x";	
	var uploadFormName = "UploadPlugin";
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += uploadFormName +"\"\r\n\r\n";
	sheader += "backupDir="+uploadParams[3] +
				";user=" + uploadParams[4] +
				";password=" + uploadParams[5] +
				";uploaddir=" + uploadParams[2];
	if (bidix.debugMode)
		sheader += ";debug=1";
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
	sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
	sheader += "Content-Length: " + data.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	data = sheader + data + strailer;
	if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
	var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
	if (!posDiv)
		posDiv = locateStoreArea(original);
	if((posDiv[0] == -1) || (posDiv[1] == -1)) {
		alert(config.messages.invalidFileError.format([localPath]));
		return;
	}
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
				original.substr(posDiv[1]);
	var newSiteTitle = getPageTitle().htmlEncode();
	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
	revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
	revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
	revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
	return revised;
};

//
// UploadLog
// 
// config.options.chkUploadLog :
//		false : no logging
//		true : logging
// config.options.txtUploadLogMaxLine :
//		-1 : no limit
//      0 :  no Log lines but UploadLog is still in place
//		n :  the last n lines are only kept
//		NaN : no limit (-1)

bidix.UploadLog = function() {
	if (!config.options.chkUploadLog) 
		return; // this.tiddler = null
	this.tiddler = store.getTiddler("UploadLog");
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = "UploadLog";
		this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
		store.addTiddler(this.tiddler);
	}
	return this;
};

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
		return;
	// retrieve maxLine when we need it
	var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
	if (isNaN(maxLine))
		maxLine = -1;
	// add text
	if (maxLine != 0) 
		this.tiddler.text = this.tiddler.text + text;
	// Trunck to maxLine
	if (maxLine >= 0) {
		var textArray = this.tiddler.text.split('\n');
		if (textArray.length > maxLine + 1)
			textArray.splice(1,textArray.length-1-maxLine);
			this.tiddler.text = textArray.join('\n');		
	}
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	store.addTiddler(this.tiddler);
	// refresh and notifiy for immediate update
	story.refreshTiddler(this.tiddler.title);
	store.notify(this.tiddler.title, true);
};

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
		return;
	var now = new Date();
	var text = "\n| ";
	var filename = bidix.basename(document.location.toString());
	if (!filename) filename = '/';
	text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
	text += config.options.txtUserName + " | ";
	text += "[["+filename+"|"+location + "]] |";
	text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
	text += uploadDir + " | ";
	text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
	text += backupDir + " |";
	this.addText(text);
};

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
		return;
	this.addText(" "+status+" |");
};

//
// Utilities
// 

bidix.checkPlugin = function(plugin, major, minor, revision) {
	var ext = version.extensions[plugin];
	if (!
		(ext  && 
			((ext.major > major) || 
			((ext.major == major) && (ext.minor > minor))  ||
			((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
			// write error in PluginManager
			if (pluginInfo)
				pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
			eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
	}
};

bidix.dirname = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};

bidix.basename = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("#")) != -1) 
		filePath = filePath.substring(0, lastpos);
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(lastpos + 1);
	} else
		return filePath.substring(filePath.lastIndexOf("\\")+1);
};

bidix.initOption = function(name,value) {
	if (!config.options[name])
		config.options[name] = value;
};

//
// Initializations
//

// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);

// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");

//optionsDesc
merge(config.optionsDesc,{
	txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
	txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
	txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
	txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
	txtUploadUserName: "Upload Username",
	pasUploadPassword: "Upload Password",
	chkUploadLog: "do Logging in UploadLog (default: true)",
	txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});

// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');


// Backstage
merge(config.tasks,{
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");


//}}}


order:2
button:w
buttonLong:waiting for

order:3
button:week
buttonLong:weekly
- Pay outstanding bills
- Review finances
- Check bank balance
This document is a ~TiddlyWiki from tiddlyspot.com.  A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.

@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below.  Then configure privacy and other site settings at your [[control panel|http://mgsd1.tiddlyspot.com/controlpanel]] (your control panel username is //mgsd1//).
<<tiddler TspotControls>>
See also GettingStarted.

@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the "save to web" button in the column on the right.

@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick.  You can make changes and save them locally without being connected to the Internet.  When you're ready to sync up again, just click "upload" and your ~TiddlyWiki will be saved back to tiddlyspot.com.

@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]].  Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help.  If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].

@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site.  Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions.
/***
|Name|WikifyPlugin|
|Source|http://www.TiddlyTools.com/#WikifyPlugin|
|Documentation|http://www.TiddlyTools.com/#WikifyPluginInfo|
|Version|1.2.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|insert sections, slices, fields, literals, or computed values into a wiki-format output|
!!!!!Documentation
> see [[WikifyPluginInfo]]
!!!!!Revisions
<<<
2011.03.07 1.2.0 added handling in getFieldReference() for retrieving section values
|please see [[WikifyPluginInfo]] for additional revision details|
2007.06.22 1.0.0 initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.WikifyPlugin= {major: 1, minor: 2, revision: 0, date: new Date(2011,3,7)};

config.macros.wikify={
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var fmt=params.shift();
		var values=[];
		var out="";
		if (!fmt.match(/\%[0-9]/g) && params.length) // format has no markers, just join all params with spaces
			out=fmt+" "+params.join(" ");
		else { // format param has markers, get values and perform substitution
			while (p=params.shift()) values.push(this.getFieldReference(place,p));
			out=fmt.format(values);
		}
		if (macroName=="wikiCalc") out=eval(out).toString();
		wikify(out.unescapeLineBreaks(),place,null,tiddler);
	},
	getFieldReference: function(place,p) {
		if (typeof p != "string") return p; // literal non-string value... just return it...

		var val=undefined;
		var here=story.findContainingTiddler(place);
		var current=here?here.getAttribute('tiddler'):'';

		// SLICES: "::slicename" OR "here::slicename" OR "tiddlername::slicename"
		var parts=p.split(config.textPrimitives.sliceSeparator);
		var tid=parts[0]; var slice=parts[1];
		if (slice) { // slice reference
			if (!tid || !tid.length || tid=="here") tid=current;
			var val=store.getTiddlerSlice(tid,slice);
		}

		// SECTIONS: "##sectionname" OR "here##sectionname" OR "tiddlername##sectionname"
		if (!slice) {
			var parts=p.split(config.textPrimitives.sectionSeparator);
			var tid=parts[0]; var section=parts[1];
			if (section) {
				if (!tid || !tid.length || tid=="here") tid=current;
				var val=store.getTiddlerText(tid+config.textPrimitives.sectionSeparator+section);
			}
		}

		// FIELDS: "fieldname" OR "fieldname@tiddlername"
		if (!slice && !section) {
			var parts=p.split("@");
		 	var field=parts[0]; var tid=parts[1];
			if (!tid || !tid.length || tid=="here") tid=current;
			var val=store.getValue(tid,field);
		}

		// not a slice, section or field, or value not found... return value unchanged
		return val===undefined?p:val;
	}
}
//}}}
//{{{
// define alternative macroName for triggering pre-rendering call to eval()
config.macros.wikiCalc=config.macros.wikify;
//}}}
/***
|Name|WikifyPlugin|
|Source|http://www.TiddlyTools.com/#WikifyPlugin|
|Documentation|http://www.TiddlyTools.com/#WikifyPluginInfo|
|Version|1.2.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|documentation for WikifyPlugin|
The {{{<<wikify>>}}} macro retrieves values from tiddler slices, sections, or fields and then inserts those values into wiki-formatted output.  The {{{<<wikiCalc>>}}} macro performs the same processing as {{{<<wikify>>}}} and, in addition, passes the assembled text content through javascript's {{{eval()}}} function before rendering the results.  This allows you to, for example, construct and compute mathematical expressions that use input values extracted from tiddler fields or slices.
!!!!!Usage
<<<
{{{
<<wikify "format" value value value value ...>>
<<wikiCalc "format" value value value value ...>>
}}}
* ''format'' specifies the output format of the wiki-syntax content (or javascript expression, if using {{{<<wikiCalc>>}}}).  Use //substitution markers// "%0" through "%9" to insert each value parameter into the formatted content, replacing its corresponding marker.  If the ''format'' is blank (or does //not// contain any substitution markers), then all values are simply joined together (with spaces) for output.  If {{{<<wikiCalc>>}}} is used, the formatted output is evaluated as a javascript expression before rendering.
* ''value'' parameters (space-separated), specified using any of:
** slices:<br>''::slicename'' or ''tiddlername::slicename'' or ''here::slicename''
** sections:<br>''##sectionname'' or ''tiddlername##sectionname'' or ''here##sectionname''
** fields:<br>''fieldname'' or ''fieldname@tiddlername'' or ''fieldname@here''
** evaluated javascript:<br>''"""{{...}}"""''
** literal text:<br>''"..."''
Note: if a slice/section/field reference omits the tiddlername (or uses the special keyword, ''here''), the current tiddler is implied.
<<<
!!!!!Examples
<<<
{{{
<<wikify [[This tiddler is: %0 using %1 bytes (last author: %2)]] title {{tiddler.text.length}} modifier>>
<<wikify [[The source URL for this plugin is: %0]] 'here::Source'>>
<<wikify [[The tiddler has been changed %0 times]] changecount@here>>
<<wikify [[The Primary Mid color is: @@background:%0;%0@@]] 'ColorPalette::PrimaryMid'>>
<<wikify [[This current user is: %0]] {{config.options.txtUserName}}>>
}}}
<<wikify [[This tiddler is: %0 using %1 bytes (last author: %2)]] title {{tiddler.text.length}} modifier>>
<<wikify [[The source URL for this plugin is: %0]] 'here::Source'>>
<<wikify [[The tiddler has been changed %0 times]] changecount@here>>
<<wikify [[The Primary Mid color is: @@background:%0;%0@@]] 'ColorPalette::PrimaryMid'>>
<<wikify [[This current user is: %0]] {{config.options.txtUserName}}>>
<<<
!!!!!Revisions
<<<
2011.03.07 1.2.0 added handling in getFieldReference() for retrieving section values and eliminated ~SiteSlices, ~SiteFields and 'checked' (fieldname) fallbacks.
2009.03.29 1.1.4 in handler(), pass 'tiddler' value to wikify() to fix macro errors in rendered content
2009.03.26 1.1.3 unescape output before wikify so that \n can be used in formatting string
2008.11.16 1.1.2 in getFieldReference(), if not a field/slice reference (or field/slice is not found), return string input unchanged instead of returning a blank string.
2008.03.08 1.1.1 size reduction: documentation moved to [[WikifyPluginInfo]]
2008.03.07 1.1.0 added {{{<<wikicalc>>}}} variant for evaluating assembled output as javascript before rendering the result
2007.11.11 1.0.1 in handler(), fixed problem where a trailing space was created when no substitution markers were present in the format param.
2007.06.22 1.0.0 initial release
<<<
order:6
button:year
buttonLong:yearly
/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.3 (2008-04-16)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2008 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Community:''|[[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23YourSearchPlugin]]|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Source Code
***/
/***
This plugin's source code is compressed (and hidden). Use this [[link|http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/Plugin-YourSearch-src.2.1.3.js]] to get the readable source code.
***/
///%
if(!version.extensions.YourSearchPlugin){version.extensions.YourSearchPlugin={major:2,minor:1,revision:3,source:"http://tiddlywiki.abego-software.de/#YourSearchPlugin",licence:"[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",copyright:"Copyright (c) abego Software GmbH, 2005-2008 (www.abego-software.de)"};if(!window.abego){window.abego={};}
if(!Array.forEach){Array.forEach=function(_1,_2,_3){for(var i=0,len=_1.length;i<len;i++){_2.call(_3,_1[i],i,_1);}};Array.prototype.forEach=function(_5,_6){for(var i=0,len=this.length;i<len;i++){_5.call(_6,this[i],i,this);}};}
abego.toInt=function(s,_9){if(!s){return _9;}
var n=parseInt(s);return(n==NaN)?_9:n;};abego.createEllipsis=function(_b){var e=createTiddlyElement(_b,"span");e.innerHTML="&hellip;";};abego.shallowCopy=function(_d){if(!_d){return _d;}
var _e={};for(var n in _d){_e[n]=_d[n];}
return _e;};abego.copyOptions=function(_10){return!_10?{}:abego.shallowCopy(_10);};abego.countStrings=function(_11,s){if(!s){return 0;}
var len=s.length;var n=0;var _15=0;while(1){var i=_11.indexOf(s,_15);if(i<0){return n;}
n++;_15=i+len;}
return n;};abego.getBracedText=function(_17,_18,_19){if(!_18){_18=0;}
var re=/\{([^\}]*)\}/gm;re.lastIndex=_18;var m=re.exec(_17);if(m){var s=m[1];var _1d=abego.countStrings(s,"{");if(!_1d){if(_19){_19.lastIndex=re.lastIndex;}
return s;}
var len=_17.length;for(var i=re.lastIndex;i<len&&_1d;i++){var c=_17.charAt(i);if(c=="{"){_1d++;}else{if(c=="}"){_1d--;}}}
if(!_1d){if(_19){_19.lastIndex=i-1;}
return _17.substring(m.index+1,i-1);}}};abego.select=function(_21,_22,_23,_24){if(!_24){_24=[];}
_21.forEach(function(t){if(_22.call(_23,t)){_24.push(t);}});return _24;};abego.consumeEvent=function(e){if(e.stopPropagation){e.stopPropagation();}
if(e.preventDefault){e.preventDefault();}
e.cancelBubble=true;e.returnValue=true;};abego.TiddlerFilterTerm=function(_27,_28){if(!_28){_28={};}
var _29=_27;if(!_28.textIsRegExp){_29=_27.escapeRegExp();if(_28.fullWordMatch){_29="\\b"+_29+"\\b";}}
var _2a=new RegExp(_29,"m"+(_28.caseSensitive?"":"i"));this.tester=new abego.MultiFieldRegExpTester(_2a,_28.fields,_28.withExtendedFields);};abego.TiddlerFilterTerm.prototype.test=function(_2b){return this.tester.test(_2b);};abego.parseNewTiddlerCommandLine=function(s){var m=/(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(s);if(!m){m=/([^#]*)()(#.*)?/.exec(s);}
if(m){var r;if(m[3]){var s2=m[3].replace(/#/g,"");r=s2.parseParams("tag");}else{r=[[]];}
var _30=m[2]?m[2].trim():"";r.push({name:"text",value:_30});r[0].text=[_30];return{title:m[1].trim(),params:r};}else{return{title:s.trim(),params:[[]]};}};abego.parseTiddlerFilterTerm=function(_31,_32,_33){var re=/\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;var _35={"!":"title","%":"text","#":"tags"};var _36={};var _37;re.lastIndex=_32;while(1){var i=re.lastIndex;var m=re.exec(_31);if(!m||m.index!=i){throw"Word or String literal expected";}
if(m[1]){var _3a={};var _3b=abego.getBracedText(_31,0,_3a);if(!_3b){throw"Invalid {...} syntax";}
var f=Function("tiddler","return ("+_3b+");");return{func:f,lastIndex:_3a.lastIndex,markRE:null};}
if(m[2]){_37=true;}else{if(m[3]){_36[_35[m[3]]]=1;}else{if(m[4]){_36[m[4]]=1;}else{var _3d=m[6];var _3e=m[5]?window.eval(m[5]):m[6]?m[6]:m[7]?m[7]:m[8];var _33=abego.copyOptions(_33);_33.fullWordMatch=_37;_33.textIsRegExp=_3d;var _3f=[];for(var n in _36){_3f.push(n);}
if(_3f.length==0){_33.fields=_33.defaultFields;}else{_33.fields=_3f;_33.withExtendedFields=false;}
var _41=new abego.TiddlerFilterTerm(_3e,_33);var _42=_3d?_3e:_3e.escapeRegExp();if(_42&&_37){_42="\\b"+_42+"\\b";}
return{func:function(_43){return _41.test(_43);},lastIndex:re.lastIndex,markRE:_42?"(?:"+_42+")":null};}}}}};abego.BoolExp=function(s,_45,_46){this.s=s;var _47=_46&&_46.defaultOperationIs_OR;var _48=/\s*(?:(\-|not)|(\())/gi;var _49=/\s*\)/g;var _4a=/\s*(?:(and|\&\&)|(or|\|\|))/gi;var _4b=/\s*[^\)\s]/g;var _4c=/\s*(\-|not)?(\s*\()?/gi;var _4d;var _4e=function(_4f){_4c.lastIndex=_4f;var m=_4c.exec(s);var _51;var _52;if(m&&m.index==_4f){_4f+=m[0].length;_51=m[1];if(m[2]){var e=_4d(_4f);_49.lastIndex=e.lastIndex;if(!_49.exec(s)){throw"Missing ')'";}
_52={func:e.func,lastIndex:_49.lastIndex,markRE:e.markRE};}}
if(!_52){_52=_45(s,_4f,_46);}
if(_51){_52.func=(function(f){return function(_55){return!f(_55);};})(_52.func);_52.markRE=null;}
return _52;};_4d=function(_56){var _57=_4e(_56);while(1){var l=_57.lastIndex;_4a.lastIndex=l;var m=_4a.exec(s);var _5a;var _5b;if(m&&m.index==l){_5a=!m[1];_5b=_4e(_4a.lastIndex);}else{try{_5b=_4e(l);}
catch(e){return _57;}
_5a=_47;}
_57.func=(function(_5c,_5d,_5e){return _5e?function(_5f){return _5c(_5f)||_5d(_5f);}:function(_60){return _5c(_60)&&_5d(_60);};})(_57.func,_5b.func,_5a);_57.lastIndex=_5b.lastIndex;if(!_57.markRE){_57.markRE=_5b.markRE;}else{if(_5b.markRE){_57.markRE=_57.markRE+"|"+_5b.markRE;}}}};var _61=_4d(0);this.evalFunc=_61.func;if(_61.markRE){this.markRegExp=new RegExp(_61.markRE,_46.caseSensitive?"mg":"img");}};abego.BoolExp.prototype.exec=function(){return this.evalFunc.apply(this,arguments);};abego.BoolExp.prototype.getMarkRegExp=function(){return this.markRegExp;};abego.BoolExp.prototype.toString=function(){return this.s;};abego.MultiFieldRegExpTester=function(re,_63,_64){this.re=re;this.fields=_63?_63:["title","text","tags"];this.withExtendedFields=_64;};abego.MultiFieldRegExpTester.prototype.test=function(_65){var re=this.re;for(var i=0;i<this.fields.length;i++){var s=store.getValue(_65,this.fields[i]);if(typeof s=="string"&&re.test(s)){return this.fields[i];}}
if(this.withExtendedFields){return store.forEachField(_65,function(_69,_6a,_6b){return typeof _6b=="string"&&re.test(_6b)?_6a:null;},true);}
return null;};abego.TiddlerQuery=function(_6c,_6d,_6e,_6f,_70){if(_6e){this.regExp=new RegExp(_6c,_6d?"mg":"img");this.tester=new abego.MultiFieldRegExpTester(this.regExp,_6f,_70);}else{this.expr=new abego.BoolExp(_6c,abego.parseTiddlerFilterTerm,{defaultFields:_6f,caseSensitive:_6d,withExtendedFields:_70});}
this.getQueryText=function(){return _6c;};this.getUseRegExp=function(){return _6e;};this.getCaseSensitive=function(){return _6d;};this.getDefaultFields=function(){return _6f;};this.getWithExtendedFields=function(){return _70;};};abego.TiddlerQuery.prototype.test=function(_71){if(!_71){return false;}
if(this.regExp){return this.tester.test(_71);}
return this.expr.exec(_71);};abego.TiddlerQuery.prototype.filter=function(_72){return abego.select(_72,this.test,this);};abego.TiddlerQuery.prototype.getMarkRegExp=function(){if(this.regExp){return"".search(this.regExp)>=0?null:this.regExp;}
return this.expr.getMarkRegExp();};abego.TiddlerQuery.prototype.toString=function(){return(this.regExp?this.regExp:this.expr).toString();};abego.PageWiseRenderer=function(){this.firstIndexOnPage=0;};merge(abego.PageWiseRenderer.prototype,{setItems:function(_73){this.items=_73;this.setFirstIndexOnPage(0);},getMaxPagesInNavigation:function(){return 10;},getItemsCount:function(_74){return this.items?this.items.length:0;},getCurrentPageIndex:function(){return Math.floor(this.firstIndexOnPage/this.getItemsPerPage());},getLastPageIndex:function(){return Math.floor((this.getItemsCount()-1)/this.getItemsPerPage());},setFirstIndexOnPage:function(_75){this.firstIndexOnPage=Math.min(Math.max(0,_75),this.getItemsCount()-1);},getFirstIndexOnPage:function(){this.firstIndexOnPage=Math.floor(this.firstIndexOnPage/this.getItemsPerPage())*this.getItemsPerPage();return this.firstIndexOnPage;},getLastIndexOnPage:function(){return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1,this.getItemsCount()-1);},onPageChanged:function(_76,_77){},renderPage:function(_78){if(_78.beginRendering){_78.beginRendering(this);}
try{if(this.getItemsCount()){var _79=this.getLastIndexOnPage();var _7a=-1;for(var i=this.getFirstIndexOnPage();i<=_79;i++){_7a++;_78.render(this,this.items[i],i,_7a);}}}
finally{if(_78.endRendering){_78.endRendering(this);}}},addPageNavigation:function(_7c){if(!this.getItemsCount()){return;}
var _7d=this;var _7e=function(e){if(!e){var e=window.event;}
abego.consumeEvent(e);var _80=abego.toInt(this.getAttribute("page"),0);var _81=_7d.getCurrentPageIndex();if(_80==_81){return;}
var _82=_80*_7d.getItemsPerPage();_7d.setFirstIndexOnPage(_82);_7d.onPageChanged(_80,_81);};var _83;var _84=this.getCurrentPageIndex();var _85=this.getLastPageIndex();if(_84>0){_83=createTiddlyButton(_7c,"Previous","Go to previous page (Shortcut: Alt-'<')",_7e,"prev");_83.setAttribute("page",(_84-1).toString());_83.setAttribute("accessKey","<");}
for(var i=-this.getMaxPagesInNavigation();i<this.getMaxPagesInNavigation();i++){var _87=_84+i;if(_87<0){continue;}
if(_87>_85){break;}
var _88=(i+_84+1).toString();var _89=_87==_84?"currentPage":"otherPage";_83=createTiddlyButton(_7c,_88,"Go to page %0".format([_88]),_7e,_89);_83.setAttribute("page",(_87).toString());}
if(_84<_85){_83=createTiddlyButton(_7c,"Next","Go to next page (Shortcut: Alt-'>')",_7e,"next");_83.setAttribute("page",(_84+1).toString());_83.setAttribute("accessKey",">");}}});abego.LimitedTextRenderer=function(){var _8a=40;var _8b=4;var _8c=function(_8d,_8e,_8f){var n=_8d.length;if(n==0){_8d.push({start:_8e,end:_8f});return;}
var i=0;for(;i<n;i++){var _92=_8d[i];if(_92.start<=_8f&&_8e<=_92.end){var r;var _94=i+1;for(;_94<n;_94++){r=_8d[_94];if(r.start>_8f||_8e>_92.end){break;}}
var _95=_8e;var _96=_8f;for(var j=i;j<_94;j++){r=_8d[j];_95=Math.min(_95,r.start);_96=Math.max(_96,r.end);}
_8d.splice(i,_94-i,{start:_95,end:_96});return;}
if(_92.start>_8f){break;}}
_8d.splice(i,0,{start:_8e,end:_8f});};var _98=function(_99){var _9a=0;for(var i=0;i<_99.length;i++){var _9c=_99[i];_9a+=_9c.end-_9c.start;}
return _9a;};var _9d=function(c){return(c>="a"&&c<="z")||(c>="A"&&c<="Z")||c=="_";};var _9f=function(s,_a1){if(!_9d(s[_a1])){return null;}
for(var i=_a1-1;i>=0&&_9d(s[i]);i--){}
var _a3=i+1;var n=s.length;for(i=_a1+1;i<n&&_9d(s[i]);i++){}
return{start:_a3,end:i};};var _a5=function(s,_a7,_a8){var _a9;if(_a8){_a9=_9f(s,_a7);}else{if(_a7<=0){return _a7;}
_a9=_9f(s,_a7-1);}
if(!_a9){return _a7;}
if(_a8){if(_a9.start>=_a7-_8b){return _a9.start;}
if(_a9.end<=_a7+_8b){return _a9.end;}}else{if(_a9.end<=_a7+_8b){return _a9.end;}
if(_a9.start>=_a7-_8b){return _a9.start;}}
return _a7;};var _aa=function(s,_ac){var _ad=[];if(_ac){var _ae=0;var n=s.length;var _b0=0;do{_ac.lastIndex=_ae;var _b1=_ac.exec(s);if(_b1){if(_ae<_b1.index){var t=s.substring(_ae,_b1.index);_ad.push({text:t});}
_ad.push({text:_b1[0],isMatch:true});_ae=_b1.index+_b1[0].length;}else{_ad.push({text:s.substr(_ae)});break;}}while(true);}else{_ad.push({text:s});}
return _ad;};var _b3=function(_b4){var _b5=0;for(var i=0;i<_b4.length;i++){if(_b4[i].isMatch){_b5++;}}
return _b5;};var _b7=function(s,_b9,_ba,_bb,_bc){var _bd=Math.max(Math.floor(_bc/(_bb+1)),_8a);var _be=Math.max(_bd-(_ba-_b9),0);var _bf=Math.min(Math.floor(_ba+_be/3),s.length);var _c0=Math.max(_bf-_bd,0);_c0=_a5(s,_c0,true);_bf=_a5(s,_bf,false);return{start:_c0,end:_bf};};var _c1=function(_c2,s,_c4){var _c5=[];var _c6=_b3(_c2);var pos=0;for(var i=0;i<_c2.length;i++){var t=_c2[i];var _ca=t.text;if(t.isMatch){var _cb=_b7(s,pos,pos+_ca.length,_c6,_c4);_8c(_c5,_cb.start,_cb.end);}
pos+=_ca.length;}
return _c5;};var _cc=function(s,_ce,_cf){var _d0=_cf-_98(_ce);while(_d0>0){if(_ce.length==0){_8c(_ce,0,_a5(s,_cf,false));return;}else{var _d1=_ce[0];var _d2;var _d3;if(_d1.start==0){_d2=_d1.end;if(_ce.length>1){_d3=_ce[1].start;}else{_8c(_ce,_d2,_a5(s,_d2+_d0,false));return;}}else{_d2=0;_d3=_d1.start;}
var _d4=Math.min(_d3,_d2+_d0);_8c(_ce,_d2,_d4);_d0-=(_d4-_d2);}}};var _d5=function(_d6,s,_d8,_d9,_da){if(_d9.length==0){return;}
var _db=function(_dc,s,_de,_df,_e0){var t;var _e2;var pos=0;var i=0;var _e5=0;for(;i<_de.length;i++){t=_de[i];_e2=t.text;if(_df<pos+_e2.length){_e5=_df-pos;break;}
pos+=_e2.length;}
var _e6=_e0-_df;for(;i<_de.length&&_e6>0;i++){t=_de[i];_e2=t.text.substr(_e5);_e5=0;if(_e2.length>_e6){_e2=_e2.substr(0,_e6);}
if(t.isMatch){createTiddlyElement(_dc,"span",null,"marked",_e2);}else{createTiddlyText(_dc,_e2);}
_e6-=_e2.length;}
if(_e0<s.length){abego.createEllipsis(_dc);}};if(_d9[0].start>0){abego.createEllipsis(_d6);}
var _e7=_da;for(var i=0;i<_d9.length&&_e7>0;i++){var _e9=_d9[i];var len=Math.min(_e9.end-_e9.start,_e7);_db(_d6,s,_d8,_e9.start,_e9.start+len);_e7-=len;}};this.render=function(_eb,s,_ed,_ee){if(s.length<_ed){_ed=s.length;}
var _ef=_aa(s,_ee);var _f0=_c1(_ef,s,_ed);_cc(s,_f0,_ed);_d5(_eb,s,_ef,_f0,_ed);};};(function(){function alertAndThrow(msg){alert(msg);throw msg;}
if(version.major<2||(version.major==2&&version.minor<1)){alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive");}
abego.YourSearch={};var _f2;var _f3;var _f4=function(_f5){_f2=_f5;};var _f6=function(){return _f2?_f2:[];};var _f7=function(){return _f2?_f2.length:0;};var _f8=4;var _f9=10;var _fa=2;var _fb=function(s,re){var m=s.match(re);return m?m.length:0;};var _ff=function(_100,_101){var _102=_101.getMarkRegExp();if(!_102){return 1;}
var _103=_100.title.match(_102);var _104=_103?_103.length:0;var _105=_fb(_100.getTags(),_102);var _106=_103?_103.join("").length:0;var _107=_100.title.length>0?_106/_100.title.length:0;var rank=_104*_f8+_105*_fa+_107*_f9+1;return rank;};var _109=function(_10a,_10b,_10c,_10d,_10e,_10f){_f3=null;var _110=_10a.reverseLookup("tags",_10f,false);try{var _111=[];if(config.options.chkSearchInTitle){_111.push("title");}
if(config.options.chkSearchInText){_111.push("text");}
if(config.options.chkSearchInTags){_111.push("tags");}
_f3=new abego.TiddlerQuery(_10b,_10c,_10d,_111,config.options.chkSearchExtendedFields);}
catch(e){return[];}
var _112=_f3.filter(_110);var _113=abego.YourSearch.getRankFunction();for(var i=0;i<_112.length;i++){var _115=_112[i];var rank=_113(_115,_f3);_115.searchRank=rank;}
if(!_10e){_10e="title";}
var _117=function(a,b){var _11a=a.searchRank-b.searchRank;if(_11a==0){if(a[_10e]==b[_10e]){return(0);}else{return(a[_10e]<b[_10e])?-1:+1;}}else{return(_11a>0)?-1:+1;}};_112.sort(_117);return _112;};var _11b=80;var _11c=50;var _11d=250;var _11e=50;var _11f=25;var _120=10;var _121="yourSearchResult";var _122="yourSearchResultItems";var _123;var _124;var _125;var _126;var _127;var _128=function(){if(version.extensions.YourSearchPlugin.styleSheetInited){return;}
version.extensions.YourSearchPlugin.styleSheetInited=true;setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch");};var _129=function(){return _124!=null&&_124.parentNode==document.body;};var _12a=function(){if(_129()){document.body.removeChild(_124);}};var _12b=function(e){_12a();var _12d=this.getAttribute("tiddlyLink");if(_12d){var _12e=this.getAttribute("withHilite");var _12f=highlightHack;if(_12e&&_12e=="true"&&_f3){highlightHack=_f3.getMarkRegExp();}
story.displayTiddler(this,_12d);highlightHack=_12f;}
return(false);};var _130=function(){if(!_125){return;}
var root=_125;var _132=findPosX(root);var _133=findPosY(root);var _134=root.offsetHeight;var _135=_132;var _136=_133+_134;var _137=findWindowWidth();if(_137<_124.offsetWidth){_124.style.width=(_137-100)+"px";_137=findWindowWidth();}
var _138=_124.offsetWidth;if(_135+_138>_137){_135=_137-_138-30;}
if(_135<0){_135=0;}
_124.style.left=_135+"px";_124.style.top=_136+"px";_124.style.display="block";};var _139=function(){if(_124){window.scrollTo(0,ensureVisible(_124));}
if(_125){window.scrollTo(0,ensureVisible(_125));}};var _13a=function(){_130();_139();};var _13b;var _13c;var _13d=new abego.PageWiseRenderer();var _13e=function(_13f){this.itemHtml=store.getTiddlerText("YourSearchItemTemplate");if(!this.itemHtml){alertAndThrow("YourSearchItemTemplate not found");}
this.place=document.getElementById(_122);if(!this.place){this.place=createTiddlyElement(_13f,"div",_122);}};merge(_13e.prototype,{render:function(_140,_141,_142,_143){_13b=_143;_13c=_141;var item=createTiddlyElement(this.place,"div",null,"yourSearchItem");item.innerHTML=this.itemHtml;applyHtmlMacros(item,null);refreshElements(item,null);},endRendering:function(_145){_13c=null;}});var _146=function(){if(!_124||!_125){return;}
var html=store.getTiddlerText("YourSearchResultTemplate");if(!html){html="<b>Tiddler YourSearchResultTemplate not found</b>";}
_124.innerHTML=html;applyHtmlMacros(_124,null);refreshElements(_124,null);var _148=new _13e(_124);_13d.renderPage(_148);_13a();};_13d.getItemsPerPage=function(){var n=(config.options.chkPreviewText)?abego.toInt(config.options.txtItemsPerPageWithPreview,_120):abego.toInt(config.options.txtItemsPerPage,_11f);return(n>0)?n:1;};_13d.onPageChanged=function(){_146();};var _14a=function(){if(_125==null||!config.options.chkUseYourSearch){return;}
if((_125.value==_123)&&_123&&!_129()){if(_124&&(_124.parentNode!=document.body)){document.body.appendChild(_124);_13a();}else{abego.YourSearch.onShowResult(true);}}};var _14b=function(){_12a();_124=null;_123=null;};var _14c=function(self,e){while(e!=null){if(self==e){return true;}
e=e.parentNode;}
return false;};var _14f=function(e){if(e.target==_125){return;}
if(e.target==_126){return;}
if(_124&&_14c(_124,e.target)){return;}
_12a();};var _151=function(e){if(e.keyCode==27){_12a();}};addEvent(document,"click",_14f);addEvent(document,"keyup",_151);var _153=function(text,_155,_156){_123=text;_f4(_109(store,text,_155,_156,"title","excludeSearch"));abego.YourSearch.onShowResult();};var _157=function(_158,_159,_15a,_15b,_15c,_15d){_128();_123="";var _15e=null;var _15f=function(txt){if(config.options.chkUseYourSearch){_153(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}else{story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}
_123=txt.value;};var _161=function(e){_15f(_125);return false;};var _163=function(e){if(!e){var e=window.event;}
_125=this;switch(e.keyCode){case 13:if(e.ctrlKey&&_127&&_129()){_127.onclick.apply(_127,[e]);}else{_15f(this);}
break;case 27:if(_129()){_12a();}else{this.value="";clearMessage();}
break;}
if(String.fromCharCode(e.keyCode)==this.accessKey||e.altKey){_14a();}
if(this.value.length<3&&_15e){clearTimeout(_15e);}
if(this.value.length>2){if(this.value!=_123){if(!config.options.chkUseYourSearch||config.options.chkSearchAsYouType){if(_15e){clearTimeout(_15e);}
var txt=this;_15e=setTimeout(function(){_15f(txt);},500);}}else{if(_15e){clearTimeout(_15e);}}}
if(this.value.length==0){_12a();}};var _166=function(e){this.select();clearMessage();_14a();};var args=_15c.parseParams("list",null,true);var _169=getFlag(args,"buttonAtRight");var _16a=getParam(args,"sizeTextbox",this.sizeTextbox);var btn;if(!_169){btn=createTiddlyButton(_158,this.label,this.prompt,_161);}
var txt=createTiddlyElement(_158,"input",null,null,null);if(_15a[0]){txt.value=_15a[0];}
txt.onkeyup=_163;txt.onfocus=_166;txt.setAttribute("size",_16a);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5");}else{txt.setAttribute("type","text");}
if(_169){btn=createTiddlyButton(_158,this.label,this.prompt,_161);}
_125=txt;_126=btn;};var _16d=function(){_12a();var _16e=_f6();var n=_16e.length;if(n){var _170=[];for(var i=0;i<n;i++){_170.push(_16e[i].title);}
story.displayTiddlers(null,_170);}};var _172=function(_173,_174,_175,_176){invokeMacro(_173,"option",_174,_175,_176);var elem=_173.lastChild;var _178=elem.onclick;elem.onclick=function(e){var _17a=_178.apply(this,arguments);_146();return _17a;};return elem;};var _17b=function(s){var _17d=["''","{{{","}}}","//","<<<","/***","***/"];var _17e="";for(var i=0;i<_17d.length;i++){if(i!=0){_17e+="|";}
_17e+="("+_17d[i].escapeRegExp()+")";}
return s.replace(new RegExp(_17e,"mg"),"").trim();};var _180=function(){var i=_13b;return(i>=0&&i<=9)?(i<9?(i+1):0):-1;};var _182=new abego.LimitedTextRenderer();var _183=function(_184,s,_186){_182.render(_184,s,_186,_f3.getMarkRegExp());};var _187=TiddlyWiki.prototype.saveTiddler;TiddlyWiki.prototype.saveTiddler=function(_188,_189,_18a,_18b,_18c,tags,_18e){_187.apply(this,arguments);_14b();};var _18f=TiddlyWiki.prototype.removeTiddler;TiddlyWiki.prototype.removeTiddler=function(_190){_18f.apply(this,arguments);_14b();};config.macros.yourSearch={label:"yourSearch",prompt:"Gives access to the current/last YourSearch result",handler:function(_191,_192,_193,_194,_195,_196){if(_193.length==0){return;}
var name=_193[0];var func=config.macros.yourSearch.funcs[name];if(func){func(_191,_192,_193,_194,_195,_196);}},tests:{"true":function(){return true;},"false":function(){return false;},"found":function(){return _f7()>0;},"previewText":function(){return config.options.chkPreviewText;}},funcs:{itemRange:function(_199){if(_f7()){var _19a=_13d.getLastIndexOnPage();var s="%0 - %1".format([_13d.getFirstIndexOnPage()+1,_19a+1]);createTiddlyText(_199,s);}},count:function(_19c){createTiddlyText(_19c,_f7().toString());},query:function(_19d){if(_f3){createTiddlyText(_19d,_f3.toString());}},version:function(_19e){var t="YourSearch %0.%1.%2".format([version.extensions.YourSearchPlugin.major,version.extensions.YourSearchPlugin.minor,version.extensions.YourSearchPlugin.revision]);var e=createTiddlyElement(_19e,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de/#YourSearchPlugin");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">"+t+"<font>";},copyright:function(_1a1){var e=createTiddlyElement(_1a1,"a");e.setAttribute("href","http://www.abego-software.de");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">&copy; 2005-2008 <b><font color=\"red\">abego</font></b> Software<font>";},newTiddlerButton:function(_1a3){if(_f3){var r=abego.parseNewTiddlerCommandLine(_f3.getQueryText());var btn=config.macros.newTiddler.createNewTiddlerButton(_1a3,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");var _1a6=btn.onclick;btn.onclick=function(){_12a();_1a6.apply(this,arguments);};_127=btn;}},linkButton:function(_1a7,_1a8,_1a9,_1aa,_1ab,_1ac){if(_1a9<2){return;}
var _1ad=_1a9[1];var text=_1a9<3?_1ad:_1a9[2];var _1af=_1a9<4?text:_1a9[3];var _1b0=_1a9<5?null:_1a9[4];var btn=createTiddlyButton(_1a7,text,_1af,_12b,null,null,_1b0);btn.setAttribute("tiddlyLink",_1ad);},closeButton:function(_1b2,_1b3,_1b4,_1b5,_1b6,_1b7){var _1b8=createTiddlyButton(_1b2,"close","Close the Search Results (Shortcut: ESC)",_12a);},openAllButton:function(_1b9,_1ba,_1bb,_1bc,_1bd,_1be){var n=_f7();if(n==0){return;}
var _1c0=n==1?"open tiddler":"open all %0 tiddlers".format([n]);var _1c1=createTiddlyButton(_1b9,_1c0,"Open all found tiddlers (Shortcut: Alt-O)",_16d);_1c1.setAttribute("accessKey","O");},naviBar:function(_1c2,_1c3,_1c4,_1c5,_1c6,_1c7){_13d.addPageNavigation(_1c2);},"if":function(_1c8,_1c9,_1ca,_1cb,_1cc,_1cd){if(_1ca.length<2){return;}
var _1ce=_1ca[1];var _1cf=(_1ce=="not");if(_1cf){if(_1ca.length<3){return;}
_1ce=_1ca[2];}
var test=config.macros.yourSearch.tests[_1ce];var _1d1=false;try{if(test){_1d1=test(_1c8,_1c9,_1ca,_1cb,_1cc,_1cd)!=_1cf;}else{_1d1=(!eval(_1ce))==_1cf;}}
catch(ex){}
if(!_1d1){_1c8.style.display="none";}},chkPreviewText:function(_1d2,_1d3,_1d4,_1d5,_1d6,_1d7){var _1d8=_1d4.slice(1).join(" ");var elem=_172(_1d2,"chkPreviewText",_1d5,_1d7);elem.setAttribute("accessKey","P");elem.title="Show text preview of found tiddlers (Shortcut: Alt-P)";return elem;}}};config.macros.foundTiddler={label:"foundTiddler",prompt:"Provides information on the tiddler currently processed on the YourSearch result page",handler:function(_1da,_1db,_1dc,_1dd,_1de,_1df){var name=_1dc[0];var func=config.macros.foundTiddler.funcs[name];if(func){func(_1da,_1db,_1dc,_1dd,_1de,_1df);}},funcs:{title:function(_1e2,_1e3,_1e4,_1e5,_1e6,_1e7){if(!_13c){return;}
var _1e8=_180();var _1e9=_1e8>=0?"Open tiddler (Shortcut: Alt-%0)".format([_1e8.toString()]):"Open tiddler";var btn=createTiddlyButton(_1e2,null,_1e9,_12b,null);btn.setAttribute("tiddlyLink",_13c.title);btn.setAttribute("withHilite","true");_183(btn,_13c.title,_11b);if(_1e8>=0){btn.setAttribute("accessKey",_1e8.toString());}},tags:function(_1eb,_1ec,_1ed,_1ee,_1ef,_1f0){if(!_13c){return;}
_183(_1eb,_13c.getTags(),_11c);},text:function(_1f1,_1f2,_1f3,_1f4,_1f5,_1f6){if(!_13c){return;}
_183(_1f1,_17b(_13c.text),_11d);},field:function(_1f7,_1f8,_1f9,_1fa,_1fb,_1fc){if(!_13c){return;}
var name=_1f9[1];var len=_1f9.length>2?abego.toInt(_1f9[2],_11e):_11e;var v=store.getValue(_13c,name);if(v){_183(_1f7,_17b(v),len);}},number:function(_200,_201,_202,_203,_204,_205){var _206=_180();if(_206>=0){var text="%0)".format([_206.toString()]);createTiddlyElement(_200,"span",null,"shortcutNumber",text);}}}};var opts={chkUseYourSearch:true,chkPreviewText:true,chkSearchAsYouType:true,chkSearchInTitle:true,chkSearchInText:true,chkSearchInTags:true,chkSearchExtendedFields:true,txtItemsPerPage:_11f,txtItemsPerPageWithPreview:_120};for(var n in opts){if(config.options[n]==undefined){config.options[n]=opts[n];}}
config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";config.shadowTiddlers["YourSearch Help"]="!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g"+" only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e."+"g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard field"+"s {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles "+"only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text "+"only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only"+"''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may"+" also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1"+"}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one"+" field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containin"+"g \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boole"+"an Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you "+"type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}}"+")|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must "+"not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two"+" words, separated with a space, YourSearch finds all tiddlers that contain both words, but not neces"+"sarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need"+" to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change "+"the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds"+" all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}"+"} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"j"+"eremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched tex"+"t. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~Complet"+"edTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you"+" need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Tas"+"k', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch"+"\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearc"+"h. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you m"+"ay do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly enterin"+"g the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/"+"}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript E"+"xpression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki interna"+"ls you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression"+" into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and e"+"valuate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tidd"+"ler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Com"+"bined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Res"+"ult|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its tit"+"les, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact wor"+"d). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encour"+"aged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. F"+"or quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|"+"!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search in"+"put field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the pr"+"evious search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. S"+"elect tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Resul"+"t]] is already closed and the cursor is in the search input field the field's content is cleared so "+"you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second e"+"tc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the "+"'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[Your"+"Search Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the "+"{{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of t"+"hese shortcuts don't work for you check your browser if you have other extensions installed that alr"+"eady \"use\" these shortcuts.//";config.shadowTiddlers["YourSearch Options"]="|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText"+">> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required"+" to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chk"+"SearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFiel"+"ds>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don"+"'t explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!"+"', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items "+"on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with pre"+"view text: <<option txtItemsPerPageWithPreview>>|\n";config.shadowTiddlers["YourSearchStyleSheet"]="/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800"+"px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGra"+"y;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width:"+" thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSea"+"rchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary ."+"button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summa"+"ry .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*"+"/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-to"+"p: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearc"+"hText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFoote"+"r {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;"+"\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/"+"\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: bla"+"ck;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSe"+"archNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #"+"FF0000;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold"+";\n\tcolor: blue;\n}\n/*}}}*/\n";config.shadowTiddlers["YourSearchResultTemplate"]="<!--\n{{{\n-->\n<span macro=\"yourSearch if found\">\n<!-- The Summary Header ============================"+"================ -->\n<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"+"<tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearc"+"h itemRange\"></span>\n\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+"\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n\t</td>\n\t<td class=\"yourSea"+"rchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel"+"\">preview text</span>\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch openAllButton\"></span>\n\t\t<span macro=\"yourSearch lin"+"kButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkB"+"utton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch clo"+"seButton\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ================="+"=========================== -->\n<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPr"+"eview=\"10\"></div>\n\n<!-- The Footer (with the Navigation) ==========================================="+"= -->\n<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody"+">\n  <tr>\n\t<td align=\"left\">\n\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar"+"\"></span>\n\t</td>\n\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearc"+"h copyright\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the 'tiddlers found' case ========="+"================================== -->\n</span>\n\n\n<!-- The \"No tiddlers found\" case ================="+"========================== -->\n<span macro=\"yourSearch if not found\">\n<table class=\"summary\" border="+"\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Resu"+"lt: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n\t</td>\n\t<t"+"d class=\"yourSearchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Options'"+" options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help"+" 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch closeButton\"></span>\n\t</td>\n  <"+"/tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n";config.shadowTiddlers["YourSearchItemTemplate"]="<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSea"+"rchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='found"+"Tiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='fo"+"undTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";config.shadowTiddlers["YourSearch"]="<<tiddler [[YourSearch Help]]>>";config.shadowTiddlers["YourSearch Result"]="The popup-like window displaying the result of a YourSearch query.";config.macros.search.handler=_157;var _20a=function(){if(config.macros.search.handler!=_157){alert("Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may "+"disable the other plugin or change the load order of \nthe plugins (by changing the names of the tidd"+"lers)\nto enable the 'Your Search' features.");}};setTimeout(_20a,5000);abego.YourSearch.getStandardRankFunction=function(){return _ff;};abego.YourSearch.getRankFunction=function(){return abego.YourSearch.getStandardRankFunction();};abego.YourSearch.getCurrentTiddler=function(){return _13c;};abego.YourSearch.closeResult=function(){_12a();};abego.YourSearch.getFoundTiddlers=function(){return _f2;};abego.YourSearch.getQuery=function(){return _f3;};abego.YourSearch.onShowResult=function(_20b){highlightHack=_f3?_f3.getMarkRegExp():null;if(!_20b){_13d.setItems(_f6());}
if(!_124){_124=createTiddlyElement(document.body,"div",_121,"yourSearchResult");}else{if(_124.parentNode!=document.body){document.body.appendChild(_124);}}
_146();highlightHack=null;};})();}
//%/
//{{{
//requires DatePicker: http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/libraries/DatePicker.js

if (DatePicker) {

	merge(config.macros, {

		calendarPopup: {
			handler: function(place,macroName,params,wikifier,paramString,tiddler) {
				var dateBox = createTiddlyButton(place,params[0],params[1]);
				dateBox.style.cursor='pointer';
				DatePicker.create(dateBox,(new Date()),function(el,objDate) {
					// mostly copy/pasted from NewSavedTiddler. refactor please
					var title = prompt("Enter name for new Tickler","");
					if (title) {
						if (typeof config.macros.newTiddler.getName == "function")  {
							title = config.macros.newTiddler.getName(title); // from NewMeansNewPlugin
						}
						store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),"Tickler Once "+config.macros.mgtdList.getRealm(),{'mgtd_date':objDate.convertToYYYYMMDDHHMM()});
						story.displayTiddler(this,title);
					}
				});
			}
		},

		dateChooser: {
			handler: function(place,macroName,params,wikifier,paramString,tiddler) {

				var useTiddler = tiddler;
				if (params[0])
					useTiddler = store.fetchTiddler(params[0]);

				var curVal = useTiddler.fields['mgtd_date'] || undefined;
				var startDate = curVal ? Date.convertFromYYYYMMDDHHMM(curVal) : null;

				var dateBox = createTiddlyElement(place,'input',null,'dateBox');

				var dateFormat = config.mGTD.getOptTxt('ticklerdateformat');
				var defaultDateFormat = 'ddd, DD-mmm-YY';
				if (!dateFormat) {
					// makes it nicer for upgraders who don't have a format set
					dateFormat = defaultDateFormat;
					config.mGTD.setOptTxt('ticklerdateformat', defaultDateFormat);
				}
				dateBox.value = startDate ? startDate.formatString(dateFormat) : '(set date)';

				var callback = function(el,objDate){
					el.value = objDate.formatString(dateFormat);
					store.setValue(useTiddler, 'mgtd_date',objDate.convertToYYYYMMDDHHMM());
				}
				DatePicker.create(dateBox,startDate,callback);
			}
		},

		addDay: {
            label:   {addDay:"+d",  addWeek:"+w",   addFortnight:"+f",        addMonth:"+m",    addYear:"+y"   },
			tooltip: {addDay:"day", addWeek:"week", addFortnight:"fortnight", addMonth:"month", addYear:"year" },
			handler: function(place,macroName,params,wikifier,paramString,tiddler) {
				var useTiddler = tiddler;
				if (params[0]) useTiddler = store.fetchTiddler(params[0]);
				var curVal = useTiddler.fields['mgtd_date'] || undefined;
				var curDate = curVal ? Date.convertFromYYYYMMDDHHMM(curVal) : new Date();
				// ensure ticklers don't have minutes/hours since new Date() has minutes/hours
				curDate.setHours(0);
				curDate.setMinutes(0);
				curDate.setSeconds(0);
				// call the applicable date method. happens to match the macroname. see MgtdDateUtils. sorry for confusing code.
				curDate[macroName](1);
				createTiddlyButton(place,config.macros.addDay.label[macroName],"add a "+config.macros.addDay.tooltip[macroName],function() {
					store.setValue(useTiddler, 'mgtd_date',curDate.convertToYYYYMMDDHHMM());
					return false;
				});

			}
		}
	});

	config.macros.addWeek      = config.macros.addDay;
	config.macros.addFortnight = config.macros.addDay;
	config.macros.addMonth     = config.macros.addDay;
	config.macros.addYear      = config.macros.addDay;

} // if (DatePicker)

//}}}

// The following are options to modify the behaviour of this wiki
config.options.txtTheme = "MonkeyGTDTheme";
config.options.chkAutoSave = true;
config.options.chkAnimate = false;
config.options.txtBackupFolder = "twbackup";
config.options.chkSaveBackups = true;
config.options.chkDisableWikiLinks = true;