From c2d5870fac81ed18ef79cff3b8bc289e1783b469 Mon Sep 17 00:00:00 2001 From: gernert Date: Mon, 1 Sep 2014 12:20:02 +0200 Subject: [PATCH 1/7] Update TiddlerTags.tid typo --- editions/tw5.com/tiddlers/concepts/TiddlerTags.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerTags.tid b/editions/tw5.com/tiddlers/concepts/TiddlerTags.tid index 1d4aab0ad..62893d710 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerTags.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerTags.tid @@ -26,7 +26,7 @@ The tag manager is available via a button at the top of the sidebar tab "Tabs", The colour used to draw a tag pill is taken from the ''color'' field of the tiddler titled with the tag. The colour can be specified as any CSS value (more modern browsers show a colour picker for the ''color'' field). -An icon can be associated with a tag by placing the title of the tiddler containing the image into the ''icon'' field of th etiddler titled with the tag. +An icon can be associated with a tag by placing the title of the tiddler containing the image into the ''icon'' field of the tiddler titled with the tag. See the tag {{done||$:/core/ui/TagTemplate}} for an example. From d93696cf10f5ab2987c61daaa2ad26cd32384e96 Mon Sep 17 00:00:00 2001 From: gernert Date: Mon, 1 Sep 2014 14:07:30 +0200 Subject: [PATCH 2/7] Update ContentType.tid typo Could not find a list of types in the Docs --- .../tiddlers/definitions/ContentType.tid | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/definitions/ContentType.tid b/editions/tw5.com/tiddlers/definitions/ContentType.tid index 0f4efd24d..cb9da199e 100644 --- a/editions/tw5.com/tiddlers/definitions/ContentType.tid +++ b/editions/tw5.com/tiddlers/definitions/ContentType.tid @@ -5,5 +5,23 @@ title: ContentType Used in Internet protocols to indicate the type that should be used to interpret the content of a web resource. -Under TiddlyWiki5, the `type` field is gives the content type to apply to the main `text` field. +Under TiddlyWiki5, the `type` field is given the content type to apply to the main `text` field. + +!!List of available types + +|!Group |!Type |!Content of `type` field | +|^''Developer'' |Data dictionary |application/x-tiddler-dictionary| +|~|JavaScript code |application/javascript| +|~|JSON data |application/json| +|~|Static stylesheet |text/css| +|^''Image''|GIF image |image/gif| +|~|ICO format icon file |image/x-icon| +|~|JPEG image |image/jpeg| +|~|PNG image |image/png| +|~|Structured Vector Graphics image |image/svg+xml| +|^''Text''|HTML markup |text/html| +|~|Plain text |text/plain| +|~|TiddlyWiki 5 |text/vnd.tiddlywiki| +|~|TiddlyWiki Classic |text/x-tiddlywiki| + From bc75bd855986bfac2eefde72c8ad289bee91ce6d Mon Sep 17 00:00:00 2001 From: gernert Date: Mon, 1 Sep 2014 15:08:54 +0200 Subject: [PATCH 3/7] Update SystemTags.tid The list of system tags was not complete. I took the info from my guide 'Customization of TW5', http://tw5custom.tiddlyspot.com/#Adding%20parts%20by%20tagging:%5B%5BAdding%20parts%20by%20tagging%5D%5D --- .../tw5.com/tiddlers/concepts/SystemTags.tid | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/concepts/SystemTags.tid b/editions/tw5.com/tiddlers/concepts/SystemTags.tid index 28df98240..705ad8d03 100644 --- a/editions/tw5.com/tiddlers/concepts/SystemTags.tid +++ b/editions/tw5.com/tiddlers/concepts/SystemTags.tid @@ -4,20 +4,36 @@ tags: concepts title: SystemTags type: text/vnd.tiddlywiki -System tags are used to give special behaviour to tiddlers: +System tags are used to give special behaviour to tiddlers. + +! Available system tags + +These are the available system tags * {{$:/tags/AboveStory||$:/core/ui/TagTemplate}} for elements to be placed at the top of the story river +* {{$:/tags/AdvancedSearch||$:/core/ui/TagTemplate}} for search elements +* {{$:/tags/Alert||$:/core/ui/TagTemplate}} for alerts * {{$:/tags/BelowStory||$:/core/ui/TagTemplate}} for elements to be placed at the bottom of the story river * {{$:/tags/ControlPanel||$:/core/ui/TagTemplate}} for control panel tabs +* {{$:/tags/ControlPanel/Advanced||$:/core/ui/TagTemplate}} for advanced control panel tabs +* {{$:/tags/ControlPanel/Advanced/Settings||$:/core/ui/TagTemplate}} for parts in advanced settings +* {{$:/tags/ControlPanel/Appearance||$:/core/ui/TagTemplate}} for tabs controlling the appearance * {{$:/tags/EditTemplate||$:/core/ui/TagTemplate}} for the edit template * {{$:/tags/EditToolbar||$:/core/ui/TagTemplate}} for the edit mode tiddler toolbar +* {{$:/tags/Filter||$:/core/ui/TagTemplate}} for filters in advanced seach > filters +* {{$:/tags/Image||$:/core/ui/TagTemplate}} for (core) images +* {{$:/tags/Macro||$:/core/ui/TagTemplate}} for global macros * {{$:/tags/MoreSideBar||$:/core/ui/TagTemplate}} for tabs in the "more" sidebar * {{$:/tags/PageControls||$:/core/ui/TagTemplate}} for the page control tools in the sidebar * {{$:/tags/PageTemplate||$:/core/ui/TagTemplate}} for the main page elements +* {{$:/tags/Palette||$:/core/ui/TagTemplate}} for colour palettes * {{$:/tags/RawMarkup||$:/core/ui/TagTemplate}} for raw markup to be included in the generated HTML file * {{$:/tags/SideBar||$:/core/ui/TagTemplate}} for sidebar tabs * {{$:/tags/stylesheet||$:/core/ui/TagTemplate}} to indicate that a tiddler should be applied as a CSS stylesheet * {{$:/tags/TiddlerInfo||$:/core/ui/TagTemplate}} for tiddler info panel tabs +* {{$:/tags/TiddlerInfo/Advanced||$:/core/ui/TagTemplate}} for tabs under the advanced tiddler tab +* {{$:/tags/TopLeftBar||$:/core/ui/TagTemplate}} for the top left bar +* {{$:/tags/TopRightBar||$:/core/ui/TagTemplate}} for the top right bar * {{$:/tags/ViewTemplate||$:/core/ui/TagTemplate}} for the view template * {{$:/tags/ViewToolbar||$:/core/ui/TagTemplate}} for the view mode tiddler toolbar @@ -29,4 +45,4 @@ These are the system tags in use in this wiki: <$list filter="[all[shadows+tiddlers]tags[]prefix[$:/]sort[title]]">
  • {{||$:/core/ui/TagTemplate}}
  • - \ No newline at end of file + From 3d647ec011838ad1c7e7ec45f61895823885264b Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 1 Sep 2014 14:23:12 +0100 Subject: [PATCH 4/7] Docs Tweaks --- .../tw5.com/tiddlers/definitions/ContentType.tid | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/editions/tw5.com/tiddlers/definitions/ContentType.tid b/editions/tw5.com/tiddlers/definitions/ContentType.tid index cb9da199e..bd01aa636 100644 --- a/editions/tw5.com/tiddlers/definitions/ContentType.tid +++ b/editions/tw5.com/tiddlers/definitions/ContentType.tid @@ -5,23 +5,27 @@ title: ContentType Used in Internet protocols to indicate the type that should be used to interpret the content of a web resource. -Under TiddlyWiki5, the `type` field is given the content type to apply to the main `text` field. +Under TiddlyWiki5, the `type` field gives the content type to apply to the main `text` field. -!!List of available types +!! List of Common Content Types |!Group |!Type |!Content of `type` field | |^''Developer'' |Data dictionary |application/x-tiddler-dictionary| -|~|JavaScript code |application/javascript| +|~|~JavaScript code |application/javascript| |~|JSON data |application/json| |~|Static stylesheet |text/css| |^''Image''|GIF image |image/gif| |~|ICO format icon file |image/x-icon| |~|JPEG image |image/jpeg| +|~|PDF image |application/pdf| |~|PNG image |image/png| |~|Structured Vector Graphics image |image/svg+xml| |^''Text''|HTML markup |text/html| +|~|Cascading Stylesheet text |text/css| +|~|Comma-separated values |text/csv| |~|Plain text |text/plain| -|~|TiddlyWiki 5 |text/vnd.tiddlywiki| -|~|TiddlyWiki Classic |text/x-tiddlywiki| +|~|Plain text |text/plain| +|~|~TiddlyWiki 5 |text/vnd.tiddlywiki| +|~|~TiddlyWiki Classic |text/x-tiddlywiki| From b68192d3cb13beda8106f8c578c13b985267310a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 1 Sep 2014 17:02:37 +0100 Subject: [PATCH 5/7] Add @pmario's latest video Part of addressing #770 --- .../tiddlers/howtos/Improving TiddlyWiki Documentation.tid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid b/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid index 89976fb22..5ee183fde 100644 --- a/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid +++ b/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid @@ -19,6 +19,10 @@ Anyone can submit improvements to the TiddlyWiki documentation that appears on h [[Jermolene|https://github.com/Jermolene]] or one of the other core developers will then have the opportunity to merge your pull request so that it is incorporated into the next build of http://tiddlywiki.com. -Mario Pietsch has created this short video tutorial: +Mario Pietsch has created these short video tutorials: + + + + From ca1de2be99bad23f28a3400c567ee653ee5576ee Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 1 Sep 2014 20:38:53 +0100 Subject: [PATCH 6/7] Revert 6641d5c93f2ccffea77f82d48d1adc6e76809bf2 --- core/wiki/config/SyncFilter.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wiki/config/SyncFilter.tid b/core/wiki/config/SyncFilter.tid index fb925264b..548e2987c 100644 --- a/core/wiki/config/SyncFilter.tid +++ b/core/wiki/config/SyncFilter.tid @@ -1,3 +1,3 @@ title: $:/config/SyncFilter -[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file +[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file From 2f6d16b0fa54a43dc870d01e96e76e57a029f1bd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 1 Sep 2014 20:39:08 +0100 Subject: [PATCH 7/7] Improve comments and coding style --- core/modules/saver-handler.js | 16 +++++++++------- core/modules/syncer.js | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 9fb0266a4..4adc2058c 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -32,22 +32,24 @@ function SaverHandler(options) { if($tw.browser && this.dirtyTracking) { // Compile the dirty tiddler filter this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter)); - // Count of tiddlers that have been changed but not yet saved - this.numTasksInQueue = 0; + // Count of changes that have not yet been saved + this.numChanges = 0; // Listen out for changes to tiddlers this.wiki.addEventListener("change",function(changes) { + // Filter the changes so that we only count changes to tiddlers that we care about var filteredChanges = self.filterFn.call(self.wiki,function(callback) { $tw.utils.each(changes,function(change,title) { var tiddler = self.wiki.getTiddler(title); callback(tiddler,title); }); }); - self.numTasksInQueue += filteredChanges.length; + // Adjust the number of changes + self.numChanges += filteredChanges.length; self.updateDirtyStatus(); // Do any autosave if one is pending and there's no more change events if(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) { // Check if we're dirty - if(self.numTasksInQueue > 0) { + if(self.numChanges > 0) { self.saveWiki({ method: "autosave", downloadType: "text/plain" @@ -61,7 +63,7 @@ function SaverHandler(options) { // Do the autosave unless there are outstanding tiddler change events if(self.wiki.getSizeOfTiddlerEventQueue() === 0) { // Check if we're dirty - if(self.numTasksInQueue > 0) { + if(self.numChanges > 0) { self.saveWiki({ method: "autosave", downloadType: "text/plain" @@ -150,7 +152,7 @@ SaverHandler.prototype.saveWiki = function(options) { } else { // Clear the task queue if we're saving (rather than downloading) if(method !== "download") { - self.numTasksInQueue = 0; + self.numChanges = 0; self.updateDirtyStatus(); } $tw.notifier.display(self.titleSavedNotification); @@ -178,7 +180,7 @@ SaverHandler.prototype.saveWiki = function(options) { Checks whether the wiki is dirty (ie the window shouldn't be closed) */ SaverHandler.prototype.isDirty = function() { - return this.numTasksInQueue > 0; + return this.numChanges > 0; }; /* diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 7d5880d1e..87a4af92c 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -63,7 +63,7 @@ function Syncer(options) { self.handleLazyLoadEvent(title); }); // Get the login status - this.getStatus(function (err,isLoggedIn) { + this.getStatus(function(err,isLoggedIn) { // Do a sync from the server self.syncFromServer(); }); @@ -173,7 +173,7 @@ Syncer.prototype.syncFromServer = function() { this.pollTimerId = null; } this.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) { - // Trigger another sync + // Trigger the next sync self.pollTimerId = setTimeout(function() { self.pollTimerId = null; self.syncFromServer.call(self);