mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 into de-DE
This commit is contained in:
commit
e6c40cfcb6
15
boot/boot.js
15
boot/boot.js
@ -967,19 +967,22 @@ $tw.Wiki = function(options) {
|
||||
this.registerPluginTiddlers = function(pluginType,titles) {
|
||||
var self = this,
|
||||
registeredTitles = [],
|
||||
checkTiddler = function(tiddler) {
|
||||
checkTiddler = function(tiddler,title) {
|
||||
if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] === pluginType) {
|
||||
var disablingTiddler = self.getTiddler("$:/config/Plugins/Disabled/" + title);
|
||||
if(title === "$:/core" || !disablingTiddler || (disablingTiddler.fields.text || "").trim() !== "yes") {
|
||||
pluginTiddlers.push(tiddler);
|
||||
registeredTitles.push(tiddler.fields.title);
|
||||
}
|
||||
}
|
||||
};
|
||||
if(titles) {
|
||||
$tw.utils.each(titles,function(title) {
|
||||
checkTiddler(self.getTiddler(title));
|
||||
checkTiddler(self.getTiddler(title),title);
|
||||
});
|
||||
} else {
|
||||
this.each(function(tiddler,title) {
|
||||
checkTiddler(tiddler);
|
||||
checkTiddler(tiddler,title);
|
||||
});
|
||||
}
|
||||
return registeredTitles;
|
||||
@ -1590,11 +1593,11 @@ $tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
|
||||
// Save the original tiddler file locations if requested
|
||||
var config = wikiInfo.config || {};
|
||||
if(config["retain-original-tiddler-path"]) {
|
||||
var output = [];
|
||||
var output = {};
|
||||
for(var title in $tw.boot.files) {
|
||||
output.push(title + ": " + path.relative(resolvedWikiPath,$tw.boot.files[title].filepath) + "\n");
|
||||
output[title] = path.relative(resolvedWikiPath,$tw.boot.files[title].filepath);
|
||||
}
|
||||
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/x-tiddler-dictionary", text: output.join("")});
|
||||
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/json", text: JSON.stringify(output)});
|
||||
}
|
||||
// Save the path to the tiddlers folder for the filesystemadaptor
|
||||
$tw.boot.wikiTiddlersPath = path.resolve($tw.boot.wikiPath,config["default-tiddler-location"] || $tw.config.wikiTiddlersSubDir);
|
||||
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/image/gif
|
||||
|
||||
bitmap
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/image/jpeg
|
||||
|
||||
bitmap
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/image/jpg
|
||||
|
||||
bitmap
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/image/png
|
||||
|
||||
bitmap
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/image/x-icon
|
||||
|
||||
bitmap
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/EditorTypeMappings/text/vnd.tiddlywiki
|
||||
|
||||
text
|
8
core/images/refresh-button.tid
Normal file
8
core/images/refresh-button.tid
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/core/images/refresh-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-refresh-button tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M106.369002,39.4325143 C116.529932,60.3119371 112.939592,86.1974934 95.5979797,103.539105 C73.7286194,125.408466 38.2713806,125.408466 16.4020203,103.539105 C-5.46734008,81.6697449 -5.46734008,46.2125061 16.4020203,24.3431458 C19.5262146,21.2189514 24.5915344,21.2189514 27.7157288,24.3431458 C30.8399231,27.4673401 30.8399231,32.5326599 27.7157288,35.6568542 C12.0947571,51.2778259 12.0947571,76.6044251 27.7157288,92.2253967 C43.3367004,107.846368 68.6632996,107.846368 84.2842712,92.2253967 C97.71993,78.7897379 99.5995262,58.1740623 89.9230597,42.729491 L83.4844861,54.9932839 C81.4307001,58.9052072 76.5945372,60.4115251 72.682614,58.3577391 C68.7706907,56.3039532 67.2643728,51.4677903 69.3181587,47.555867 L84.4354914,18.7613158 C86.4966389,14.8353707 91.3577499,13.3347805 95.273202,15.415792 L124.145886,30.7612457 C128.047354,32.8348248 129.52915,37.6785572 127.455571,41.5800249 C125.381992,45.4814927 120.53826,46.9632892 116.636792,44.8897102 L106.369002,39.4325143 Z M98.1470904,27.0648707 C97.9798954,26.8741582 97.811187,26.6843098 97.6409651,26.4953413 L98.6018187,26.1987327 L98.1470904,27.0648707 Z"></path>
|
||||
</g>
|
||||
</svg>
|
8
core/images/star-filled.tid
Normal file
8
core/images/star-filled.tid
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/core/images/star-filled
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-star-filled tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="nonzero">
|
||||
<path d="M61.8361286,96.8228569 L99.1627704,124.110219 C101.883827,126.099427 105.541968,123.420868 104.505636,120.198072 L90.2895569,75.9887263 L89.0292911,79.8977279 L126.314504,52.5528988 C129.032541,50.5595011 127.635256,46.2255025 124.273711,46.2229134 L78.1610486,46.1873965 L81.4604673,48.6032923 L67.1773543,4.41589688 C66.1361365,1.19470104 61.6144265,1.19470104 60.5732087,4.41589688 L46.2900957,48.6032923 L49.5895144,46.1873965 L3.47685231,46.2229134 C0.115307373,46.2255025 -1.28197785,50.5595011 1.43605908,52.5528988 L38.7212719,79.8977279 L37.4610061,75.9887263 L23.2449266,120.198072 C22.2085954,123.420868 25.8667356,126.099427 28.5877926,124.110219 L65.9144344,96.8228569 L61.8361286,96.8228569 Z"></path>
|
||||
</g>
|
||||
</svg>
|
@ -3,7 +3,7 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-tag-button tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M18.1643182,47.6600756 L18.1677196,51.7651887 C18.1708869,55.5878829 20.3581578,60.8623899 23.0531352,63.5573673 L84.9021823,125.406414 C87.5996731,128.103905 91.971139,128.096834 94.6717387,125.396234 L125.766905,94.3010679 C128.473612,91.5943612 128.472063,87.2264889 125.777085,84.5315115 L63.9280381,22.6824644 C61.2305472,19.9849735 55.9517395,17.801995 52.1318769,17.8010313 L25.0560441,17.7942007 C21.2311475,17.7932358 18.1421354,20.8872832 18.1452985,24.7049463 L18.1535504,34.6641936 C18.2481119,34.6754562 18.3439134,34.6864294 18.4409623,34.6971263 C22.1702157,35.1081705 26.9295004,34.6530132 31.806204,33.5444844 C32.1342781,33.0700515 32.5094815,32.6184036 32.9318197,32.1960654 C35.6385117,29.4893734 39.5490441,28.718649 42.94592,29.8824694 C43.0432142,29.8394357 43.1402334,29.7961748 43.2369683,29.7526887 L43.3646982,30.0368244 C44.566601,30.5115916 45.6933052,31.2351533 46.6655958,32.2074439 C50.4612154,36.0030635 50.4663097,42.1518845 46.6769742,45.94122 C43.0594074,49.5587868 37.2914155,49.7181264 33.4734256,46.422636 C28.1082519,47.5454734 22.7987486,48.0186448 18.1643182,47.6600756 L18.1643182,47.6600756 Z M68.181501,48.8343838 C64.6688413,45.321724 58.975366,45.3200526 55.4632208,48.8321977 L48.679315,55.6161036 C45.1678625,59.127556 45.1695229,64.8224056 48.681501,68.3343838 L83.4868841,103.139767 C86.9995439,106.652427 92.6930192,106.654098 96.2051643,103.141953 L102.98907,96.3580471 C106.500523,92.8465946 106.498862,87.151745 102.986884,83.6397669 L68.181501,48.8343838 Z"></path>
|
||||
<path d="M18.1643182,47.6600756 L18.1677196,51.7651887 C18.1708869,55.5878829 20.3581578,60.8623899 23.0531352,63.5573673 L84.9021823,125.406414 C87.5996731,128.103905 91.971139,128.096834 94.6717387,125.396234 L125.766905,94.3010679 C128.473612,91.5943612 128.472063,87.2264889 125.777085,84.5315115 L63.9280381,22.6824644 C61.2305472,19.9849735 55.9517395,17.801995 52.1318769,17.8010313 L25.0560441,17.7942007 C21.2311475,17.7932358 18.1421354,20.8872832 18.1452985,24.7049463 L18.1535504,34.6641936 C18.2481119,34.6754562 18.3439134,34.6864294 18.4409623,34.6971263 C22.1702157,35.1081705 26.9295004,34.6530132 31.806204,33.5444844 C32.1342781,33.0700515 32.5094815,32.6184036 32.9318197,32.1960654 C35.6385117,29.4893734 39.5490441,28.718649 42.94592,29.8824694 C43.0432142,29.8394357 43.1402334,29.7961748 43.2369683,29.7526887 L43.3646982,30.0368244 C44.566601,30.5115916 45.6933052,31.2351533 46.6655958,32.2074439 C50.4612154,36.0030635 50.4663097,42.1518845 46.6769742,45.94122 C43.0594074,49.5587868 37.2914155,49.7181264 33.4734256,46.422636 C28.1082519,47.5454734 22.7987486,48.0186448 18.1643182,47.6600756 Z"></path>
|
||||
<path d="M47.6333528,39.5324628 L47.6562932,39.5834939 C37.9670934,43.9391617 26.0718874,46.3819521 17.260095,45.4107025 C5.27267473,44.0894301 -1.02778744,36.4307276 2.44271359,24.0779512 C5.56175386,12.9761516 14.3014034,4.36129832 24.0466405,1.54817001 C34.7269254,-1.53487574 43.7955833,3.51606438 43.7955834,14.7730751 L35.1728168,14.7730752 C35.1728167,9.91428944 32.0946059,8.19982862 26.4381034,9.83267419 C19.5270911,11.8276553 13.046247,18.2159574 10.7440788,26.4102121 C8.82861123,33.2280582 11.161186,36.0634845 18.2047888,36.8398415 C25.3302805,37.6252244 35.7353482,35.4884477 44.1208333,31.7188498 L44.1475077,31.7781871 C44.159701,31.7725635 44.1718402,31.7671479 44.1839238,31.7619434 C45.9448098,31.0035157 50.4503245,38.3109156 47.7081571,39.5012767 C47.6834429,39.512005 47.6585061,39.5223987 47.6333528,39.5324628 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
@ -31,7 +31,7 @@ Import/Hint: Import files
|
||||
Info/Caption: info
|
||||
Info/Hint: Show information for this tiddler
|
||||
Home/Caption: home
|
||||
Home/Hint: Refresh the page and open the home tiddlers
|
||||
Home/Hint: Open the default tiddlers
|
||||
Language/Caption: language
|
||||
Language/Hint: Choose the user interface language
|
||||
NewTiddler/Caption: new tiddler
|
||||
@ -42,6 +42,8 @@ Permalink/Caption: permalink
|
||||
Permalink/Hint: Set browser address bar to a direct link to this tiddler
|
||||
Permaview/Caption: permaview
|
||||
Permaview/Hint: Set browser address bar to a direct link to all the tiddlers in this story
|
||||
Refresh/Caption: refresh
|
||||
Refresh/Hint: Perform a full refresh of the wiki
|
||||
Save/Caption: save
|
||||
Save/Hint: Save this tiddler
|
||||
SaveWiki/Caption: save changes
|
||||
|
@ -64,6 +64,12 @@ Basics/Title/Prompt: Title of this ~TiddlyWiki:
|
||||
Basics/Username/Prompt: Username for signing edits:
|
||||
Basics/Version/Prompt: ~TiddlyWiki version:
|
||||
Plugins/Caption: Plugins
|
||||
Plugins/Disable/Caption: disable
|
||||
Plugins/Disable/Hint: Disable this plugin when reloading page
|
||||
Plugins/Disabled/Status: (disabled)
|
||||
Plugins/Empty/Hint: None
|
||||
Plugins/Enable/Caption: enable
|
||||
Plugins/Enable/Hint: Enable this plugin when reloading page
|
||||
Plugins/Language/Prompt: Languages
|
||||
Plugins/Plugin/Prompt: Plugins
|
||||
Plugins/Theme/Prompt: Themes
|
||||
|
@ -9,5 +9,6 @@ Listing/Title/Caption: Title
|
||||
Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin
|
||||
Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)
|
||||
Upgrader/Plugins/Upgraded: Upgraded plugin from <<incoming>> to <<upgraded>>
|
||||
Upgrader/State/Suppressed: Blocked temporary state tiddler
|
||||
Upgrader/System/Suppressed: Blocked system tiddler
|
||||
Upgrader/ThemeTweaks/Created: Migrated theme tweak from <$text text=<<from>>/>
|
||||
|
@ -8,6 +8,7 @@ ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text
|
||||
ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<<title>>/>"?
|
||||
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"?
|
||||
ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"?
|
||||
DropMessage: Drop here (or click escape to cancel)
|
||||
InvalidFieldName: Illegal characters in field name "<$text text=<<fieldName>>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)
|
||||
MissingTiddler/Hint: Missing tiddler "<$text text=<<currentTiddler>>/>" - click {{$:/core/images/edit-button}} to create
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
|
177
core/modules/saver-handler.js
Normal file
177
core/modules/saver-handler.js
Normal file
@ -0,0 +1,177 @@
|
||||
/*\
|
||||
title: $:/core/modules/saver-handler.js
|
||||
type: application/javascript
|
||||
module-type: global
|
||||
|
||||
The saver handler tracks changes to the store and handles saving the entire wiki via saver modules.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Instantiate the saver handler with the following options:
|
||||
wiki: wiki to be synced
|
||||
dirtyTracking: true if dirty tracking should be performed
|
||||
*/
|
||||
function SaverHandler(options) {
|
||||
var self = this;
|
||||
this.wiki = options.wiki;
|
||||
this.dirtyTracking = options.dirtyTracking;
|
||||
// Make a logger
|
||||
this.logger = new $tw.utils.Logger("saver-handler");
|
||||
// Initialise our savers
|
||||
if($tw.browser) {
|
||||
this.initSavers();
|
||||
}
|
||||
// Only do dirty tracking if required
|
||||
if(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;
|
||||
// Listen out for changes to tiddlers
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
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;
|
||||
self.updateDirtyStatus();
|
||||
});
|
||||
// Browser event handlers
|
||||
if($tw.browser) {
|
||||
// Set up our beforeunload handler
|
||||
window.addEventListener("beforeunload",function(event) {
|
||||
var confirmationMessage = undefined;
|
||||
if(self.isDirty()) {
|
||||
confirmationMessage = $tw.language.getString("UnsavedChangesWarning");
|
||||
event.returnValue = confirmationMessage; // Gecko
|
||||
}
|
||||
return confirmationMessage;
|
||||
});
|
||||
}
|
||||
}
|
||||
// Install the save action handlers
|
||||
if($tw.browser) {
|
||||
$tw.rootWidget.addEventListener("tw-save-wiki",function(event) {
|
||||
self.saveWiki({
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-auto-save-wiki",function(event) {
|
||||
self.saveWiki({
|
||||
method: "autosave",
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-download-file",function(event) {
|
||||
self.saveWiki({
|
||||
method: "download",
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
SaverHandler.prototype.titleSyncFilter = "$:/config/SyncFilter";
|
||||
SaverHandler.prototype.titleAutoSave = "$:/config/AutoSave";
|
||||
SaverHandler.prototype.titleSavedNotification = "$:/language/Notifications/Save/Done";
|
||||
|
||||
/*
|
||||
Select the appropriate saver modules and set them up
|
||||
*/
|
||||
SaverHandler.prototype.initSavers = function(moduleType) {
|
||||
moduleType = moduleType || "saver";
|
||||
// Instantiate the available savers
|
||||
this.savers = [];
|
||||
var self = this;
|
||||
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
|
||||
if(module.canSave(self)) {
|
||||
self.savers.push(module.create(self.wiki));
|
||||
}
|
||||
});
|
||||
// Sort the savers into priority order
|
||||
this.savers.sort(function(a,b) {
|
||||
if(a.info.priority < b.info.priority) {
|
||||
return -1;
|
||||
} else {
|
||||
if(a.info.priority > b.info.priority) {
|
||||
return +1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Save the wiki contents. Options are:
|
||||
method: "save" or "download"
|
||||
template: the tiddler containing the template to save
|
||||
downloadType: the content type for the saved file
|
||||
*/
|
||||
SaverHandler.prototype.saveWiki = function(options) {
|
||||
options = options || {};
|
||||
var self = this,
|
||||
method = options.method || "save",
|
||||
template = options.template || "$:/core/save/all",
|
||||
downloadType = options.downloadType || "text/plain",
|
||||
text = this.wiki.renderTiddler(downloadType,template),
|
||||
callback = function(err) {
|
||||
if(err) {
|
||||
alert("Error while saving:\n\n" + err);
|
||||
} else {
|
||||
$tw.notifier.display(self.titleSavedNotification);
|
||||
if(options.callback) {
|
||||
options.callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
// Ignore autosave if disabled
|
||||
if(method === "autosave" && this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") {
|
||||
return false;
|
||||
}
|
||||
// Call the highest priority saver that supports this method
|
||||
for(var t=this.savers.length-1; t>=0; t--) {
|
||||
var saver = this.savers[t];
|
||||
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback)) {
|
||||
this.logger.log("Saving wiki with method",method,"through saver",saver.info.name);
|
||||
// Clear the task queue if we're saving (rather than downloading)
|
||||
if(method !== "download") {
|
||||
this.numTasksInQueue = 0;
|
||||
this.updateDirtyStatus();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Checks whether the wiki is dirty (ie the window shouldn't be closed)
|
||||
*/
|
||||
SaverHandler.prototype.isDirty = function() {
|
||||
return this.numTasksInQueue > 0;
|
||||
};
|
||||
|
||||
/*
|
||||
Update the document body with the class "tw-dirty" if the wiki has unsaved/unsynced changes
|
||||
*/
|
||||
SaverHandler.prototype.updateDirtyStatus = function() {
|
||||
if($tw.browser) {
|
||||
$tw.utils.toggleClass(document.body,"tw-dirty",this.isDirty());
|
||||
}
|
||||
};
|
||||
|
||||
exports.SaverHandler = SaverHandler;
|
||||
|
||||
})();
|
@ -62,8 +62,19 @@ exports.startup = function() {
|
||||
document: document
|
||||
});
|
||||
}
|
||||
// Set up the syncer object
|
||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
|
||||
// Find a working syncadaptor
|
||||
$tw.syncadaptor = undefined;
|
||||
$tw.modules.forEachModuleOfType("syncadaptor",function(title,module) {
|
||||
if(!$tw.syncadaptor && module.adaptorClass) {
|
||||
$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});
|
||||
}
|
||||
});
|
||||
// Set up the syncer object if we've got a syncadaptor
|
||||
if($tw.syncadaptor) {
|
||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});
|
||||
}
|
||||
// Setup the saver handler
|
||||
$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor});
|
||||
// Host-specific startup
|
||||
if($tw.browser) {
|
||||
// Install the popup manager
|
||||
|
@ -49,10 +49,17 @@ exports.startup = function() {
|
||||
openStartupTiddlers({defaultToCurrentStory: true});
|
||||
}
|
||||
},false)
|
||||
// Listen for the tw-browser-refresh message
|
||||
$tw.rootWidget.addEventListener("tw-browser-refresh",function(event) {
|
||||
window.location.hash = "";
|
||||
window.location.reload(true);
|
||||
});
|
||||
// Listen for the tw-home message
|
||||
$tw.rootWidget.addEventListener("tw-home",function(event) {
|
||||
window.location.hash = "";
|
||||
window.location.reload(true);
|
||||
var storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),
|
||||
storyList = $tw.wiki.filterTiddlers(storyFilter);
|
||||
$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: "", list: storyList},$tw.wiki.getModificationFields());
|
||||
});
|
||||
// Listen for the tw-permalink message
|
||||
$tw.rootWidget.addEventListener("tw-permalink",function(event) {
|
||||
|
@ -14,24 +14,15 @@ The syncer tracks changes to the store. If a syncadaptor is used then individual
|
||||
|
||||
/*
|
||||
Instantiate the syncer with the following options:
|
||||
syncadaptor: reference to syncadaptor to be used
|
||||
wiki: wiki to be synced
|
||||
*/
|
||||
function Syncer(options) {
|
||||
var self = this;
|
||||
this.wiki = options.wiki;
|
||||
this.syncadaptor = options.syncadaptor
|
||||
// Make a logger
|
||||
this.logger = new $tw.utils.Logger("syncer" + ($tw.browser ? "-browser" : "") + ($tw.node ? "-server" : ""));
|
||||
// Find a working syncadaptor
|
||||
this.syncadaptor = undefined;
|
||||
$tw.modules.forEachModuleOfType("syncadaptor",function(title,module) {
|
||||
if(!self.syncadaptor && module.adaptorClass) {
|
||||
self.syncadaptor = new module.adaptorClass(self);
|
||||
}
|
||||
});
|
||||
// Initialise our savers
|
||||
if($tw.browser) {
|
||||
this.initSavers();
|
||||
}
|
||||
// Compile the dirty tiddler filter
|
||||
this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));
|
||||
// Record information for known tiddlers
|
||||
@ -58,42 +49,19 @@ function Syncer(options) {
|
||||
});
|
||||
// Listen out for login/logout/refresh events in the browser
|
||||
$tw.rootWidget.addEventListener("tw-login",function() {
|
||||
$tw.syncer.handleLoginEvent();
|
||||
self.handleLoginEvent();
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-logout",function() {
|
||||
$tw.syncer.handleLogoutEvent();
|
||||
self.handleLogoutEvent();
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-server-refresh",function() {
|
||||
$tw.syncer.handleRefreshEvent();
|
||||
});
|
||||
// Install the save action handlers
|
||||
$tw.rootWidget.addEventListener("tw-save-wiki",function(event) {
|
||||
$tw.syncer.saveWiki({
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-auto-save-wiki",function(event) {
|
||||
$tw.syncer.saveWiki({
|
||||
method: "autosave",
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tw-download-file",function(event) {
|
||||
$tw.syncer.saveWiki({
|
||||
method: "download",
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
});
|
||||
self.handleRefreshEvent();
|
||||
});
|
||||
}
|
||||
// Listen out for lazyLoad events
|
||||
if(this.syncadaptor) {
|
||||
this.wiki.addEventListener("lazyLoad",function(title) {
|
||||
self.handleLazyLoadEvent(title);
|
||||
});
|
||||
}
|
||||
// Get the login status
|
||||
this.getStatus(function (err,isLoggedIn) {
|
||||
// Do a sync from the server
|
||||
@ -107,7 +75,6 @@ Constants
|
||||
Syncer.prototype.titleIsLoggedIn = "$:/status/IsLoggedIn";
|
||||
Syncer.prototype.titleUserName = "$:/status/UserName";
|
||||
Syncer.prototype.titleSyncFilter = "$:/config/SyncFilter";
|
||||
Syncer.prototype.titleAutoSave = "$:/config/AutoSave";
|
||||
Syncer.prototype.titleSavedNotification = "$:/language/Notifications/Save/Done";
|
||||
Syncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer
|
||||
Syncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s...
|
||||
@ -134,79 +101,6 @@ Syncer.prototype.readTiddlerInfo = function() {
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Select the appropriate saver modules and set them up
|
||||
*/
|
||||
Syncer.prototype.initSavers = function(moduleType) {
|
||||
moduleType = moduleType || "saver";
|
||||
// Instantiate the available savers
|
||||
this.savers = [];
|
||||
var self = this;
|
||||
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
|
||||
if(module.canSave(self)) {
|
||||
self.savers.push(module.create(self.wiki));
|
||||
}
|
||||
});
|
||||
// Sort the savers into priority order
|
||||
this.savers.sort(function(a,b) {
|
||||
if(a.info.priority < b.info.priority) {
|
||||
return -1;
|
||||
} else {
|
||||
if(a.info.priority > b.info.priority) {
|
||||
return +1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Save the wiki contents. Options are:
|
||||
method: "save" or "download"
|
||||
template: the tiddler containing the template to save
|
||||
downloadType: the content type for the saved file
|
||||
*/
|
||||
Syncer.prototype.saveWiki = function(options) {
|
||||
options = options || {};
|
||||
var self = this,
|
||||
method = options.method || "save",
|
||||
template = options.template || "$:/core/save/all",
|
||||
downloadType = options.downloadType || "text/plain",
|
||||
text = this.wiki.renderTiddler(downloadType,template),
|
||||
callback = function(err) {
|
||||
if(err) {
|
||||
alert("Error while saving:\n\n" + err);
|
||||
} else {
|
||||
$tw.notifier.display(self.titleSavedNotification);
|
||||
if(options.callback) {
|
||||
options.callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
// Ignore autosave if we've got a syncadaptor or autosave is disabled
|
||||
if(method === "autosave") {
|
||||
if(this.syncadaptor || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Call the highest priority saver that supports this method
|
||||
for(var t=this.savers.length-1; t>=0; t--) {
|
||||
var saver = this.savers[t];
|
||||
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback)) {
|
||||
this.logger.log("Saving wiki with method",method,"through saver",saver.info.name);
|
||||
// Clear the task queue if we're saving (rather than downloading)
|
||||
if(method !== "download") {
|
||||
this.readTiddlerInfo();
|
||||
this.taskQueue = {};
|
||||
this.updateDirtyStatus();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Checks whether the wiki is dirty (ie the window shouldn't be closed)
|
||||
*/
|
||||
@ -458,9 +352,7 @@ Syncer.prototype.enqueueSyncTask = function(task) {
|
||||
this.updateDirtyStatus();
|
||||
}
|
||||
// Process the queue
|
||||
if(this.syncadaptor) {
|
||||
$tw.utils.nextTick(function() {self.processTaskQueue.call(self);});
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
@ -603,6 +495,8 @@ Syncer.prototype.dispatchTask = function(task,callback) {
|
||||
}
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
},{
|
||||
tiddlerInfo: self.tiddlerInfo[task.title]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -12,7 +12,8 @@ Upgrader module that suppresses certain system tiddlers that shouldn't be import
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var DONT_IMPORT_LIST = ["$:/StoryList","$:/HistoryList"];
|
||||
var DONT_IMPORT_LIST = ["$:/StoryList","$:/HistoryList"],
|
||||
DONT_IMPORT_PREFIX_LIST = ["$:/temp/","$:/state/"];
|
||||
|
||||
exports.upgrade = function(wiki,titles,tiddlers) {
|
||||
var self = this,
|
||||
@ -22,6 +23,14 @@ exports.upgrade = function(wiki,titles,tiddlers) {
|
||||
if(DONT_IMPORT_LIST.indexOf(title) !== -1) {
|
||||
tiddlers[title] = Object.create(null);
|
||||
messages[title] = $tw.language.getString("Import/Upgrader/System/Suppressed");
|
||||
} else {
|
||||
for(var t=0; t<DONT_IMPORT_PREFIX_LIST.length; t++) {
|
||||
var prefix = DONT_IMPORT_PREFIX_LIST[t];
|
||||
if(title.substr(0,prefix.length) === prefix) {
|
||||
tiddlers[title] = Object.create(null);
|
||||
messages[title] = $tw.language.getString("Import/Upgrader/State/Suppressed");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return messages;
|
||||
|
@ -46,28 +46,11 @@ EditWidget.prototype.execute = function() {
|
||||
this.editIndex = this.getAttribute("index");
|
||||
this.editClass = this.getAttribute("class");
|
||||
this.editPlaceholder = this.getAttribute("placeholder");
|
||||
// Get the content type of the thing we're editing
|
||||
var type;
|
||||
if(this.editField === "text") {
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||
if(tiddler) {
|
||||
type = tiddler.fields.type;
|
||||
}
|
||||
}
|
||||
type = type || "text/vnd.tiddlywiki";
|
||||
// Choose the appropriate edit widget
|
||||
var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);
|
||||
if(!editorType) {
|
||||
var typeInfo = $tw.config.contentTypeInfo[type];
|
||||
if(typeInfo && typeInfo.encoding === "base64") {
|
||||
editorType = "binary";
|
||||
} else {
|
||||
editorType = "text";
|
||||
}
|
||||
}
|
||||
this.editorType = this.getEditorType();
|
||||
// Make the child widgets
|
||||
this.makeChildWidgets([{
|
||||
type: "edit-" + editorType,
|
||||
type: "edit-" + this.editorType,
|
||||
attributes: {
|
||||
tiddler: {type: "string", value: this.editTitle},
|
||||
field: {type: "string", value: this.editField},
|
||||
@ -78,12 +61,35 @@ EditWidget.prototype.execute = function() {
|
||||
}]);
|
||||
};
|
||||
|
||||
EditWidget.prototype.getEditorType = function() {
|
||||
// Get the content type of the thing we're editing
|
||||
var type;
|
||||
if(this.editField === "text") {
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||
if(tiddler) {
|
||||
type = tiddler.fields.type;
|
||||
}
|
||||
}
|
||||
type = type || "text/vnd.tiddlywiki";
|
||||
var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);
|
||||
if(!editorType) {
|
||||
var typeInfo = $tw.config.contentTypeInfo[type];
|
||||
if(typeInfo && typeInfo.encoding === "base64") {
|
||||
editorType = "binary";
|
||||
} else {
|
||||
editorType = "text";
|
||||
}
|
||||
}
|
||||
return editorType;
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
EditWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {
|
||||
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -105,6 +105,9 @@ ImageWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(this.imageTooltip) {
|
||||
domNode.setAttribute("title",this.imageTooltip);
|
||||
}
|
||||
if(this.imageAlt) {
|
||||
domNode.setAttribute("alt",this.imageAlt);
|
||||
}
|
||||
// Insert element
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.domNodes.push(domNode);
|
||||
@ -120,6 +123,7 @@ ImageWidget.prototype.execute = function() {
|
||||
this.imageHeight = this.getAttribute("height");
|
||||
this.imageClass = this.getAttribute("class");
|
||||
this.imageTooltip = this.getAttribute("tooltip");
|
||||
this.imageAlt = this.getAttribute("alt");
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -30,8 +30,9 @@ TextNodeWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
var text = this.getAttribute("text",this.parseTreeNode.text),
|
||||
textNode = this.document.createTextNode(text);
|
||||
var text = this.getAttribute("text",this.parseTreeNode.text);
|
||||
text = text.replace(/\r/mg,"");
|
||||
var textNode = this.document.createTextNode(text);
|
||||
parent.insertBefore(textNode,nextSibling);
|
||||
this.domNodes.push(textNode);
|
||||
};
|
||||
|
@ -830,7 +830,7 @@ exports.parseTextReference = function(title,field,index,options) {
|
||||
}
|
||||
return this.parseText("text/vnd.tiddlywiki",text.toString(),options);
|
||||
} else if(index) {
|
||||
text = this.extractTiddlerDataItem(tiddler,index,"");
|
||||
text = this.extractTiddlerDataItem(tiddler,index,undefined);
|
||||
if(text === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
@ -12,11 +12,10 @@ $(popup-state)$-$(pluginInfoType)$
|
||||
\define plugin-icon-title()
|
||||
$(currentTiddler)$/icon
|
||||
\end
|
||||
\define plugin-table(type)
|
||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||
<$link to={{!!title}} class="tw-plugin-info">
|
||||
\define plugin-disable-title()
|
||||
$:/config/Plugins/Disabled/$(currentTiddler)$
|
||||
\end
|
||||
\define plugin-table-body(type,disabledMessage)
|
||||
<div class="tw-plugin-info-chunk">
|
||||
<$reveal type="nomatch" state=<<popup-state>> text="yes">
|
||||
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes">
|
||||
@ -36,7 +35,7 @@ $(currentTiddler)$/icon
|
||||
</div>
|
||||
<div class="tw-plugin-info-chunk">
|
||||
<div>
|
||||
''<$view field="description"><$view field="title"/></$view>''
|
||||
''<$view field="description"><$view field="title"/></$view>'' $disabledMessage$
|
||||
</div>
|
||||
<div>
|
||||
<$view field="title"/>
|
||||
@ -45,18 +44,44 @@ $(currentTiddler)$/icon
|
||||
<$view field="version"/>
|
||||
</div>
|
||||
</div>
|
||||
\end
|
||||
\define plugin-table(type)
|
||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<<lingo "Empty/Hint">>>
|
||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||
<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes">
|
||||
<$link to={{!!title}} class="tw-plugin-info">
|
||||
<<plugin-table-body type:"$type$">>
|
||||
</$link>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<plugin-disable-title>> text="yes">
|
||||
<$link to={{!!title}} class="tw-plugin-info tw-plugin-info-disabled">
|
||||
<<plugin-table-body type:"$type$" disabledMessage:"<$macrocall $name='lingo' title='Disabled/Status'/>">>
|
||||
</$link>
|
||||
</$reveal>
|
||||
<$reveal type="match" text="yes" state=<<popup-state>>>
|
||||
<$reveal type="nomatch" text="" state="!!list">
|
||||
<div class="tw-plugin-info-dropdown">
|
||||
<$macrocall $name="tabs" state=<<tabs-state-macro>> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/>
|
||||
<$list filter="[all[current]] -[[$:/core]]">
|
||||
<div style="float:right;">
|
||||
<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes">
|
||||
<$button set=<<plugin-disable-title>> setTo="yes" title={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}>
|
||||
<<lingo Disable/Caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<plugin-disable-title>> text="yes">
|
||||
<$button set=<<plugin-disable-title>> setTo="no" title={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}>
|
||||
<<lingo Enable/Caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$list>
|
||||
<$reveal type="nomatch" text="" state="!!list">
|
||||
<$macrocall $name="tabs" state=<<tabs-state-macro>> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" text="" state="!!list">
|
||||
<div class="tw-plugin-info-dropdown">
|
||||
No information provided
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</$list>
|
||||
|
3
core/ui/PageControls/SaveWikiButtonTemplate.tid
Normal file
3
core/ui/PageControls/SaveWikiButtonTemplate.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/SaveWikiButton/Template
|
||||
|
||||
$:/core/save/all
|
13
core/ui/PageControls/refresh.tid
Normal file
13
core/ui/PageControls/refresh.tid
Normal file
@ -0,0 +1,13 @@
|
||||
title: $:/core/ui/Buttons/refresh
|
||||
tags: $:/tags/PageControls
|
||||
caption: {{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}}
|
||||
description: {{$:/language/Buttons/Refresh/Hint}}
|
||||
|
||||
<$button message="tw-browser-refresh" title={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tw-config-toolbar-class>>>
|
||||
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/refresh-button}}
|
||||
</$list>
|
||||
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
|
||||
<$text text={{$:/language/Buttons/Refresh/Caption}}/>
|
||||
</$list>
|
||||
</$button>
|
@ -3,7 +3,7 @@ tags: $:/tags/PageControls
|
||||
caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
|
||||
<$button message="tw-save-wiki" title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tw-config-toolbar-class>>>
|
||||
<$button message="tw-save-wiki" param={{$:/config/SaveWikiButton/Template}} title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tw-config-toolbar-class>>>
|
||||
<span class="tw-dirty-indicator">
|
||||
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/save-button}}
|
||||
|
@ -1,59 +1,9 @@
|
||||
title: $:/core/ui/PageStylesheet
|
||||
|
||||
\define colour(name)
|
||||
<$transclude tiddler={{$:/palette}} index="$name$"/>
|
||||
\end
|
||||
\define color(name)
|
||||
<<colour $name$>>
|
||||
\end
|
||||
\define box-shadow(shadow)
|
||||
```
|
||||
-webkit-box-shadow: $shadow$;
|
||||
-moz-box-shadow: $shadow$;
|
||||
box-shadow: $shadow$;
|
||||
```
|
||||
\end
|
||||
\define filter(filter)
|
||||
```
|
||||
-webkit-filter: $filter$;
|
||||
-moz-filter: $filter$;
|
||||
filter: $filter$;
|
||||
```
|
||||
\end
|
||||
\define transition(transition)
|
||||
```
|
||||
-webkit-transition: $transition$;
|
||||
-moz-transition: $transition$;
|
||||
transition: $transition$;
|
||||
```
|
||||
\end
|
||||
\define transform-origin(origin)
|
||||
```
|
||||
-webkit-transform-origin: $origin$;
|
||||
-moz-transform-origin: $origin$;
|
||||
transform-origin: $origin$;
|
||||
```
|
||||
\end
|
||||
\define background-linear-gradient(gradient)
|
||||
```
|
||||
background-image: linear-gradient($gradient$);
|
||||
background-image: -o-linear-gradient($gradient$);
|
||||
background-image: -moz-linear-gradient($gradient$);
|
||||
background-image: -webkit-linear-gradient($gradient$);
|
||||
background-image: -ms-linear-gradient($gradient$);
|
||||
```
|
||||
\end
|
||||
\define datauri(title)
|
||||
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/>
|
||||
\end
|
||||
\define if-sidebar(text)
|
||||
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal>
|
||||
\end
|
||||
\define if-no-sidebar(text)
|
||||
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal>
|
||||
\end
|
||||
|
||||
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/stylesheet]!has[draft.of]]">
|
||||
<$transclude/>
|
||||
</$list>
|
||||
|
||||
</$importvariables>
|
||||
|
@ -1,4 +1,3 @@
|
||||
title: $:/DefaultTiddlers
|
||||
|
||||
GettingStarted
|
||||
[!is[system]has[modified]!sort[modified]limit[25]]
|
8
core/wiki/config/EditorTypeMappings.multids
Normal file
8
core/wiki/config/EditorTypeMappings.multids
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/config/EditorTypeMappings/
|
||||
|
||||
image/gif: bitmap
|
||||
image/jpeg: bitmap
|
||||
image/jpg: bitmap
|
||||
image/png: bitmap
|
||||
image/x-icon: bitmap
|
||||
text/vnd.tiddlywiki: text
|
@ -4,6 +4,7 @@ core/ui/Buttons/close-all: hide
|
||||
core/ui/Buttons/encryption: hide
|
||||
core/ui/Buttons/full-screen: hide
|
||||
core/ui/Buttons/home: hide
|
||||
core/ui/Buttons/refresh: hide
|
||||
core/ui/Buttons/import: hide
|
||||
core/ui/Buttons/language: hide
|
||||
core/ui/Buttons/tag-manager: hide
|
||||
|
3
core/wiki/language.tid
Normal file
3
core/wiki/language.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/language
|
||||
|
||||
$:/languages/en-GB
|
@ -2,9 +2,63 @@ title: $:/core/macros/CSS
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define colour(name)
|
||||
<$transclude tiddler={{$:/palette}} index="$name$"/>
|
||||
<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"/></$transclude>
|
||||
\end
|
||||
|
||||
\define color(name)
|
||||
<<colour $name$>>
|
||||
\end
|
||||
|
||||
\define box-shadow(shadow)
|
||||
```
|
||||
-webkit-box-shadow: $shadow$;
|
||||
-moz-box-shadow: $shadow$;
|
||||
box-shadow: $shadow$;
|
||||
```
|
||||
\end
|
||||
|
||||
\define filter(filter)
|
||||
```
|
||||
-webkit-filter: $filter$;
|
||||
-moz-filter: $filter$;
|
||||
filter: $filter$;
|
||||
```
|
||||
\end
|
||||
|
||||
\define transition(transition)
|
||||
```
|
||||
-webkit-transition: $transition$;
|
||||
-moz-transition: $transition$;
|
||||
transition: $transition$;
|
||||
```
|
||||
\end
|
||||
|
||||
\define transform-origin(origin)
|
||||
```
|
||||
-webkit-transform-origin: $origin$;
|
||||
-moz-transform-origin: $origin$;
|
||||
transform-origin: $origin$;
|
||||
```
|
||||
\end
|
||||
|
||||
\define background-linear-gradient(gradient)
|
||||
```
|
||||
background-image: linear-gradient($gradient$);
|
||||
background-image: -o-linear-gradient($gradient$);
|
||||
background-image: -moz-linear-gradient($gradient$);
|
||||
background-image: -webkit-linear-gradient($gradient$);
|
||||
background-image: -ms-linear-gradient($gradient$);
|
||||
```
|
||||
\end
|
||||
|
||||
\define datauri(title)
|
||||
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/>
|
||||
\end
|
||||
|
||||
\define if-sidebar(text)
|
||||
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal>
|
||||
\end
|
||||
|
||||
\define if-no-sidebar(text)
|
||||
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal>
|
||||
\end
|
||||
|
79
core/wiki/macros/toc.tid
Normal file
79
core/wiki/macros/toc.tid
Normal file
@ -0,0 +1,79 @@
|
||||
title: $:/core/macros/toc
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define toc(tag,sort:"")
|
||||
<ol>
|
||||
<$list filter="[tag[$tag$]$sort$]">
|
||||
<li>
|
||||
<$link>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
<$macrocall $name="toc" tag=<<currentTiddler>>/>
|
||||
</li>
|
||||
</$list>
|
||||
</ol>
|
||||
\end
|
||||
|
||||
\define toc-expandable-body(tag,sort:"")
|
||||
<$set name="toc-state" value=<<qualify "$:/state/toc/$tag$-$(currentTiddler)$">>>
|
||||
<li>
|
||||
<$link>
|
||||
<$reveal type="nomatch" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="open" class="btn-invisible">
|
||||
{{$:/core/images/right-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="close" class="btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$macrocall $name="toc-expandable" tag=<<currentTiddler>> sort="$sort$"/>
|
||||
</$reveal>
|
||||
</li>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define toc-expandable(tag,sort:"")
|
||||
<ol>
|
||||
<$list filter="[tag[$tag$]$sort$]">
|
||||
<<toc-expandable-body tag:"$tag$" sort:"$sort$">>
|
||||
</$list>
|
||||
</ol>
|
||||
\end
|
||||
|
||||
\define toc-selective-expandable-body(tag,sort:"")
|
||||
<$set name="toc-state" value=<<qualify "$:/state/toc/$tag$-$(currentTiddler)$">>>
|
||||
<li>
|
||||
<$link>
|
||||
<$list filter="[all[current]tagging[]limit[1]]">
|
||||
<$reveal type="nomatch" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="open" class="btn-invisible">
|
||||
{{$:/core/images/right-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="close" class="btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$list>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>> sort="$sort$"/>
|
||||
</$reveal>
|
||||
</li>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define toc-selective-expandable(tag,sort:"")
|
||||
<ol>
|
||||
<$list filter="[tag[$tag$]$sort$]">
|
||||
<<toc-selective-expandable-body tag:"$tag$" sort:"$sort$">>
|
||||
</$list>
|
||||
</ol>
|
||||
\end
|
@ -1,2 +1,2 @@
|
||||
title: $:/tags/PageControls
|
||||
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/more-page-actions]]
|
||||
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]
|
||||
|
@ -17,3 +17,4 @@ See also:
|
||||
* [[Saving on TiddlySpot]], a free service that lets you use TiddlyWiki online
|
||||
* Running [[TiddlyWiki on node-webkit]], turning a single TiddlyWiki into a native application on your desktop
|
||||
* [[Using TiddlyWiki on TiddlyDesktop]], a custom desktop application for working with TiddlyWiki
|
||||
* You can also download this full TiddlyWiki including all the documentation: <a href="http://tiddlywiki.com/index.html" download="index.html">~http://tiddlywiki.com/index.html</a>
|
||||
|
11
editions/tw5.com/tiddlers/GuerillaWiki.tid
Normal file
11
editions/tw5.com/tiddlers/GuerillaWiki.tid
Normal file
@ -0,0 +1,11 @@
|
||||
created: 20140817140917462
|
||||
modified: 20140817141027417
|
||||
tags: definitions
|
||||
title: GuerillaWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki makes a great GuerillaWiki in situations where it is not practical to use a traditional wiki.
|
||||
|
||||
For instance, in a corporate setting, persuading an over-worked IT department to install a Wiki server for you is seldom going to be possible overnight. And if your PC is locked down you can't install a conventional Wiki yourself. Equally, you can't go and use one of the public hosted Wiki services because your Information Security department would not allow all that corporate data to flow into an outside server.
|
||||
|
||||
TiddlyWiki slices through those barriers by being usable on virtually all PCs.
|
@ -1,5 +1,5 @@
|
||||
created: 20130822170200000
|
||||
modified: 20140813164027280
|
||||
modified: 20140820153116300
|
||||
tags: introduction
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
@ -1,25 +1,39 @@
|
||||
caption: 5.0.15-beta
|
||||
created: 20140818150234142
|
||||
modified: 20140813153116300
|
||||
created: 20140812150234142
|
||||
modified: 20140820153116300
|
||||
tags: releasenote
|
||||
title: Release 5.0.15-beta
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 201408202255
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.14-beta...v5.0.15-beta]]//
|
||||
|
||||
!! Major Changes
|
||||
|
||||
!! Usability Improvements
|
||||
|
||||
*
|
||||
* [[Simplified|https://github.com/Jermolene/TiddlyWiki5/commit/c57b00996855f10d9b7fa2aa4e9deb2a2a607d7f]] shadow default tiddlers
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/32a7ee2683ace619599f0ab73028307ca33f4e4c]] the ability to disable plugins (see PluginMechanism) with a user interface in [[control panel|$:/ControlPanel]]
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/4b05608ad5e77043b01495825ea0f0e76c378760]] page control button for invoking the [[tag manager|$:/TagManager]]
|
||||
* [[Simplified|https://github.com/Jermolene/TiddlyWiki5/commit/c4b76ceb0bc786bcceb12fc3417bb8c4bfde27a9]] downloading an offline copy of a client-server wiki
|
||||
* [[Blocked|https://github.com/Jermolene/TiddlyWiki5/commit/2bbe9f76ecf8fc89c789e72be00ac19e811195ee]] temporary state tiddlers from import/upgrade
|
||||
|
||||
!! Hackability Improvements
|
||||
|
||||
*
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c912fed55d94c9bef2d541cd55f458b12172941c]] a banner to the edit template encouraging improvements to the documentation
|
||||
* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/f75af2c983e10e8a82639890b993fb5cf042d610]] `saver-handler.js` out of `syncer.js`
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/8cf726275c19ed5b4a0ed1cf8354d64d1bc29da5]] TableOfContentsMacro support
|
||||
* Simplified startup module organisation (see [[Startup Modules.svg]])
|
||||
* [[Changed|https://github.com/Jermolene/TiddlyWiki5/commit/25777b147fa4ed2f915150aec503ad1e094e6043]] the overlay text for the DropzoneWidget to make it translateable
|
||||
* [[Introduced|https://github.com/Jermolene/TiddlyWiki5/commit/920e11e7921f777170aa2f9e1836c000fec2e26d]] a new [[refresh button|WidgetMessage: tw-browser-refresh]] and reverted [[home button|WidgetMessage: tw-home]] behaviour
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/fbf307c648ae0e92679c54f7d03f197a75b4e101]] ''alt'' attribute to the ImageWidget
|
||||
|
||||
!! Bug Fixes
|
||||
|
||||
*
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/c8830d32f74b8c228553f11f7f55b5be45ae6471]] problem with building TiddlyWiki under Windows
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/34461cb2fe554331a0269fd7795b1d6a879fcba9]] unclickable download ink in upgrade wizard
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/9e85ddfec78dd8df71e6173100dce659417551f4]] missing language flag in ''empty.html''
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/18592fe8f810d1858ca040da1a7c4a81fb74cfed]] problem with switching the type of a tiddler between the bitmap and text editor
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/fe6623d7feed1a9068e15bfac57be0b0924e8915]] foreground colour for tag pills in the sidebar
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/c912fed55d94c9bef2d541cd55f458b12172941c]] problem with github source links for tiddlywiki.com not working for titles containing colons
|
||||
|
||||
!! Contributors
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
title: Improving TiddlyWiki Documentation
|
||||
tags: howto
|
||||
created: 20140820151051019
|
||||
modified: 20140820151051019
|
||||
|
||||
Anyone can submit improvements to the TiddlyWiki documentation that appears on http://tiddlywiki.com.
|
||||
|
||||
# Create an account on https://github.com if you don't already have one
|
||||
# On http://tiddlywiki.com, click "edit" on the tiddler you want to improve
|
||||
# You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub//
|
||||
# Click on the external link ...''this tiddler on ~GitHub''
|
||||
# A new browser tab should open ready to edit the tiddler on github.com
|
||||
# Below the edit box for the tiddler text you should see a box labelled ''Propose file change''
|
||||
# Enter a brief title to explain the change (eg, "Clarify attribute syntax instability")
|
||||
# If necessary, enter a longer description too
|
||||
# Click the green button labelled ''Propose file change''
|
||||
# On the following screen, click the green button labelled ''Create pull request''
|
||||
|
||||
[[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.
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,11 @@
|
||||
title: TableOfContentsMacro Expandable Example
|
||||
caption: Expandable
|
||||
tags: table-of-contents-example
|
||||
|
||||
!! Expandable Table of Contents
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html"
|
||||
src="<div class='tw-table-of-contents'>
|
||||
<<toc-expandable 'Contents'>>
|
||||
</div>
|
||||
"/>
|
@ -0,0 +1,11 @@
|
||||
title: TableOfContentsMacro Selective Expandable Example
|
||||
caption: Selective Expandable
|
||||
tags: table-of-contents-example
|
||||
|
||||
!! Selective Expandable Table of Contents
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html"
|
||||
src="<div class='tw-table-of-contents'>
|
||||
<<toc-selective-expandable 'Contents'>>
|
||||
</div>
|
||||
"/>
|
@ -0,0 +1,11 @@
|
||||
title: TableOfContentsMacro Simple Example
|
||||
caption: Simple
|
||||
tags: table-of-contents-example
|
||||
|
||||
!! Simple Table of Contents
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html"
|
||||
src="<div class='tw-table-of-contents'>
|
||||
<<toc 'Contents'>>
|
||||
</div>
|
||||
"/>
|
@ -0,0 +1,11 @@
|
||||
title: TableOfContentsMacro Sorted Expandable Example
|
||||
caption: Sorted Expandable
|
||||
tags: table-of-contents-example
|
||||
|
||||
!! Sorted Expandable Table of Contents
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html"
|
||||
src="<div class='tw-table-of-contents'>
|
||||
<<toc-expandable 'Contents' 'sort[title]'>>
|
||||
</div>
|
||||
"/>
|
29
editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid
Normal file
29
editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid
Normal file
@ -0,0 +1,29 @@
|
||||
title: TableOfContentsMacro
|
||||
tags: macros
|
||||
modified: 20140818180307785
|
||||
|
||||
The table of contents macro produces a hierarchical tree of tiddlers based on their tags.
|
||||
|
||||
The top level entries of the table of contents are defined by a root tag. The subentries under each of those entries are tagged with the title of the entry. Entries can be ordered using the `list` field as described in TiddlerTags.
|
||||
|
||||
There are several variants of the macro:
|
||||
|
||||
* `<<toc>>` produces a simple hierarchical tree of links
|
||||
* `<<toc-expandable>>` produces an expandable tree of links
|
||||
* `<<toc-selective-expandable>>` produces an expandable tree of links where the expand/contract buttons are only shown for entries that possess child nodes
|
||||
|
||||
! Parameters
|
||||
|
||||
|!Position |!Name |!Description |!Default |
|
||||
|1st |tag |The root tag that identifies the top level of the hierarchy | |
|
||||
|2nd |sort |Optional sorting subfilter (eg `sort[title]`) | |
|
||||
|
||||
The ''tag'' and ''sort'' parameters are combined to make a filter expression of the form:
|
||||
|
||||
```
|
||||
[tag[$tag$]$sort$]
|
||||
```
|
||||
|
||||
! Examples
|
||||
|
||||
<<tabs "[tag[table-of-contents-example]]" "TableOfContentsMacro Simple Example">>
|
@ -1,5 +1,5 @@
|
||||
created: 20130826122000000
|
||||
modified: 20140807094840608
|
||||
modified: 20140815094840608
|
||||
tags: mechanism
|
||||
title: PluginMechanism
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -87,6 +87,16 @@ The wiki object keeps track of all of the currently loaded plugins. If a request
|
||||
|
||||
In the browser, any constituent tiddlers that are JavaScript modules (ie shadow tiddlers of content type `application/javascript` and possessing the field `module-type`) are executed during startup processing.
|
||||
|
||||
!! Disabling Plugins
|
||||
|
||||
Plugins can be disabled by creating a tiddler titled `$:/config/Plugins/Disabled/` concatenated with the plugin title, and setting its text to `yes`.
|
||||
|
||||
For example, to disable the plugin `$:/plugins/tiddlywiki/highlight`, the title would be:
|
||||
|
||||
```
|
||||
$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/highlight
|
||||
```
|
||||
|
||||
! Information Tiddlers for Plugins
|
||||
|
||||
Plugin authors are encouraged to provide special information and documentation tiddlers that TiddlyWiki can include as plugin information tabs in the [[control panel|$:/ControlPanel]].
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112343634
|
||||
modified: 20140811114420597
|
||||
tags: message
|
||||
title: WidgetMessage: tw-auto-save-wiki
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The autosave wiki message causes the current saver module to perform a background save if it is required.
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
created: 20140819110529062
|
||||
modified: 20140819110529062
|
||||
tags: message
|
||||
title: WidgetMessage: tw-browser-refresh
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The `tw-browser-refresh` message removs any [[permalink|PermaLinks]] from the browser address bar and refreshes the page, causing the re-display of the [[$:/DefaultTiddlers]], and re-initialisation of any plugin tiddlers. It does not require any properties on the `event` object.
|
||||
|
||||
The refresh message is usually generated with the ButtonWidget and is handled by the core.
|
@ -2,7 +2,7 @@ created: 20140811112201235
|
||||
modified: 20140811115140378
|
||||
tags: message
|
||||
title: WidgetMessage: tw-download-file
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The download file message causes the current saver module to prompt the user to download the result of parsing a specified template tiddler as a file. It requires the following properties on the `event` object:
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112400855
|
||||
modified: 20140811113627373
|
||||
tags: message
|
||||
title: WidgetMessage: tw-full-screen
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The fullscreen message toggles the "fullscreen" mode of the browser, if it supports it.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
created: 20140312223013470
|
||||
modified: 20140729223134387
|
||||
created: 20140819110529062
|
||||
modified: 20140819110529062
|
||||
tags: message
|
||||
title: WidgetMessage: tw-home
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The `tw-home` message refreshes the current page by removing any [[permalink|PermaLinks]] from the browser address bar, causing the re-display of the [[$:/DefaultTiddlers]], and re-initialisation of any plugin tiddlers. It does not require any properties on the `event` object.
|
||||
The `tw-home` message closes any open tiddlers and re-opens the default tiddlers set in [[$:/DefaultTiddlers]]. It also remove any [[permalink|PermaLinks]] from the browser address bar. It does not require any properties on the `event` object.
|
||||
|
||||
The home message is usually generated with the ButtonWidget and is handled by the core.
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112445887
|
||||
modified: 20140811113336694
|
||||
tags: message
|
||||
title: WidgetMessage: tw-login
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The login message prompts the user for a username and password and attempts to login to the current serverside host. The tiddler [[$:/status/IsLoggedIn]] reflects the current login status with the values "yes" or "no", and [[$:/status/UserName]] reflects the current username.
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112457311
|
||||
modified: 20140811113344084
|
||||
tags: message
|
||||
title: WidgetMessage: tw-logout
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The logout message attempts to log the user out of the current serverside host. The tiddler [[$:/status/IsLoggedIn]] reflects the current login status with the values "yes" or "no", and [[$:/status/UserName]] reflects the current username.
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112133701
|
||||
modified: 20140811120203685
|
||||
tags: message
|
||||
title: WidgetMessage: tw-modal
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The modal message displays a specified tiddler in a modal overlay that dims the main page. It requires the following properties on the `event` object:
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112304772
|
||||
modified: 20140811120248738
|
||||
tags: message
|
||||
title: WidgetMessage: tw-notify
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The notify message briefly displays a specified tiddler as a small alert in the upper right corner of the page. It requires the following properties on the `event` object:
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112325641
|
||||
modified: 20140811115149288
|
||||
tags: message
|
||||
title: WidgetMessage: tw-save-wiki
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The save wiki message causes the current saver module to perform a full save operation. The save operation can involve user interaction, unlike the [[WidgetMessage: tw-auto-save-wiki]]/
|
||||
|
||||
|
@ -2,7 +2,7 @@ created: 20140811112435281
|
||||
modified: 20140811113453568
|
||||
tags: message
|
||||
title: WidgetMessage: tw-server-refresh
|
||||
type: application/x-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The server refresh message attempts to synchronise the latest changes to the current serverside host.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20130825162100000
|
||||
modified: 20131129094907624
|
||||
modified: 20140814094907624
|
||||
tags: dev moduletypes
|
||||
title: SyncAdaptorModules
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -27,12 +27,16 @@ Nothing should be exported if the adaptor detects that it isn't capable of opera
|
||||
|
||||
Adaptor modules must handle the following methods.
|
||||
|
||||
!! `Constructor(syncer)`
|
||||
!! `Constructor(options)`
|
||||
|
||||
Initialises a new adaptor instance.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|syncer |Syncer object that is using this adaptor |
|
||||
|options |See below |
|
||||
|
||||
Options include:
|
||||
|
||||
* ''options.wiki'': reference to wiki to use with this syncadaptor
|
||||
|
||||
!! `getTiddlerInfo(tiddler)`
|
||||
|
||||
@ -91,10 +95,11 @@ Loads a tiddler from the server.
|
||||
|title |Title of tiddler to be retrieved |
|
||||
|callback |Callback function invoked with parameter `err,tiddlerFields` |
|
||||
|
||||
!! `deleteTiddler(title,callback)`
|
||||
!! `deleteTiddler(title,callback,tiddlerInfo)`
|
||||
|
||||
Delete a tiddler from the server.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|title |Title of tiddler to be deleted |
|
||||
|callback |Callback function invoked with parameter `err` |
|
||||
|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler |
|
||||
|
@ -0,0 +1,6 @@
|
||||
title: Contents
|
||||
list: First Second Third Fourth
|
||||
|
||||
Sample data for TableOfContentsMacro.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,5 @@
|
||||
title: First
|
||||
tags: Contents
|
||||
list: FirstOne FirstTwo FirstThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: FirstOne
|
||||
tags: First
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: FirstThree
|
||||
tags: First
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: FirstTwo
|
||||
tags: First
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: Fourth
|
||||
tags: Contents
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: Second
|
||||
tags: Contents
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: SecondOne
|
||||
tags: Second
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,5 @@
|
||||
title: SecondThree
|
||||
tags: Second
|
||||
list: SecondThreeOne SecondThreeTwo SecondThreeThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: SecondThreeOne
|
||||
tags: SecondThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: SecondThreeThree
|
||||
tags: SecondThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: SecondThreeTwo
|
||||
tags: SecondThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: SecondTwo
|
||||
tags: Second
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,5 @@
|
||||
title: Third
|
||||
tags: Contents
|
||||
list: ThirdOne ThirdTwo ThirdThree
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: ThirdOne
|
||||
tags: Third
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: ThirdThree
|
||||
tags: Third
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -0,0 +1,4 @@
|
||||
title: ThirdTwo
|
||||
tags: Third
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
20
editions/tw5.com/tiddlers/system/EditTemplateSources.tid
Normal file
20
editions/tw5.com/tiddlers/system/EditTemplateSources.tid
Normal file
@ -0,0 +1,20 @@
|
||||
title: $:/editions/tw5.com/EditTemplate/Sources
|
||||
tags: $:/tags/EditTemplate
|
||||
list-after: $:/core/ui/EditTemplate/title
|
||||
|
||||
\define makeGitHubLink()
|
||||
https://github.com/Jermolene/TiddlyWiki5/edit/master/editions/tw5.com/tiddlers/$(githubLink)$
|
||||
\end
|
||||
\define innerMakeGitHubLink(linkText)
|
||||
<$set name="githubLink" value={{$:/config/OriginalTiddlerPaths##$(draftOfTiddler)$}}>
|
||||
<a href=<<makeGitHubLink>> class="tw-tiddlylink-external" target="_blank">$linkText$</a>
|
||||
</$set>
|
||||
\end
|
||||
\define outerMakeGitHubLink(linkText)
|
||||
<$set name="draftOfTiddler" value={{$(currentTiddler)$!!draft.of}}>
|
||||
<<innerMakeGitHubLink "$linkText$">>
|
||||
</$set>
|
||||
\end
|
||||
<div class="tw-improvement-banner">
|
||||
{{$:/core/images/star-filled}} Can you help us improve this documentation? [[Find out how|Improving TiddlyWiki Documentation]] to edit <<outerMakeGitHubLink "this tiddler on ~GitHub">>
|
||||
</div>
|
@ -3,5 +3,4 @@ tags: $:/tags/PageControls
|
||||
caption: ~GitHub ribbon
|
||||
description: ~GitHub ribbon for tw5.com
|
||||
|
||||
<div class="github-fork-ribbon-wrapper right"><div class="github-fork-ribbon"><a href="https://github.com/Jermolene/TiddlyWiki5" target="_blank">Find me on ~GitHub</a></div>
|
||||
</div>
|
||||
<div class="github-fork-ribbon-wrapper right" style><div class="github-fork-ribbon" style="background-color:#DF4848;"><$link to="ReleaseHistory"><<version>></$link></div></div>
|
@ -41,3 +41,47 @@ tags: $:/tags/stylesheet
|
||||
padding: 1em;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.tw-improvement-banner {
|
||||
font-size: 0.7em;
|
||||
background: #fcc;
|
||||
padding-left: 5px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 12px;
|
||||
<<box-shadow "2px 2px 2px rgba(0,0,0,0.4)">>
|
||||
}
|
||||
|
||||
@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
|
||||
|
||||
.tw-improvement-banner {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
|
||||
|
||||
.tw-improvement-banner {
|
||||
margin-right: -23px;
|
||||
margin-left: -53px;
|
||||
}
|
||||
|
||||
.tw-improvement-banner:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
content: " ";
|
||||
margin-left: -5px;
|
||||
margin-top: -10px;
|
||||
border-top: 5px solid transparent;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid #C07E7E;
|
||||
border-bottom: 5px solid #C07E7E;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tw-improvement-banner svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: ImageWidget
|
||||
created: 20140416160234142
|
||||
modified: 20140611160234142
|
||||
modified: 20140820100234142
|
||||
tags: widget
|
||||
|
||||
! Introduction
|
||||
@ -16,6 +16,7 @@ Any content of the `<$image>` widget is ignored.
|
||||
|width |The width of the image as a number |
|
||||
|height |The height of the image |
|
||||
|tooltip |The tooltip to be displayed over the image |
|
||||
|alt |The alternative text to be associated with the image |
|
||||
|class |CSS classes to be assigned to the `<img>` element |
|
||||
|
||||
! External Images and the ''_canonical_uri'' field
|
||||
|
@ -21,7 +21,7 @@ The content of the `<$reveal>` widget is displayed according to the rules given
|
||||
|type |The type of matching performed: ''match'', ''nomatch'' or ''popup'' |
|
||||
|text |The text to match when the type is ''match'' and ''nomatch'' |
|
||||
|position |The position used for the popup when the type is ''popup''. Can be ''left'', ''above'', ''aboveright'', ''right'', ''belowleft'' or ''below'' |
|
||||
|default |Default value to use when the state tiddler |
|
||||
|default |Default value to use when the state tiddler is missing |
|
||||
|animate |Set to "yes" to animate opening and closure (defaults to "no") |
|
||||
|retain |Set to "yes" to force the content to be retained even when hidden (defaults to "no")|
|
||||
|
||||
|
@ -31,7 +31,7 @@ Import/Hint: Importer des fichiers
|
||||
Info/Caption: informations
|
||||
Info/Hint: Afficher les informations sur ce tiddler
|
||||
Home/Caption: accueil
|
||||
Home/Hint: Rafraîchit la page et ouvre les tiddlers de la page d'accueil
|
||||
Home/Hint: Ouvre les tiddlers par défaut
|
||||
Language/Caption: langue
|
||||
Language/Hint: Choix de la langue pour l'interface utilisateur
|
||||
NewTiddler/Caption: nouveau tiddler
|
||||
@ -42,6 +42,8 @@ Permalink/Caption: permalink
|
||||
Permalink/Hint: Remplacer l'URL dans la barre d'adresse du navigateur par un lien direct vers ce tiddler
|
||||
Permaview/Caption: permaview
|
||||
Permaview/Hint: Remplacer l'URL dans la barre d'adresse du navigateur par un lien direct vers l'ensemble des tiddlers présents dans le déroulé
|
||||
Refresh/Caption: rafraîchir
|
||||
Refresh/Hint: Rafraîchit la totalité du wiki
|
||||
Save/Caption: enregistrer
|
||||
Save/Hint: Enregistrer ce tiddler
|
||||
SaveWiki/Caption: enregistrer les modifications
|
||||
|
@ -64,6 +64,12 @@ Basics/Title/Prompt: Titre de ce ~TiddlyWiki
|
||||
Basics/Username/Prompt: Signer les modifications avec ce nom d'utilisateur
|
||||
Basics/Version/Prompt: Numéro de version :
|
||||
Plugins/Caption: Plugins
|
||||
Plugins/Disable/Caption: désactiver
|
||||
Plugins/Disable/Hint: Désactive ce plugin au prochain rechargement de la page
|
||||
Plugins/Disabled/Status: (désactivé)
|
||||
Plugins/Empty/Hint: Aucun
|
||||
Plugins/Enable/Caption: activer
|
||||
Plugins/Enable/Hint: Active ce plugin au prochain rechargement de la page
|
||||
Plugins/Language/Prompt: Langues
|
||||
Plugins/Plugin/Prompt: Plugins
|
||||
Plugins/Theme/Prompt: Thèmes
|
||||
|
@ -1,5 +1,8 @@
|
||||
title: $:/core/fr-FR/readme
|
||||
|
||||
<!-- Replace with translation of the readme for the core plugin -->
|
||||
Ce plugin contient les principaux composants de TiddlyWiki, notamment :
|
||||
|
||||
{{$:/core/readme}}
|
||||
* Les modules du code JavaScript ;
|
||||
* Les icones ;
|
||||
* Les //templates// nécessaires à l'élaboration de l'interface utilisateur de TiddlyWiki ;
|
||||
* Les traductions en anglais britannique (''en-GB'') des chaînes de caractères utilisées par le cœur de l'application et susceptibles d'être traduites dans d'autres langues.
|
||||
|
@ -8,6 +8,7 @@ ConfirmCancelTiddler: Souhaitez-vous annuler les modifications apportées au tid
|
||||
ConfirmDeleteTiddler: Souhaitez-vous supprimer le tiddler « <$text text=<<title>>/> » ?
|
||||
ConfirmOverwriteTiddler: Souhaitez-vous supplanter le tiddler « <$text text=<<title>>/> » ?
|
||||
ConfirmEditShadowTiddler: Vous êtes sur le point d'éditer un ShadowTiddler. Toute modification supplantera la version par défaut du système, rendant les prochaines mises à jour non-triviales. Êtes-vous sûr(e) de vouloir éditer "<$text text=<<title>>/>"?
|
||||
DropMessage: Lâcher ici (ou appuyer sur « escape » pour annuler)
|
||||
InvalidFieldName: Caractères illicites dans le nom du champ « <$text text=<<fieldName>>/> ». Les champs ne peuvent contenir que des lettres minuscules non accentuées et les caractères souligné (`_`), tiret (`-`) et point (`.`)
|
||||
MissingTiddler/Hint: Le tiddler « <$text text=<<currentTiddler>>/> » est manquant - cliquez sur {{$:/core/images/edit-button}} pour le créer
|
||||
RecentChanges/DateFormat: DD MMM YYYY
|
||||
@ -30,3 +31,4 @@ TagManager/Colour/Heading: Couleur
|
||||
TagManager/Count/Heading: Quantité
|
||||
TagManager/Icon/Heading: Icone
|
||||
TagManager/Tag/Heading: Tag
|
||||
UnsavedChangesWarning: Vos dernières modifications n'ont pas été sauvegardées dans votre TiddlyWiki
|
||||
|
@ -64,11 +64,17 @@ Basics/Title/Prompt: 标题:
|
||||
Basics/Username/Prompt: 编辑者署名:
|
||||
Basics/Version/Prompt: ~TiddlyWiki 版本:
|
||||
Plugins/Caption: 插件
|
||||
Plugins/Disable/Caption: 禁用
|
||||
Plugins/Disable/Hint: 重新加载页面时禁用此插件
|
||||
Plugins/Disabled/Status: (已禁用)
|
||||
Plugins/Empty/Hint: 无
|
||||
Plugins/Enable/Caption: 启用
|
||||
Plugins/Enable/Hint: 重新加载页面时启用此插件
|
||||
Plugins/Language/Prompt: 语言
|
||||
Plugins/Plugin/Prompt: 插件
|
||||
Plugins/Theme/Prompt: 布景主题
|
||||
Saving/AutoSave/Disabled/Button: 启用
|
||||
Saving/AutoSave/Disabled/Prompt: 自动保存已停用
|
||||
Saving/AutoSave/Disabled/Prompt: 自动保存已禁用
|
||||
Saving/AutoSave/Enabled/Button: 停用
|
||||
Saving/AutoSave/Enabled/Prompt: 自动保存已启用
|
||||
Saving/AutoSave: 自动保存
|
||||
|
@ -30,3 +30,4 @@ TagManager/Colour/Heading: 颜色
|
||||
TagManager/Count/Heading: 数量
|
||||
TagManager/Icon/Heading: 图标
|
||||
TagManager/Tag/Heading: 标签
|
||||
UnsavedChangesWarning: 在此 TiddlyWiki 您有尚未保存的变更
|
||||
|
@ -64,6 +64,12 @@ Basics/Title/Prompt: 標題:
|
||||
Basics/Username/Prompt: 編輯者署名:
|
||||
Basics/Version/Prompt: ~TiddlyWiki 版本:
|
||||
Plugins/Caption: 插件
|
||||
Plugins/Disable/Caption: 停用
|
||||
Plugins/Disable/Hint: 重新載入頁面時停用此插件
|
||||
Plugins/Disabled/Status: (已停用)
|
||||
Plugins/Empty/Hint: 無
|
||||
Plugins/Enable/Caption: 啟用
|
||||
Plugins/Enable/Hint: 重新載入頁面時啟用此插件
|
||||
Plugins/Language/Prompt: 語言
|
||||
Plugins/Plugin/Prompt: 插件
|
||||
Plugins/Theme/Prompt: 佈景主題
|
||||
|
@ -30,3 +30,4 @@ TagManager/Colour/Heading: 顏色
|
||||
TagManager/Count/Heading: 數量
|
||||
TagManager/Icon/Heading: 圖示
|
||||
TagManager/Tag/Heading: 標籤
|
||||
UnsavedChangesWarning: 在此 TiddlyWiki 您有尚未儲存的變更
|
||||
|
@ -16,9 +16,9 @@ A sync adaptor module for synchronising with the local filesystem via node.js AP
|
||||
var fs = !$tw.browser ? require("fs") : null,
|
||||
path = !$tw.browser ? require("path") : null;
|
||||
|
||||
function FileSystemAdaptor(syncer) {
|
||||
function FileSystemAdaptor(options) {
|
||||
var self = this;
|
||||
this.syncer = syncer;
|
||||
this.wiki = options.wiki;
|
||||
this.watchers = {};
|
||||
this.pending = {};
|
||||
this.logger = new $tw.utils.Logger("FileSystem");
|
||||
@ -31,7 +31,7 @@ function FileSystemAdaptor(syncer) {
|
||||
var tiddlers = $tw.loadTiddlersFromFile(filename).tiddlers;
|
||||
for(var t in tiddlers) {
|
||||
if(tiddlers[t].title) {
|
||||
$tw.wiki.addTiddler(tiddlers[t]);
|
||||
self.wiki.addTiddler(tiddlers[t]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -152,7 +152,7 @@ FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
content = $tw.wiki.renderTiddler("text/plain","$:/core/templates/tiddler-metadata",{variables: {currentTiddler: tiddler.fields.title}});
|
||||
content = self.wiki.renderTiddler("text/plain","$:/core/templates/tiddler-metadata",{variables: {currentTiddler: tiddler.fields.title}});
|
||||
fs.writeFile(fileInfo.filepath + ".meta",content,{encoding: "utf8"},function (err) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
@ -164,7 +164,7 @@ FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback) {
|
||||
} else {
|
||||
// Save the tiddler as a self contained templated file
|
||||
template = $tw.config.typeTemplates[fileInfo.type];
|
||||
content = $tw.wiki.renderTiddler("text/plain",template,{variables: {currentTiddler: tiddler.fields.title}});
|
||||
content = self.wiki.renderTiddler("text/plain",template,{variables: {currentTiddler: tiddler.fields.title}});
|
||||
fs.writeFile(fileInfo.filepath,content,{encoding: "utf8"},function (err) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
@ -188,7 +188,7 @@ FileSystemAdaptor.prototype.loadTiddler = function(title,callback) {
|
||||
/*
|
||||
Delete a tiddler and invoke the callback with (err)
|
||||
*/
|
||||
FileSystemAdaptor.prototype.deleteTiddler = function(title,callback) {
|
||||
FileSystemAdaptor.prototype.deleteTiddler = function(title,callback,options) {
|
||||
var self = this,
|
||||
fileInfo = $tw.boot.files[title];
|
||||
// Only delete the tiddler if we have writable information for the file
|
||||
|
3
plugins/tiddlywiki/tiddlyweb/SaveWikiButtonTemplate.tid
Normal file
3
plugins/tiddlywiki/tiddlyweb/SaveWikiButtonTemplate.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/SaveWikiButton/Template
|
||||
|
||||
$:/plugins/tiddlywiki/tiddlyweb/save/offline
|
@ -18,9 +18,3 @@ Host configuration: <$edit-text tiddler="$:/config/tiddlyweb/host" tag="input" d
|
||||
----
|
||||
|
||||
<$button message="tw-server-refresh" class="btn btn-warning">Refresh</$button> to fetch changes from the server immediately
|
||||
|
||||
----
|
||||
|
||||
Download an offline copy of this wiki:
|
||||
|
||||
{{$:/editions/server/download-offline-button}}
|
@ -1,3 +0,0 @@
|
||||
title: $:/editions/server/download-offline-button
|
||||
|
||||
<$button message="tw-download-file" param="$:/editions/server/download-offline" class="btn-big-green">Download Offline Snapshot {{$:/core/images/save-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/editions/server/download-offline
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/save/offline
|
||||
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[[$:/boot/boot.css]] -[[$:/HistoryList]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] +[sort[title]]
|
@ -15,15 +15,15 @@ A sync adaptor module for synchronising with TiddlyWeb compatible servers
|
||||
var CONFIG_HOST_TIDDLER = "$:/config/tiddlyweb/host",
|
||||
DEFAULT_HOST_TIDDLER = "$protocol$//$host$/";
|
||||
|
||||
function TiddlyWebAdaptor(syncer) {
|
||||
this.syncer = syncer;
|
||||
function TiddlyWebAdaptor(options) {
|
||||
this.wiki = options.wiki;
|
||||
this.host = this.getHost();
|
||||
this.recipe = undefined;
|
||||
this.logger = new $tw.utils.Logger("TiddlyWebAdaptor");
|
||||
}
|
||||
|
||||
TiddlyWebAdaptor.prototype.getHost = function() {
|
||||
var text = this.syncer.wiki.getTiddlerText(CONFIG_HOST_TIDDLER,DEFAULT_HOST_TIDDLER),
|
||||
var text = this.wiki.getTiddlerText(CONFIG_HOST_TIDDLER,DEFAULT_HOST_TIDDLER),
|
||||
substitutions = [
|
||||
{name: "protocol", value: document.location.protocol},
|
||||
{name: "host", value: document.location.host}
|
||||
@ -46,8 +46,7 @@ Get the current status of the TiddlyWeb connection
|
||||
*/
|
||||
TiddlyWebAdaptor.prototype.getStatus = function(callback) {
|
||||
// Get status
|
||||
var self = this,
|
||||
wiki = self.syncer.wiki;
|
||||
var self = this;
|
||||
this.logger.log("Getting status");
|
||||
$tw.utils.httpRequest({
|
||||
url: this.host + "status",
|
||||
@ -198,10 +197,12 @@ TiddlyWebAdaptor.prototype.loadTiddler = function(title,callback) {
|
||||
|
||||
/*
|
||||
Delete a tiddler and invoke the callback with (err)
|
||||
options include:
|
||||
tiddlerInfo: the syncer's tiddlerInfo for this tiddler
|
||||
*/
|
||||
TiddlyWebAdaptor.prototype.deleteTiddler = function(title,callback) {
|
||||
TiddlyWebAdaptor.prototype.deleteTiddler = function(title,callback,options) {
|
||||
var self = this,
|
||||
bag = this.syncer.tiddlerInfo[title].adaptorInfo.bag;
|
||||
bag = options.tiddlerInfo.adaptorInfo.bag;
|
||||
// If we don't have a bag it means that the tiddler hasn't been seen by the server, so we don't need to delete it
|
||||
if(!bag) {
|
||||
return callback(null);
|
||||
|
@ -226,12 +226,17 @@ a.tw-tiddlylink-external:hover {
|
||||
z-index: 10000;
|
||||
display: block;
|
||||
position: absolute;
|
||||
position: -webkit-sticky;
|
||||
position: -moz-sticky;
|
||||
position: -o-sticky;
|
||||
position: -ms-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: <<colour dropzone-background>>;
|
||||
text-align: center;
|
||||
content: "Drop here";
|
||||
content: "<<lingo DropMessage>>";
|
||||
}
|
||||
|
||||
/*
|
||||
@ -312,7 +317,7 @@ button svg.tw-image-button, button .tw-image-button img {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.tw-tag-label {
|
||||
button.tw-tag-label, span.tw-tag-label {
|
||||
display: inline-block;
|
||||
padding: 2px 9px;
|
||||
font-size: 0.9em;
|
||||
@ -1251,6 +1256,16 @@ canvas.tw-edit-bitmapeditor {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.tw-plugin-info-disabled {
|
||||
background: -webkit-repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);
|
||||
background: repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);
|
||||
}
|
||||
|
||||
.tw-plugin-info-disabled:hover {
|
||||
background: -webkit-repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);
|
||||
background: repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);
|
||||
}
|
||||
|
||||
a.tw-tiddlylink.tw-plugin-info:hover {
|
||||
text-decoration: none;
|
||||
background-color: <<colour primary>>;
|
||||
@ -1273,7 +1288,7 @@ a.tw-tiddlylink.tw-plugin-info:hover {
|
||||
|
||||
.tw-plugin-info-dropdown {
|
||||
border: 1px solid <<colour muted-foreground>>;
|
||||
padding: 1em;
|
||||
padding: 1em 1em 1em 1em;
|
||||
margin-top: -1em;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user