<<option chkGenerateAnRssFeed>> GenerateAnRssFeed\n<<option chkOpenInNewWindow>> OpenLinksInNewWindow\n<<option chkSaveEmptyTemplate>> SaveEmptyTemplate\n<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close\n^^(override with Control or other modifier key)^^\n<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP\n<<option chkForceMinorUpdate>> Treat edits as MinorChanges by preserving date and time\n^^(override with Shift key when clicking 'done' or by pressing Ctrl-Shift-Enter^^\n<<option chkConfirmDelete>> ConfirmBeforeDeleting\nMaximum number of lines in a tiddler edit box: <<option txtMaxEditRows>>\nFolder name for backup files: <<option txtBackupFolder>>\n<<option chkInsertTabs>> Use tab key to insert tab characters instead of jumping to next field
/***\n| Name:|CloseOnCancelPlugin|\n| Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nmerge(config.commands.cancelTiddler,{\n\n handler_orig_closeUnsaved: config.commands.cancelTiddler.handler,\n\n handler: function(event,src,title) {\n this.handler_orig_closeUnsaved(event,src,title);\n if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))\n story.closeTiddler(title,true);\n return false;\n }\n\n});\n\n//}}}\n\n
Name: Green\nBackground: #fff\nForeground: #000\nPrimaryPale: #9b9\nPrimaryLight: #385\nPrimaryMid: #031\nPrimaryDark: #020\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n\n
\n|MonkeyGTDSettings|Change settings|\n|<<selectPalette>>|Change colour scheme|\n|Version|<<tiddler MonkeyGTDVersion>>|\n|[[Upgrade]]|Upgrade to the latest MonkeyGTD|\n|[[Area]]|To add/remove Areas of Responsibilty|\n|[[Realm]]|To add/remove Realms|\n|[[ViewDashboardTemplate]]|This defines the dashboards and lists|\n|[[ViewPanelTemplate]]|This controls the toolbar panels|\n|MainMenu|Defines the menu bar|\n|DefaultTiddlers|Defines what to show at startup|\n|SiteTitle|Site title|\n|SiteSubtitle|Site subtitle|\n|GTDComponent|For advanced use only|\n\n!Notes\n* I have hard coded references to "Professional" and "Personal" in a couple of places so it's better to just use those at least for now.\n* If you add a new context/area etc you won't see it until you click "refresh" on one of your tiddler toolbars\n\n!What's New\n* 24 Oct 06\n** Drop down select for projects and areas as suggested by Ken Girard.\n
//{{{\nconfig.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit\nconfig.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler\nconfig.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist\nconfig.views.editor.defaultText = ""; // don't need message when creating a new tiddler \n//}}}\n
/***\nVersion: $$version$$\nCreates a bunch of shadow tiddlers for the dashboards and panels \n***/\n\n//{{{\nmerge(config.shadowTiddlers,{\n\n'ActionPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag Action\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Realm:</td><td><span macro=\s"checkboxList Realm\s"></span></td></tr>",\n "<tr macro=\s"showWhen tiddler.getProject() == ''\s"><td class=\s"label\s">Area:</td><td><span macro=\s"dropdownSelect Area\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Project:</td><td><span macro=\s"dropdownSelect Project\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Context:</td><td><span macro=\s"checkboxList Context\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Status:</td><td><span macro=\s"checkboxList ActionStatus\s"></span></td></tr>",\n ""\n].join("\sn"),\n\n'ActionTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Actions by Status'",\n " tags:!Done",\n " group:ActionStatus",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Actions by Realm'",\n " group:Realm",\n " tags:!Done",\n " \s"></div>",\n "",\n "",\n "",\n "</td></tr></table>",\n ""\n].join("\sn"),\n\n'AreaDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:Projects",\n " tags:Project",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Next Actions'",\n " tags:'Next && Action && !Done'",\n " view:action_proj",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Waiting For'",\n " tags:'[(Waiting For)] && Action && !Done'",\n " view:action_proj",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Reference'",\n " tags:'Reference'",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Sub Areas'",\n " tags:Area",\n " \s"></div>",\n "",\n "</td>",\n "</td></tr></table>",\n ""\n].join("\sn"),\n\n'AreaPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag Area\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Realm:</td><td><span macro=\s"checkboxList Realm\s"></span></td></tr>",\n "",\n "<tr><td class=\s"label\s"></td><td>",\n " <span macro=\s"newHere title:'New Project' label:'new project' tag: Project GTD\s"></span>",\n " <span macro=\s"newHere title:'New Action' label:'new next action' tag: Action GTD Next\s"></span>",\n " <span macro=\s"newHere title:'New Action' label:'new waiting action' tag: Action GTD 'Waiting For'\s"></span>",\n " <span macro=\s"newHere title:'New Action' label:'new future action' tag: Action GTD\s"></span>",\n "</td></tr>",\n ""\n].join("\sn"),\n\n'AreaTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"33%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Areas by Realm'",\n " group:Realm",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"33%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Projects by Area'",\n " tags:Project",\n " group:Area",\n " mode:global",\n " \s"></div>",\n "",\n "</td>",\n "</tr></table>",\n ""\n].join("\sn"),\n\n'CollectThoughtsTiddlerDash':[\n "",\n "<div macro=\s"collectThoughts\s"></div>",\n ""\n].join("\sn"),\n\n'ContextDash':[\n "<table width=\s"100%\s">",\n "<tr>",\n "<td valign=\s"top\s" width=\s"50%\s">",\n " <div macro=\s"listByTag title:'Next Actions'",\n " tags:'Action && Next && !Done'",\n " view:action_proj",\n " group:Realm",\n " \s"></div>",\n "</td>",\n "<td valign=\s"top\s" width=\s"50%\s">",\n " <div macro=\s"listByTag title:'Waiting For Actions'",\n " tags:'Action && [(Waiting For)] && !Next && !Done'",\n " view:action_proj",\n " group:Realm",\n " \s"></div>",\n "",\n " <div macro=\s"listByTag title:'Future Actions'",\n " tags:'Action && ![(Waiting For)] && !Next && !Done'",\n " view:action_proj",\n " group:Realm",\n " \s"></div>",\n "</td>",\n "</tr>",\n "</table>",\n ""\n].join("\sn"),\n\n'ContextTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Contexts'",\n " \s"></div>",\n "",\n "</td>",\n "</tr></table>",\n ""\n].join("\sn"),\n\n'InboxTiddlerDash':[\n "",\n "<div macro=\s"listByTag\s"",\n " title:'Inbox items'",\n " tags:'Inbox'",\n " ></div>",\n ""\n].join("\sn"),\n\n'MainDashDash':[\n "<table width=\s"100%\s">",\n "<tr>",\n "<td valign=\s"top\s" width=\s"50%\s">",\n "",\n "",\n " <div macro=\s"listByTag title:'Next Actions'",\n " tags:'Action && Next && !Done'",\n " view:action_proj",\n " group:Context",\n " mode:global",\n " \s"></div>",\n "",\n "</td><td valign=\s"top\s">",\n "",\n " <div macro=\s"listByTag title:'Current Ticklers'",\n " tags:'Tickler && !Processed'",\n " view:tickler",\n " sort:tickleDate",\n " where:'tiddler.tickleDate() <= (new Date()).convertToLocalYYYYMMDDHHMM()'",\n " mode:global",\n " \s"></div>",\n "",\n "",\n " <div macro=\s"listByTag title:'Waiting For'",\n " tags:'Action && [(Waiting For)] && !Done'",\n " view:action_proj",\n " group:Context",\n " mode:global",\n " \s"></div>",\n "",\n "",\n "</td>",\n "</tr>",\n "</table>",\n ""\n].join("\sn"),\n\n'MainDashPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag MainDash\s"></span></td></tr>",\n "<tr><td class=\s"label\s"></td><td>",\n " <span macro=\s"newTiddler label:'new project' tag: Project GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new next action' tag: Action Next GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new waiting action' tag: Action GTD 'Waiting For'\s"></span>",\n " <span macro=\s"newTiddler label:'new future action' tag: Action GTD\s"></span>",\n " <span macro=\s"newTiddler title:'New Tickler' label:'new tickler' tag: Tickler GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new context' tag: Context GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new area' tag: Area GTD\s"></span>",\n "</td></tr>",\n ""\n].join("\sn"),\n\n'NextTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"33%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Next Actions by Context'",\n " tags:!Done",\n " view:action_proj",\n " group:Context",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"34%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Next Actions by Realm'",\n " tags:!Done",\n " view:action_proj",\n " group:Realm",\n " \s"></div>",\n "",\n "</td><td width=\s"34%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Next Actions by Project'",\n " tags:!Done",\n " view:action",\n " group:Project",\n " \s"></div>",\n "",\n "",\n "</td></tr></table>",\n ""\n].join("\sn"),\n\n'ProcessInboxTiddlerDash':[\n "",\n "",\n "<div macro=\s"processInbox\s"></div>",\n ""\n].join("\sn"),\n\n'ProjectDash':[\n "<table style=\s"width:100%\s"><tr>",\n "",\n "<td valign=\s"top\s" width=\s"33%\s" cellspacing=\s"0\s" border=\s"0\s">",\n "",\n " <div macro=\s"listByTag title:'Next Actions'",\n " tags:'Action && Next && !Done'",\n " view:action",\n " group:Context",\n " \s"></div>",\n "",\n " <div macro=\s"listByTag title:'Waiting For'",\n " tags:'Action && [(Waiting For)] && !Done'",\n " view:action",\n " \s"></div>",\n "",\n "</td><td valign=\s"top\s" width=\s"34%\s">",\n "",\n " <div macro=\s"listByTag title:'Ticklers'",\n " tags:'Tickler && !Done'",\n " view:tickler",\n " \s"></div>",\n "",\n "",\n " <div macro=\s"listByTag title:'Sub Projects'",\n " tags:'Project'",\n " \s"></div>",\n "",\n " <div macro=\s"listByTag title:'Future Actions'",\n " tags:'Action && ![(Waiting For)] && !Next && !Done'",\n " view:action",\n " \s"></div>",\n "",\n "</td><td valign=\s"top\s" width=\s"33%\s">",\n "",\n " <div macro=\s"listByTag title:'Reference'",\n " tags:'Reference'",\n " \s"></div>",\n "",\n " <div macro=\s"listByTag title:'Recently Done'",\n " tags:'Action && Done'",\n " limit:10",\n " view:action_plain",\n " sortBy:-modified",\n " \s"></div>",\n "",\n "</td>",\n "</tr></table>",\n ""\n].join("\sn"),\n\n'ProjectPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag Project\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Realm:</td><td><span macro=\s"checkboxList Realm\s"></span></td></tr>",\n "<!-- <tr><td class=\s"label\s">Area:</td><td><span macro=\s"checkboxList Area\s"></span></td></tr> -->",\n "<tr macro=\s"showWhenTagged Professional\s"><td class=\s"label\s">Area:</td><td><span macro=\s"dropdownSelect Area && Professional\s"></span></td></tr>",\n "<tr macro=\s"showWhenTagged Personal\s"><td class=\s"label\s">Area:</td><td><span macro=\s"dropdownSelect Area && Personal\s"></span></td></tr>",\n "<tr macro=\s"hideWhen tiddler.tags.containsAny(['Professional','Personal'])\s"><td class=\s"label\s">Area:</td><td><span macro=\s"dropdownSelect Area\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Status:</td><td><span macro=\s"checkboxList ProjectStatus\s"></span></td>",\n "",\n "<tr><td class=\s"label\s"></td><td>",\n " <span macro=\s"deleteAllTagged 'remove project' delete\s"></span>",\n "</td></tr>",\n "<tr><td class=\s"label\s"></td><td>",\n " <span macro=\s"newHere title:'New Action' label:'new next action' tag: Action Next GTD\s"></span>",\n " <span macro=\s"newHere title:'New Action' label:'new waiting action' tag: Action GTD 'Waiting For'\s"></span>",\n " <span macro=\s"newHere title:'New Action' label:'new future action' tag: Action GTD\s"></span>",\n " <span macro=\s"newHere label:'new sub-project' tag: Project GTD\s"></span>",\n " <span macro=\s"newHere title:'New Tickler' label:'new tickler' tag: Tickler GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new context' tag: Context GTD\s"></span>",\n " <span macro=\s"newTiddler label:'new area' tag: Area GTD\s"></span>",\n "</td></tr>",\n ""\n].join("\sn"),\n\n'ProjectTiddlerDash':[\n "<!-- ******************************* -->",\n "<!-- contributed by Michael Lockhart -->",\n "<!-- ******************************* -->",\n "",\n "<!--",\n "~MJL20070205 - Customized Project Tiddler.",\n "This overrides the ProjectTiddlerDash shadow tiddler from MonkeyGTD 2.1 alpha r77 with a new dashboard focussing on",\n "the GTD weekly review task. I have added these features:",\n "",\n " * An ability to see Completed projects and to remove old tasks via the DeleteDoneTasks macro",\n " * Separate out the Someday/Maybe projects to help with assessing if any can be activated",\n " * GTD Weekly Review instructions",\n " * Inspiration for new ideas during review",\n " * A link to a Review How To tiddler that guides me through the GTD process",\n "",\n "-->",\n "",\n "<div style=\s"margin-top:1em;\s" macro=\s"tiddler ReviewTips\s"></div>",\n "",\n "<table width=\s"100%\s"><tr>",\n "",\n "<td style=\s"vertical-align:top\s" width=\s"50%\s">",\n "",\n "<div macro=\s"listByTag title:'Projects by Area'",\n " tags:'!Complete && !Someday/Maybe'",\n " group:Area",\n " view:showstar",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Someday/Maybe Projects'",\n " mode:global",\n " tags:'Someday/Maybe && !Complete'",\n " view:showstar",\n " group:Area",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Completed Projects'",\n " mode:global",\n " tags:'Complete'",\n " view:showstar",\n " group:Area",\n " \s"></div>",\n "",\n "<div macro=\s"deleteDone daysOld:20 title:'Delete Old Actions' \s"></div>",\n "",\n "</td>",\n "",\n "<td valign=\s"top\s" width=\s"50%\s">",\n "<div macro=\s"listByTag title:'Actions by Project'",\n " mode:global",\n " tags:'Action && Next && !Done && !Someday/Maybe'",\n " view:action",\n " group:Project",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Projects that need a next action'",\n " mode:global",\n " tags:'Action && !Done && (Next || [(Waiting For)])'",\n " group:'Project && !Someday/Maybe && !Complete'",\n " onlyShowEmpty:yes",\n " \s"></div>",\n "",\n "</td>",\n "",\n "</tr></table>",\n "",\n "",\n "",\n "",\n "",\n "<!-- old version -->",\n "<!-- ",\n "",\n "<table width=\s"100%\s"><tr>",\n "<td style=\s"vertical-align:top\s" width=\s"50%\s">",\n "",\n "<div macro=\s"listByTag title:'Projects by Area'",\n " tags:!Complete",\n " group:Area",\n " view:showstar",\n " \s"></div>",\n "",\n "</td>",\n "",\n "<td valign=\s"top\s" width=\s"50%\s">",\n "<div macro=\s"listByTag title:'Actions by Project'",\n " mode:global",\n " tags:'Action && Next && !Done'",\n " view:action",\n " group:Project",\n " \s"></div>",\n "</td>",\n "",\n "</tr></table>",\n "",\n "",\n "-->",\n ""\n].join("\sn"),\n\n'RealmDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Next Actions'",\n " tags:'Next && Action && !Done && ![(Waiting For)]'",\n " view:action_proj",\n " group:Context",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Waiting For'",\n " tags:'[(Waiting For)] && Action && !Done'",\n " view:action_proj",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "",\n "<div macro=\s"listByTag title:Projects",\n " tags:'Project && !Complete && ![(Someday/Maybe)]'",\n " group:Area",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "<div macro=\s"listByTag title:'Someday/Maybe'",\n " tags:'Project && !Complete && [(Someday/Maybe)]'",\n " group:Area",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "",\n "<div macro=\s"listByTag title:Areas",\n " tags:Area",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "</td></tr></table>",\n ""\n].join("\sn"),\n\n'RealmPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag Realm\s"></span></td></tr>",\n "",\n "<tr><td class=\s"label\s"></td><td>",\n " <span macro=\s"newHere label:'new area' tag: Area GTD\s"></span>",\n " <span macro=\s"newHere label:'new project' tag: Project GTD\s"></span>",\n "</td></tr>",\n ""\n].join("\sn"),\n\n'RealmTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"33%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Realms'",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "</td>",\n "<td width=\s"33%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Areas by Realm'",\n " tags:Area",\n " group:Realm",\n " mode:global",\n " ignoreRealm:yes",\n " \s"></div>",\n "",\n "",\n "",\n "</td>",\n "",\n "</tr></table>",\n ""\n].join("\sn"),\n\n'StarredTiddlerDash':[\n "",\n "<table width=\s"100%\s"><tr>",\n "<td style=\s"vertical-align:top\s" width=\s"50%\s">",\n "",\n " <div macro=\s"listByTag title:'Starred Next Actions'",\n " tags:'Action && Next && Starred && !Done'",\n " group:Context",\n " view:action",\n " \s"></div>",\n "",\n " <div macro=\s"listByTag title:'Starred Waiting For Actions'",\n " tags:'Action && [(Waiting For)] && Starred && !Done'",\n " group:Context",\n " view:action",\n " \s"></div>",\n "",\n "",\n "</td>",\n "",\n "<td valign=\s"top\s" width=\s"50%\s">",\n " <div macro=\s"listByTag title:'Starred'",\n " tags:'Starred && !Complete && !Done && !Action'",\n " group:GTDComponent",\n " view:showstar",\n " \s"></div>",\n "</td>",\n "",\n "</tr></table>",\n "",\n "",\n ""\n].join("\sn"),\n\n'TicklerPanel':[\n "<tr><td class=\s"label\s">Type:</td><td><span macro=\s"toggleTag Tickler\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Realm:</td><td><span macro=\s"checkboxList Realm\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Processed:</td><td><span macro=\s"toggleTag Processed\s"></span></td></tr>",\n "<tr><td class=\s"label\s">Tickler:</td><td>",\n " <table class=\s"ticklerDate\s">",\n " <tr>",\n " <td macro=\s"hideWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'\s" align=\s"right\s"><span macro=\s"view mgtd.tday\s"></span></td>",\n " <td macro=\s"showWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'\s" align=\s"right\s"><span macro=\s"view mgtd.tmonth\s"></span></td>",\n " <td>/</td>",\n " <td macro=\s"hideWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'\s" align=\s"center\s"><span macro=\s"view mgtd.tmonth\s"></span></td>",\n " <td macro=\s"showWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'\s" align=\s"center\s"><span macro=\s"view mgtd.tday\s"></span></td>",\n " <td>/</td>",\n " <td align=\s"left\s" macro=\s"view mgtd.tyear\s"></td>",\n " </tr>",\n " </table>",\n "</td></tr>",\n ""\n].join("\sn"),\n\n'TicklerTiddlerDash':[\n "<table width=\s"100%\s"><tr>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Current Ticklers'",\n " tags:'!Processed'",\n " view:tickler",\n " sort:tickleDate",\n " where:'tiddler.tickleDate() <= (new Date()).convertToLocalYYYYMMDDHHMM()'",\n " \s"></div>",\n "",\n "",\n "",\n "</td>",\n "<td width=\s"50%\s" style=\s"vertical-align:top\s">",\n "",\n "<div macro=\s"listByTag title:'Upcoming Ticklers'",\n " tags:'!Processed'",\n " view:tickler",\n " sort:tickleDate",\n " where:'tiddler.tickleDate() > (new Date()).convertToLocalYYYYMMDDHHMM()'",\n " \s"></div>",\n "",\n "<!--",\n "<div macro=\s"listByTag title:'Ticklers by Project'",\n " group:Project",\n " \s"></div>",\n "-->",\n "",\n "",\n "</td></tr></table>",\n ""\n].join("\sn")\n\n});\n//}}}\n
[[demo]]\n[[MainMenu]]
/***\n|Name|DeleteAllTaggedPlugin|\n|Source|http://ido-xp.tiddlyspot.com/#DeleteAllTaggedPlugin|\n|Version|1.0|\n\nAn adaptation of DeleteDoneTasks (Simon Baird) by Ido Magal\nTo use this insert {{{<<deleteAllTagged>>}}} into the desired tiddler.\n\nExample usage:\n{{{<<deleteAllTagged>>}}}\n<<deleteAllTagged>>\n***/\n//{{{\n\nconfig.macros.deleteAllTagged = {\n handler: function ( place,macroName,params,wikifier,paramString,tiddler ) {\n var buttonTitle = params[0] ? params[0] : "Delete Tagged w/ '"+tiddler.title+"'"; // simon's tweak\n var alsoDeleteThisTiddler = params[1] ? params[1] : "";\n createTiddlyButton( place, buttonTitle, "Delete every tiddler tagged with '"+tiddler.title+"'", this.deleteAllTagged( tiddler.title, alsoDeleteThisTiddler == "delete" ));\n },\n\n deleteAllTagged: function(tag,deleteMe) {\n return function() {\n var collected = [];\n store.forEachTiddler( function ( title,tiddler ) {\n if ( tiddler.tags.contains( tag ))\n {\n collected.push( title );\n }\n });\n if ( collected.length == 0 )\n {\n alert( "No tiddlers found tagged with '"+tag+"'." );\n }\n else\n {\n if ( confirm( "These tiddlers are tagged with '"+tag+"'\sn'"\n + collected.join( "', '" ) + "'\sn\sn\sn"\n + "Are you sure you want to delete these?" ))\n {\n for ( var i=0;i<collected.length;i++ )\n {\n store.deleteTiddler( collected[i] );\n story.closeTiddler( collected[i], true );\n displayMessage( "Deleted '"+collected[i]+"'" );\n }\n }\n }\n if (deleteMe)\n {\n if ( confirm( "Also delete this tiddler ('"+tag+"')?" ) )\n {\n store.deleteTiddler( tag );\n story.closeTiddler( tag, true );\n displayMessage( "Deleted '"+tag+"'" );\n }\n }\n }\n }\n};\n\n//}}}\n\n\n/***\nExample usage:\n{{{<<deleteDone>>}}}\n<<deleteDone>>\n{{{<<deleteDone daysOld:20 title:'delete old'>>}}}\n<<deleteDone daysOld:30 title:'delete old'>>\n\nTODO merge these two\n\n***/\n//{{{\n\n\n\n\nconfig.macros.deleteDone = {\n handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n var namedParams = (paramString.parseParams('daysOld'))[0];\n var daysOld = namedParams['daysOld'] ? namedParams['daysOld'][0] : 30; // default\n var buttonTitle = namedParams['title'] ? namedParams['title'][0] : "Delete Done Actions";\n createTiddlyButton(place,buttonTitle,"Delete done actions older than "+daysOld+" days old",this.deleteDone(daysOld));\n },\n\n deleteDone: function(daysOld) {\n return function() {\n var collected = [];\n var compareDate = new Date();\n compareDate.setDate(compareDate.getDate() - daysOld);\n store.forEachTiddler(function (title,tiddler) {\n if (tiddler.tags.containsAll(["Action","Done"])\n && tiddler.modified < compareDate) {\n collected.push(title);\n }\n });\n if (collected.length == 0) {\n alert("No done actions found older than "+daysOld+" days");\n }\n else {\n if (confirm("Done actions older than "+daysOld+" days:\sn'"\n + collected.join("', '") + "'\sn\sn\sn"\n + "Are you sure you want to delete these actions?")) {\n for (var i=0;i<collected.length;i++) {\n store.removeTiddler(collected[i]);\n displayMessage("Deleted '"+collected[i]+"'");\n story.closeTiddler( collected[i], true );\n }\n }\n }\n }\n }\n};\n\n//}}}\n\n
\n<div style="display:none" macro="showWhen tiddler.tags.containsAll(['GTD','Action']) || tiddler.title == 'New Action'">\n <span>Project field (not used yet):</span><span macro="edit mgtd.project"></span>\n</div>\n<div macro="showWhen tiddler.tags.containsAll(['GTD','Tickler']) || tiddler.title == 'New Tickler'">\n\n <table>\n <tr><td class="editLabel" valign="top" rowspan="2">Tickler</td>\n <!-- TODO make a utility method for this sort of thing -->\n <td macro="showWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'" class="editLabel">Month</td>\n <td class="editLabel">Day</td>\n <td macro="hideWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'" class="editLabel">Month</td>\n <td class="editLabel">Year</td></tr>\n <tr>\n <td macro="showWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'" ><span class="shorterEdit" macro="edit mgtd.tmonth"></span></td>\n <td><span class="shorterEdit" macro="edit mgtd.tday"></span></td>\n <td macro="hideWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'" ><span class="shorterEdit" macro="edit mgtd.tmonth"></span></td>\n <td><span class="shorterEdit" macro="edit mgtd.tyear"></span></td>\n </tr>\n </table>\n\n</div>\n\n
<div class="toolbar" macro="toolbar +saveTiddler saveCloseTiddler closeOthers -cancelTiddler cancelCloseTiddler deleteTiddler"></div>\n<div class="title" macro="view title"></div>\n<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>\n<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>\n<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>\n<div macro="showWhenExists EditPanelTemplate">[[EditPanelTemplate]]</div>\n<div class="editor" macro="edit text"></div>\n\n
This tiddler title should appear in ''bold'' in the new "Merged" tiddler
These tiddlers are important so don't delete them.
/***\n|!Plugin Name|GtdCompletedProjects|\n|!Description:|List completed projets|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|1.0.0|\n|!Date:|2010/06/02|\n|!Usage|<////<GtdCompletedProjects>////>|\n|!Source:| |\n\n!History\n* 2010/06/02 v1.0.0 - Initial version\n\n!Code\n***/\n\n//{{{\n\nversion.extensions.GtdCompletedProjects= {major: 1, minor: 0 , revision: 0, date: new Date(2010,06, 02)};\n//Created by Jean Buchet, ideas taken from GtdStats\n\nconfig.macros.GtdCompletedProjects= {\n noProjects: "No projects found"\n};\n\nconfig.macros.GtdCompletedProjects.handler = function(place,macroName,params) {\n\n var GtdStatsWrapper = createTiddlyElement(place,"div",null,"GtdCompletedProjects",null);\n var completed_projects= [];\n var results = "" ;\n\n store.forEachTiddler( function ( title,tiddler ) {\n if ( tiddler.tags.contains( "Project" )) {\n if (tiddler.tags.contains("Complete" )) {\n completed_projects.push( title );\n } \n }\n });\n if ( completed_projects.length == 0 ) {\n wikify("No completed project found", place);\n } else {\n results="Completed projects:" ;\n for ( var i=0;i<completed_projects.length;i++ ) {\n results=results+" [["+completed_projects[i] + "]]" ; \n }\n\n wikify(results, place);\n \n }\n\n}\n\n//}}}\n
Brought to you by [[JeanBuchet]]' GtdStatsMacro and GtdCompletedProjectsMacro plugins.\n\n<<GtdStats>>\n<<GtdCompletedProjects>>
/***\n|!Plugin Name|GtdStats|\n|!Description:|Collect statistics about projects completion|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|2.2.0|\n|!Date:|2008/10/15|\n|!Usage|<////<GtdStats>////>|\n|!Source:| |\n\n!History\n* 2010/06/02 v2.2.0 - Completed projects are not listed anymore\n* 2008/12/19 v2.1.2 - Code simplification\n* 2008/10/16 version 2.1.0\n** Some code cleaning\n* 2008/10/15 version 2.0.0\n** took interesting ideas from TagglyTagCloud macro and TagglyListPlugin\n** converted to a macro\n** output into a tiddler\n** data showed as a table and as text/cvs \n** project names are links to the corresponding project tiddler\n* 2008/10/04 version 1.0.0\n** First version as a command button\n** output to the upper right corner notification popup\n\n!Code\n***/\n\n//{{{\n\nversion.extensions.GtdStats= {major: 2, minor: 1 , revision: 1, date: new Date(2005,10, 15)};\n//Created by Jean Buchet, ideas taken from TagCloud \n\nconfig.macros.GtdStats= {\n noProjects: "No projects found"\n};\n\nfunction repeat_string(repeatString, repeatNum) {\n var newString = "";\n for (var x=1; x<=parseInt(repeatNum, 10); x++) {\n newString = newString + repeatString;\n }\n return (newString) ;\n} \n\nconfig.macros.GtdStats.handler = function(place,macroName,params) {\n\n var GtdStatsWrapper = createTiddlyElement(place,"div",null,"GtdStats",null);\n var projects= [];\n var results = "" ;\n var next=0;\n var future=0;\n var done=0;\n var waitfor=0;\n\n\n store.forEachTiddler( function ( title,tiddler ) {\n if ( tiddler.tags.contains( "Project" )) {\n if (! tiddler.tags.contains("Complete" )) {\n projects.push( title );\n }\n }\n });\n if ( projects.length == 0 ) {\n wikify("''No project found''", place);\n } else {\n var tot_next=0;\n var tot_future=0;\n var tot_done=0;\n var tot_waitfor=0;\n var tot_pct=0;\n\n var pct = 0\n var grph = "";\n\n // generate table header\n \n results="|!Projects|!Actions|!Mass|!Done!|!Todo|!Future|!% done|!Completion|!W/for|!Adherence|";\n\n for ( var i=0;i<projects.length;i++ ) {\n next=0;\n future=0;\n done=0;\n waitfor=0;\n store.forEachTiddler( function ( title, tiddler ) {\n if (tiddler.tags.contains( "Action")) {\n if ( tiddler.tags.contains(projects[i]) ) {\n if (tiddler.tags.contains("Done") ) { done = done + 1 ; }\n else if (tiddler.tags.contains("Next") ) { next = next + 1 ; }\n else if (tiddler.tags.contains("Waiting For") ) { waitfor = waitfor + 1 ; }\n else { future =future + 1 ; }\n }\n }\n });\n\n if ( (next+future+done) == 0 ) {\n pct = 0 ;\n } else {\n pct = done/(next+future+done) ;\n }\n grph = repeat_string("l", Math.round(pct*50) )+ "-" + repeat_string(".", Math.round((1-pct)*50) ) ;\n\n results=results+"\sn"+"|[["+projects[i] +"]]|"+ (next+future+done) +"|"+ repeat_string("X", (next+future+done)) +"|"+ done +"|"+ next +"|"+ future +"|"+ (Math.round(1000 * pct)/10) +" % " +"|"+ grph +"|"+ waitfor +"|"+ repeat_string("X", waitfor) +"|";\n tot_next+=next;\n tot_future+=future;\n tot_done+=done;\n tot_waitfor+=waitfor;\n }\n\n if ( (tot_next+tot_future+tot_done) == 0 ) {\n tot_pct = 0 ;\n } else {\n tot_pct = tot_done/(tot_next+tot_future+tot_done) ;\n }\n\n grph = repeat_string("l", Math.round(tot_pct*50) )+ "-" + repeat_string(".", Math.round((1-tot_pct)*50) ) ;\n\n results=results+"\sn"+"|!"+projects.length+" project(s)|!"+ (tot_next+tot_future+tot_done) +"|!Mass"+"|!"+ tot_done +" done|!"+ tot_next +" next|!"+ tot_future +" future|!"+ (Math.round(1000 * tot_pct)/10) +" % done" +"|!"+ grph +"|!"+ tot_waitfor +" w/for|!|";\n\n wikify(results, place);\n \n }\n\n}\n\n//}}}\n
/***\n| Name:|HideWhenPlugin|\n| Description:|Allows conditional inclusion/exclusion in templates|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\nFor use in ViewTemplate and EditTemplate. Eg\n{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}\n{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}\n***/\n//{{{\n\nwindow.removeElementWhen = function(test,place) {\n if (test) {\n removeChildren(place);\n place.parentNode.removeChild(place);\n }\n};\n\nmerge(config.macros,{\n\n hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( eval(paramString), place);\n }},\n\n showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !eval(paramString), place);\n }},\n\n hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( tiddler.tags.containsAll(params), place);\n }},\n\n showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !tiddler.tags.containsAll(params), place);\n }},\n\n hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( tiddler.tags.containsAny(params), place);\n }},\n\n showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !tiddler.tags.containsAny(params), place);\n }},\n\n hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);\n }},\n\n showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);\n }}\n\n});\n\n//}}}\n\n
<<importTiddlers>>
Inbox Related tiddlers
/***\n|Name|InlineJavascriptPlugin|\n|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|\n|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|\n|Version|1.9.3|\n|Author|Eric Shulman - ELS Design Studios|\n|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|~CoreVersion|2.1|\n|Type|plugin|\n|Requires||\n|Overrides||\n|Description|Insert Javascript executable code directly into your tiddler content.|\n''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Documentation\n>see [[InlineJavascriptPluginInfo]]\n!!!!!Revisions\n<<<\n2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()\n2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")\n2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)\n2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.\n|please see [[InlineJavascriptPluginInfo]] for additional revision details|\n2005.11.08 [1.0.0] initial release\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};\n\nconfig.formatters.push( {\n name: "inlineJavascript",\n match: "\s\s<script",\n lookahead: "\s\s<script(?: src=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: label=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: title=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: key=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?( show)?\s\s>((?:.|\s\sn)*?)\s\s</script\s\s>",\n\n handler: function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {\n var src=lookaheadMatch[1];\n var label=lookaheadMatch[2];\n var tip=lookaheadMatch[3];\n var key=lookaheadMatch[4];\n var show=lookaheadMatch[5];\n var code=lookaheadMatch[6];\n if (src) { // load a script library\n // make script tag, set src, add to body to execute, then remove for cleanup\n var script = document.createElement("script"); script.src = src;\n document.body.appendChild(script); document.body.removeChild(script);\n }\n if (code) { // there is script code\n if (show) // show inline script code in tiddler output\n wikify("{{{\sn"+lookaheadMatch[0]+"\sn}}}\sn",w.output);\n if (label) { // create a link to an 'onclick' script\n // add a link, define click handler, save code in link (pass 'place'), set link attributes\n var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));\n var fixup=code.replace(/document.write\ss*\s(/gi,'place.bufferedHTML+=(');\n link.code="function _out(place){"+fixup+"\sn};_out(this);"\n link.tiddler=w.tiddler;\n link.onclick=function(){\n this.bufferedHTML="";\n try{ var r=eval(this.code);\n if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)\n var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);\n if(this.bufferedHTML.length)\n s.innerHTML=this.bufferedHTML;\n if((typeof(r)==="string")&&r.length) {\n wikify(r,s,null,this.tiddler);\n return false;\n } else return r!==undefined?r:false;\n } catch(e){alert(e.description||e.toString());return false;}\n };\n link.setAttribute("title",tip||"");\n var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';\n URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\sn/g,' ')));\n URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';\n link.setAttribute("href",URIcode);\n link.style.cursor="pointer";\n if (key) link.accessKey=key.substr(0,1); // single character only\n }\n else { // run inline script code\n var fixup=code.replace(/document.write\ss*\s(/gi,'place.innerHTML+=(');\n var code="function _out(place){"+fixup+"\sn};_out(w.output);"\n try { var out=eval(code); } catch(e) { out=e.description?e.description:e.toString(); }\n if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);\n }\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n} )\n//}}}\n\n// // Backward-compatibility for TW2.1.x and earlier\n//{{{\nif (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {\n if(limit > 0) text = text.substr(0,limit);\n var wikifier = new Wikifier(text,formatter,null,tiddler);\n return wikifier.wikifyPlain();\n}\n//}}}\n\n// // $(...) function: 'shorthand' convenience syntax for document.getElementById()\n//{{{\nif (typeof($)=="undefined") { // avoid redefinition\nfunction $() {\n var elements=new Array();\n for (var i=0; i<arguments.length; i++) {\n var element=arguments[i];\n if (typeof element=='string') element=document.getElementById(element);\n if (arguments.length==1) return element;\n elements.push(element);\n }\n return elements;\n}\n}\n//}}}
/***\n|Name|InlineJavascriptPluginInfo|\n|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|\n|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|\n|Version|1.9.3|\n|Author|Eric Shulman - ELS Design Studios|\n|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|~CoreVersion|2.1|\n|Type|documentation|\n|Requires||\n|Overrides||\n|Description|Documentation for InlineJavascriptPlugin|\n''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Usage\n<<<\nThis plugin adds wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be recognized as embedded javascript code.\n<script show>\n /* javascript code goes here... */\n</script>Every time the tiddler content is rendered, the javascript code is automatically evaluated, allowing you to invoke 'side-effect' processing and/or produce dynamically-generated content that is then inserted into the tiddler content, immediately following the script (see below). By including the optional ''show'' keyword as the final parameter in a {{{<script>}}} marker, the plugin will also include the script source code in the output that it displays in the tiddler. This is helpful when creating examples for documentation purposes (such as used in this tiddler!)\n\n__''Deferred execution from an 'onClick' link''__\n<script label="click here" title="mouseover tooltip text" key="X" show>\n /* javascript code goes here... */\n alert('you clicked on the link!');\n</script>\nBy including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered. You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text, and a {{{key="X"}}} parameter to specify an //access key// (which must be a //single// letter or numeric digit only).\n\n__''Loading scripts from external source files''__\n<script src="URL" show>\n /* optional javascript code goes here... */\n</script>You can also load javascript directly from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.\n\nIn addition to loading the javascript from the external file, you can also use this feature to invoke javascript code contained within the {{{<script>...</script>}}} markers. This code is invoked //after// the external script file has been processed, and can make immediate use of the functions and/or global variables defined by the external script file.\n>Note: To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that is rendered as soon as your TiddlyWiki document is opened, such as MainMenu. For example: put your {{{<script src="..."></script>}}} syntax into a separate 'library' tiddler (e.g., LoadScripts), and then add {{{<<tiddler LoadScripts>>}}} to MainMenu so that the library is loaded before any other tiddlers that rely upon the functions it defines. \n>\n>Normally, loading external javascript in this way does not produce any direct output, and should not have any impact on the appearance of your MainMenu. However, if your LoadScripts tiddler contains notes or other visible content, you can suppress this output by using 'inline CSS' in the MainMenu, like this: {{{@@display:none;<<tiddler LoadScripts>>@@}}}\n<<<\n!!!!!Creating dynamic tiddler content and accessing the ~TiddlyWiki DOM\n<<<\nAn important difference between TiddlyWiki inline scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document: in a typical web document, you use the {{{document.write()}}} (or {{{document.writeln()}}}) function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.\n\nHowever, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and instead will //completely replace the entire ~TiddlyWiki document in your browser window (which is clearly not a good thing!)//. In order to allow scripts to use {{{document.write()}}}, the plugin automatically converts and buffers all HTML output so it can be safely inserted into your tiddler content, immediately following the script.\n\n''Note that {{{document.write()}}} can only be used to output "pure HTML" syntax. To produce //wiki-formatted// output, your script should instead return a text value containing the desired wiki-syntax content'', which will then be automatically rendered immediately following the script. If returning a text value is not sufficient for your needs, the plugin also provides an automatically-defined variable, 'place', that gives the script code ''direct access to the //containing DOM element//'' into which the tiddler output is being rendered. You can use this variable to ''perform direct DOM manipulations'' that can, for example:\n* generate wiki-formatted output using {{{wikify("...content...",place)}}}\n* vary the script's actions based upon the DOM element in which it is embedded\n* access 'tiddler-relative' DOM information using {{{story.findContainingTiddler(place)}}}\nNote:\n''When using an 'onclick' script, the 'place' element actually refers to the onclick //link text// itself, instead of the containing DOM element.'' This permits you to directly reference or modify the link text to reflect any 'stateful' conditions that might set by the script. To refer to the containing DOM element from within an 'onclick' script, you can use "place.parentNode" instead.\n<<<\n!!!!!Instant "bookmarklets"\n<<<\nYou can also use an 'onclick' link to define a "bookmarklet": a small piece of javascript that can be ''invoked directly from the browser without having to be defined within the current document.'' This allows you to create 'stand-alone' commands that can be applied to virtually ANY TiddlyWiki document... even remotely-hosted documents that have been written by others!! To create a bookmarklet, simply define an 'onclick' script and then grab the resulting link text and drag-and-drop it onto your browser's toolbar (or right-click and use the 'bookmark this link' command to add it to the browser's menu).\n\nNotes:\n*When writing scripts intended for use as bookmarklets, due to the ~URI-encoding required by the browser, ''you cannot not use ANY double-quotes (") within the bookmarklet script code.''\n*All comments embedded in the bookmarklet script must ''use the fully-delimited {{{/* ... */}}} comment syntax,'' rather than the shorter {{{//}}} comment syntax.\n*Most importantly, because bookmarklets are invoked directly from the browser interface and are not embedded within the TiddlyWiki document, there is NO containing 'place' DOM element surrounding the script. As a result, ''you cannot use a bookmarklet to generate dynamic output in your document,'' and using {{{document.write()}}} or returning wiki-syntax text or making reference to the 'place' DOM element will halt the script and report a "Reference Error" when that bookmarklet is invoked. \nPlease see [[InstantBookmarklets]] for many examples of 'onclick' scripts that can also be used as bookmarklets.\n<<<\n!!!!!Special reserved function name\n<<<\nThe plugin 'wraps' all inline javascript code inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.\n<<<\n!!!!!$(...) 'shorthand' function\n<<<\nAs described by Dustin Diaz [[here|http://www.dustindiaz.com/top-ten-javascript/]], the plugin defines a 'shorthand' function that allows you to write:\n{{{\n$(id)\n}}}\nin place of the normal standard javascript syntax:\n{{{\ndocument.getElementById(id)\n}}}\nThis function is provided merely as a convenience for javascript coders that may be familiar with this abbreviation, in order to allow them to save a few bytes when writing their own inline script code.\n<<<\n!!!!!Examples\n<<<\nsimple dynamic output:\n><script show>\n document.write("The current date/time is: "+(new Date())+"<br>");\n return "link to current user: [["+config.options.txtUserName+"]]\sn";\n</script>\ndynamic output using 'place' to get size information for current tiddler:\n><script show>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).getAttribute("tiddler");\n var size=store.getTiddlerText(title).length;\n return title+" is using "+size+" bytes";\n</script>\ndynamic output from an 'onclick' script, using {{{document.write()}}} and/or {{{return "..."}}}\n><script label="click here" show>\n document.write("<br>The current date/time is: "+(new Date())+"<br>");\n return "link to current user: [["+config.options.txtUserName+"]]\sn";\n</script>\ncreating an 'onclick' button/link that accesses the link text AND the containing tiddler:\n><script label="click here" title="clicking this link will show an 'alert' box" key="H" show>\n if (!window.story) window.story=window;\n var txt=place.firstChild.data;\n var tid=story.findContainingTiddler(place).getAttribute('tiddler');\n alert('Hello World!\snlinktext='+txt+'\sntiddler='+tid);\n</script>\ndynamically setting onclick link text based on stateful information:\n>{{block{\n{{{\n<script label="click here">\n /* toggle "txtSomething" value */\n var on=(config.txtSomething=="ON");\n place.innerHTML=on?"enable":"disable";\n config.txtSomething=on?"OFF":"ON";\n return "\snThe current value is: "+config.txtSomething;\n</script><script>\n /* initialize onclick link text based on current "txtSomething" value */\n var on=(config.txtSomething=="ON");\n place.lastChild.previousSibling.innerHTML=on?"disable":"enable";\n</script>\n}}}\n<script label="click here">\n /* toggle "txtSomething" value */\n var on=(config.txtSomething=="ON");\n place.innerHTML=on?"enable":"disable";\n config.txtSomething=on?"OFF":"ON";\n return "\snThe current value is: "+config.txtSomething;\n</script><script>\n /* initialize onclick link text based on current "txtSomething" value */\n var on=(config.txtSomething=="ON");\n place.lastChild.innerHTML=on?"enable":"disable";\n</script>\n}}}\nloading a script from a source url:\n>http://www.TiddlyTools.com/demo.js contains:\n>>{{{function inlineJavascriptDemo() { alert('Hello from demo.js!!') } }}}\n>>{{{displayMessage('InlineJavascriptPlugin: demo.js has been loaded');}}}\n>note: When using this example on your local system, you will need to download the external script file from the above URL and install it into the same directory as your document.\n>\n><script src="demo.js" show>\n return "inlineJavascriptDemo() function has been defined"\n</script>\n><script label="click to invoke inlineJavascriptDemo()" key="D" show>\n inlineJavascriptDemo();\n</script>\n<<<\n!!!!!Revisions\n<<<\n2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()\n2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")\n2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)\n2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.\n2008.02.14 [1.8.1] added backward-compatibility for use of wikifyPlainText() in TW2.1.3 and earlier\n2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler\n2007.12.28 [1.8.0] added support for key="X" syntax to specify custom access key definitions\n2007.12.15 [1.7.0] autogenerate URI encoded HREF on links for onclick scripts. Drag links to browser toolbar to create bookmarklets. IMPORTANT NOTE: place is NOT defined when scripts are used as bookmarklets. In addition, double-quotes will cause syntax errors. Thanks to PaulReiber for debugging and brainstorming.\n2007.11.26 [1.6.2] when converting "document.write()" function calls in inline code, allow whitespace between "write" and "(" so that "document.write ( foobar )" is properly converted.\n2007.11.16 [1.6.1] when rendering "onclick scripts", pass label text through wikifyPlainText() to parse any embedded wiki-syntax to enable use of HTML entities or even TW macros to generate dynamic label text.\n2007.02.19 [1.6.0] added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script\n2006.10.16 [1.5.2] add newline before closing '}' in 'function out_' wrapper. Fixes error caused when last line of script is a comment.\n2006.06.01 [1.5.1] when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly\n2006.04.19 [1.5.0] added 'show' parameter to force display of javascript source code in tiddler output\n2006.01.05 [1.4.0] added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.\n2005.12.13 [1.3.1] when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski\n2005.11.09 [1.3.0] for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck\n2005.11.08 [1.2.0] handle loading of javascript from an external URL via src="..." syntax\n2005.11.08 [1.1.0] pass 'place' param into scripts to provide direct DOM access \n2005.11.08 [1.0.0] initial release\n<<<
//{{{\nconfig.formatters.unshift( {\n name: "inlinesliders",\n match: "\s\s+\s\s+\s\s+\s\s+|\s\s<slider",\n lookaheadRegExp: /(?:\s+\s+\s+\s+|<slider) ([\sw\ss]*)(?:>?)\sn((?:.|\sn)*?)\sn(?:====|<\s/slider>)/mg,\n handler: function(w)\n {\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart )\n {\n var btn = createTiddlyButton(w.output,lookaheadMatch[1] + " "+"\su00BB",lookaheadMatch[1],this.onClickSlider,"button sliderButton");\n var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");\n panel.style.display = "none";\n wikify(lookaheadMatch[2],panel);\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n },\n onClickSlider : function(e)\n {\n if(!e) var e = window.event;\n var n = this.nextSibling;\n n.style.display = (n.style.display=="none") ? "block" : "none";\n return false;\n }\n});\n//}}}
//{{{\n\n// By Lewcid\n// http://tw.lewcid.org/sandbox/#InlineTabsPlugin\n\nconfig.formatters.unshift( {\n name: "inlinetabs",\n match: "\s\s<tabs",\n lookaheadRegExp: /(?:<tabs (.*)>\sn)((?:.|\sn)*?)(?:\sn<\s/tabs>)/mg,\n handler: function(w)\n {\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var cookie = lookaheadMatch[1];\n var wrapper = createTiddlyElement(null,"div",null,cookie);\n var tabset = createTiddlyElement(wrapper,"div",null,"tabset");\n tabset.setAttribute("cookie",cookie);\n var validTab = false;\n var firstTab = '';\n var tabregexp = /(?:<tab (.*)>)(?:(?:\sn)?)((?:.|\sn)*?)(?:<\s/tab>)/mg;\n while((m = tabregexp.exec(lookaheadMatch[2])) != null)\n {\n if (firstTab == '') firstTab = m[1];\n var tab = createTiddlyButton(tabset,m[1],m[1],story.onClickInlineTab,"tab tabUnselected");\n tab.setAttribute("tab",m[1]);\n tab.setAttribute("content",m[2]);\n tab.title = m[1];\n if(config.options[cookie] == m[1])\n validTab = true;\n }\n if(!validTab)\n config.options[cookie] = firstTab;\n w.output.appendChild(wrapper);\n story.switchInlineTab(tabset,config.options[cookie]);\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n})\n\nStory.prototype.switchInlineTab = function(tabset,tab)\n{\n var cookie = tabset.getAttribute("cookie");\n var theTab = null\n var nodes = tabset.childNodes;\n for(var t=0; t<nodes.length; t++)\n if(nodes[t].getAttribute && nodes[t].getAttribute("tab") == tab)\n {\n theTab = nodes[t];\n theTab.className = "tab tabSelected";\n }\n else\n nodes[t].className = "tab tabUnselected"\n if(theTab)\n {\n if(tabset.nextSibling && tabset.nextSibling.className == "tabContents")\n tabset.parentNode.removeChild(tabset.nextSibling);\n var tabContent = createTiddlyElement(null,"div",null,"tabContents");\n tabset.parentNode.insertBefore(tabContent,tabset.nextSibling);\n wikify(theTab.getAttribute("content"),tabContent);\n if(cookie)\n {\n config.options[cookie] = tab;\n saveOptionCookie(cookie);\n }\n }\n}\n \nStory.prototype.onClickInlineTab = function(e)\n{\n story.switchInlineTab(this.parentNode,this.getAttribute("tab"));\n return false;\n}\n//}}}\n\n
/***\n| Name:|InstantTimestampPlugin|\n| Created by:|SimonBaird|\n| Location:|http://instanttimestamp.tiddlyspot.com/|\n| Version:|1.0.5 (17-Jan-2007)|\n| Requires:|~TW2.x|\n!Description\nIf you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list:\n* {ts} or {t} -> timestamp\n* {ds} or {d} -> datestamp\n* !ts or !t at start of line -> !!timestamp\n* !ds or !d at start of line -> !!datestamp\n(I added the extra ! since that's how I like it. Remove it from translations below if required)\n!Notes\n* Change the timeFormat and dateFormat below to suit your preference.\n* See also AutoCorrectPlugin\n!History\n* 17-Jan-07, version 1.0.5\n** added fields param to saveTiddler method needed in TW 2.1+\n* 06-Apr-06, version 1.0.4\n** removed the AutoCorrect stuff and put it in AutoCorrectPlugin\n* 05-Apr-06, version 1.0.3\n** now have exclusion by tag and tiddler name, probably less important here than in AutoCorrectPlugin\n* 05-Apr-06, version 1.0.2\n** put matches into array to and eval them to allow generic substitutions\n* 05-Apr-06, version 1.0.1\n** added ds for datestamp as suggested by DanielBaird\n** made case insensitive\n** Added translation for !t at start of line\n* 05-Apr-06, version 1.0.0\n** written after suggestion by Achim Wessling \n!Code\n***/\n//{{{\n\nconfig.InstantTimestamp = {\n\n // adjust to suit\n timeFormat: 'DD/0MM/YY 0hh:0mm',\n dateFormat: 'DD/0MM/YY',\n\n translations: [\n [/^!ts?$/img, "'!!'+now.formatString(config.InstantTimestamp.timeFormat)"],\n [/^!ds?$/img, "'!!'+now.formatString(config.InstantTimestamp.dateFormat)"],\n [/\s{ts?\s}/ig, "now.formatString(config.InstantTimestamp.timeFormat)"],\n [/\s{ds?\s}/ig, "now.formatString(config.InstantTimestamp.dateFormat)"]\n ],\n\n excludeTags: [\n "noAutoCorrect",\n "html",\n "CSS",\n "css",\n "systemConfig",\n "zsystemConfig",\n "Plugins",\n "Plugin",\n "plugins",\n "plugin",\n "javascript",\n "code"\n ],\n\n excludeTiddlers: [\n "StyleSheet",\n "StyleSheetLayout",\n "StyleSheetColors",\n "StyleSheetPrint"\n ]\n\n}; \n\nif (!Array.prototype.contains)\n Array.prototype.contains = function(item) {\n return (this.find(item) != null);\n };\n\nif (!Array.prototype.containsAny)\n Array.prototype.containsAny = function(items) {\n for (var i=0;i<items.length;i++)\n if (this.contains(items[i]))\n return true;\n return false;\n };\n\nTiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;\nTiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields) {\n\n tags = (typeof(tags) == "string") ? tags.readBracketedList() : tags;\n var conf = config.InstantTimestamp;\n\n if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {\n\n var now = new Date();\n var trans = config.InstantTimestamp.translations;\n for (var i=0;i<trans.length;i++) {\n newBody = newBody.replace(trans[i][0], eval(trans[i][1]));\n }\n }\n\n return this.saveTiddler_mptw_instanttimestamp(title,newTitle,newBody,modifier,modified,tags,fields);\n}\n\n//}}}\n\n
In the "Merged" tiddler, the text of the merged tiddlers will be separated by a {{{----}}} line
/***\n|''Name:''|LegacyStrikeThroughPlugin|\n|''Description:''|Support for legacy (pre 2.1) strike through formatting|\n|''Version:''|1.0.1|\n|''Date:''|Jul 21, 2006|\n|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|\n|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|\n|''License:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n\n***/\n\n//{{{\n\n// Ensure that the LegacyStrikeThrough Plugin is only installed once.\nif(!version.extensions.LegacyStrikeThroughPlugin)\n {\n version.extensions.LegacyStrikeThroughPlugin = true;\n\nconfig.formatters.push(\n{\n name: "legacyStrikeByChar",\n match: "==",\n termRegExp: /(==)/mg,\n element: "strike",\n handler: config.formatterHelpers.createElementAndWikify\n});\n\n} // end of "install only once"\n//}}}\n
Name: Blue\nBackground: #fff\nForeground: #000\nPrimaryPale: #cdf\nPrimaryLight: #57c\nPrimaryMid: #114\nPrimaryDark: #012\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n\n
Name: Green\nBackground: #fff\nForeground: #000\nPrimaryPale: #9b9\nPrimaryLight: #385\nPrimaryMid: #031\nPrimaryDark: #020\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n\n
Name: Red\nBackground: #fff\nForeground: #000\nPrimaryPale: #fdd\nPrimaryLight: #c55\nPrimaryMid: #711\nPrimaryDark: #500\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n\n
Name: Smoke\nBackground: #fff\nForeground: #000\nPrimaryPale: #aaa\nPrimaryLight: #777\nPrimaryMid: #111\nPrimaryDark: #000\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n\n
Bits and strips made by jbu
[[Dashboard]]\n [[Project]]\n/%\n <<tag Realm>>\n {{new{''<<newTiddler label:'+' title:'New Action' tag: Action Next GTD>>''}}}\n {{tag{<<tag Action>>}}}\n {{new{''<<newTiddler label:'+' title:'New Project' tag: Project GTD>>''}}}\n {{tag{<<tag Project>>}}}\n {{new{''<<newTiddler label:'+' title:'New Tickler' tag: Tickler GTD>>''}}}\n {{tag{<<tag Tickler>>}}}\n {{new{''<<newTiddler label:'+' title:'New Context' tag: Context GTD>>''}}}\n {{tag{<<tag Context>>}}}\n {{new{''<<newTiddler label:'+' title:'New Area' tag: Area GTD>>''}}}\n {{tag{<<tag Area>>}}}\n%/\n@@padding-left:1em;font-size:70%;\n [[starred|Starred]] &nbsp;&nbsp;\n {{tag{<<tag inbox|InboxTiddlers>>}}}\n {{tag{<<tag updt|UpgradeTools>>}}}\n {{tag{<<tag more|GTDComponent>>}}}\n {{tag{<<tag special|tiddlers>>}}}\n {{tag{<<tag tools|QuickAccess>>}}}\n\n@@\n @@padding-left:1em;color:[[ColorPalette::PrimaryLight]];<<tiddler MonkeyGTDVersion>>@@\n
Click the <<tiddlerMerger>> to merge all the tiddlers tagged with {{{Merge demo}}} tag.\nThey will be merged into a new tiddler called [[merged Merge demo]] (this one will "inherit" the tags from the tagged (child) tiddlers.\n\n\n''Beware:'' the tagged (child) tiddlers will be merged by alphabetical order
/***\n\n\n***/\n//{{{\n\nconfig.mGTD = {\n\n star: "\su2605",\n // star: "*", // use in case the above doesn't work on your system\n \n config: {}, // gets populated by populateLists\n\n tiddlerViews: {\n phoneList:\n "'|[['+this.title+']]"+\n "|'+config.mGTD.undefBlank(store.getTiddlerSlice(this.title,'phone'))+'"+\n "|\s\sn'",\n tickler:\n "'|<<toggleTag Processed [['+this.title+']] ->>|[['+this.title+']]"+\n "|'+"+\n "((store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true')"+\n "?(this.mGet('tmonth')+'/'+this.mGet('tday'))"+\n ":(this.mGet('tday')+'/'+this.mGet('tmonth')))"+\n "+'/'+this.mGet('tyear')+'|\s\sn'",\n // TODO ffs use classes for these\n groupBy:\n "'{{groupBy{[['+this.title+']] }}}\s\sn'",\n showstar:\n "'{{starthing{"+\n "@@font-size:80%;"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] }}}\s\sn'",\n showstar2:\n "'{{starthing{"+\n "@@font-size:80%;margin-left:2em;"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] }}}\s\sn'",\n action:\n "'{{action{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n "<<tTag tag:Next mode:text text:N title:[['+this.title+']]>>"+\n "<<tTag tag:[[Waiting For]] mode:text text:W title:[['+this.title+']]>>"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] "+\n "}}}\s\sn'",\n action2:\n "'{{action2{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n "<<tTag tag:Next mode:text text:N title:[['+this.title+']]>>"+\n "<<tTag tag:[[Waiting For]] mode:text text:W title:[['+this.title+']]>>"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] "+\n "}}}\s\sn'",\n action_proj:\n "'{{action{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n "<<tTag tag:Next mode:text text:N title:[['+this.title+']]>>"+\n "<<tTag tag:[[Waiting For]] mode:text text:W title:[['+this.title+']]>>"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] "+\n "'+this.getProjectTextForList()+'"+\n "}}}\s\sn'",\n action_proj2:\n "'{{action2{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n "<<tTag tag:Next mode:text text:N title:[['+this.title+']]>>"+\n "<<tTag tag:[[Waiting For]] mode:text text:W title:[['+this.title+']]>>"+\n "<<tTag tag:[[Starred]] mode:text text:{{config.mGTD.star}} title:[['+this.title+']]>>"+\n " @@"+\n "[['+this.title+']] "+\n "'+this.getProjectTextForList()+'"+\n "}}}\s\sn'",\n action_plain:\n "'{{action{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n " @@"+\n "[['+this.title+']] "+\n "}}}\s\sn'",\n action_plain2:\n "'{{action2{"+\n "@@font-size:80%;"+\n "<<toggleTag Done [['+this.title+']] ->>"+\n " @@"+\n "[['+this.title+']] "+\n "}}}\s\sn'"\n\n },\n\n getListByTag: function(tag) {\n return store.getTaggedTiddlers(tag).map( function(t) { return t.title; } );\n },\n\n populateLists: function() {\n\n // the meta list\n this.config.GTDComponent = this.getListByTag("GTDComponent");\n\n for (var i=0;i<this.config.GTDComponent.length;i++) {\n this.config[this.config.GTDComponent[i]] = this.getListByTag(this.config.GTDComponent[i]);\n }\n\n },\n\n undefBlank: function(value) {\n return value ? value.toString() : "";\n },\n\n commands: {\n refresh: {\n text: 'refresh',\n tooltip: 'Refresh this tiddler',\n handler: function(e,src,title) {\n clearMessage();\n if (config.mGTD.populateLists)\n config.mGTD.populateLists();\n story.refreshTiddler(title,null,true);\n return false; \n }\n } \n },\n\n macros: {\n\n realmSelector: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var markup = "Show realms: ";\n for (var i=0;i<config.mGTD.config.Realm.length;i++) {\n markup += '<<tField title:MonkeyGTDSettings tag:[[hide'+\n config.mGTD.config.Realm[i] + \n ']] mode:text text:[['+\n config.mGTD.config.Realm[i] +\n ']] refreshAll:yes>>';\n }\n wikify(markup,place,null,tiddler);\n }\n },\n\n listByTag: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var parsedParams = paramString.parseParams("tags",null,true);\n var tagExpr = getParam(parsedParams,"tags","true");\n var whereExpr = getParam(parsedParams,"where","true");\n var groupBy = getParam(parsedParams,"group");\n var mode = getParam(parsedParams,"mode","local");\n var title = getParam(parsedParams,"title","local");\n var sortBy = getParam(parsedParams,"sort","title");\n var limit = getParam(parsedParams,"limit");\n var className = getParam(parsedParams,"class","");\n var viewType = getParam(parsedParams,"view");\n var ignoreRealm = getParam(parsedParams,"ignoreRealm","no");\n var showEmpty = getParam(parsedParams,"showEmpty","no"); // only relevant when using group\n var onlyShowEmpty = getParam(parsedParams,"onlyShowEmpty","no"); // only relevant using group\n\n if (mode != "global")\n tagExpr = '( '+tagExpr+' ) && ( [[' + tiddler.title + ']] )';\n\n if (ignoreRealm != "yes") {\n\n for (var i=0;i<config.mGTD.config.Realm.length;i++) {\n if (mHideRealm(config.mGTD.config.Realm[i])) {\n tagExpr = '( '+tagExpr+' ) && ( ![[' + config.mGTD.config.Realm[i] + ']] )';\n }\n }\n }\n\n var markup = "{{mList "+className+"{\sn";\n\n if (title)\n markup += "{{mListTitle{"+title+"}}}\sn";\n \n if (groupBy) {\n markup += store.getByTagExpr(groupBy,sortBy).asList(1,viewType,limit,tagExpr,showEmpty,onlyShowEmpty,sortBy);\n\n var catchLeftoversExpr = "( "+tagExpr+" ) && !parent:" + groupBy;\n var leftovers = store.getByTagExpr(catchLeftoversExpr,sortBy).asList(2,viewType,limit);\n if (leftovers != "") {\n markup += "{{groupBy{''(No "+groupBy+")''}}}\sn";\n markup += leftovers;\n }\n\n }\n else\n markup += store.getByTagExpr(tagExpr,sortBy,whereExpr).asList(1,viewType,limit);\n\n markup += "}}}\sn";\n wikify(markup,place,null,tiddler); \n }\n },\n\n checkboxList: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var itemType = params[0];\n for (var i=0;i<config.mGTD.config[itemType].length;i++)\n wikify("<<toggleTag [["+config.mGTD.config[itemType][i]+"]]>>",place,null,tiddler);\n }\n },\n\n dropdownSelect: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n\n var values = store.getByTagExpr(paramString);\n\n var selectFrom = [];\n var currentVal = "";\n selectFrom.push({name:"", caption:"(none)"});\n for (var i=0;i<values.length;i++) {\n if (tiddler.tags.contains(values[i].title))\n currentVal = values[i].title; \n selectFrom.push({name:values[i].title, caption:values[i].title});\n }\n\n var onChangeHandler = function() {\n // this will be better when we use fields:\n store.setTiddlerTag(tiddler.title,false,currentVal);\n tiddler.mSet("project",null);\n if (this.value != "") {\n tiddler.mSet("project",this.value);\n store.setTiddlerTag(tiddler.title,true,this.value);\n }\n return true;\n };\n\n var selector = createTiddlyDropDown(place,onChangeHandler,selectFrom,currentVal);\n if (currentVal != "")\n wikify(" [[>>|"+currentVal+"]]",place);\n }\n },\n\n\n newHere: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);\n }\n },\n\n newHereFields: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n // needs some work here to derive parent type\n wikify("<<newTiddlerWithFields "+paramString+" tag:[["+tiddler.title+"]] mgtd.project:[["+tiddler.title+"]]>>",place,null,tiddler);\n }\n },\n\n processInbox: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n\n var shortHand = {\n 'W': 'Waiting For',\n 'N': 'Next',\n 'F': ''\n };\n\n // TODO move this help elsewhere...\n wikify(\n "Enter projects and actions here. Click 'create these items' to create them\sn"+\n "Example usage:\sn{{{\snPaint House|Home Maintenance\sn"+\n ".Buy ladder and brushes|Errands\sn"+\n ".Choose colours|Home|W\sn"+\n "\sn}}}\sn"+\n "By default actions are next actions. "+\n "Specify W or F to make them future or Waiting For. You can create multiple projects.\snRealm:"\n ,place);\n\n for (var i=0;i<config.mGTD.config.Realm.length;i++) {\n var r = config.mGTD.config.Realm[i];\n var foo = createTiddlyCheckbox(place,r,!mHideRealm(r),null);\n foo.id = "piRealm"+r.replace(/ /,'');\n }\n\n var pi = createTiddlyElement(place,"textarea",null,"piBox");\n \n wikify("\sn",place);\n\n var a1 = createTiddlyCheckbox(place,"Open created projects",true,null);\n a1.id = 'piShowProjects';\n\n var a2 = createTiddlyCheckbox(place,"Open created actions",false,null);\n a2.id = 'piShowActions';\n\n wikify("\sn\sn",place);\n\n var btn = createTiddlyButton(place,"create these items","create these items",function(e) {\n var lines = pi.value.split("\sn");\n var currentProject = "";\n var displayThese = [];\n\n for (var i=0;i<lines.length;i++) {\n //alert(lines[i]);\n var fields = lines[i].split(/[|;]/);\n\n if (!fields[0] || fields[0].trim() == "") {\n currentProject = "";\n }\n else {\n\n var title = fields.shift();\n //alert(title);\n\n // add the realm\n for (var j=0;j<config.mGTD.config.Realm.length;j++) {\n var theId = "piRealm"+config.mGTD.config.Realm[j].replace(/ /,'');\n if (document.getElementById(theId).checked)\n fields.push(config.mGTD.config.Realm[j]);\n }\n\n if (title[0] != '.') {\n //alert("project "+title);\n currentProject = title;\n\n if (document.getElementById('piShowProjects').checked)\n displayThese.push(title);\n\n fields.push("GTD"); // make it a GTD item\n fields.push("Project"); // make it a project\n if (store.tiddlerExists(title))\n alert("Warning: '"+title+"' already exists, did not create");\n else\n store.saveTiddler(\n title,title,\n "", // content\n config.options.txtUserName,\n new Date(),\n fields, // tags\n null // extra fields\n );\n }\n else {\n\n // default to next actions\n if (!fields.containsAny(['N','F','W']))\n fields.push('N');\n\n fields = fields.map(function(f) {\n if (shortHand[f] && shortHand[f] != '')\n return shortHand[f];\n else\n return f;\n });\n\n //alert("action "+title);\n title = title.trim();\n title = title.replace(/^\s.+/,'');\n\n if (document.getElementById('piShowActions').checked)\n displayThese.push(title);\n\n fields.push("GTD"); // make it a GTD item\n fields.push("Action"); // make it an action \n if (currentProject.trim() != "")\n fields.push(currentProject); // make it in this project\n\n if (store.tiddlerExists(title))\n alert("Warning: '"+title+" already exists, did not create");\n else\n store.saveTiddler(\n title,title,\n "", // content\n config.options.txtUserName,\n new Date(),\n fields, // tags\n null // extra fields\n );\n }\n }\n }\n\n for (var ii=0;ii<displayThese.length;ii++)\n story.displayTiddler("bottom",displayThese[ii]);\n\n alert("Done creating items");\n return false;\n }); // end of createTiddlyButton\n\n }\n },\n\n collectThoughts: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n\n // TODO move this help elsewhere...\n wikify("Enter thoughts one per line. They will be added to your [[Inbox]]",place);\n wikify("\sn",place);\n\n for (var i=0;i<config.mGTD.config.Realm.length;i++) {\n var r = config.mGTD.config.Realm[i];\n var foo = createTiddlyCheckbox(place,r,!mHideRealm(r),null);\n foo.id = "ctRealm"+r.replace(/ /,'');\n }\n\n wikify("\sn",place);\n var ct = createTiddlyElement(place,"textarea",null,"ctBox");\n wikify("\sn",place);\n \n var btn = createTiddlyButton(place,"add to inbox","add to inbox",function(e) {\n var lines = ct.value.split("\sn");\n var currentProject = "";\n var displayThese = [];\n\n for (var i=0;i<lines.length;i++) {\n //alert(lines[i]);\n var fields = [lines[i]]; //.split(/[|;]/);\n\n var title = fields.shift();\n //alert(title);\n\n // add the realm\n for (var j=0;j<config.mGTD.config.Realm.length;j++) {\n var theId = "ctRealm"+config.mGTD.config.Realm[j].replace(/ /,'');\n if (document.getElementById(theId).checked)\n fields.push(config.mGTD.config.Realm[j]);\n }\n\n fields.push("GTD"); // make it a GTD item\n fields.push("Inbox"); // make it a project\n if (store.tiddlerExists(title))\n alert("Warning: '"+title+"' already exists, did not create");\n else\n store.saveTiddler(\n title,title,\n "", // content\n config.options.txtUserName,\n new Date(),\n fields, // tags\n null // extra fields\n );\n\n }\n\n alert("Done");\n return false;\n }); // end of createTiddlyButton\n\n }\n }\n\n },\n\n/*\n// I think this is obsolete now. See also NewTiddlerWithFieldsMacro.js which also we don't need for now?? \n onClickNewTiddler: function() {\n var title = this.getAttribute("newTitle");\n var params = this.getAttribute("params").split("|");\n var focus = this.getAttribute("newFocus");\n var template = this.getAttribute("newTemplate");\n story.displayTiddler(null,title,template);\n var text = this.getAttribute("newText");\n if(typeof text == "string")\n story.getTiddlerField(title,"text").value = text.format([title]);\n for(var t=0;t<params.length;t++) {\n if (params[t].indexOf("=") != -1) {\n // it's a field, name=value. this is hacky and not good\n var nameValue = params[t].split("=");\n // alert(nameValue[0]);\n // alert(nameValue[1]);\n // damn this doesn't work because tiddler doesn't exist yet\n // store.setValue(title,nameValue[0],nameValue[1]);\n }\n else {\n // it's a normal tag\n story.setTiddlerTag(title,params[t],+1);\n }\n }\n story.focusTiddler(title,focus);\n return false;\n \n },\n*/\n \n stringMethods: {\n parseTagExpr: function() {\n var spaced = this.\n replace(/\s[\s(/g," [["). // because square brackets in templates no good\n replace(/\s)\s]/g,"]] "). \n replace(/(!|&&|\s|\s||\s(|\s))/g," $1 ");\n var tokens = spaced.readBracketedList(false); // false means not unique. thanks Jeremy!\n var expr = "";\n var logicOps = ['(',')','||','&&','!','true','false'];\n for (var i=0;i<tokens.length;i++) {\n if (logicOps.contains(tokens[i])) {\n expr += tokens[i];\n }\n else if (tokens[i].match(/^parent:/)) {\n var lookForTagInParent = tokens[i].split(":")[1];\n expr += "tiddler.parents().anyHasTag('"+lookForTagInParent+"')";\n } \n else {\n expr += "tiddler.tags.contains('"+tokens[i].\n replace(/'/,"\s\s'") // fix single quote bug. hurrah\n // but how to fix round bracket bug?\n +"')";\n }\n }\n //alert(expr);\n return '('+expr+')';\n }\n },\n\n storeMethods: {\n getByTagExpr: function(tagExpr,sortBy,whereExpr) {\n var parsed = tagExpr.parseTagExpr();\n\n sortBy = sortBy ? sortBy : 'title';\n var desc = false;\n if (sortBy.substr(0,1) == '-') {\n desc = true;\n sortBy.replace(/^-/,'');\n }\n\n if (whereExpr) {\n parsed = "( "+parsed+" ) && ( "+whereExpr+" ) ";\n }\n\n\n var output = [];\n var first = true;\n this.forEachTiddler(function(title,tiddler) {\n //alert(tiddler.getRealm());\n try {\n if (eval(parsed))\n output.push(tiddler);\n }\n catch(e) {\n if (first) {\n alert("error parsing: "+parsed);\n first = false;\n }\n }\n });\n if (sortBy == "tickleDate") {\n output.sort(function(a,b) {\n return a.tickleDate() < b.tickleDate() ? -1 :\n (a.tickleDate() == b.tickleDate() ? 0 : +1);\n });\n }\n else {\n output.sort(function(a,b) {\n return a[sortBy] < b[sortBy] ? -1 :\n (a[sortBy] == b[sortBy] ? 0 : +1);\n });\n }\n\n if (desc)\n return output.reverse();\n else\n return output;\n }\n },\n\n arrayMethods: {\n map: function(func) {\n var result = [];\n for (var i=0;i<this.length;i++)\n result.push(func(this[i]));\n return result;\n },\n\n asList: function(level, viewType, limit, subExpr, showEmpty, onlyShowEmpty, sortBy, sortExpr) {\n var output = "";\n for (var i=0;(i<this.length && (!limit || i<limit));i++)\n if (!subExpr)\n output += this[i].mGTDrender(level,viewType);\n else {\n var newExpr = "( " + subExpr + " ) && ( [[" + this[i].title + "]] )";\n var sublist = store.getByTagExpr(newExpr,sortBy).asList(level+1, viewType, limit);\n if (((sublist == "" && (showEmpty == "yes" || onlyShowEmpty == "yes"))) || ((sublist != "" && onlyShowEmpty != "yes"))) {\n output += this[i].mGTDrender(level,"groupBy");\n output += sublist;\n }\n }\n return output;\n },\n\n anyHasTag: function(tagName) {\n for (var i=0;i<this.length;i++)\n if (this[i].tags.contains(tagName))\n return true;\n return false;\n }\n },\n\n tiddlerMethods: {\n \n getProjectTextForList: function() {\n var proj = this.getProject();\n if (proj == '')\n return '';\n return "@@font-size:80%;"+\n " [/%%/[[P|"+proj+"]]/%%/]"+\n "@@";\n },\n\n getProject: function() {\n //return this.getValueByTag('Project').join("/"); // maybe two projects??\n return this.getValueByGTDComponent('Project').join("/"); // maybe two projects??\n },\n \n getRealm: function() {\n // TODO why is different from getProject?\n // do some sneaky backwards/compat stuff for tags/fields\n \n // check for field\n //var fieldBasedRealm = this.mGet('realm');\n //if (fieldBasedRealm) {\n // var realm = fieldBasedRealm.readBrackettedList(); // could be more than one\n //}\n //else {\n //var realm = this.getValueByTag('Realm'); // returns array\n // this.mSet("realm",String.encodeTiddlyLinkList(realm));\n //}\n if (this.tags.contains("Professional")) return "Professional";\n if (this.tags.contains("Personal")) return "Personal";\n \n //return "asdf";//realm[0];\n },\n\n getValueByTag: function(value) {\n // this gets a lot better when we use fields also\n var values = store.getByTagExpr(value); // probably just getTaggedTiddlers would do here..?\n var result = [];\n for (var i=0;i<values.length;i++) {\n if (this.tags.contains(values[i].title)) {\n result.push(values[i].title);\n }\n }\n return result;\n },\n\n getValueByGTDComponent: function(itemType) {\n // faster than getValueByTag since we don't need to\n // do a "full table scan" of all tiddlers\n var values = config.mGTD.config[itemType];\n var result = [];\n for (var i=0;i<values.length;i++) {\n if (this.tags.contains(values[i])) {\n result.push(values[i]);\n }\n }\n return result;\n },\n\n hasValue: function(itemType,value) {\n var foo = this.getValueByGTDComponent(itemType);\n return foo.contains(value);\n },\n\n mGTDrender: function(level,viewType) {\n var output = "";\n if (viewType) {\n if (config.mGTD.tiddlerViews[viewType+level])\n return eval(config.mGTD.tiddlerViews[viewType+level]);\n else\n return eval(config.mGTD.tiddlerViews[viewType]);\n }\n else {\n for (var i=0; i<level; i++)\n output += "*";\n output += "[[%0]]\sn".format([this.title]);\n }\n return output;\n },\n\n parents: function() {\n var output = [];\n for (var i=0;i<this.tags.length;i++) {\n var t = store.fetchTiddler(this.tags[i]);\n if (t)\n output.push(t);\n }\n return output;\n },\n\n mGet: function(field) {\n return store.getValue(this,"mgtd."+field);\n },\n\n mSet: function(field,value) {\n store.setValue(this,"mgtd."+field,value);\n },\n\n tickleDate: function() {\n var d = this.mGet("tday");\n var m = this.mGet("tmonth");\n var y = this.mGet("tyear");\n var result = "";\n if (d && m && y)\n result = y + String.zeroPad(parseInt(m,10),2) + String.zeroPad(parseInt(d,10),2) + '0000';\n return result;\n }\n },\n\n styles: [\n // ".mListTitle { font-weight:bold; }",\n // ".mList { border:solid 1px pink; }",\n // ".mList ul { margin-top:0px; padding-top:0px; }",\n ""],\n\n coreFunctions: {\n\n // Extending this to put in a defaultValue\n createTiddlyDropDown: function(place,onchange,options,defaultValue) {\n var sel = createTiddlyElement(place,"select");\n sel.onchange = onchange;\n var foo = 0;\n for(var t=0; t<options.length; t++)\n {\n var e = createTiddlyElement(sel,"option",null,null,options[t].caption);\n if (options[t].name == defaultValue) foo = t;\n e.value = options[t].name;\n }\n sel.selectedIndex = foo;\n return sel;\n },\n\n // utility\n mOpt: function(setting) {\n return store.getValue("MonkeyGTDSettings","mgtd."+setting);\n },\n\n mHideRealm: function(realm) {\n return store.getValue("MonkeyGTDSettings","hide"+realm);\n },\n\n mDefaultRealm: function() {\n // for (var i=config.mGTD.config.Realm.length-1;i>=0;i--) {\n for (var i=0;i<config.mGTD.config.Realm.length;i++) {\n if (!mHideRealm(config.mGTD.config.Realm[i])) {\n // if both are on it returns last one\n // hack. because Work is after Personal??\n return config.mGTD.config.Realm[i];\n }\n }\n return config.mGTD.config.Realm[0]; // just in case\n }\n\n },\n dateMethods: {\n // just a bug fix in TW 2.1.3\n // temporary\n formatString: function(template) {\n var t = template.replace(/0hh12/g,String.zeroPad(this.getHours12(),2));\n t = t.replace(/hh12/g,this.getHours12());\n t = t.replace(/0hh/g,String.zeroPad(this.getHours(),2));\n t = t.replace(/hh/g,this.getHours());\n t = t.replace(/0ss/g,String.zeroPad(this.getSeconds(),2));\n t = t.replace(/ss/g,this.getSeconds());\n t = t.replace(/[ap]m/g,this.getAmPm().toLowerCase());\n t = t.replace(/[AP]M/g,this.getAmPm().toUpperCase());\n t = t.replace(/wYYYY/g,this.getYearForWeekNo());\n t = t.replace(/wYY/g,String.zeroPad(this.getYearForWeekNo()-2000,2));\n t = t.replace(/YYYY/g,this.getFullYear());\n t = t.replace(/YY/g,String.zeroPad(this.getFullYear()-2000,2));\n t = t.replace(/MMM/g,config.messages.dates.months[this.getMonth()]);\n t = t.replace(/mmm/g,config.messages.dates.shortMonths[this.getMonth()]);\n t = t.replace(/0MM/g,String.zeroPad(this.getMonth()+1,2));\n t = t.replace(/MM/g,this.getMonth()+1);\n t = t.replace(/0WW/g,String.zeroPad(this.getWeek(),2));\n t = t.replace(/WW/g,this.getWeek());\n t = t.replace(/DDD/g,config.messages.dates.days[this.getDay()]);\n t = t.replace(/ddd/g,config.messages.dates.shortDays[this.getDay()]);\n t = t.replace(/0DD/g,String.zeroPad(this.getDate(),2));\n t = t.replace(/DDth/g,this.getDate()+this.daySuffix());\n t = t.replace(/DD/g,this.getDate());\n\n t = t.replace(/0mm/g,String.zeroPad(this.getMinutes(),2));\n t = t.replace(/mm/g,this.getMinutes());\n\n return t;\n }\n },\n \n test: function() {\n },\n\n init: function() {\n\n merge(config.macros,this.macros);\n merge(config.commands,this.commands);\n\n merge(TiddlyWiki.prototype,this.storeMethods);\n merge(Tiddler.prototype,this.tiddlerMethods);\n merge(String.prototype,this.stringMethods);\n merge(Array.prototype,this.arrayMethods);\n merge(Date.prototype,this.dateMethods);\n merge(window,this.coreFunctions);\n\n\n //merge(config.shadowTiddlers,{MonkeyGTDStyles:this.styles.join("\sn")});\n //store.addNotification("MonkeyGTDStyles",refreshStyles);\n\n // config.macros.newTiddler.onClickNewTiddler = this.onClickNewTiddler; // over-ride\n\n this.populateLists();\n \n this.test();\n \n }\n};\n\nconfig.mGTD.init();\n\n//}}}\n\n
<<tField tag:mgtd.usemdy label:'Use ~M-D-Y instead of ~D-M-Y'>>\n
\n.mToolbar .ticklerDate tr td {\n padding:0;\n margin:0;\n}\n\n.mToolbar {\n background-color:[[ColorPalette::TertiaryPale]];\n border:solid 1px [[ColorPalette::TertiaryMid]];\n}\n.mToolbar td {\n padding:0.5em;\n}\n.mToolbar .label {\n width:1%;\n text-align:right;\n font-weight:bold;\n background-color:[[ColorPalette::TertiaryPale]];\n color:[[ColorPalette::TertiaryMid]];\n padding-left:0.5em;\n padding-right:0;\n}\n.mListTitle {\n font-weight:bold;\n background-color:[[ColorPalette::TertiaryPale]];\n color:[[ColorPalette::TertiaryMid]];\n display:block;\n padding:0.25em 0.5em;\n border-bottom:1px solid [[ColorPalette::TertiaryMid]];\n\n}\n.mList br { display:none; }\n.mList {\n border:solid 1px [[ColorPalette::TertiaryMid]];\n margin:0 0.5em 0 0;\n padding-bottom:1em;\n}\n.mList ul {\n margin:0.25em 0 0;\n padding:0px;\n padding-left:1.8em;\n}\n.mList ul li { }\n\n.mList .action, .mList .starthing {\n display:block;\n padding-left:0.25em;\n padding-bottom:0.1em;\n /*\n overflow:hidden;\n white-space:no-wrap;*/\n /* border-bottom:1px solid #eee; */\n}\n\n.mList .action span { white-space:no-wrap; }\n.mList .action2 span { white-space:no-wrap; }\n\n.mList .action2 {\n display:block;\n padding-left:1.5em;\n padding-bottom:0.1em;\n /*overflow:hidden;\n white-space:no-wrap;*/\n /*border-bottom:1px solid #eee;*/\n}\n/* the nowrap and hidden doesnt work :( */\n\n.shorterEdit input { width:2.5em; }\n\n#topMenu .new a { padding-right:0; margin-right:0; }\n#topMenu .tag a { padding-left:0; margin-left:0; }\n\n.mList .off {border-style:none;background:#fff;color:#ccc;}\n.mList .on {border-style:none;background:#fff;color:#000;}\n.mList .WaitingForButton.off {border-style:none;background:#fff;color:#ccc;}\n.mList .WaitingForButton.on {border-style:none;background:#fdb;color:#000;}\n.mList .NextButton.off {border-style:none;background:#fff;color:#ccc;}\n.mList .NextButton.on {border-style:none;background:#cfa;color:#000;}\n\n.StarredButton.off {border-style:none;background:transparent;color:#ddd;font-size:200%;padding:0;margin:0;font-family:'Arial Unicode MS' sans-serif;}\n.StarredButton.on {border-style:none;background:transparent;color:#f80;font-size:200%;padding:0;margin:0;font-family:'Arial Unicode MS' sans-serif;}\n\nspan.title {\n color:[[ColorPalette::PrimaryDark]];\n}\n\n#topMenu {\n background:url(file://logo-trans.gif) no-repeat -15px 2px transparent;\n padding:5px;\n padding-left:80px;\n}\n\n\nhtml>body #topMenu {background-image:url(file://logo-trans.png)}\n\n\n#topMenu a { color:white ! important; }\n\n#topMenu a.button {\n border-style:none;\n}\n\n.mList .tiddlyLink { font-weight: normal; }\n\n.mList .groupBy {\n display:block;\n padding-top:0.75em;\n border-bottom:1px solid #ddd;\n margin-right:1em;\n margin-bottom:1px;\n padding-bottom:1px;\n margin-left:1em;\n font-size:120%;\n}\n\n.mList .groupBy a {\n font-weight:bold;\n}\n\n#extraToolbar .button {\n background:#ccc;\n padding:0 0.5em;\n margin:0 0.5em;\n}\n\n.piBox {\n width:95%;\n height:10em;\n}\n\n@media print {\n\n/* Thanks to Andrew C and Scott K*/\n#mainMenu,\n#sidebar,\n#extraToolbar,\n#messageArea,\n.subtitle,\n.tagglyTagged,\n.toolbar,\n.mToolbar,\n.mList .off,\n.mList .WaitingForButton.off,\n.mList .NextButton.off\n{\n display: none ! important;\n}\n\n#displayArea {\n margin: 1em 1em 0em 1em;\n}\n\n.tiddler { page-break-after:always }\n\n}/* end @media print */\n\n\n\n
URL: http://mgtd-alpha.tiddlyspot.com/upgrade.html\n
URL: /proxy/mgtd-alpha.tiddlyspot.com/upgrade.html\n
~MonkeyGTD 2.1 alpha r91\n\n
/***\n| Name:|MptwLayoutPlugin|\n| Description:|A package containing templates and css for the MonkeyPirateTiddlyWiki layout|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#MptwLayoutPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nPresumes you have TagglyTaggingPlugin installed.\n***/\n//{{{\nconfig.shadowTiddlers.GettingStarted += "\sn\snSee also MonkeyPirateTiddlyWiki.";\n\n//}}}\n\n//{{{\nmerge(config.shadowTiddlers,{\n\n'MptwEditTemplate':[\n "<!--{{{-->",\n "<div class=\s"toolbar\s" macro=\s"toolbar +saveTiddler closeOthers -cancelTiddler deleteTiddler\s"></div>",\n "<div class=\s"title\s" macro=\s"view title\s"></div>",\n "<div class=\s"editLabel\s">Title</div><div class=\s"editor\s" macro=\s"edit title\s"></div>",\n "<div class=\s"editLabel\s">Tags</div><div class=\s"editor\s" macro=\s"edit tags\s"></div>",\n "<div class=\s"editorFooter\s"><span macro=\s"message views.editor.tagPrompt\s"></span><span macro=\s"tagChooser\s"></span></div>",\n "<div macro=\s"showWhenExists EditPanelTemplate\s">[[EditPanelTemplate]]</div>",\n "<div class=\s"editor\s" macro=\s"edit text\s"></div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\n'MptwPageTemplate':[\n "<!--{{{-->",\n "<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>",\n " <div class='headerShadow'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n " <div class='headerForeground'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n "</div>",\n "<!-- horizontal MainMenu -->",\n "<div id='topMenu' refresh='content' tiddler='MainMenu'></div>",\n "<!-- original MainMenu menu -->",\n "<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->",\n "<div id='sidebar'>",\n " <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>",\n " <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>",\n "</div>",\n "<div id='displayArea'>",\n " <div id='messageArea'></div>",\n " <div id='tiddlerDisplay'></div>",\n "</div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\n'MptwStyleSheet':[\n "/*{{{*/",\n "/* a contrasting background so I can see where one tiddler ends and the other begins */",\n "body {",\n " background: [[ColorPalette::TertiaryLight]];",\n "}",\n "",\n "/* sexy colours and font for the header */",\n ".headerForeground {",\n " color: [[ColorPalette::PrimaryPale]];",\n "}",\n ".headerShadow, .headerShadow a {",\n " color: [[ColorPalette::PrimaryMid]];",\n "}",\n ".headerForeground, .headerShadow {",\n " padding: 1em 1em 0;",\n " font-family: 'Trebuchet MS' sans-serif;",\n " font-weight:bold;",\n "}",\n ".headerForeground .siteSubtitle {",\n " color: [[ColorPalette::PrimaryLight]];",\n "}",\n ".headerShadow .siteSubtitle {",\n " color: [[ColorPalette::PrimaryMid]];",\n "}",\n "",\n "/* make shadow go and down right instead of up and left */",\n ".headerShadow {",\n " left: 1px;",\n " top: 1px;",\n "}",\n "",\n "/* prefer monospace for editing */",\n ".editor textarea {",\n " font-family: 'Consolas' monospace;",\n "}",\n "",\n "/* sexy tiddler titles */",\n ".title {",\n " font-size: 250%;",\n " color: [[ColorPalette::PrimaryLight]];",\n " font-family: 'Trebuchet MS' sans-serif;",\n "}",\n "",\n "/* more subtle tiddler subtitle */",\n ".subtitle {",\n " padding:0px;",\n " margin:0px;",\n " padding-left:0.5em;",\n " font-size: 90%;",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n ".subtitle .tiddlyLink {",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n "",\n "/* a little bit of extra whitespace */",\n ".viewer {",\n " padding-bottom:3px;",\n "}",\n "",\n "/* don't want any background color for headings */",\n "h1,h2,h3,h4,h5,h6 {",\n " background: [[ColorPalette::Background]];",\n " color: [[ColorPalette::Foreground]];",\n "}",\n "",\n "/* give tiddlers 3d style border and explicit background */",\n ".tiddler {",\n " background: [[ColorPalette::Background]];",\n " border-right: 2px [[ColorPalette::TertiaryMid]] solid;",\n " border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;",\n " margin-bottom: 1em;",\n " padding-bottom: 2em;",\n "}",\n "",\n "/* make options slider look nicer */",\n "#sidebarOptions .sliderPanel {",\n " border:solid 1px [[ColorPalette::PrimaryLight]];",\n "}",\n "",\n "",\n "/* the borders look wrong with the body background */",\n "#sidebar .button {",\n " border-style: none;",\n "}",\n "",\n "/* displays the list of a tiddler's tags horizontally. used in ViewTemplate */",\n ".tagglyTagged li.listTitle {",\n " display:none",\n "}",\n ".tagglyTagged li {",\n " display: inline; font-size:90%;",\n "}",\n ".tagglyTagged ul {",\n " margin:0px; padding:0px;",\n "}",\n "",\n "/* this means you can put line breaks in SidebarOptions for readability */",\n "#sidebarOptions br {",\n " display:none;",\n "}",\n "/* undo the above in OptionsPanel */",\n "#sidebarOptions .sliderPanel br {",\n " display:inline;",\n "}",\n "",\n "/* horizontal main menu stuff */",\n "#displayArea {",\n " margin: 1em 15.7em 0em 1em; /* use the freed up space */",\n "}",\n "#topMenu br {",\n " display: none;",\n "}",\n "#topMenu {",\n " background: [[ColorPalette::PrimaryMid]];",\n " color:[[ColorPalette::PrimaryPale]];",\n "}",\n "#topMenu {",\n " padding:2px;",\n "}",\n "#topMenu .button, #topMenu .tiddlyLink, #topMenu a {",\n " margin-left: 0.5em;",\n " margin-right: 0.5em;",\n " padding-left: 3px;",\n " padding-right: 3px;",\n " color: [[ColorPalette::PrimaryPale]];",\n " font-size: 115%;",\n "}",\n "#topMenu .button:hover, #topMenu .tiddlyLink:hover {",\n " background: [[ColorPalette::PrimaryDark]];",\n "}",\n "",\n "/* make it print a little cleaner */",\n "@media print {",\n " #topMenu {",\n " display: none ! important;",\n " }",\n " /* not sure if we need all the importants */",\n " .tiddler {",\n " border-style: none ! important;",\n " margin:0px ! important;",\n " padding:0px ! important;",\n " padding-bottom:2em ! important;",\n " }",\n " .tagglyTagging .button, .tagglyTagging .hidebutton {",\n " display: none ! important;",\n " }",\n " .headerShadow {",\n " visibility: hidden ! important;",\n " }",\n " .tagglyTagged .quickopentag, .tagged .quickopentag {",\n " border-style: none ! important;",\n " }",\n " .quickopentag a.button, .miniTag {",\n " display: none ! important;",\n " }",\n "}",\n "/*}}}*/",\n ""\n].join("\sn"),\n\n'MptwViewTemplate':[\n "<!--{{{-->",\n "",\n "<div class='toolbar'>",\n " <span macro=\s"showWhenTagged systemConfig\s">",\n " <span macro=\s"toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'\s"></span>",\n " </span>",\n " <span style=\s"padding:1em;\s"></span>",\n " <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink references jump newHere newJournalHere'></span>",\n "</div>",\n "",\n "<div class=\s"tagglyTagged\s" macro=\s"tags\s"></div>",\n "",\n "<div class='titleContainer'>",\n " <span class='title' macro='view title'></span>",\n " <span macro=\s"miniTag\s"></span>",\n "</div>",\n "",\n "<div class='subtitle'>",\n " <span macro='view modifier link'></span>,",\n " <span macro='view modified date [[DD-MMM-YY]]'></span>",\n " (<span macro='message views.wikified.createdPrompt'></span>",\n " <span macro='view created date [[DD-MMM-YY]]'></span>)",\n "</div>",\n "",\n "<div macro=\s"showWhenExists ViewPanelTemplate\s">[[ViewPanelTemplate]]</div>",\n "",\n "<div macro=\s"hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer' macro='view text wikified'></div>",\n "</div>",\n "<div macro=\s"showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer'><pre macro='view text'></pre></div>",\n "</div>",\n "",\n "<div macro=\s"showWhenExists ViewDashboardTemplate\s">[[ViewDashboardTemplate]]</div>",\n "",\n "<div class=\s"tagglyTagging\s" macro=\s"tagglyTagging\s"></div>",\n "",\n "<!--}}}-->",\n ""\n].join("\sn")\n\n});\n//}}}\n
/***\n''NewDocumentPlugin for TiddlyWiki version 2.0''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#NewDocumentPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nQuickly create new TiddlyWiki documents from your existing document, with just one click! Use the {{{<<newDocument>>}}} macro to place a "new document" link into your sidebar/mainmenu/any tiddler (wherever you like). Select this command to automatically create a "new.html" document containing a specific set of tagged tiddlers. Optional parameters let you specify an alternate path/filename for the new file, or different tags to match. You can also indicate "ask" for either parameter, which will trigger a prompt for input when the command is selected.\n\n!!!!!Usage\n<<<\n{{{<<newDocument label:text filename tag tag tag...>>}}}\n{{{<<newDocument label:text filename all>>}}}\n{{{<<newDocument label:text filename snap>>}}}\n where:\n* ''label:text'' defines //optional// alternative link text (replaces default "new document" display)\n* ''filename'' is any local path-and-filename. If no parameters are provided, the default is to create the file "new.htm" in the current directory. If a filename is provided without a path (i.e., there is no "/" in the input), then the current directory is also assumed. Otherwise, this parameter is expected to contain the complete path and filename needed to write the file to your local hard disk. If ''ask'' is used in place of the filename parameter then, when the command link is selected, a message box will be automatically displayed so you can select/enter the path and filename.\n* ''tag tag tag...'' is a list of one or more space-separated tags (use quotes or {{{[[]]}}} around tags that contain spaces). The new document will include all tiddlers that match at least one of the tags in the list. The default is to include tiddlers tagged with <<tag includeNew>>or<<tag systemTiddlers>>. The special value ''all'' may be used to match every tiddler (even those without tags). If ''ask'' is used in place of the tags then, when the command link is selected, a message box will be automatically displayed so you can enter the desired tags at that time.\n* When the keyword ''snap'' is used in place of tags to match, the plugin generates a file containing the //rendered// CSS-and-HTML for all tiddlers currently displayed in the document.\n\nNote: as of version 1.4.0 of this plugin, support for selecting tiddlers by using tag *expressions* has been replaced with simpler, more efficient "containsAny()" logic. To create new ~TiddlyWiki documents that contain only those tiddlers selected with advanced AND/OR/NOT Boolean expressions, you can use the filtering features provided by the ExportTiddlersPlugin (see www.TiddlyTools.com/#ExportTiddlersPlugin).\n<<<\n!!!!!Examples:\n<<<\n{{{<<newDocument>>}}}\nequivalent to {{{<<newDocument new.htm includeNew systemTiddlers>>}}}\ncreates default "new.htm" containing tiddlers tagged with either<<tag includeNew>>or<<tag systemTiddlers>>\ntry it: <<newDocument>>\n\n{{{<<newDocument empty.html systemTiddlers>>}}}\ncreates "empty.html" containing only tiddlers tagged with<<tag systemTiddlers>>\n//(reproduces old-style (pre 2.0.2) empty file)//\ntry it: <<newDocument empty.html systemTiddlers>>\n\n{{{<<newDocument "label:create Import/Export starter" ask importexport>>}}}\nsave importexport tiddlers to a new file, prompts for path/file\ntry it: <<newDocument "label:create Import/Export starter" ask importexport>>\n\n{{{<<newDocument ask ask>>}}}\nprompts for path/file, prompts for tags to match\ntry it: <<newDocument ask ask>>\n\n{{{<<newDocument ask all>>}}}\nsave all current TiddlyWiki contents to a new file, prompts for path/file\ntry it: <<newDocument ask all>>\n\n{{{<<newDocument ask snap>>}}}\ngenerates snapshot of currently displayed document, prompts for path/file\ntry it: <<newDocument ask snap>>\n\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n''NewDocumentPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.05.23 [1.4.0]'' due to very poor performance, support for tag *expressions* has been removed, in favor of a simpler "containsAny()" scan for tags.\n''2006.04.09 [1.3.6]'' in onClickNewDocument, added call to convertUnicodeToUTF8() to better handle international characters.\n''2006.03.15 [1.3.5]'' added nsIFilePicker() handler for selecting filename in moz-based browsers. IE and other non-moz browsers still use simple prompt() dialog\n''2006.03.15 [1.3.0]'' added "label:text" param for custom link text. added special "all" filter parameter for "save as..." handling (writes all tiddlers to output file)\n''2006.03.09 [1.2.0]'' added special "snap" filter parameter to generate and write "snapshot" files containing static HTML+CSS for currently rendered document.\n''2006.02.24 [1.1.2]'' Fix incompatiblity with TW 2.0.5 by removing custom definition of getLocalPath() (which is now part of TW core)\n''2006.02.03 [1.1.1]'' concatentate 'extra' params so that tag expressions don't have to be quoted. moved all text to 'formatted' string definitions for easier translation.\n''2006.02.03 [1.1.0]'' added support for tag EXPRESSIONS. plus improved documentation and code cleanup\n''2006.02.03 [1.0.0]'' Created.\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.newDocument = {major: 1, minor: 3, revision: 6, date: new Date(2006,4,9)};\n\nconfig.macros.newDocument = {\n newlabel: "new document",\n newprompt: "Create a new TiddlyWiki 'starter' document",\n newdefault: "new.htm",\n allparam: "all",\n saveaslabel: "save as...",\n saveasprompt: "Save current TiddlyWiki to a different file",\n snapparam: "snap",\n snaplabel: "create a snapshot",\n snapprompt: "Create a 'snapshot' of the current TiddlyWiki display",\n snapdefault: "snapshot.htm",\n askparam: "ask",\n labelparam: "label:",\n fileprompt: "Please enter a filename",\n filter: "includeNew OR systemTiddlers",\n filterprompt: "Enter tag(s) to match (use AND, OR, NOT)",\n filtererrmsg: "Error in tag filter '%0'",\n snapmsg: "Document snapshot written to %0",\n okmsg: "%0 tiddlers written to %1",\n failmsg: "An error occurred while creating '%0'"\n};\n\nconfig.macros.newDocument.handler = function(place,macroName,params) {\n\n var path=getLocalPath(document.location.toString());\n var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\s\s"); \n if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash\n\n if (params[0] && params[0].substr(0,config.macros.newDocument.labelparam.length)==config.macros.newDocument.labelparam)\n var label=params.shift().substr(config.macros.newDocument.labelparam.length)\n var filename=params.shift(); if (!filename) filename=config.macros.newDocument.newdefault;\n if (params[0]==config.macros.newDocument.snapparam) {\n if (!label) var label=config.macros.newDocument.snaplabel;\n var prompt=config.macros.newDocument.snapprompt;\n var defaultfile=config.macros.newDocument.snapdefault;\n }\n if (params[0]==config.macros.newDocument.allparam) {\n if (!label) var label=config.macros.newDocument.saveaslabel;\n var prompt=config.macros.newDocument.saveasprompt;\n var defaultfile=getLocalPath(document.location.toString());\n var slashpos=defaultfile.lastIndexOf("/"); if (slashpos==-1) slashpos=defaultfile.lastIndexOf("\s\s");\n if (slashpos!=-1) defaultfile=defaultfile.substr(slashpos+1); // get filename only\n }\n if (!prompt) var prompt=config.macros.newDocument.newprompt;\n if (!label) var label=config.macros.newDocument.newlabel;\n if (!defaultfile) var defaultfile=config.macros.newDocument.newdefault;\n\n var btn=createTiddlyButton(place,label,prompt,onClickNewDocument);\n btn.path=path;\n btn.file=filename;\n btn.defaultfile=defaultfile;\n btn.filter=params.length?params:[config.macros.newDocument.filter]; \n}\n\n// IE needs explicit global scoping for functions called by browser events\nwindow.onClickNewDocument=function(e)\n{\n if (!e) var e = window.event; var btn=resolveTarget(e);\n\n // get output path/filename\n var filename=btn.file;\n if (filename==config.macros.newDocument.askparam)\n filename=promptForFilename(config.macros.newDocument.fileprompt,btn.path,btn.defaultfile);\n if (!filename) return; // cancelled by user\n // if specified file does not include a path, assemble fully qualified path and filename\n var slashpos=filename.lastIndexOf("/"); if (slashpos==-1) slashpos=filename.lastIndexOf("\s\s");\n if (slashpos==-1) filename=btn.path+filename;\n // assemble document content, write file, report result\n if (btn.filter[0]==config.macros.newDocument.snapparam) { // HTML+CSS snapshot\n var styles=document.getElementsByTagName("style");\n var out="<html>\sn<head>\sn<style>\sn";\n for(var i=0; i < styles.length; i++) out +="/* stylesheet from tiddler:"+styles[i].getAttribute("id")+" */\sn"+styles[i].innerHTML+"\sn\sn";\n out += "</style>\sn</head>\sn<body>\sn\sn"+document.getElementById("contentWrapper").innerHTML+"\sn\sn</body>\sn</html>";\n var msg=saveFile(filename,out)\n ?config.macros.newDocument.snapmsg.format([filename])\n :config.macros.newDocument.failmsg.format([filename]);\n } else { // TW starter document\n // get the TiddlyWiki core code source\n var sourcefile=getLocalPath(document.location.toString());\n var source=loadFile(sourcefile);\n if(source==null) { alert(config.messages.cantSaveError); return null; }\n var posOpeningDiv=source.indexOf(startSaveArea);\n var posClosingDiv=source.lastIndexOf(endSaveArea);\n if((posOpeningDiv==-1)||(posClosingDiv==-1)) { alert(config.messages.invalidFileError.format([sourcefile])); return; }\n // get the matching tiddler divs\n var match=btn.filter;\n if (match[0]==config.macros.newDocument.askparam)\n match=prompt(config.macros.newDocument.filterprompt,config.macros.newDocument.filter).readMacroParams();\n if (!match[0]) return; // cancelled by user\n var storeAreaDivs=[];\n var tiddlers=store.getTiddlers('title');\n for (var i=0; i<tiddlers.length; i++)\n if (match[0]==config.macros.newDocument.allparam || (tiddlers[i].tags && tiddlers[i].tags.containsAny(match)) )\n storeAreaDivs.push(tiddlers[i].saveToDiv());\n var out=source.substr(0,posOpeningDiv+startSaveArea.length)+convertUnicodeToUTF8(storeAreaDivs.join("\sn"))+"\sn\st\st"+source.substr(posClosingDiv);\n var msg=saveFile(filename,out)\n ?config.macros.newDocument.okmsg.format([storeAreaDivs.length,filename])\n :config.macros.newDocument.failmsg.format([filename]);\n }\n clearMessage(); displayMessage(msg);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);\n}\n//}}}\n\n//{{{\nfunction promptForFilename(msg,path,file)\n{\n if(!window.Components)\n return prompt(msg,path+file); // fallback for IE and other non-moz browsers\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var nsIFilePicker = window.Components.interfaces.nsIFilePicker;\n var picker = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);\n picker.init(window, msg, nsIFilePicker.modeSave);\n var thispath = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n thispath.initWithPath(path);\n picker.displayDirectory=thispath;\n picker.defaultExtension="html";\n picker.defaultString=file;\n picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);\n var result = picker.show();\n if (result == nsIFilePicker.returnOK) return picker.file.persistentDescriptor;\n }\n catch(e) { alert('error during local file access: '+e.toString()) }\n}\n//}}}
/***\n| Name:|NewHerePlugin|\n| Description:|Creates the new here and new journal toolbar commands|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nTo use edit your ViewTemplate and add newHere to the toolbar div, eg\n{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}\nNote: would be good if we could do this instead some day\n{{{<<newTiddler tag:{{tiddler.title}} label:'new here'>>}}}\n***/\n//{{{\nmerge(config.commands,{\n\n newHere: {\n text: 'new here',\n tooltip: 'Create a new tiddler tagged as this tiddler',\n hideReadOnly: true,\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var t=document.getElementById('tiddler'+title);\n story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(config.macros.newTiddler.title, title, 0);\n story.focusTiddler(config.macros.newTiddler.title,"title"); // doesn't work??\n return false;\n }\n }\n },\n\n newJournalHere: {\n //text: 'new journal here', // too long\n text: 'new journal',\n hideReadOnly: true,\n dataFormat: 'DD MMM YYYY', // adjust to your preference\n //dataFormat: 'YYYY-0MM-0DD', \n tooltip: 'Create a new journal tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var now = new Date();\n var t=document.getElementById('tiddler'+title);\n var newtitle = now.formatString(this.dataFormat)\n story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(newtitle, title, 0);\n story.focusTiddler(newtitle,"title");\n return false;\n }\n }\n }\n\n});\n//}}}\n
/***\n| Name:|NewTiddlerWithFieldsMacro|\n| Created by:|BJ Backitis|\n| Location:|http://tampageekland.tiddlyspot.com#NewTiddlerWithFieldsMacro|\n| Version:|0.1.0 (16 Nov 2006)|\n| Requires:|~TW2.1.x|\n!Description\nThis is a clone of the NewTiddler core macro that allows for adding custom fields and values. Any param "name: value" pair where the name is not a \nrecognized param (title, text, label, prompt, accessKey, template, focus, and tag) will be treated as a custom field name and value. \n!Usage\nUse like the existing {{{<<newTiddler>>}}} macro, but any unknown param "name: value" pairs will be treated as a custom field name and value.\nBe sure to have the custom field defined in your view and/or edit templates so you can see them (if you wish)!\n\nExample:\n{{{<<newTiddlerWithFields label:'New Example' tag: special customTiddler tiddlertype: Example>>}}}\n\ntry it here:\n<<newTiddlerWithFields label:'New Example' tag: special customTiddler tiddlertype: Example>>\n\n* v0.1.0 -- BJ Backitis, 16 Nov 2006 (Original, based on a suggestion from Simon Baird)\n!To Do\n* {{{<<newJournalWithFields>>}}}???\n\n!Code\n***/\n\n\nconfig.macros.newTiddlerWithFields = {\n text: "new Tiddler",\n prompt: "Create a new tiddler with custom fields",\n title: "new Tiddler"\n} \n \nconfig.macros.newTiddlerWithFields.fixedParams = ["title", "tag", "label", "text", "prompt", "accessKey", "focus", "template", "anon"];\n\nconfig.macros.newTiddlerWithFields.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n if(!readOnly) {\n params = paramString.parseParams("anon",null,true,false,false);\n var title = params[1] && params[1].name == "anon" ? params[1].value : this.title;\n title = getParam(params,"title",title);\n this.createNewTiddlerWithFieldsButton(place,title,params,this.label,this.prompt,this.accessKey,"title",false);\n }\n}\n\nconfig.macros.newTiddlerWithFields.createNewTiddlerWithFieldsButton = function(place,title,params,label,prompt,accessKey,newFocus,isJournal) {\n var tags = [];\n var custFields = [];\n var custValues = [];\n for(var t=1; t<params.length; t++) {\n if (!this.fixedParams.contains(params[t].name)) {\n custFields.push(params[t].name);\n custValues.push(params[t].value);\n }\n else if((params[t].name == "anon" && t != 1) || (params[t].name == "tag"))\n tags.push(params[t].value);\n }\n label = getParam(params,"label",label);\n prompt = getParam(params,"prompt",prompt);\n accessKey = getParam(params,"accessKey",accessKey);\n newFocus = getParam(params,"focus",newFocus);\n var btn = createTiddlyButton(place,label,prompt,this.onClickNewTiddlerWithFields,null,null,accessKey);\n btn.setAttribute("newTitle",title);\n btn.setAttribute("isJournal",isJournal);\n btn.setAttribute("params",tags.join("|"));\n btn.setAttribute("custFields",custFields.join("|"));\n btn.setAttribute("custValues",custValues.join("|"));\n btn.setAttribute("newFocus",newFocus);\n btn.setAttribute("newTemplate",getParam(params,"template",DEFAULT_EDIT_TEMPLATE));\n var text = getParam(params,"text");\n if(text !== undefined) \n btn.setAttribute("newText",text);\n return btn;\n}\n\n\nconfig.macros.newTiddlerWithFields.onClickNewTiddlerWithFields = function() {\n var title = this.getAttribute("newTitle");\n if(this.getAttribute("isJournal")) {\n var now = new Date();\n title = now.formatString(title.trim());\n }\n var params = this.getAttribute("params").split("|");\n var custFields = this.getAttribute("custFields").split("|");\n var custValues = this.getAttribute("custValues").split("|");\n var focus = this.getAttribute("newFocus");\n var template = this.getAttribute("newTemplate");\n story.displayTiddler(null,title,template);\n var text = this.getAttribute("newText");\n if (typeof text == "string")\n story.getTiddlerField(title,"text").value = text.format([title]);\n for (var t=0;t<params.length;t++)\n story.setTiddlerTag(title,params[t],+1);\n for (var i=0;i<custFields.length;i++) \n story.setTiddlerField(title,custValues[i],+1,custFields[i]);\n story.focusTiddler(title,focus);\n return false;\n}\n\n\n\n
The tagged (child) tiddlers will be merged by alphabetical order
\n<!--{{{-->\n<!--div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>\n <div class='headerShadow'>\n <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n </div>\n <div class='headerForeground'>\n <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n </div>\n</div-->\n<!-- horizontal MainMenu -->\n<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>\n<div id='topMenu' refresh='content' tiddler='MainMenu' style="font-size:120%;"></div>\n</div>\n<!-- realm selector under construction -->\n<div id="extraToolbar" style="color:#555;background:#999;padding:3px;border-bottom:2px solid #777;padding-left:0.5em;font-size:120%;">\n <span id='realmSelector' macro="realmSelector"></span>\n <span style="margin:0 2em;">|</span>\n <span>Create:</span>\n <span macro="newTiddler label:'new action' title:'New Action' tag: Action Next GTD "></span>\n <span macro="newTiddler label:'new project' title:'New Project' tag: Project GTD "></span>\n <span macro="newTiddler label:'new tickler' title:'New Tickler' tag: Tickler GTD "></span>\n</div>\n<!--\n<div id='topBar' style="background:#ddd;padding:3px;border-bottom:1px solid #aaa;padding-left:0.5em;">\n <span macro="saveChanges" style="padding-left:2em;padding-right:2em;"></span>\n <span macro="selectPalette">select colour palette:</span>\n</div>\n-->\n<!-- original MainMenu menu -->\n<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->\n<div id='sidebar'>\n <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n\n <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n <div id='messageArea'></div>\n <div id='tiddlerDisplay'></div>\n</div>\n<!--}}}-->\n\n
/***\n|''Name:''|Publish Macro|\n|''Version:''|2.4.1 (2 July 2008)|\n|''Source''|http://jackparke.googlepages.com/jtw.html#PublishMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23PublishMacro]])|\n|''Author:''|[[Jack]]|\n|''Type:''|Macro|\n!Description\n<<doPublish>> tiddlers tagged with these tags <<option txtPublishTags>> (comma seperated) as HTML pages to the subfolder 'publish' (you must create this). Use the [[PublishTemplateHead]] and [[PublishTemplateBody]] templates to style your pages and the [[PublishIndexTemplate]] to define an index page. For publishing individual tiddlers the [[PublishTemplateBodySingle]] template is used.\n!Usage\nTo publish all tagged tiddlers:\n{{{<<doPublish>>}}} <<doPublish>>\nTo publish a single tiddler, use the {{{<<publishTiddler>>}}} macro or add the "publishTiddler" command to your ViewTemplate\n!Template placeholders\n|!Placeholder|!Meaning|\n|%0|Your SiteTitle "<<tiddler SiteTitle>>"|\n|%1|The current tiddler title|\n|%2|The rendered tiddler HTML|\n|%3|CSV list of tags|\n|%4|Tiddler modifier|\n|%5|Tiddler modified date|\n|%6|Tiddler creation date|\n|%7|Tiddler wiki text|\n!Revision History\n* Original by [[Jack]] 24 May 2006\n* Updated 2 Jan 2007\n* Refactored 4 Jan 2007\n* Small improvements\n* Publish single tiddlers\n* Template placeholder %7 for tiddler's wiki text\n\n!Code\n***/\n//{{{\nversion.extensions.doPublish = {\n major: 2,\n minor: 4,\n revision: 1,\n date: new Date("July 2, 2008")\n};\nconfig.macros.doPublish = {\n label: "publish",\n prompt: "Publish Tiddlers as HTML files"\n};\nif (config.options.txtPublishTags == undefined) config.options.txtPublishTags = "Publish";\nconfig.shadowTiddlers.PublishTemplateHead = '<title>%0 - %1</title>\sn<link rel="stylesheet" type="text/css" href="style.css"/>\sn<meta name="keywords" content="%3"/>'\nconfig.shadowTiddlers.PublishTemplateBody = '<div class=\s'viewer\s' id=\s'contentWrapper\s'><small><a href=\s"./publish/index.html\s">Home</a> > %1</small><h1>%0</h1>\sn<h2>%1</h2>\sn%2\sn<hr>Tags: %3\sn<hr>%4, %5&nbsp;(created %6)\sn</div>\sn'\nconfig.shadowTiddlers.PublishTemplateBodySingle = '<h1>%0</h1>\sn<h2>%1</h2>\sn%2\sn<hr>Tags: %3\sn<hr>%4, %5&nbsp;(created %6)\sn</div>\sn'\nconfig.shadowTiddlers.PublishIndexTemplate = '<div class=\s'viewer\s' id=\s'contentWrapper\s'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1><h2>%1</h2>\sn<ul>%2\sn</ul>\sn<small>Published: %6</small>\sn</div>\sn';\nconfig.macros.doPublish.handler = function(place)\n {\n if (!readOnly)\n createTiddlyButton(place, this.label, this.prompt, \n function() {\n doPublish();\n return false;\n },\n null, null, this.accessKey);\n\n}\nconfig.macros.publishTiddler = {\n label : 'publish',\n prompt : 'Publish this tiddler as an HTML file.',\n handler : function(place,macroName,params,wikifier,paramString,tiddler)\n {\n var btn = createTiddlyButton(place, this.label, this.prompt, \n function(e) {\n if(!e) var e = window.event;\n publishTiddler(this.getAttribute('tiddler'))\n return false;\n },\n null, null, this.accessKey);\n btn.setAttribute('tiddler', tiddler.title);\n}}\nconfig.commands.publishTiddler = {handler : function(event,src,title) {publishTiddler(title);},text: "publish", tooltip: "Publish this tiddler as HTML"};\nfunction publishTiddler(title) {\n //debugger\n \n var PublishFolder = getWikiPath('publish');\n var place = document.getElementById(story.container)\n var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");\n var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBodySingle") || store.getTiddlerText("PublishTemplateBody");\n HTMLTemplateBody = renderTemplate(HTMLTemplateBody)\n HTMLTemplateBody = wiki2Web(HTMLTemplateBody);\n \n var tiddler = store.getTiddler(title);\n var tiddlerText = store.getValue(tiddler, 'text');\n var tiddlerHTML = wikifyStatic(tiddlerText);\n var HTML = '<html>\sn\s<head>\sn' + HTMLTemplateHead + '\sn</head>\sn<body>\sn' + HTMLTemplateBody + '\sn</body>\sn</html>';\n HTML = HTML.format([\n wikifyPlain("SiteTitle").htmlEncode(), \n tiddler.title.htmlEncode(), \n wiki2Web(tiddlerHTML), \n tiddler.tags.join(", "), \n tiddler.modifier, \n tiddler.modified.toLocaleString(), \n tiddler.created.toLocaleString(),\n tiddlerText\n ]);\n saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);\n //story.closeTiddler(tiddler.title);\n var indexWin = window.open((PublishFolder + title.filenameEncode() + ".html").replace(/\s\s/g, "/"), null);\n indexWin.focus();\n}\nfunction doPublish() {\n var savedTiddlers = [];\n var tiddlers = store.getTiddlers("title");\n var place = document.getElementById(story.container)\n var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");\n var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBody");\n HTMLTemplateBody = renderTemplate(HTMLTemplateBody)\n HTMLTemplateBody = wiki2Web(HTMLTemplateBody);\n\n var PublishTags = config.options.txtPublishTags || "publish";\n PublishTags = PublishTags.split(",")\n var PublishFolder = getWikiPath('publish');\n if (!PublishFolder) return;\n var indexFile = "";\n\n var indexFileTemplate = store.getTiddlerText("PublishIndexTemplate");\n // This does not allow <<myMacro>> but wants <div macro="myMacro">\n indexFileTemplate = renderTemplate(indexFileTemplate)\n // This option allows WIKI-syntax but is limited in it's HTML capabilities\n //indexFileTemplate = wikifyStatic(indexFileTemplate)\n\n for (var t = 0; t < tiddlers.length; t++) {\n var tiddler = tiddlers[t];\n if (tiddler.tags.containsAny(PublishTags)) {\n var tiddlerText = store.getValue(tiddler, 'text');\n var tiddlerHTML = wikifyStatic(tiddlerText);\n var HTML = '<html>\sn\s<head>\sn' + HTMLTemplateHead + '\sn</head>\sn<body>\sn' + HTMLTemplateBody + '\sn</body>\sn</html>';\n HTML = HTML.format([\n wikifyPlain("SiteTitle").htmlEncode(), \n tiddler.title.htmlEncode(), \n wiki2Web(tiddlerHTML), \n tiddler.tags.join(", "), \n tiddler.modifier, \n tiddler.modified.toLocaleString(), \n tiddler.created.toLocaleString(),\n tiddlerText\n ]);\n //saveFile(PublishFolder + tiddler.created.formatString("YYYY0MM0DD") + ".html", HTML);\n saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);\n indexFile += "<li><a href=\s"" + tiddler.title.filenameEncode() + ".html" + "\s" class=\s"tiddlyLink tiddlyLinkExisting\s">" + tiddler.title + "</a></li>\sn";\n story.closeTiddler(tiddler.title);\n\n }\n\n }\n indexFileTemplate = '<html>\sn\s<head>\sn' + HTMLTemplateHead + '\sn</head>\sn<body>\sn' + indexFileTemplate + '\sn</body>\sn</html>';\n indexFileTemplate = indexFileTemplate.format([wikifyPlain("SiteTitle").htmlEncode(), wikifyPlain("SiteSubtitle").htmlEncode(), "%2", "", "", "", (new Date()).toLocaleString()])\n\n indexFile = indexFileTemplate.replace("%2", indexFile)\n indexFile = wiki2Web(indexFile);\n saveFile(PublishFolder + "index.html", indexFile)\n saveFile(PublishFolder + "style.css", store.getTiddlerText("StyleSheet") + store.getTiddlerText("StyleSheetLayout") + store.getTiddlerText("StyleSheetColors"))\n var indexWin = window.open("file://" + PublishFolder.replace(/\s\s/g, "/") + "index.html", null);\n indexWin.focus();\n\n}\n\nfunction renderTemplate(html) {\n var result = document.createElement("div");\n result.innerHTML = html;\n applyHtmlMacros(result, null);\n var temp = result.innerHTML;\n //result.parentNode.removeChild(result);\n return temp;\n\n}\n\n// Convert wikified text to html\nfunction wiki2Web(wikiHTML) {\n //var regexpLinks = new RegExp("<a tiddlylink=.*?</a>", "img");\n var regexpLinks = /<a[^>]+tiddlylink\ss*=\ss*["']?\ss*?([^ "'>]*)\ss*["']?[^>]*>[^<]+<\s/a>/img;\n var result = wikiHTML.match(regexpLinks);\n if (result) {\n for (i = 0; i < result.length; i++) {\n var className = result[i].match(/ class="(.*?)"/i) ? result[i].match(/ class="(.*?)"/i)[1] : "";\n var tiddlerName = result[i].match(/ tiddlylink="(.*?)"/i)[1]; \n var url = tiddlerName.htmlDecode().filenameEncode() + ".html"; \n var tiddlerLabel = result[i].match(/">(.*?)<\s/a>/i)[1]; \n if (!className.match(/tiddlyLinkNonExisting/i)) \n wikiHTML = wikiHTML.myReplace(result[i], "<a class=\s"" + className + "\s" href=\s"" + url + "\s">" + tiddlerLabel + "</a>"); \n else\n wikiHTML = wikiHTML.myReplace(result[i], "<a class=\s"" + className + "\s" title=\s"Page does not exist\s" href=\s"#\s">" + tiddlerName + "</a>");\n\n }\n wikiHTML = wikiHTML.replace(/ href="http:\s/\s//gi, " target=\s"_blank\s" href=\s"http://");\n\n }\n return wikiHTML\n\n}\nfunction getWikiPath(folderName) {\n var originalPath = document.location.toString();\n if (originalPath.substr(0, 5) != 'file:') {\n alert(config.messages.notFileUrlError);\n if (store.tiddlerExists(config.messages.saveInstructions))\n story.displayTiddler(null, config.messages.saveInstructions);\n return;\n\n }\n var localPath = getLocalPath(originalPath);\n var backSlash = localPath.lastIndexOf('\s\s') == -1 ? '/': '\s\s';\n var dirPathPos = localPath.lastIndexOf(backSlash);\n var subPath = localPath.substr(0, dirPathPos) + backSlash + (folderName ? folderName + backSlash: '');\n return subPath;\n\n}\n\n// Replace without regex\nString.prototype.myReplace = function(sea, rep) {\n var t1 = this.indexOf(sea);\n var t2 = parseInt(this.indexOf(sea)) + parseInt(sea.length);\n var t3 = this.length;\n return this.substring(0, t1) + rep + this.substring(t2, t3)\n\n}\n// Convert illegal characters to underscores\nString.prototype.filenameEncode = function()\n {\n return (this.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));\n\n}\n//}}}
/***\n| Name:|QuickOpenTagPlugin|\n| Description:|Changes tag links to make it easier to open tags as tiddlers|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nconfig.quickOpenTag = {\n\n dropdownChar: (document.all ? "\su25bc" : "\su25be"), // the little one doesn't work in IE\n\n createTagButton: function(place,tag,excludeTiddler) {\n // little hack so we can to <<tag PrettyTagName|RealTagName>>\n var splitTag = tag.split("|");\n var pretty = tag;\n if (splitTag.length == 2) {\n tag = splitTag[1];\n pretty = splitTag[0];\n }\n \n var sp = createTiddlyElement(place,"span",null,"quickopentag");\n createTiddlyText(createTiddlyLink(sp,tag,false),pretty);\n \n var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tag]),onClickTag);\n theTag.setAttribute("tag",tag);\n if (excludeTiddler)\n theTag.setAttribute("tiddler",excludeTiddler);\n return(theTag);\n },\n\n miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tagged = store.getTaggedTiddlers(tiddler.title);\n if (tagged.length > 0) {\n var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);\n theTag.setAttribute("tag",tiddler.title);\n theTag.className = "miniTag";\n }\n },\n\n allTagsHandler: function(place,macroName,params) {\n var tags = store.getTags();\n var theDateList = createTiddlyElement(place,"ul");\n if(tags.length == 0)\n createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);\n for (var t=0; t<tags.length; t++) {\n var theListItem = createTiddlyElement(theDateList,"li");\n var theLink = createTiddlyLink(theListItem,tags[t][0],true);\n var theCount = " (" + tags[t][1] + ")";\n theLink.appendChild(document.createTextNode(theCount));\n var theDropDownBtn = createTiddlyButton(theListItem," " +\n config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);\n theDropDownBtn.setAttribute("tag",tags[t][0]);\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by QuickOpenTagPlugin */\sn"+\n".tagglyTagged .quickopentag, .tagged .quickopentag \sn"+\n" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\sn"+\n".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\sn"+\n".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\sn"+\n"/* extra specificity to make it work right */\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#displayArea .viewer .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink \sn"+\n" { border:0px solid black; }\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" { margin-left:0px; padding-left:2px; }\sn"+\n"#displayArea .viewer .quickopentag a.tiddlyLink, \sn"+\n"#mainMenu .quickopentag a.tiddlyLink \sn"+\n" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\sn"+\n"a.miniTag {font-size:150%;} \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" /* looks better in right justified main menus */\sn"+\n" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\sn" + \n"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\sn" +\n"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\sn" +\n"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\sn" +\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n // we fully replace these builtins. can't hijack them easily\n window.createTagButton = this.createTagButton;\n config.macros.allTags.handler = this.allTagsHandler;\n config.macros.miniTag = { handler: this.miniTagHandler };\n config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;\n if (store)\n store.addNotification("QuickOpenTagStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"QuickOpenTagStyles", notify: refreshStyles});\n }\n\n}\n\nconfig.quickOpenTag.init();\n\n//}}}\n
Brought to you by [[JeanBuchet]]' RelatedUrlsMacro plugin.\n<<RelatedUrls _jbu_demo _jbu_template>>
/***\n|!Plugin Name|Related Urls Macro|\n|!Description:|Displays informations about the browser and its host OS|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|1.1.0|\n|!Date:|2009/03/17|\n|!Usage|<////<RelatedUrls>////>|\n|!Source:| |\n\n!History\n\n!Code\n***/\n//{{{\n\nversion.extensions.RelatedUrls= {major: 1, minor: 1 , revision: 0, date: new Date(2009,03, 17)};\n\nconfig.macros.RelatedUrls= {\n prefix : "gtd"\n};\n\n\nconfig.macros.RelatedUrls.handler = function(place,macroName,params) {\n\n var GtdStatsWrapper = createTiddlyElement(place,"div",null,"GtdStats",null);\n\n var l_href=location.href;\n var results="";\n var last_slash = l_href.lastIndexOf('/') + 1;\n\n var l_base = l_href.substring(0, last_slash);\n var l_url = l_href.substring(last_slash, l_href.lastIndexOf('.') );\n\n for (var i=0;i<params.length; i++) {\n l_f=params[i];\n if (config.macros.RelatedUrls.prefix + l_f != l_url) {\n results=results + "* [[" + l_f + "|" + l_base + config.macros.RelatedUrls.prefix + l_f + ".html]] \sn";\n }\n }\n\n wikify(results, place);\n}\n\n//}}}\n
/***\n| Name:|RenameTagsPlugin|\n| Description:|Allows you to easily rename or delete tags across multiple tiddlers|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nRename a tag and you will be prompted to rename it in all its tagged tiddlers.\n***/\n//{{{\nconfig.renameTags = {\n\n prompts: {\n rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",\n remove: "Remove the tag '%0' from %1 tidder%2?"\n },\n\n removeTag: function(tag,tiddlers) {\n store.suspendNotifications();\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,tag);\n }\n store.resumeNotifications();\n store.notifyAll();\n },\n\n renameTag: function(oldTag,newTag,tiddlers) {\n store.suspendNotifications();\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old\n store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new\n }\n store.resumeNotifications();\n store.notifyAll();\n },\n\n storeMethods: {\n\n saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,\n\n saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {\n if (title != newTitle) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0) {\n // then we are renaming a tag\n if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.renameTag(title,newTitle,tagged);\n\n if (!this.tiddlerExists(title) && newBody == "")\n // dont create unwanted tiddler\n return null;\n }\n }\n return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);\n },\n\n removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,\n\n removeTiddler: function(title) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0)\n if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.removeTag(title,tagged);\n return this.removeTiddler_orig_renameTags(title);\n }\n\n },\n\n init: function() {\n merge(TiddlyWiki.prototype,this.storeMethods);\n }\n}\n\nconfig.renameTags.init();\n\n//}}}\n\n
\n// to use these you must add them to the tool bar in EditTemplate\n\nmerge(config.commands,{\n\n saveCloseTiddler: {\n text: 'done/close',\n tooltip: 'Undo changes to this tiddler and close it',\n handler: function(e,src,title) {\n config.commands.saveTiddler.handler(e,src,title);\n config.commands.closeTiddler.handler(e,src,title);\n return false;\n }\n },\n\n cancelCloseTiddler: {\n text: 'cancel/close',\n tooltip: 'Save changes to this tiddler and close it',\n handler: function(e,src,title) {\n config.commands.cancelTiddler.handler(e,src,title);\n config.commands.closeTiddler.handler(e,src,title);\n return false;\n }\n }\n\n});\n\n
/***\nQuick and dirtly palette switcher for 2.1.x\n<<selectPalette>>\nWARNING this will overwrite your ColorPalette tiddler.\n***/\n\n//{{{\n\nmerge(config.macros,{\n\n setPalette: {\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var paletteName = params[0] ? params[0] : tiddler.title;\n createTiddlyButton(place,"apply","Apply this palette",function(e) {\n config.macros.selectPalette.updatePalette(tiddler.title);\n return false;\n });\n }\n },\n\n selectPalette: {\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n createTiddlyDropDown(place,this.onPaletteChange,this.getPalettes());\n },\n\n getPalettes: function() {\n var result = [\n {caption:"-palette-", name:""},\n {caption:"(Default)", name:"(default)"}\n ];\n var tagged = store.getTaggedTiddlers("palette","title");\n for(var t=0; t<tagged.length; t++) {\n var caption = tagged[t].title;\n var sliceTitle = store.getTiddlerSlice(caption,"Name");\n if (sliceTitle)\n caption = sliceTitle;\n result.push({caption:sliceTitle, name:tagged[t].title});\n }\n return result;\n },\n\n onPaletteChange: function(e) {\n config.macros.selectPalette.updatePalette(this.value);\n return true;\n },\n\n updatePalette: function(title) {\n if (title != "") {\n store.deleteTiddler("ColorPalette");\n if (title != "(default)")\n store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),\n config.options.txtUserName,undefined,"");\n this.refreshPalette();\n if(config.options.chkAutoSave)\n saveChanges(true);\n }\n },\n\n refreshPalette: function() {\n config.macros.refreshDisplay.onClick();\n }\n }\n});\n\n//}}}\n\n
<<tabs txtMainTab\n Timeline Timeline TabTimeline\n All 'All tiddlers' TabAll\n Tags 'Tags' TabTags\n Shadowed 'Shadowed tiddlers' TabMoreShadowed\n >>\n/%\n Tags 'All tags' TabTags\n More 'More lists' TabMore\n%/\n
|[[Related urls|RelatedUrlsMacro]]: <<RelatedUrls Activites Notes RC Tsks Wuas Work _jbu_template>> |<<siteMap notes>> |
/***\n| Name:|SiteMapMacro|\n| Author:|Simon Baird|\n| Location:|http://simonbaird.com/mptw/#SiteMapMacro|\n| Version:|1.0.3, 15-Mar-06|\n\n!!Examples\nSee SiteMap and SliderSiteMap for example usage.\n\n!!Parameters\n* Name of tiddler to start at\n* Max depth (a number) \n* Format (eg, nested, see formats below)\n* Don't show root flag (anything other than null turns it on)\n* Tags - a string containing a bracketed list of tags that we are interested in\n\n!!History\n* 1.0.3 (15-Mar-06)\n** added tag filtering\n* 1.0.2 (15-Mar-06)\n** Added json format and dontshowroot option\n* 1.0.1 (9-Mar-06)\n** Added selectable formats and fixed nested slider format\n* 1.0.0 (8-Mar-06)\n** first release\n\n***/\n//{{{\n\nversion.extensions.SiteMapMacro = {\n major: 1,\n minor: 0,\n revision: 3,\n date: new Date(2006,3,15),\n source: "http://simonbaird.com/mptw/#SiteMapMacro"\n};\n\nconfig.macros.siteMap = {\n\n formats: {\n bullets: {\n formatString: "%0[[%1]]\sn%2",\n indentString: "*"\n },\n\n // put this in your StyleSheet to make it look good.\n // .sliderPanel { margin-left: 2em; }\n\n sliders: {\n formatString: "[[%1]]+++\sn%2===\sn\sn",\n formatStringLeaf: "[[%1]]\sn"\n },\n\n openSliders: {\n formatString: "[[%1]]++++\sn%2===\sn\sn",\n formatStringLeaf: "[[%1]]\sn"\n },\n\n popups: {\n formatString: "[[%1]]+++^\sn%2===\sn\sn",\n formatStringLeaf: "[[%1]]\sn"\n },\n\n // these don't work too well\n openPopups: {\n formatString: "[[%1]]++++^\sn%2===\sn\sn",\n formatStringLeaf: "[[%1]]\sn"\n },\n \n // this is a little nuts but it works\n json: {\n formatString: '\sn%0{"%1":[%2\sn%0]}',\n formatStringLeaf: '\sn%0"%1"',\n indentString: " ",\n separatorString: ","\n }\n\n\n },\n\n defaultFormat: "bullets",\n\n treeTraverse: function(title,depth,maxdepth,format,dontshowroot,tags,excludetags) {\n\n var tiddler = store.getTiddler(title);\n var tagging = store.getTaggedTiddlers(title);\n\n if (dontshowroot)\n depth = 0;\n\n var indent = "";\n if (this.formats[format].indentString)\n for (var j=0;j<depth;j++)\n indent += this.formats[format].indentString;\n\n var childOutput = "";\n if (!maxdepth || depth < parseInt(maxdepth)) \n for (var i=0;i<tagging.length;i++)\n if (tagging[i].title != title) {\n if (this.formats[format].separatorString && i != 0)\n childOutput += this.formats[format].separatorString;\n childOutput += this.treeTraverse(tagging[i].title,depth+1,maxdepth,format,null,tags,excludetags);\n }\n\n if (childOutput == "" && (\n (tags && tags != "" && !tiddler.tags.containsAll(tags.readBracketedList())) ||\n (excludetags && excludetags != "" && tiddler.tags.containsAny(excludetags.readBracketedList()))\n )\n ) {\n // so prune it cos it doesn't have the right tags and neither do any of it's children\n return "";\n }\n\n if (dontshowroot)\n return childOutput;\n\n if (this.formats[format].formatStringLeaf && childOutput == "") {\n // required for nestedSliders\n return this.formats[format].formatStringLeaf.format([indent,title,childOutput]);\n }\n\n return this.formats[format].formatString.format([indent,title,childOutput]);\n },\n\n handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n wikify(this.treeTraverse(\n params[0] && params[0] != '.' ? params[0] : tiddler.title, 1, \n params[1] && params[1] != '.' ? params[1] : null, // maxdepth\n params[2] && params[2] != '.' ? params[2] : this.defaultFormat, // format\n params[3] && params[3] != '.' ? params[3] : null, // dontshowroot\n params[4] && params[4] != '.' ? params[4] : null, // tags\n params[5] && params[5] != '.' ? params[5] : null // excludetags\n ),place);\n }\n\n}\n\n//}}}\n
powered by TiddlyWiki\n
Gtd_jbu_template
<<tiddlerSplitter>> <<deleteAllTagged>> \nThis tiddler is a demo for the tiddlerSplitter macro.\nJust click the above tiddlerSplitterbutton to split this tiddler\nIt will create new tagged (child) tiddlers.\nYou will be able to merge them later by adding the tiddlerMerger macro to this one\nThe Merge demo is ready as a demo of the tiddlerMerger macro\nThe newly created child tiddler will not be tagged as this one (ie as demo), \nso you will have to delete them either manually, or by clicking the deleteAllTagged button above
\n[[MptwStyleSheet]]\n[[MonkeyGTDStyles]]\n\n
<<timeline modified 30>>\n
Brought to you by [[Clint Checketts]]' TagglyTagCloud plugin.\n<<gradient vert #dddddd #ffffff #eeeeee>>\n<<tagCloud GTD Action ActionStatus Area Atelier Besace Complete Context Corvées dsk Done GTDComponent html InboxTiddlers MainDash Next palette Personal Project ProjectStatus QuickAccess Realm Starred systemConfig UpgradeTools "Waiting For" css >>\n
/***\n|Name|TagglyListPlugin|\n|Created by|SimonBaird|\n|Location|http://simonbaird.com/mptw/#TagglyListPlugin|\n|Version|1.1.2 25-Apr-06|\n|Requires|See TagglyTagging|\n\n!History\n* 1.1.2 (25-Apr-2006) embedded TagglyTaggingStyles. No longer need separated tiddler for styles.\n* 1.1.1 (6-Mar-2006) fixed bug with refreshAllVisible closing tiddlers being edited. Thanks Luke Blanshard.\n\n***/\n\n/***\n!Setup and config\n***/\n//{{{\n\nversion.extensions.TagglyListPlugin = {\n major: 1, minor: 1, revision: 2,\n date: new Date(2006,4,25),\n source: "http://simonbaird.com/mptw/#TagglyListPlugin"\n};\n\nconfig.macros.tagglyList = {};\nconfig.macros.tagglyListByTag = {};\nconfig.macros.tagglyListControl = {};\nconfig.macros.tagglyListWithSort = {};\nconfig.macros.hideSomeTags = {};\n\n// change this to your preference\nconfig.macros.tagglyListWithSort.maxCols = 6;\n\nconfig.macros.tagglyList.label = "Tagged as %0:";\n\n// the default sort options. set these to your preference\nconfig.macros.tagglyListWithSort.defaults = {\n sortBy:"title", // title|created|modified\n sortOrder: "asc", // asc|desc\n hideState: "show", // show|hide\n groupState: "nogroup", // nogroup|group\n numCols: 1\n};\n\n// these tags will be ignored by the grouped view\nconfig.macros.tagglyListByTag.excludeTheseTags = [\n "systemConfig",\n "TiddlerTemplates"\n];\n\nconfig.macros.tagglyListControl.tags = {\n title:"sortByTitle", \n modified: "sortByModified", \n created: "sortByCreated",\n asc:"sortAsc", \n desc:"sortDesc",\n hide:"hideTagged", \n show:"showTagged",\n nogroup:"noGroupByTag",\n group:"groupByTag",\n cols1:"list1Cols",\n cols2:"list2Cols",\n cols3:"list3Cols",\n cols4:"list4Cols",\n cols5:"list5Cols",\n cols6:"list6Cols",\n cols7:"list7Cols",\n cols8:"list8Cols",\n cols9:"list9Cols" \n}\n\n// note: should match config.macros.tagglyListControl.tags\nconfig.macros.hideSomeTags.tagsToHide = [\n "sortByTitle",\n "sortByCreated",\n "sortByModified",\n "sortDesc",\n "sortAsc",\n "hideTagged",\n "showTagged",\n "noGroupByTag",\n "groupByTag",\n "list1Cols",\n "list2Cols",\n "list3Cols",\n "list4Cols",\n "list5Cols",\n "list6Cols",\n "list7Cols",\n "list8Cols",\n "list9Cols"\n];\n\n\n//}}}\n/***\n\n!Utils\n***/\n//{{{\n// from Eric\nfunction isTagged(title,tag) {\n var t=store.getTiddler(title); if (!t) return false;\n return (t.tags.find(tag)!=null);\n}\n\n// from Eric\nfunction toggleTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)==null) t.tags.push(tag);\n else t.tags.splice(t.tags.find(tag),1);\n}\n\nfunction addTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n t.tags.push(tag);\n}\n\nfunction removeTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);\n}\n\n// from Udo\nArray.prototype.indexOf = function(item) {\n for (var i = 0; i < this.length; i++) {\n if (this[i] == item) {\n return i;\n }\n }\n return -1;\n};\nArray.prototype.contains = function(item) {\n return (this.indexOf(item) >= 0);\n}\n//}}}\n/***\n\n!tagglyList\ndisplays a list of tagged tiddlers. \nparameters are sortField and sortOrder\n***/\n//{{{\n\n// not used at the moment...\nfunction sortedListOfOtherTags(tiddler,thisTag) {\n var list = tiddler.tags.concat(); // so we are working on a clone..\n for (var i=0;i<config.macros.hideSomeTags.tagsToHide.length;i++) {\n if (list.find(config.macros.hideSomeTags.tagsToHide[i]) != null)\n list.splice(list.find(config.macros.hideSomeTags.tagsToHide[i]),1); // remove hidden ones\n }\n for (var i=0;i<config.macros.tagglyListByTag.excludeTheseTags.length;i++) {\n if (list.find(config.macros.tagglyListByTag.excludeTheseTags[i]) != null)\n list.splice(list.find(config.macros.tagglyListByTag.excludeTheseTags[i]),1); // remove excluded ones\n }\n list.splice(list.find(thisTag),1); // remove thisTag\n return '[[' + list.sort().join("]] [[") + ']]';\n}\n\nfunction sortHelper(a,b) {\n if (a == b) return 0;\n else if (a < b) return -1;\n else return +1;\n}\n\nconfig.macros.tagglyListByTag.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n\n if (sortOrder == "desc")\n result = result.reverse();\n\n var leftOvers = []\n for (var i=0;i<result.length;i++) {\n leftOvers.push(result[i].title);\n }\n\n var allTagsHolder = {};\n for (var i=0;i<result.length;i++) {\n for (var j=0;j<result[i].tags.length;j++) {\n\n if ( \n result[i].tags[j] != tiddler.title // not this tiddler\n && config.macros.hideSomeTags.tagsToHide.find(result[i].tags[j]) == null // not a hidden one\n && config.macros.tagglyListByTag.excludeTheseTags.find(result[i].tags[j]) == null // not excluded\n ) {\n if (!allTagsHolder[result[i].tags[j]])\n allTagsHolder[result[i].tags[j]] = "";\n allTagsHolder[result[i].tags[j]] += "**[["+result[i].title+"]]\sn";\n\n if (leftOvers.find(result[i].title) != null)\n leftOvers.splice(leftOvers.find(result[i].title),1); // remove from leftovers. at the end it will contain the leftovers...\n }\n }\n }\n\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var markup = "";\n\n if (sortOrder == "desc") {\n allTags.reverse();\n }\n else {\n // leftovers first...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n } \n\n for (var i=0;i<allTags.length;i++)\n markup += "*[["+allTags[i]+"]]\sn" + allTagsHolder[allTags[i]];\n\n if (sortOrder == "desc") {\n // leftovers last...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n }\n\n wikify(markup,place);\n}\n\nconfig.macros.tagglyList.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n var numCols = params[2] ? params[2] : 1;\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n if (sortOrder == "desc")\n result = result.reverse();\n\n var listSize = result.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize;\n var lowerColsize;\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n lowerColsize = Math.floor(colSize);\n upperColsize = Math.floor(colSize) + 1;\n }\n else {\n lowerColsize = colSize;\n upperColsize = colSize;\n }\n\n var markup = "";\n var c=0;\n\n var newTaggedTable = createTiddlyElement(place,"table");\n var newTaggedBody = createTiddlyElement(newTaggedTable,"tbody");\n var newTaggedTr = createTiddlyElement(newTaggedBody,"tr");\n\n for (var j=0;j<numCols;j++) {\n var foo = "";\n var thisSize;\n\n if (j<remainder)\n thisSize = upperColsize;\n else\n thisSize = lowerColsize;\n\n for (var i=0;i<thisSize;i++) \n foo += ( "*[[" + result[c++].title + "]]\sn"); // was using splitList.shift() but didn't work in IE;\n\n var newTd = createTiddlyElement(newTaggedTr,"td",null,"tagglyTagging");\n wikify(foo,newTd);\n\n }\n\n};\n\n/* snip for later.....\n //var groupBy = params[3] ? params[3] : "t.title.substr(0,1)";\n //var groupBy = params[3] ? params[3] : "sortedListOfOtherTags(t,tiddler.title)";\n //var groupBy = params[3] ? params[3] : "t.modified";\n var groupBy = null; // for now. groupBy here is working but disabled for now.\n\n var prevGroup = "";\n var thisGroup = "";\n\n if (groupBy) {\n result.sort(function(a,b) {\n var t = a; var aSortVal = eval(groupBy); var aSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal = eval(groupBy); var bSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal2 = eval(groupBy);\n return (aSortVal == bSortVal ?\n (aSortVal2 == bSortVal2 ? 0 : (aSortVal2 < bSortVal2 ? -1 : +1)) // yuck\n : (aSortVal < bSortVal ? -1 : +1));\n });\n }\n\n if (groupBy) {\n thisGroup = eval(groupBy);\n if (thisGroup != prevGroup)\n markup += "*[["+thisGroup+']]\sn';\n markup += "**[["+t.title+']]\sn';\n prevGroup = thisGroup;\n }\n\n\n\n*/\n\n\n//}}}\n\n/***\n\n!tagglyListControl\nUse to make the sort control buttons\n***/\n//{{{\n\nfunction getSortBy(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortBy;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["title"])) return "title";\n else if (tiddler.tags.contains(usetags["modified"])) return "modified";\n else if (tiddler.tags.contains(usetags["created"])) return "created";\n else return defaultVal;\n}\n\nfunction getSortOrder(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortOrder;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["asc"])) return "asc";\n else if (tiddler.tags.contains(usetags["desc"])) return "desc";\n else return defaultVal;\n}\n\nfunction getHideState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.hideState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["hide"])) return "hide";\n else if (tiddler.tags.contains(usetags["show"])) return "show";\n else return defaultVal;\n}\n\nfunction getGroupState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.groupState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["group"])) return "group";\n else if (tiddler.tags.contains(usetags["nogroup"])) return "nogroup";\n else return defaultVal;\n}\n\nfunction getNumCols(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.numCols; // an int\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n for (var i=1;i<=config.macros.tagglyListWithSort.maxCols;i++)\n if (tiddler.tags.contains(usetags["cols"+i])) return i;\n return defaultVal;\n}\n\n\nfunction getSortLabel(title,which) {\n // TODO. the strings here should be definable in config\n var by = getSortBy(title);\n var order = getSortOrder(title);\n var hide = getHideState(title);\n var group = getGroupState(title);\n if (which == "hide") return (hide == "show" ? "−" : "+"); // 0x25b8;\n else if (which == "group") return (group == "group" ? "normal" : "grouped");\n else if (which == "cols") return "cols±"; // &plusmn;\n else if (by == which) return which + (order == "asc" ? "↓" : "↑"); // &uarr; &darr;\n else return which;\n}\n\nfunction handleSortClick(title,which) {\n var currentSortBy = getSortBy(title);\n var currentSortOrder = getSortOrder(title);\n var currentHideState = getHideState(title);\n var currentGroupState = getGroupState(title);\n var currentNumCols = getNumCols(title);\n\n var tags = config.macros.tagglyListControl.tags;\n\n // if it doesn't exist, lets create it..\n if (!store.getTiddler(title))\n store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);\n\n if (which == "hide") {\n // toggle hide state\n var newHideState = (currentHideState == "hide" ? "show" : "hide");\n removeTag(title,tags[currentHideState]);\n if (newHideState != config.macros.tagglyListWithSort.defaults.hideState)\n toggleTag(title,tags[newHideState]);\n }\n else if (which == "group") {\n // toggle hide state\n var newGroupState = (currentGroupState == "group" ? "nogroup" : "group");\n removeTag(title,tags[currentGroupState]);\n if (newGroupState != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags[newGroupState]);\n }\n else if (which == "cols") {\n // toggle num cols\n var newNumCols = currentNumCols + 1; // confusing. currentNumCols is an int\n if (newNumCols > config.macros.tagglyListWithSort.maxCols || newNumCols > store.getTaggedTiddlers(title).length)\n newNumCols = 1;\n removeTag(title,tags["cols"+currentNumCols]);\n if (("cols"+newNumCols) != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags["cols"+newNumCols]);\n }\n else if (currentSortBy == which) {\n // toggle sort order\n var newSortOrder = (currentSortOrder == "asc" ? "desc" : "asc");\n removeTag(title,tags[currentSortOrder]);\n if (newSortOrder != config.macros.tagglyListWithSort.defaults.sortOrder)\n toggleTag(title,tags[newSortOrder]);\n }\n else {\n // change sortBy only\n removeTag(title,tags["title"]);\n removeTag(title,tags["created"]);\n removeTag(title,tags["modified"]);\n\n if (which != config.macros.tagglyListWithSort.defaults.sortBy)\n toggleTag(title,tags[which]);\n }\n\n store.setDirty(true); // save is required now.\n story.refreshTiddler(title,false,true); // force=true\n}\n\nconfig.macros.tagglyListControl.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var onclick = function(e) {\n if (!e) var e = window.event;\n handleSortClick(tiddler.title,params[0]);\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return false;\n };\n createTiddlyButton(place,getSortLabel(tiddler.title,params[0]),"Click to change sort options",onclick,params[0]=="hide"?"hidebutton":"button");\n}\n//}}}\n/***\n\n!tagglyListWithSort\nput it all together..\n***/\n//{{{\nconfig.macros.tagglyListWithSort.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n if (tiddler && store.getTaggedTiddlers(tiddler.title).length > 0)\n // todo make this readable\n wikify(\n "<<tagglyListControl hide>>"+\n (getHideState(tiddler.title) != "hide" ? \n '<html><span class="tagglyLabel">'+config.macros.tagglyList.label.format([tiddler.title])+' </span></html>'+\n "<<tagglyListControl title>><<tagglyListControl modified>><<tagglyListControl created>><<tagglyListControl group>>"+(getGroupState(tiddler.title)=="group"?"":"<<tagglyListControl cols>>")+"\sn" + \n "<<tagglyList" + (getGroupState(tiddler.title)=="group"?"ByTag ":" ") + getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+" "+getNumCols(tiddler.title)+">>" // hacky\n // + \sn----\sn" +\n //"<<tagglyList "+getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+">>"\n : ""),\n place,null,tiddler);\n}\n\nconfig.macros.tagglyTagging = { handler: config.macros.tagglyListWithSort.handler };\n\n\n//}}}\n/***\n\n!hideSomeTags\nSo we don't see the sort tags.\n(note, they are still there when you edit. Will that be too annoying?\n***/\n//{{{\n\n// based on tags.handler\nconfig.macros.hideSomeTags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n var theList = createTiddlyElement(place,"ul");\n if(params[0] && store.tiddlerExists[params[0]])\n tiddler = store.getTiddler(params[0]);\n var lingo = config.views.wikified.tag;\n var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;\n createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));\n for(var t=0; t<tiddler.tags.length; t++)\n if (!this.tagsToHide.contains(tiddler.tags[t])) // this is the only difference from tags.handler...\n createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);\n\n}\n\n//}}}\n/***\n\n!Refresh everything when we save a tiddler. So the tagged lists never get stale. Is this too slow???\n***/\n//{{{\n\nfunction refreshAllVisible() {\n story.forEachTiddler(function(title,element) {\n if (element.getAttribute("dirty") != "true") \n story.refreshTiddler(title,false,true);\n });\n}\n\nstory.saveTiddler_orig_mptw = story.saveTiddler;\nstory.saveTiddler = function(title,minorUpdate) {\n var result = this.saveTiddler_orig_mptw(title,minorUpdate);\n refreshAllVisible();\n return result;\n}\n\nstore.removeTiddler_orig_mptw = store.removeTiddler;\nstore.removeTiddler = function(title) {\n this.removeTiddler_orig_mptw(title);\n refreshAllVisible();\n}\n\nconfig.shadowTiddlers.TagglyTaggingStyles = "/***\snTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\sn***/\sn/*{{{*/\sn.tagglyTagged li.listTitle { display:none;}\sn.tagglyTagged li { display: inline; font-size:90%; }\sn.tagglyTagged ul { margin:0px; padding:0px; }\sn.tagglyTagging { padding-top:0.5em; }\sn.tagglyTagging li.listTitle { display:none;}\sn.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\sn\sn/* .tagglyTagging .tghide { display:inline; } */\sn\sn.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\sn.tagglyTagging table { margin:0px; padding:0px; }\sn\sn\sn.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\sn.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\sn.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\sn.selected .tagglyTagging .button { display:inline; }\sn\sn.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */\sn.selected .tagglyTagging .hidebutton { color:#aaa }\sn\sn.tagglyLabel { color:#aaa; font-size:90%; }\sn\sn.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\sn.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\sn.tagglyTagging ul ul li {margin-left:0.5em; }\sn\sn.editLabel { font-size:90%; padding-top:0.5em; }\sn/*}}}*/\sn";\n\nrefreshStyles("TagglyTaggingStyles");\n\n\n//}}}\n\n// // <html>&#x25b8;&#x25be;&minus;&plusmn;</html>
/***\n|!Plugin Name|TagglyTagCloud|\n|!Author|[[Clint Checketts|http://www.checkettsweb.com]]|\n|!Version|1.0|\n|!Usage|<////<tagCloud excludeTag>////>|\n***/\n\n//{{{\nversion.extensions.tagCloud = {major: 1, minor: 0 , revision: 1, date: new Date(2005,8,16)};\n//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman\n\nconfig.macros.tagCloud = {\n noTags: "No tag cloud created because there are no tags.",\n tooltip: "%1 tiddlers tagged with '%0'"\n};\n\nconfig.macros.tagCloud.handler = function(place,macroName,params) {\n \nvar tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null);\n\nvar tags = store.getTags();\nfor (var t=0; t<tags.length; t++) {\n for (var p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = "";\n}\n\n if(tags.length == 0) \n createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags);\n //Findout the maximum number of tags\n var mostTags = 0;\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n if (tags[t][1] > mostTags) mostTags = tags[t][1];\n }\n //divide the mostTags into 4 segments for the 4 different tagCloud sizes\n var tagSegment = mostTags / 4;\n\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null);\n tagCloudWrapper.appendChild(document.createTextNode(" "));\n var theTag = createTiddlyLink(tagCloudElement,tags[t][0],true);\n theTag.className += " tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1);\n if (tags[t][1] > 1){\n theTag.title = "There are "+tags[t][1]+" tiddlers tagged as '"+tags[t][0]+"'";\n} else {\n theTag.title = "There is only one tiddler tagged as '"+tags[t][0]+"'";\n}\n\n// theTag.setAttribute("tag",tags[t][0]);\n }\n\n};\n\nsetStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 1.2em;}.tagCloud2{font-size: 1.4em;}.tagCloud3{font-size: 1.6em;}.tagCloud4{font-size: 1.8em;}.tagCloud5{font-size: 1.8em;font-weight: bold;}","tagCloudsStyles");\n//}}}
/***\n| Name:|TagglyTaggingPlugin|\n| Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nSee http://mptw.tiddlyspot.com/#TagglyTagging\n***/\n//{{{\nconfig.taggly = {\n\n // for translations\n lingo: {\n labels: {\n asc: "\su2191", // down arrow\n desc: "\su2193", // up arrow\n title: "title",\n modified: "modified",\n created: "created",\n show: "+",\n hide: "-",\n normal: "normal",\n group: "group",\n commas: "commas",\n sitemap: "sitemap",\n numCols: "cols\su00b1", // plus minus sign\n label: "Tagged as '%0':"\n },\n\n tooltips: {\n title: "Click to sort by title",\n modified: "Click to sort by modified date",\n created: "Click to sort by created date",\n show: "Click to show tagging list",\n hide: "Click to hide tagging list",\n normal: "Click to show a normal ungrouped list",\n group: "Click to show list grouped by tag",\n sitemap: "Click to show a sitemap style list",\n commas: "Click to show a comma separated list",\n numCols: "Click to change number of columns"\n }\n },\n\n config: {\n showTaggingCounts: true,\n listOpts: {\n // the first one will be the default\n sortBy: ["title","modified","created"],\n sortOrder: ["asc","desc"],\n hideState: ["show","hide"],\n listMode: ["normal","group","sitemap","commas"],\n numCols: ["1","2","3","4","5","6"]\n },\n valuePrefix: "taggly."\n },\n\n getTagglyOpt: function(title,opt) {\n var val = store.getValue(title,this.config.valuePrefix+opt);\n return val ? val : this.config.listOpts[opt][0];\n },\n\n setTagglyOpt: function(title,opt,value) {\n if (!store.tiddlerExists(title))\n // create it silently\n store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);\n // if value is default then remove it to save space\n return store.setValue(title,\n this.config.valuePrefix+opt,\n value == this.config.listOpts[opt][0] ? null : value);\n },\n\n getNextValue: function(title,opt) {\n var current = this.getTagglyOpt(title,opt);\n var pos = this.config.listOpts[opt].indexOf(current);\n // a little usability enhancement. actually it doesn't work right for grouped or sitemap\n var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);\n var newPos = (pos + 1) % limit;\n return this.config.listOpts[opt][newPos];\n },\n\n toggleTagglyOpt: function(title,opt) {\n var newVal = this.getNextValue(title,opt);\n this.setTagglyOpt(title,opt,newVal);\n }, \n\n createListControl: function(place,title,type) {\n var lingo = config.taggly.lingo;\n var label;\n var tooltip;\n var onclick;\n\n if ((type == "title" || type == "modified" || type == "created")) {\n // "special" controls. a little tricky. derived from sortOrder and sortBy\n label = lingo.labels[type];\n tooltip = lingo.tooltips[type];\n\n if (this.getTagglyOpt(title,"sortBy") == type) {\n label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,"sortOrder");\n return false;\n }\n }\n else {\n onclick = function() {\n config.taggly.setTagglyOpt(title,"sortBy",type);\n config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);\n return false;\n }\n }\n }\n else {\n // "regular" controls, nice and simple\n label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];\n tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,type);\n return false;\n }\n }\n\n // hide button because commas don't have columns\n if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))\n createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");\n },\n\n makeColumns: function(orig,numCols) {\n var listSize = orig.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize = colSize;\n var lowerColsize = colSize;\n\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n upperColsize = Math.floor(colSize) + 1;\n lowerColsize = Math.floor(colSize);\n }\n\n var output = [];\n var c = 0;\n for (var j=0;j<numCols;j++) {\n var singleCol = [];\n var thisSize = j < remainder ? upperColsize : lowerColsize;\n for (var i=0;i<thisSize;i++) \n singleCol.push(orig[c++]);\n output.push(singleCol);\n }\n\n return output;\n },\n\n drawTable: function(place,columns,theClass) {\n var newTable = createTiddlyElement(place,"table",null,theClass);\n var newTbody = createTiddlyElement(newTable,"tbody");\n var newTr = createTiddlyElement(newTbody,"tr");\n for (var j=0;j<columns.length;j++) {\n var colOutput = "";\n for (var i=0;i<columns[j].length;i++) \n colOutput += columns[j][i];\n var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class\n wikify(colOutput,newTd);\n }\n return newTable;\n },\n\n createTagglyList: function(place,title) {\n switch(this.getTagglyOpt(title,"listMode")) {\n case "group": return this.createTagglyListGrouped(place,title); break;\n case "normal": return this.createTagglyListNormal(place,title,false); break;\n case "commas": return this.createTagglyListNormal(place,title,true); break;\n case "sitemap":return this.createTagglyListSiteMap(place,title); break;\n }\n },\n\n getTaggingCount: function(title) {\n // thanks to Doug Edmunds\n if (this.config.showTaggingCounts) {\n var tagCount = store.getTaggedTiddlers(title).length;\n if (tagCount > 0)\n return " ("+tagCount+")";\n }\n return "";\n },\n\n // this is for normal and commas mode\n createTagglyListNormal: function(place,title,useCommas) {\n\n var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));\n\n if (this.getTagglyOpt(title,"sortOrder") == "desc")\n list = list.reverse();\n\n var output = [];\n for (var i=0;i<list.length;i++) {\n var countString = this.getTaggingCount(list[i].title);\n if (useCommas)\n output.push((i > 0 ? ", " : "") + "[[" + list[i].title + "]]" + countString);\n else\n output.push("*[[" + list[i].title + "]]" + countString + "\sn");\n }\n\n return this.drawTable(place,\n this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),\n useCommas ? "commas" : "normal");\n },\n\n // this is for the "grouped" mode\n createTagglyListGrouped: function(place,title) {\n var sortBy = this.getTagglyOpt(title,"sortBy");\n var sortOrder = this.getTagglyOpt(title,"sortOrder");\n\n var list = store.getTaggedTiddlers(title,sortBy);\n\n if (sortOrder == "desc")\n list = list.reverse();\n\n var leftOvers = []\n for (var i=0;i<list.length;i++)\n leftOvers.push(list[i].title);\n\n var allTagsHolder = {};\n for (var i=0;i<list.length;i++) {\n for (var j=0;j<list[i].tags.length;j++) {\n\n if (list[i].tags[j] != title) { // not this tiddler\n\n if (!allTagsHolder[list[i].tags[j]])\n allTagsHolder[list[i].tags[j]] = "";\n\n allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"\n + this.getTaggingCount(list[i].title) + "\sn";\n leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers\n }\n }\n }\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n var sortHelper = function(a,b) {\n if (a == b) return 0;\n if (a < b) return -1;\n return 1;\n };\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var leftOverOutput = "";\n for (var i=0;i<leftOvers.length;i++)\n leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn";\n\n var output = [];\n\n if (sortOrder == "desc")\n allTags.reverse();\n else if (leftOverOutput != "")\n // leftovers first...\n output.push(leftOverOutput);\n\n for (var i=0;i<allTags.length;i++)\n output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn" + allTagsHolder[allTags[i]]);\n\n if (sortOrder == "desc" && leftOverOutput != "")\n // leftovers last...\n output.push(leftOverOutput);\n\n return this.drawTable(place,\n this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),\n "grouped");\n\n },\n\n // used to build site map\n treeTraverse: function(title,depth,sortBy,sortOrder) {\n\n var list = store.getTaggedTiddlers(title,sortBy);\n if (sortOrder == "desc")\n list.reverse();\n\n var indent = "";\n for (var j=0;j<depth;j++)\n indent += "*"\n\n var childOutput = "";\n for (var i=0;i<list.length;i++)\n if (list[i].title != title)\n childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);\n\n if (depth == 0)\n return childOutput;\n else\n return indent + "[["+title+"]]" + this.getTaggingCount(title) + "\sn"+childOutput;\n },\n\n // this if for the site map mode\n createTagglyListSiteMap: function(place,title) {\n var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));\n return this.drawTable(place,\n this.makeColumns(output.split(/(?=^\s*\s[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic\n "sitemap"\n );\n },\n\n macros: {\n tagglyTagging: {\n handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n var refreshContainer = createTiddlyElement(place,"div");\n // do some refresh magic to make it keep the list fresh - thanks Saq\n refreshContainer.setAttribute("refresh","macro");\n refreshContainer.setAttribute("macroName",macroName);\n refreshContainer.setAttribute("title",tiddler.title);\n this.refresh(refreshContainer);\n },\n\n refresh: function(place) {\n var title = place.getAttribute("title");\n removeChildren(place);\n if (store.getTaggedTiddlers(title).length > 0) {\n var lingo = config.taggly.lingo;\n config.taggly.createListControl(place,title,"hideState");\n if (config.taggly.getTagglyOpt(title,"hideState") == "show") {\n createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));\n config.taggly.createListControl(place,title,"title");\n config.taggly.createListControl(place,title,"modified");\n config.taggly.createListControl(place,title,"created");\n config.taggly.createListControl(place,title,"listMode");\n config.taggly.createListControl(place,title,"numCols");\n config.taggly.createTagglyList(place,title);\n }\n }\n }\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by TagglyTaggingPlugin */\sn"+\n".tagglyTagging { padding-top:0.5em; }\sn"+\n".tagglyTagging li.listTitle { display:none; }\sn"+\n".tagglyTagging ul {\sn"+\n" margin-top:0px; padding-top:0.5em; padding-left:2em;\sn"+\n" margin-bottom:0px; padding-bottom:0px;\sn"+\n"}\sn"+\n".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\sn"+\n".tagglyTagging table { margin:0px; padding:0px; }\sn"+\n".tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\sn"+\n".tagglyTagging .button, .tagglyTagging .hidebutton {\sn"+\n" color:[[ColorPalette::TertiaryLight]]; font-size:90%;\sn"+\n" border:0px; padding-left:0.3em;padding-right:0.3em;\sn"+\n"}\sn"+\n".tagglyTagging .button:hover, .hidebutton:hover {\sn"+\n" background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];\sn"+\n"}\sn"+\n".selected .tagglyTagging .button {\sn"+\n" display:inline;\sn"+\n"}\sn"+\n".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }\sn"+\n".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }\sn"+\n".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }\sn"+\n".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\sn"+\n".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\sn"+\n".tagglyTagging ul ul li {margin-left:0.5em; }\sn"+\n".editLabel { font-size:90%; padding-top:0.5em; }\sn"+\n".tagglyTagging .commas { padding-left:1.8em; }\sn"+\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n merge(config.macros,this.macros);\n config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;\n if (store)\n store.addNotification("TagglyTaggingStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"TagglyTaggingStyles", notify: refreshStyles});\n }\n};\n\nconfig.taggly.init();\n\n//}}}\n\n
\n/***\n\nAn under construction replacement for toggleTag\n\n<<tTag mode:text text:D tag:Done>>\n<<tTag mode:text text:N tag:Next>>\n***/\n//{{{\n\nmerge(config.macros,{\n\n tTag: {\n\n createIfRequired: true,\n shortLabel: "[[%0]]",\n longLabel: "[[%0]] [[%1]]",\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n\n var parsedParams = paramString.parseParams("tags",null,true);\n \n if (!tiddler)\n tiddler = store.getTiddler(getParam(parsedParams,"title"));\n \n var tag = getParam(parsedParams,"tag","checked");\n var title = getParam(parsedParams,"title",tiddler.title);\n\n var refreshAll = getParam(parsedParams,"refreshAll",false);\n\n var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);\n var label = getParam(parsedParams,"label",defaultLabel);\n\n var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);\n\n var mode = getParam(parsedParams,"mode","checkbox");\n\n var theClass = getParam(parsedParams,"class",tag+"Button");\n\n\n var currentValue = theTiddler && \n (macroName == "tTag" ? theTiddler.isTagged(tag) : store.getValue(theTiddler,tag)=="true");\n\n if (mode == "checkbox") {\n // create the checkbox\n\n var cb = createTiddlyCheckbox(place, label.format([tag,title]), currentValue, function(e) {\n if (!store.tiddlerExists(title)) {\n if (config.macros.tTag.createIfRequired) {\n var content = store.getTiddlerText(title); // just in case it's a shadow\n store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);\n }\n else \n return false;\n }\n //store.suspendNotifications(); \n if (macroName == "tTag")\n store.setTiddlerTag(title,this.checked,tag);\n else // it must be tField\n store.setValue(title,tag,this.checked?"true":null);\n\n if (refreshAll) {\n story.forEachTiddler(function(title,element) {\n if (element.getAttribute("dirty") != "true") \n story.refreshTiddler(title,false,true);\n });\n }\n\n //store.resumeNotifications();\n return true;\n });\n }\n else if (mode == "text") {\n var text = getParam(parsedParams,"text","X");\n\n var cl = createTiddlyButton(place, text, "Toggle "+text, function(e) {\n if(!e) var e = window.event;\n\n if (!store.tiddlerExists(title)) {\n if (config.macros.tTag.createIfRequired) {\n var content = store.getTiddlerText(title); // just in case it's a shadow\n store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);\n }\n else \n return false;\n }\n //store.suspendNotifications(); \n var currentState = this.getAttribute("state")=="true";\n var newState = !currentState;\n\n store.setTiddlerTag(title,newState,tag);\n if (macroName == "tTag")\n store.setTiddlerTag(title,newState,tag);\n else // it must be tField\n store.setValue(title,tag,newState?"true":null);\n\n // this is terrible please refactor\n if (currentState) {\n cl.setAttribute("state","false");\n removeClass(cl,"on");\n addClass(cl,"off");\n }\n else {\n cl.setAttribute("state","true");\n removeClass(cl,"off");\n addClass(cl,"on");\n }\n\n //refreshDisplay(); \n if (refreshAll) {\n story.forEachTiddler(function(title,element) {\n if (element.getAttribute("dirty") != "true") \n story.refreshTiddler(title,false,true);\n });\n }\n //store.resumeNotifications();\n\n e.cancelBubble = true;\n if(e.stopPropagation) e.stopPropagation();\n\n return false;\n });\n\n addClass(cl,theClass.replace(/ /g,''));\n\n if (currentValue) {\n cl.setAttribute("state","true");\n removeClass(cl,"off");\n addClass(cl,"on");\n }\n else {\n cl.setAttribute("state","false");\n removeClass(cl,"on");\n addClass(cl,"off");\n }\n \n }\n else if (mode == "popup") {\n var cl = createTiddlyButton(place, "zzz", "Toggle "+text, function(e) {\n // props to Saq\n if(!e) var e = window.event;\n var popup = Popup.create(this);\n createTiddlyButton(createTiddlyElement(popup,"li"),"foo","bar",function(e) {\n // under contruction\n alert(this.getAttribute("tag"));\n });\n Popup.show(popup,false);\n e.cancelBubble = true;\n if(e.stopPropagation) e.stopPropagation();\n return false ;\n });\n }\n\n }\n }\n\n});\n\nconfig.macros.tField = config.macros.tTag;\n\nsetStylesheet(["",\n".button.off {border-style:none;background:#fff;color:#ccc;}",\n".button.on {border-style:none;background:#ddd;color:#000;}",\n// TODO move this css elsewhere\n"#realmSelector .button.off {margin:0 0.5em;padding:0 1em;border:2px solid #aaa;background:#eee;color:#333;}", // actually reversed, ie off is "on"\n"#realmSelector .button.on {margin:0 0.5em;padding:0 1em;border:2px solid #999;background:#999;color:#ccc;}", // actually reversed, ie off is "on"\n""].join("\sn"),"tTag");\n\n//}}}\n\n\n\n\n
/***\n| Name:|ToggleTagMacro|\n| Description:|Makes a checkbox which toggles a tag in a tiddler|\n| Version:|$$version$$|\n| Date:|$$date$$|\n| Source:|http://tiddlyspot.com/mptw/#ToggleTagMacro|\n| Author:|SimonBaird|\n| License:|[[BSD open source license]]|\n| CoreVersion:|2.1|\n!Usage\n{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}\n* TagName - the tag to be toggled, default value "checked"\n* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler\n* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'\n(If a parameter is '.' then the default will be used)\n\nExamples:\n\n|Code|Description|Example|h\n|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|\n|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|\n|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|\n|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|\n|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|\n(Note if TiddlerName doesn't exist it will be silently created)\n\n!Known issues\n* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing. Should it stick the tag in the edit box?\n\n***/\n//{{{\n\nmerge(config.macros,{\n\n toggleTag: {\n\n doRefreshAll: true,\n createIfRequired: true,\n shortLabel: "[[%0]]",\n longLabel: "[[%0]] [[%1]]",\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tag = (params[0] && params[0] != '.') ? params[0] : "checked";\n var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;\n var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);\n var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;\n label = (label == '-' ? '' : label);\n var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);\n var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {\n if (!store.tiddlerExists(title)) {\n if (config.macros.toggleTag.createIfRequired) {\n var content = store.getTiddlerText(title); // just in case it's a shadow\n store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);\n }\n else \n return false;\n }\n //store.suspendNotifications(); \n store.setTiddlerTag(title,this.checked,tag);\n //refreshDisplay(); \n //store.resumeNotifications();\n return true;\n });\n }\n }\n});\n\n//}}}\n\n
[[DeleteAllTagged]] : <<deleteAllTagged>> \n{{{ <<deleteAllTagged>> }}}\n----\n[[tiddlerSplitter]] : <<tiddlerSplitter>> \n{{{ <<tiddlerSplitter>> }}}\n----\n[[tiddlerMerger]] : <<tiddlerMerger>> \n{{{ <<tiddlerMerger>> }}}\n\n
/***\n|!Plugin Name|UntaggedMacro|\n|!Description:|Lists untagged tiddlers|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|2.0.0|\n|!Date:|2008/10/16|\n|!Usage|<////<Untagged>////>|\n|!Source:| |\n\n!History\n* 2008/10/16 version 2.0.0\n** take profit from my GtdStats macro\n** converted to a macro\n** output into a tiddler\n* 2008/10/04 version 1.0.0\n** First version as a command button\n** output to the upper right corner notification popup\n\n!Code\n***/\n\n//{{{\n\nversion.extensions.UntaggedMacro= {major: 2, minor: 0 , revision: 0, date: new Date(2005,10, 16)};\n//Created by Jean Buchet\n\nconfig.macros.UntaggedMacro= {\n noProjects: "No projects found"\n};\n\nconfig.macros.UntaggedMacro.handler = function(place,macroName,params) {\n\n var UntaggedWrapper = createTiddlyElement(place,"div",null,"UntaggedMacro",null);\n var results= [] ;\n var nb = 0 ;\n\n store.forEachTiddler( function ( title,tiddler ) {\n if ( tiddler.tags.length == 0) {\n wikify("[["+title+"]]\sn", place );\n nb++ ;\n }\n });\n wikify(nb + " untagged tiddler(s) found", place);\n}\n\n//}}}\n\n
Brought to you by [[JeanBuchet]]' UntaggedMacro plugin.\n\n<<UntaggedMacro>>
<<option chkSaveBackups>> SaveBackups <<saveChanges>>\nTo upgrade select MonkeyGTDUpgrade (or MonkeyGTDUpgradeTs for tiddlyspot online use) then fetch and install all tiddlers. Click Continue if you get long-running script warnings. When it's done save and reload.\n<<importTiddlers>>\n
Use these tools to upgrade you MonkeyGtd
\n<div macro="showWhenTagged GTD">\n\n<div macro="showWhen tiddler.tags.contains('MainDash')">[[MainDashDash]]</div>\n<div macro="showWhen tiddler.tags.contains('Project')">[[ProjectDash]]</div>\n<div macro="showWhen tiddler.tags.contains('Context')">[[ContextDash]]</div>\n<div macro="showWhen tiddler.tags.contains('Area')">[[AreaDash]]</div>\n<div macro="showWhen tiddler.tags.contains('Realm')">[[RealmDash]]</div>\n\n<div macro="showWhen tiddler.title == 'Tickler'">[[TicklerTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Context'">[[ContextTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Realm'">[[RealmTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Area'">[[AreaTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Next'">[[NextTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Action'">[[ActionTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Project'">[[ProjectTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Starred'">[[StarredTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Inbox'">[[InboxTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Process Inbox'">[[ProcessInboxTiddlerDash]]</div>\n<div macro="showWhen tiddler.title == 'Collect Thoughts'">[[CollectThoughtsTiddlerDash]]</div>\n\n</div>\n\n
\n\n<table macro="showWhen tiddler.tags.contains('GTD')" class="mToolbar" width="100%" cellspacing="0" border="0">\n\n <tbody macro="hideWhen tiddler.tags.containsAny(config.mGTD.config.GTDComponent) ||\n config.mGTD.config.GTDComponent.contains(tiddler.title) ||\n tiddler.title == 'Starred' ||\n tiddler.title == 'Process Inbox' ||\n tiddler.title == 'Collect Thoughts'\n "\n > <!-- this seems clumsy. rethink? -->\n <tr>\n <td class="label">Type:</td>\n <td><span macro="checkboxList GTDComponent"></span></td>\n </tr>\n </tbody>\n\n <tbody macro="showWhen tiddler.tags.contains('MainDash')">[[MainDashPanel]]</tbody>\n <tbody macro="showWhen tiddler.tags.contains('Realm')">[[RealmPanel]]</tbody>\n <tbody macro="showWhen tiddler.tags.contains('Tickler')">[[TicklerPanel]]</tbody>\n <tbody macro="showWhen tiddler.tags.contains('Project')">[[ProjectPanel]]</tbody>\n <tbody macro="showWhen tiddler.tags.contains('Action')">[[ActionPanel]]</tbody>\n <tbody macro="showWhen tiddler.tags.contains('Area')">[[AreaPanel]]</tbody>\n</table>\n\n\n\n
\n<!--{{{-->\n\n<div class='toolbar'>\n <span macro="showWhenTagged systemConfig">\n <span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>\n </span>\n <span style="padding:1em;"></span>\n <span macro='toolbar +closeTiddler closeOthers +editTiddler deleteTiddler permalink references newHere refresh'></span>\n</div>\n\n\n\n<div class="tagglyTagged" macro="tags"></div>\n\n<div class='titleContainer'>\n <span class='title' macro='view title'></span>\n <span macro="miniTag"></span>\n <span macro="toggleTag GTD"></span>\n <span macro="showWhenTagged GTD">\n <span macro="tTag tag:Starred mode:text text:{{config.mGTD.star}}"></span>\n </span>\n</div>\n\n<div class='subtitle'>\n <span macro='view modifier link'></span>,\n <span macro="hideWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'">\n <span macro='view modified date [[DD/MM/YY]]'></span>\n (<span macro='message views.wikified.createdPrompt'></span>\n <span macro='view created date [[DD/MM/YY]]'></span>)\n </span>\n <span macro="showWhen store.getValue('MonkeyGTDSettings','mgtd.usemdy')=='true'">\n <span macro='view modified date [[MM/DD/YY]]'></span>\n (<span macro='message views.wikified.createdPrompt'></span>\n <span macro='view created date [[MM/DD/YY]]'></span>)\n </span>\n</div>\n\n<div macro="showWhenExists ViewPanelTemplate">[[ViewPanelTemplate]]</div>\n\n<!--\n<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer' macro='view text wikified'></div>\n</div>\n<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer'><pre macro='view text'></pre></div>\n</div>\n-->\n\n<div macro="hideWhenTagged GTD">\n <div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer' macro='view text wikified'></div>\n </div>\n <div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer'><pre macro='view text'></pre></div>\n </div>\n</div>\n<div macro="showWhenTagged GTD">\n <div style="background:#ffd;padding:0.5em;margin:0.5em 0;border:1px solid #dda;" macro="showWhen tiddler.text.length > 0">\n <div style="font-size:90%;color:#996;">Notes</div>\n <div class='viewer' macro='view text wikified'></div>\n </div>\n</div>\n\n<div macro="showWhenExists ViewDashboardTemplate">[[ViewDashboardTemplate]]</div>\n\n<div macro="hideWhenTagged GTD">\n <div class="tagglyTagging" macro="tagglyTagging"></div>\n</div>\n\n<!--}}}-->\n
This tiddler is used as a tag for a few demo tiddlers.\n\nSome demo tiddlers :\n* [[GtdStats]] will show a projects progress report\n* [[RelatedUrls]] will provide links to other tiddlywiki documents in the same folder.\n* [[UntaggedTiddlers]] will list untagged tiddlers\n* [[Merge demo]] is a demo of the [[tiddlerMerger]] macro\n* [[Split demo]] is a demo of the [[tiddlerSplitter]] macro\n\nWhen you're done with them just delete them by clicking the "<<deleteAllTagged>>" button
<script label="click here" title="mouseover tooltip text" key="X" show>\n/* javascript code goes here... */\nalert('you clicked on the link!');\n</script>
Click the <<tiddlerMerger>> to merge all the tiddlers tagged with {{{Merge demo}}} tag.\nThey will be merged into a new tiddler called [[merged Merge demo]] (this one will "inherit" the tags from the tagged (child) tiddlers.\n\n\n''Beware:'' the tagged (child) tiddlers will be merged by alphabetical order\n''First tiddler to be merged''\nThis tiddler title should appear in ''bold'' in the new "Merged" tiddler\n\n''Last tiddler to be merged''\nIn the "Merged" tiddler, the text of the merged tiddlers will be separated by a {{{----}}} line\n\n''Other tiddler to be merged''\nThe tagged (child) tiddlers will be merged by alphabetical order\n
\n/***\n|!Plugin Name|tiddlerSplitter|\n|!Description:|Merge into a tiddler all its son tiddlers|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|0.0.3|\n|!Date:|2010/07/09|\n|!Usage|<////<tiddlerMerger>////>|\n|!Source:| |\n\n!History\n!Code\n***/\n\n//{{{\n\nversion.extensions.tiddlerMerger= {major: 0, minor: 0 , revision: 1, date: new Date(2010,07, 15)};\n//Created by Jean Buchet\n\nconfig.macros.tiddlerMerger= {\n noProjects: "No projects found",\n\nhandler : function ( place,macroName,params,wikifier,paramString,tiddler ) {\n createTiddlyButton( place, "Merge tiddlers", "Merge its sons into this tiddlers", \n this.do_split(params,paramString,tiddler ) ) ;\n return;\n}, \n\ndo_split : function(params, paramString,tiddler ) {\n return function() {\n\n var this_title=tiddler.title;\n var this_tiddler=tiddler;\n var result_lines=this_tiddler.text;\n var result_tags= [];\n\n result_tags.push(this_title);\n for ( i=0 ; i<this_tiddler.tags.length ; i++) {\n result_tags.push(this_tiddler.tags[ i ] ) ;\n }\n \n displayMessage("Running through tiddlers, looking for "+ this_title);\n\n store.forEachTiddler( function ( title,tiddler ) {\n if ( tiddler.tags.contains(this_title) && ( tiddler.title != this_title ) ) {\n displayMessage("Merging "+ tiddler.title);\n result_lines = result_lines + "\sn''" + tiddler.title + "''\sn" + tiddler.text + "\sn----\sn";\n for ( i=0; i < tiddler.tags.length; i++ ) {\n var atag = tiddler.tags[ i ];\n if ( ! result_tags.contains( atag ) && ( atag != this_title ) ) {\n result_tags.push( atag );\n }\n }\n }\n } );\n \n store.saveTiddler( "merged "+this_title, "merged "+this_title, \n result_lines, // content\n config.options.txtUserName,\n new Date(),\n result_tags, // tags\n null // extra fields\n );\n displayMessage("Merge terminated");\n return false;\n }\n}\n}\n//}}}\n\n
\n/***\n|!Plugin Name|tiddlerSplitter|\n|!Description:|Split a tiddler's content into separate child tiddler|\n|!Author|[[Jean Buchet|http://buje.free.fr/index.php]]|\n|!Version|0.0.1|\n|!Date:|2010/07/09|\n|!Usage|<////<tiddlerSplitter>////>|\n|!Source:| |\n\n!History\n!Code\n***/\n\n//{{{\n\nversion.extensions.tiddlerSplitter= {major: 0, minor: 0 , revision: 1, date: new Date(2010,07, 09)};\n//Created by Jean Buchet\n\nconfig.macros.tiddlerSplitter= {\n noProjects: "No projects found",\n\nhandler : function ( place,macroName,params,wikifier,paramString,tiddler ) {\n createTiddlyButton( place, "Split This tiddler", "Split this tiddler into tagged tiddlers", \n this.do_split(params,paramString,tiddler ) ) ;\n return;\n}, \n\ndo_split : function(params, paramString,tiddler ) {\n return function() {\n\n var lines = tiddler.text.split("\sn");\n var title="";\n for (var i=0;i<lines.length;i++) {\n \n title = lines[i].trim();\n if ( ( title != "<<tiddlerSplitter>>") && (title !="" )) {\n displayMessage("Creating "+title);\n \n if (store.tiddlerExists(title))\n alert("Warning: '"+title+"' already exists, did not create");\n else\n store.saveTiddler( title,title, "", // content\n config.options.txtUserName,\n new Date(),\n "[["+tiddler.title.trim()+"]]", // tags\n null // extra fields\n );\n }\n \n }\n \n displayMessage("Done creating items");\n return false;\n }\n}\n}\n//}}}\n