mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-13 19:00:27 +00:00
Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5
This commit is contained in:
commit
2690d2cb7c
@ -32,22 +32,24 @@ function SaverHandler(options) {
|
|||||||
if($tw.browser && this.dirtyTracking) {
|
if($tw.browser && this.dirtyTracking) {
|
||||||
// Compile the dirty tiddler filter
|
// Compile the dirty tiddler filter
|
||||||
this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));
|
this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));
|
||||||
// Count of tiddlers that have been changed but not yet saved
|
// Count of changes that have not yet been saved
|
||||||
this.numTasksInQueue = 0;
|
this.numChanges = 0;
|
||||||
// Listen out for changes to tiddlers
|
// Listen out for changes to tiddlers
|
||||||
this.wiki.addEventListener("change",function(changes) {
|
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) {
|
var filteredChanges = self.filterFn.call(self.wiki,function(callback) {
|
||||||
$tw.utils.each(changes,function(change,title) {
|
$tw.utils.each(changes,function(change,title) {
|
||||||
var tiddler = self.wiki.getTiddler(title);
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
callback(tiddler,title);
|
callback(tiddler,title);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
self.numTasksInQueue += filteredChanges.length;
|
// Adjust the number of changes
|
||||||
|
self.numChanges += filteredChanges.length;
|
||||||
self.updateDirtyStatus();
|
self.updateDirtyStatus();
|
||||||
// Do any autosave if one is pending and there's no more change events
|
// Do any autosave if one is pending and there's no more change events
|
||||||
if(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) {
|
if(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) {
|
||||||
// Check if we're dirty
|
// Check if we're dirty
|
||||||
if(self.numTasksInQueue > 0) {
|
if(self.numChanges > 0) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
method: "autosave",
|
method: "autosave",
|
||||||
downloadType: "text/plain"
|
downloadType: "text/plain"
|
||||||
@ -61,7 +63,7 @@ function SaverHandler(options) {
|
|||||||
// Do the autosave unless there are outstanding tiddler change events
|
// Do the autosave unless there are outstanding tiddler change events
|
||||||
if(self.wiki.getSizeOfTiddlerEventQueue() === 0) {
|
if(self.wiki.getSizeOfTiddlerEventQueue() === 0) {
|
||||||
// Check if we're dirty
|
// Check if we're dirty
|
||||||
if(self.numTasksInQueue > 0) {
|
if(self.numChanges > 0) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
method: "autosave",
|
method: "autosave",
|
||||||
downloadType: "text/plain"
|
downloadType: "text/plain"
|
||||||
@ -150,7 +152,7 @@ SaverHandler.prototype.saveWiki = function(options) {
|
|||||||
} else {
|
} else {
|
||||||
// Clear the task queue if we're saving (rather than downloading)
|
// Clear the task queue if we're saving (rather than downloading)
|
||||||
if(method !== "download") {
|
if(method !== "download") {
|
||||||
self.numTasksInQueue = 0;
|
self.numChanges = 0;
|
||||||
self.updateDirtyStatus();
|
self.updateDirtyStatus();
|
||||||
}
|
}
|
||||||
$tw.notifier.display(self.titleSavedNotification);
|
$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)
|
Checks whether the wiki is dirty (ie the window shouldn't be closed)
|
||||||
*/
|
*/
|
||||||
SaverHandler.prototype.isDirty = function() {
|
SaverHandler.prototype.isDirty = function() {
|
||||||
return this.numTasksInQueue > 0;
|
return this.numChanges > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -173,7 +173,7 @@ Syncer.prototype.syncFromServer = function() {
|
|||||||
this.pollTimerId = null;
|
this.pollTimerId = null;
|
||||||
}
|
}
|
||||||
this.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {
|
this.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {
|
||||||
// Trigger another sync
|
// Trigger the next sync
|
||||||
self.pollTimerId = setTimeout(function() {
|
self.pollTimerId = setTimeout(function() {
|
||||||
self.pollTimerId = null;
|
self.pollTimerId = null;
|
||||||
self.syncFromServer.call(self);
|
self.syncFromServer.call(self);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
title: $:/config/SyncFilter
|
title: $:/config/SyncFilter
|
||||||
|
|
||||||
[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]]
|
[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]]
|
@ -4,20 +4,36 @@ tags: concepts
|
|||||||
title: SystemTags
|
title: SystemTags
|
||||||
type: text/vnd.tiddlywiki
|
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/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/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||$:/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/EditTemplate||$:/core/ui/TagTemplate}} for the edit template
|
||||||
* {{$:/tags/EditToolbar||$:/core/ui/TagTemplate}} for the edit mode tiddler toolbar
|
* {{$:/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/MoreSideBar||$:/core/ui/TagTemplate}} for tabs in the "more" sidebar
|
||||||
* {{$:/tags/PageControls||$:/core/ui/TagTemplate}} for the page control tools in the 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/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/RawMarkup||$:/core/ui/TagTemplate}} for raw markup to be included in the generated HTML file
|
||||||
* {{$:/tags/SideBar||$:/core/ui/TagTemplate}} for sidebar tabs
|
* {{$:/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/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||$:/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/ViewTemplate||$:/core/ui/TagTemplate}} for the view template
|
||||||
* {{$:/tags/ViewToolbar||$:/core/ui/TagTemplate}} for the view mode tiddler toolbar
|
* {{$:/tags/ViewToolbar||$:/core/ui/TagTemplate}} for the view mode tiddler toolbar
|
||||||
|
|
||||||
|
@ -5,5 +5,27 @@ title: ContentType
|
|||||||
|
|
||||||
Used in Internet protocols to indicate the type that should be used to interpret the content of a web resource.
|
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 gives the content type to apply to the main `text` field.
|
||||||
|
|
||||||
|
!! List of Common Content 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|
|
||||||
|
|~|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|
|
||||||
|
|~|Plain text |text/plain|
|
||||||
|
|~|~TiddlyWiki 5 |text/vnd.tiddlywiki|
|
||||||
|
|~|~TiddlyWiki Classic |text/x-tiddlywiki|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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.
|
[[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:
|
||||||
|
|
||||||
<iframe width="560" height="315" src="http://www.youtube.com/embed/L4zTkMYcri8" frameborder="0" allowfullscreen></iframe>
|
<iframe width="560" height="315" src="http://www.youtube.com/embed/L4zTkMYcri8" frameborder="0" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
<iframe width="560" height="315" src="http://www.youtube.com/embed/6ElUruH92tc" frameborder="0" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
<iframe width="560" height="315" src="http://www.youtube.com/embed/axFCk9KsMFc" frameborder="0" allowfullscreen></iframe>
|
||||||
|
Loading…
Reference in New Issue
Block a user