mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 17:40:29 +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) {
|
||||
// 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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
|
@ -1,3 +1,3 @@
|
||||
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
|
||||
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]]">
|
||||
<li>{{||$:/core/ui/TagTemplate}}</li>
|
||||
</$list>
|
||||
</ul>
|
||||
</ul>
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
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.
|
||||
|
||||
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/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