kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Merge branch 'master' into new-json-store-area
commit
d3d59eb55b
|
@ -128,7 +128,7 @@ Saving/TiddlySpot/Filename: Upload Filename
|
|||
Saving/TiddlySpot/Heading: ~TiddlySpot
|
||||
Saving/TiddlySpot/Hint: //The server URL defaults to `http://<wikiname>.tiddlyspot.com/store.cgi` and can be changed to use a custom server address, e.g. `http://example.com/store.php`.//
|
||||
Saving/TiddlySpot/Password: Password
|
||||
Saving/TiddlySpot/ReadOnly: Note that [[TiddlySpot|http://tiddlyspot.com]] no longer allows the creation of new sites. For new sites you can use [[TiddlyHost|https://tiddlyhost.com]], a new hosting service which replaces ~TiddlySpot.
|
||||
Saving/TiddlySpot/ReadOnly: Note that [[TiddlySpot|http://tiddlyspot.com]] no longer allows the creation of new sites. For new sites, you can use [[TiddlyHost|https://tiddlyhost.com]], a new hosting service that replaces ~TiddlySpot.
|
||||
Saving/TiddlySpot/ServerURL: Server URL
|
||||
Saving/TiddlySpot/UploadDir: Upload Directory
|
||||
Saving/TiddlySpot/UserName: Wiki Name
|
||||
|
|
|
@ -3,6 +3,8 @@ title: $:/language/EditTemplate/
|
|||
Body/External/Hint: This tiddler shows content stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself
|
||||
Body/Placeholder: Type the text for this tiddler
|
||||
Body/Preview/Type/Output: output
|
||||
Body/Preview/Type/DiffShadow: differences from shadow (if any)
|
||||
Body/Preview/Type/DiffCurrent: differences from current
|
||||
Field/Remove/Caption: remove field
|
||||
Field/Remove/Hint: Remove field
|
||||
Field/Dropdown/Caption: field list
|
||||
|
|
|
@ -19,8 +19,8 @@ All parameters are optional with safe defaults, and can be specified in any orde
|
|||
* ''username'' - optional username for basic authentication
|
||||
* ''password'' - optional password for basic authentication
|
||||
* ''authenticated-user-header'' - optional name of header to be used for trusted authentication
|
||||
* ''readers'' - comma separated list of principals allowed to read from this wiki
|
||||
* ''writers'' - comma separated list of principals allowed to write to this wiki
|
||||
* ''readers'' - comma-separated list of principals allowed to read from this wiki
|
||||
* ''writers'' - comma-separated list of principals allowed to write to this wiki
|
||||
* ''csrf-disable'' - set to "yes" to disable CSRF checks (defaults to "no")
|
||||
* ''sse-enabled'' - set to "yes" to enable Server-sent events (defaults to "no")
|
||||
* ''root-tiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all")
|
||||
|
@ -30,7 +30,7 @@ All parameters are optional with safe defaults, and can be specified in any orde
|
|||
* ''tls-key'' - pathname of TLS key file (relative to wiki folder)
|
||||
* ''debug-level'' - optional debug level; set to "debug" to view request details (defaults to "none")
|
||||
* ''gzip'' - set to "yes" to enable gzip compression for some http endpoints (defaults to "no")
|
||||
* ''use-browser-cache'' - set to "yes" to allow the browser to cache responses to save bandwith (defaults to "no")
|
||||
* ''use-browser-cache'' - set to "yes" to allow the browser to cache responses to save bandwidth (defaults to "no")
|
||||
|
||||
For information on opening up your instance to the entire local network, and possible security concerns, see the WebServer tiddler at TiddlyWiki.com.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
|
||||
* The output directory is not cleared of any existing files
|
||||
* Any missing directories in the path to the filename are automatically created.
|
||||
* When referring to a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets : `--render "[[Motovun Jack.jpg]]"`
|
||||
* When referring to a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets: `--render "[[Motovun Jack.jpg]]"`
|
||||
* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being rendered, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`
|
||||
* Multiple ''name''/''value'' pairs can be used to pass more than one variable
|
||||
* The `--render` command is a more flexible replacement for both the `--rendertiddler` and `--rendertiddlers` commands, which are deprecated
|
||||
|
|
|
@ -16,7 +16,7 @@ Notes:
|
|||
|
||||
* The output directory is not cleared of any existing files
|
||||
* Any missing directories in the path to the filename are automatically created.
|
||||
* When saving a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets : `--save "[[Motovun Jack.jpg]]"`
|
||||
* When saving a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets: `--save "[[Motovun Jack.jpg]]"`
|
||||
* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being saved, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`
|
||||
* The `--save` command is a more flexible replacement for both the `--savetiddler` and `--savetiddlers` commands, which are deprecated
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
title: $:/language/Import/
|
||||
|
||||
Editor/Import/Heading: Import images and insert into the editor.
|
||||
Editor/Import/Heading: Import images and insert them into the editor.
|
||||
Imported/Hint: The following tiddlers were imported:
|
||||
Listing/Cancel/Caption: Cancel
|
||||
Listing/Hint: These tiddlers are ready to import:
|
||||
|
@ -23,7 +23,11 @@ Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugi
|
|||
Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <<incoming>> not being newer than existing <<existing>>).
|
||||
Upgrader/Plugins/Upgraded: Upgraded plugin from <<incoming>> to <<upgraded>>.
|
||||
Upgrader/State/Suppressed: Blocked temporary state tiddler.
|
||||
Upgrader/System/Disabled: Disabled system tiddler.
|
||||
Upgrader/System/Suppressed: Blocked system tiddler.
|
||||
Upgrader/System/Warning: Core module tiddler.
|
||||
Upgrader/System/Alert: You are about to import a tiddler that will overwrite a core module tiddler. This is not recommended as it may make the system unstable.
|
||||
Upgrader/ThemeTweaks/Created: Migrated theme tweak from <$text text=<<from>>/>.
|
||||
Upgrader/Tiddler/Disabled: Disabled tiddler.
|
||||
Upgrader/Tiddler/Selected: User selected.
|
||||
Upgrader/Tiddler/Unselected: Unselected tiddler.
|
||||
|
|
|
@ -34,7 +34,7 @@ exports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:
|
|||
|
||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||
|
||||
exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video".split(",");
|
||||
exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,details,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,nav,ol,p,pre,section,summary,table,tfoot,ul,video".split(",");
|
||||
|
||||
exports.htmlUnsafeElements = "script".split(",");
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@ function FramedEngine(options) {
|
|||
{name: "input",handlerObject: this,handlerMethod: "handleInputEvent"},
|
||||
{name: "keydown",handlerObject: this.widget,handlerMethod: "handleKeydownEvent"},
|
||||
{name: "focus",handlerObject: this,handlerMethod: "handleFocusEvent"}
|
||||
|
||||
]);
|
||||
// Add drag and drop event listeners if fileDrop is enabled
|
||||
if(this.widget.isFileDropEnabled) {
|
||||
|
|
|
@ -381,7 +381,6 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
|||
};
|
||||
|
||||
return EditTextWidget;
|
||||
|
||||
}
|
||||
|
||||
exports.editTextWidgetFactory = editTextWidgetFactory;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*\
|
||||
title: $:/core/modules/filters/format/titlelist.js
|
||||
type: application/javascript
|
||||
module-type: formatfilteroperator
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.titlelist = function(source,operand,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(title && title.length) {
|
||||
results.push($tw.utils.stringifyList([title]));
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
|
@ -5,11 +5,9 @@ module-type: filteroperator
|
|||
|
||||
Filter operator that looks up values via a title prefix
|
||||
|
||||
[lookup:<defaultvalue>:<field OR index>[<prefix>],[<field-name OR index-name>]]
|
||||
[lookup:<field>[<prefix>]]
|
||||
|
||||
Prepends the prefix to the selected items and returns the specified
|
||||
field or index value. If the 2nd suffix does not exist, it defaults to field.
|
||||
If the second operand is missing it defaults to "text" for fields, and "0" for indexes
|
||||
Prepends the prefix to the selected items and returns the specified field value
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
@ -22,35 +20,10 @@ If the second operand is missing it defaults to "text" for fields, and "0" for i
|
|||
Export our filter function
|
||||
*/
|
||||
exports.lookup = function(source,operator,options) {
|
||||
var results = [],
|
||||
suffixes = operator.suffixes || [],
|
||||
defaultSuffix = suffixes[0] ? (suffixes[0][0] || "") : "",
|
||||
indexSuffix = (suffixes[1] && suffixes[1][0] === "index") ? true : false,
|
||||
target;
|
||||
if(operator.operands.length == 2) {
|
||||
target = operator.operands[1]
|
||||
} else {
|
||||
target = indexSuffix ? "0": "text";
|
||||
}
|
||||
if(indexSuffix) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var targetTitle = operator.operands[0] + title;
|
||||
var data = options.wiki.extractTiddlerDataItem(targetTitle,target,defaultSuffix);
|
||||
results.push(data);
|
||||
results.push(options.wiki.getTiddlerText(operator.operand + title) || operator.suffix || '');
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
var targetTitle = operator.operands[0] + title;
|
||||
var targetTiddler = options.wiki.getTiddler(targetTitle);
|
||||
if(targetTiddler) {
|
||||
var value = targetTiddler.getFieldString(target);
|
||||
if(value == "" && defaultSuffix !== "") {
|
||||
value = defaultSuffix;
|
||||
}
|
||||
results.push(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ KeyboardManager.prototype.getEventModifierKeyDescriptor = function(event) {
|
|||
event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey ? "meta" :
|
||||
event.metaKey && event.ctrlKey && !event.shiftKey && !event.altKey ? "meta-ctrl" :
|
||||
event.metaKey && event.ctrlKey && event.shiftKey && !event.altKey ? "meta-ctrl-shift" :
|
||||
event.metaKey && event.ctrlKey & event.shiftKey && event.altKey ? "meta-ctrl-alt-shift" : "normal";
|
||||
event.metaKey && event.ctrlKey && event.shiftKey && event.altKey ? "meta-ctrl-alt-shift" : "normal";
|
||||
};
|
||||
|
||||
KeyboardManager.prototype.getShortcutTiddlerList = function() {
|
||||
|
@ -324,7 +324,7 @@ KeyboardManager.prototype.handleKeydownEvent = function(event) {
|
|||
if(key !== undefined) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$tw.rootWidget.invokeActionString(action,$tw.rootWidget);
|
||||
$tw.rootWidget.invokeActionString(action,$tw.rootWidget,event);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -36,7 +36,7 @@ exports.parse = function() {
|
|||
// Move past the pragma invocation
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Parse the filter terminated by a line break
|
||||
var reMatch = /(.*)(\r?\n)|$/mg;
|
||||
var reMatch = /(.*)(?:$|\r?\n)/mg;
|
||||
reMatch.lastIndex = this.parser.pos;
|
||||
var match = reMatch.exec(this.parser.source);
|
||||
this.parser.pos = reMatch.lastIndex;
|
||||
|
|
|
@ -40,9 +40,10 @@ exports.startup = function() {
|
|||
// Install the tm-focus-selector message
|
||||
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) {
|
||||
var selector = event.param || "",
|
||||
element;
|
||||
element,
|
||||
doc = event.event ? event.event.target.ownerDocument : document;
|
||||
try {
|
||||
element = document.querySelector(selector);
|
||||
element = doc.querySelector(selector);
|
||||
} catch(e) {
|
||||
console.log("Error in selector: ",selector)
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) {
|
|||
var listItemWidget = this.listWidget.children[listElementIndex],
|
||||
targetElement = listItemWidget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
if(duration) {
|
||||
|
@ -43,7 +43,7 @@ ClassicStoryView.prototype.insert = function(widget) {
|
|||
if(duration) {
|
||||
var targetElement = widget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
// Get the current height of the tiddler
|
||||
|
@ -83,7 +83,7 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||
widget.removeChildDomNodes();
|
||||
};
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
removeElement();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ PopStoryView.prototype.navigateTo = function(historyInfo) {
|
|||
var listItemWidget = this.listWidget.children[listElementIndex],
|
||||
targetElement = listItemWidget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
// Scroll the node into view
|
||||
|
@ -35,7 +35,7 @@ PopStoryView.prototype.insert = function(widget) {
|
|||
var targetElement = widget.findFirstDomNode(),
|
||||
duration = $tw.utils.getAnimationDuration();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
// Reset once the transition is over
|
||||
|
@ -77,7 +77,7 @@ PopStoryView.prototype.remove = function(widget) {
|
|||
}
|
||||
};
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
removeElement();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
|
|||
var listItemWidget = this.listWidget.children[listElementIndex],
|
||||
targetElement = listItemWidget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
// Make the new tiddler be position absolute and visible so that we can measure it
|
||||
|
@ -130,7 +130,7 @@ function findTitleDomNode(widget,targetClass) {
|
|||
ZoominListView.prototype.insert = function(widget) {
|
||||
var targetElement = widget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
return;
|
||||
}
|
||||
// Make the newly inserted node position absolute and hidden
|
||||
|
@ -147,7 +147,7 @@ ZoominListView.prototype.remove = function(widget) {
|
|||
widget.removeChildDomNodes();
|
||||
};
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!(targetElement instanceof Element)) {
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
removeElement();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -601,7 +601,10 @@ SaveTiddlerTask.prototype.run = function(callback) {
|
|||
tiddler = this.syncer.wiki.tiddlerExists(this.title) && this.syncer.wiki.getTiddler(this.title);
|
||||
this.syncer.logger.log("Dispatching 'save' task:",this.title);
|
||||
if(tiddler) {
|
||||
this.syncer.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {
|
||||
this.syncer.syncadaptor.saveTiddler(tiddler,{
|
||||
changeCount: changeCount,
|
||||
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
|
||||
},function(err,adaptorInfo,revision) {
|
||||
// If there's an error, exit without changing any internal state
|
||||
if(err) {
|
||||
return callback(err);
|
||||
|
@ -615,8 +618,6 @@ SaveTiddlerTask.prototype.run = function(callback) {
|
|||
};
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
},{
|
||||
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
|
||||
});
|
||||
} else {
|
||||
this.syncer.logger.log(" Not Dispatching 'save' task:",this.title,"tiddler does not exist");
|
||||
|
@ -633,7 +634,9 @@ function DeleteTiddlerTask(syncer,title) {
|
|||
DeleteTiddlerTask.prototype.run = function(callback) {
|
||||
var self = this;
|
||||
this.syncer.logger.log("Dispatching 'delete' task:",this.title);
|
||||
this.syncer.syncadaptor.deleteTiddler(this.title,function(err) {
|
||||
this.syncer.syncadaptor.deleteTiddler(this.title,{
|
||||
tiddlerInfo: self.syncer.tiddlerInfo[this.title]
|
||||
},function(err,adaptorInfo) {
|
||||
// If there's an error, exit without changing any internal state
|
||||
if(err) {
|
||||
return callback(err);
|
||||
|
@ -642,8 +645,6 @@ DeleteTiddlerTask.prototype.run = function(callback) {
|
|||
delete self.syncer.tiddlerInfo[self.title];
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
},{
|
||||
tiddlerInfo: self.syncer.tiddlerInfo[this.title]
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -12,8 +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"],
|
||||
DONT_IMPORT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/Import"],
|
||||
var DONT_IMPORT_LIST = ["$:/Import"],
|
||||
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
|
||||
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];
|
||||
|
||||
exports.upgrade = function(wiki,titles,tiddlers) {
|
||||
|
@ -26,11 +26,10 @@ exports.upgrade = function(wiki,titles,tiddlers) {
|
|||
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];
|
||||
for(var t=0; t<UNSELECT_PREFIX_LIST.length; t++) {
|
||||
var prefix = UNSELECT_PREFIX_LIST[t];
|
||||
if(title.substr(0,prefix.length) === prefix) {
|
||||
tiddlers[title] = Object.create(null);
|
||||
messages[title] = $tw.language.getString("Import/Upgrader/State/Suppressed");
|
||||
messages[title] = $tw.language.getString("Import/Upgrader/Tiddler/Unselected");
|
||||
}
|
||||
}
|
||||
for(var t=0; t<WARN_IMPORT_PREFIX_LIST.length; t++) {
|
||||
|
|
|
@ -58,9 +58,10 @@ Invoke the action associated with this widget
|
|||
*/
|
||||
ConfirmWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
var invokeActions = true,
|
||||
handled = true;
|
||||
handled = true,
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
if(this.prompt) {
|
||||
invokeActions = confirm(this.message);
|
||||
invokeActions = win.confirm(this.message);
|
||||
}
|
||||
if(invokeActions) {
|
||||
handled = this.invokeActions(triggeringWidget,event);
|
||||
|
|
|
@ -27,8 +27,11 @@ CreateTiddlerWidget.prototype = new Widget();
|
|||
Render this widget into the DOM
|
||||
*/
|
||||
CreateTiddlerWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
// Render children
|
||||
this.renderChildren(parent,nextSibling);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -44,7 +47,8 @@ CreateTiddlerWidget.prototype.execute = function() {
|
|||
this.actionTemplate = this.getAttribute("$template");
|
||||
this.useTemplate = !!this.actionTemplate;
|
||||
this.actionOverwrite = this.getAttribute("$overwrite","no");
|
||||
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -86,18 +90,20 @@ CreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|||
if (!this.hasBase && this.useTemplate) {
|
||||
title = this.wiki.generateNewTitle(this.actionTemplate);
|
||||
} else if (!this.hasBase && !this.useTemplate) {
|
||||
// If NO $basetitle AND NO $template use initial title
|
||||
// DON'T overwrite any stuff
|
||||
// If no $basetitle and no $template then use initial title
|
||||
title = this.wiki.generateNewTitle(title);
|
||||
}
|
||||
var templateTiddler = this.wiki.getTiddler(this.actionTemplate) || {};
|
||||
var tiddler = this.wiki.addTiddler(new $tw.Tiddler(templateTiddler.fields,creationFields,fields,modificationFields,{title: title}));
|
||||
this.wiki.addTiddler(new $tw.Tiddler(templateTiddler.fields,creationFields,fields,modificationFields,{title: title}));
|
||||
var draftTitle = this.wiki.generateDraftTitle(title);
|
||||
if(this.actionSaveTitle) {
|
||||
this.wiki.setTextReference(this.actionSaveTitle,title,this.getVariable("currentTiddler"));
|
||||
}
|
||||
if(this.actionSaveDraftTitle) {
|
||||
this.wiki.setTextReference(this.actionSaveDraftTitle,this.wiki.generateDraftTitle(title),this.getVariable("currentTiddler"));
|
||||
this.wiki.setTextReference(this.actionSaveDraftTitle,draftTitle,this.getVariable("currentTiddler"));
|
||||
}
|
||||
this.setVariable("createTiddler-title",title);
|
||||
this.setVariable("createTiddler-draftTitle",draftTitle);
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
||||
|
|
|
@ -40,30 +40,38 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
|
|||
// Create element
|
||||
var domNode = this.document.createElement(tag);
|
||||
// Assign classes
|
||||
var classes = (this["class"] || "").split(" ");
|
||||
classes.push("tc-keyboard");
|
||||
domNode.className = classes.join(" ");
|
||||
this.domNode = domNode;
|
||||
this.assignDomNodeClasses();
|
||||
// Add a keyboard event handler
|
||||
domNode.addEventListener("keydown",function (event) {
|
||||
if($tw.keyboardManager.checkKeyDescriptors(event,self.keyInfoArray)) {
|
||||
var handled = self.invokeActions(self,event);
|
||||
if(self.actions) {
|
||||
self.invokeActionString(self.actions,self,event);
|
||||
$tw.utils.addEventListeners(domNode,[
|
||||
{name: "keydown", handlerObject: this, handlerMethod: "handleChangeEvent"}
|
||||
]);
|
||||
// Insert element
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
this.domNodes.push(domNode);
|
||||
};
|
||||
|
||||
KeyboardWidget.prototype.handleChangeEvent = function(event) {
|
||||
if($tw.keyboardManager.checkKeyDescriptors(event,this.keyInfoArray)) {
|
||||
var handled = this.invokeActions(this,event);
|
||||
if(this.actions) {
|
||||
var variables = {
|
||||
"event-key": event.key,
|
||||
"event-code": event.code,
|
||||
"modifier": $tw.keyboardManager.getEventModifierKeyDescriptor(event)
|
||||
};
|
||||
this.invokeActionString(this.actions,this,event,variables);
|
||||
}
|
||||
self.dispatchMessage(event);
|
||||
if(handled || self.actions || self.message) {
|
||||
this.dispatchMessage(event);
|
||||
if(handled || this.actions || this.message) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},false);
|
||||
// Insert element
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
this.domNodes.push(domNode);
|
||||
};
|
||||
}
|
||||
|
||||
KeyboardWidget.prototype.dispatchMessage = function(event) {
|
||||
this.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable("currentTiddler")});
|
||||
|
@ -81,7 +89,6 @@ KeyboardWidget.prototype.execute = function() {
|
|||
this.key = this.getAttribute("key","");
|
||||
this.tag = this.getAttribute("tag","");
|
||||
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
|
||||
this["class"] = this.getAttribute("class","");
|
||||
if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") {
|
||||
this.shortcutTiddlers = [];
|
||||
var name = this.key.substring(2,this.key.length -2);
|
||||
|
@ -93,14 +100,22 @@ KeyboardWidget.prototype.execute = function() {
|
|||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
KeyboardWidget.prototype.assignDomNodeClasses = function() {
|
||||
var classes = this.getAttribute("class","").split(" ");
|
||||
classes.push("tc-keyboard");
|
||||
this.domNode.className = classes.join(" ");
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
KeyboardWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes["class"] || changedAttributes.tag) {
|
||||
if(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes.tag) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedAttributes["class"]) {
|
||||
this.assignDomNodeClasses();
|
||||
}
|
||||
// Update the keyInfoArray if one of its shortcut-config-tiddlers has changed
|
||||
if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers)) {
|
||||
|
|
|
@ -183,7 +183,8 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
|||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event);
|
||||
var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event),
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
if(!editTiddler) {
|
||||
return false;
|
||||
}
|
||||
|
@ -192,7 +193,7 @@ NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
|||
return self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title);
|
||||
}
|
||||
function confirmEditShadow(title) {
|
||||
return confirm($tw.language.getString(
|
||||
return win.confirm($tw.language.getString(
|
||||
"ConfirmEditShadowTiddler",
|
||||
{variables:
|
||||
{title: title}
|
||||
|
@ -225,7 +226,8 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
|||
storyList = this.getStoryList(),
|
||||
originalTitle = tiddler ? tiddler.fields["draft.of"] : "",
|
||||
originalTiddler = originalTitle ? this.wiki.getTiddler(originalTitle) : undefined,
|
||||
confirmationTitle;
|
||||
confirmationTitle,
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
if(!tiddler) {
|
||||
return false;
|
||||
}
|
||||
|
@ -238,7 +240,7 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
|||
confirmationTitle = title;
|
||||
}
|
||||
// Seek confirmation
|
||||
if((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || "") !== "") && !confirm($tw.language.getString(
|
||||
if((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || "") !== "") && !win.confirm($tw.language.getString(
|
||||
"ConfirmDeleteTiddler",
|
||||
{variables:
|
||||
{title: confirmationTitle}
|
||||
|
@ -304,7 +306,8 @@ NavigatorWidget.prototype.generateDraftTitle = function(title) {
|
|||
NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
storyList = this.getStoryList();
|
||||
storyList = this.getStoryList(),
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
// Replace the original tiddler with the draft
|
||||
if(tiddler) {
|
||||
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
|
||||
|
@ -313,7 +316,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
|||
var isRename = draftOf !== draftTitle,
|
||||
isConfirmed = true;
|
||||
if(isRename && this.wiki.tiddlerExists(draftTitle)) {
|
||||
isConfirmed = confirm($tw.language.getString(
|
||||
isConfirmed = win.confirm($tw.language.getString(
|
||||
"ConfirmOverwriteTiddler",
|
||||
{variables:
|
||||
{title: draftTitle}
|
||||
|
@ -362,6 +365,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
|||
// Take a tiddler out of edit mode without saving the changes
|
||||
NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
event = $tw.hooks.invokeHook("th-cancelling-tiddler", event);
|
||||
var win = event.event && event.event.view ? event.event.view : window;
|
||||
// Flip the specified tiddler from draft back to the original
|
||||
var draftTitle = event.param || event.tiddlerTitle,
|
||||
draftTiddler = this.wiki.getTiddler(draftTitle),
|
||||
|
@ -372,7 +376,7 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
|||
originalTiddler = this.wiki.getTiddler(originalTitle),
|
||||
storyList = this.getStoryList();
|
||||
if(this.wiki.isDraftModified(draftTitle)) {
|
||||
isConfirmed = confirm($tw.language.getString(
|
||||
isConfirmed = win.confirm($tw.language.getString(
|
||||
"ConfirmCancelTiddler",
|
||||
{variables:
|
||||
{title: draftTitle}
|
||||
|
@ -522,10 +526,15 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
|||
});
|
||||
// Give the active upgrader modules a chance to process the incoming tiddlers
|
||||
var messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers);
|
||||
// Deselect any disabled, but _not_ suppressed tiddlers
|
||||
var systemMessage = $tw.language.getString("Import/Upgrader/Tiddler/Unselected");
|
||||
$tw.utils.each(messages,function(message,title) {
|
||||
newFields["message-" + title] = message;
|
||||
if (message.indexOf(systemMessage) !== -1) {
|
||||
newFields["selection-" + title] = "unchecked";
|
||||
}
|
||||
});
|
||||
// Deselect any suppressed tiddlers
|
||||
// Deselect suppressed tiddlers ... they have been removed and can't be selected anymore
|
||||
$tw.utils.each(importData.tiddlers,function(tiddler,title) {
|
||||
if($tw.utils.count(tiddler) === 0) {
|
||||
newFields["selection-" + title] = "unchecked";
|
||||
|
@ -557,10 +566,12 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
|||
NavigatorWidget.prototype.handlePerformImportEvent = function(event) {
|
||||
var self = this,
|
||||
importTiddler = this.wiki.getTiddler(event.param),
|
||||
importData = this.wiki.getTiddlerDataCached(event.param,{tiddlers: {}}),
|
||||
importData,
|
||||
importReport = [];
|
||||
// Add the tiddlers to the store
|
||||
importReport.push($tw.language.getString("Import/Imported/Hint") + "\n");
|
||||
// If you need to modify the import tiddler payload then consider th-importing-tiddler instead
|
||||
importTiddler = $tw.hooks.invokeHook("th-before-importing",importTiddler);
|
||||
importData = this.wiki.getTiddlerDataCached(event.param,{tiddlers: {}}),
|
||||
$tw.utils.each(importData.tiddlers,function(tiddlerFields) {
|
||||
var title = tiddlerFields.title;
|
||||
if(title && importTiddler && importTiddler.fields["selection-" + title] !== "unchecked") {
|
||||
|
@ -569,7 +580,10 @@ NavigatorWidget.prototype.handlePerformImportEvent = function(event) {
|
|||
} else {
|
||||
var tiddler = new $tw.Tiddler(tiddlerFields);
|
||||
}
|
||||
// th-importing-tiddler doesn't allow user interaction by default
|
||||
// If you want to use the default UI then use: $:/core/modules/upgraders/ instead
|
||||
tiddler = $tw.hooks.invokeHook("th-importing-tiddler",tiddler);
|
||||
// Add the tiddlers to the store
|
||||
self.wiki.addTiddler(tiddler);
|
||||
importReport.push("# [[" + tiddler.fields.title + "]]");
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ TranscludeWidget.prototype.execute = function() {
|
|||
subTiddler: this.transcludeSubTiddler
|
||||
}),
|
||||
parseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;
|
||||
this.sourceText = parser ? parser.source : null;
|
||||
this.parserType = parser? parser.type : null;
|
||||
// Set context variables for recursion detection
|
||||
var recursionMarker = this.makeRecursionMarker();
|
||||
if(this.recursionMarker === "yes") {
|
||||
|
@ -98,12 +100,17 @@ TranscludeWidget.prototype.makeRecursionMarker = function() {
|
|||
return output.join("");
|
||||
};
|
||||
|
||||
TranscludeWidget.prototype.parserNeedsRefresh = function() {
|
||||
var parserInfo = this.wiki.getTextReferenceParserInfo(this.transcludeTitle,this.transcludeField,this.transcludeIndex,{subTiddler:this.transcludeSubTiddler});
|
||||
return (this.sourceText === undefined || parserInfo.sourceText !== this.sourceText || parserInfo.parserType !== this.parserType)
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
TranscludeWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {
|
||||
if(($tw.utils.count(changedAttributes) > 0) || (changedTiddlers[this.transcludeTitle] && this.parserNeedsRefresh())) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -960,41 +960,57 @@ exports.parseTiddler = function(title,options) {
|
|||
};
|
||||
|
||||
exports.parseTextReference = function(title,field,index,options) {
|
||||
var tiddler,text;
|
||||
if(options.subTiddler) {
|
||||
tiddler = this.getSubTiddler(title,options.subTiddler);
|
||||
} else {
|
||||
var tiddler,
|
||||
text,
|
||||
parserInfo;
|
||||
if(!options.subTiddler) {
|
||||
tiddler = this.getTiddler(title);
|
||||
if(field === "text" || (!field && !index)) {
|
||||
this.getTiddlerText(title); // Force the tiddler to be lazily loaded
|
||||
return this.parseTiddler(title,options);
|
||||
}
|
||||
}
|
||||
if(field === "text" || (!field && !index)) {
|
||||
if(tiddler && tiddler.fields) {
|
||||
return this.parseText(tiddler.fields.type,tiddler.fields.text,options);
|
||||
parserInfo = this.getTextReferenceParserInfo(title,field,index,options);
|
||||
if(parserInfo.sourceText !== null) {
|
||||
return this.parseText(parserInfo.parserType,parserInfo.sourceText,options);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
exports.getTextReferenceParserInfo = function(title,field,index,options) {
|
||||
var tiddler,
|
||||
parserInfo = {
|
||||
sourceText : null,
|
||||
parserType : "text/vnd.tiddlywiki"
|
||||
};
|
||||
if(options.subTiddler) {
|
||||
tiddler = this.getSubTiddler(title,options.subTiddler);
|
||||
} else {
|
||||
tiddler = this.getTiddler(title);
|
||||
}
|
||||
if(field === "text" || (!field && !index)) {
|
||||
if(tiddler && tiddler.fields) {
|
||||
parserInfo.sourceText = tiddler.fields.text || "";
|
||||
if(tiddler.fields.type) {
|
||||
parserInfo.parserType = tiddler.fields.type;
|
||||
}
|
||||
}
|
||||
} else if(field) {
|
||||
if(field === "title") {
|
||||
text = title;
|
||||
} else {
|
||||
if(!tiddler || !tiddler.hasField(field)) {
|
||||
return null;
|
||||
parserInfo.sourceText = title;
|
||||
} else if(tiddler && tiddler.fields) {
|
||||
parserInfo.sourceText = tiddler.fields[field] ? tiddler.fields[field].toString() : null;
|
||||
}
|
||||
text = tiddler.fields[field];
|
||||
}
|
||||
return this.parseText("text/vnd.tiddlywiki",text.toString(),options);
|
||||
} else if(index) {
|
||||
this.getTiddlerText(title); // Force the tiddler to be lazily loaded
|
||||
text = this.extractTiddlerDataItem(tiddler,index,undefined);
|
||||
if(text === undefined) {
|
||||
return null;
|
||||
parserInfo.sourceText = this.extractTiddlerDataItem(tiddler,index,null);
|
||||
}
|
||||
return this.parseText("text/vnd.tiddlywiki",text,options);
|
||||
if(parserInfo.sourceText === null) {
|
||||
parserInfo.parserType = null;
|
||||
}
|
||||
};
|
||||
return parserInfo;
|
||||
}
|
||||
|
||||
/*
|
||||
Make a widget tree for a parse tree
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/Blanca
|
||||
name: Blanca
|
||||
color-scheme: light
|
||||
description: A clean white palette to let you focus
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/Blue
|
||||
name: Blue
|
||||
color-scheme: light
|
||||
description: A blue theme
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/Muted
|
||||
name: Muted
|
||||
color-scheme: light
|
||||
description: Bright tiddlers on a muted background
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/ContrastLight
|
||||
name: Contrast (Light)
|
||||
color-scheme: light
|
||||
description: High contrast and unambiguous (light version)
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/ContrastDark
|
||||
name: Contrast (Dark)
|
||||
color-scheme: dark
|
||||
description: High contrast and unambiguous (dark version)
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/CupertinoDark
|
||||
tags: $:/tags/Palette
|
||||
color-scheme: dark
|
||||
name: Cupertino Dark
|
||||
description: A macOS inspired dark palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -5,6 +5,7 @@ name: DarkPhotos
|
|||
tags: $:/tags/Palette
|
||||
title: $:/palettes/DarkPhotos
|
||||
type: application/x-tiddler-dictionary
|
||||
color-scheme: light
|
||||
|
||||
alert-background: #ffe476
|
||||
alert-border: #b99e2f
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/DesertSand
|
||||
tags: $:/tags/Palette
|
||||
color-scheme: light
|
||||
name: Desert Sand
|
||||
description: A desert sand palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/GruvboxDark
|
||||
name: Gruvbox Dark
|
||||
color-scheme: dark
|
||||
description: Retro groove color scheme
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/Nord
|
||||
name: Nord
|
||||
color-scheme: dark
|
||||
description: An arctic, north-bluish color palette.
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/Rocker
|
||||
name: Rocker
|
||||
color-scheme: dark
|
||||
description: A dark theme
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
title: $:/palettes/SolarFlare
|
||||
name: Solar Flare
|
||||
color-scheme: light
|
||||
description: Warm, relaxing earth colours
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
|
|
|
@ -4,6 +4,7 @@ type: application/x-tiddler-dictionary
|
|||
description: Precision dark colors for machines and people
|
||||
license: MIT, Ethan Schoonover, https://github.com/altercation/solarized/blob/master/LICENSE
|
||||
name: SolarizedDark
|
||||
color-scheme: dark
|
||||
|
||||
alert-background: #073642
|
||||
alert-border: #93a1a1
|
||||
|
|
|
@ -4,6 +4,7 @@ type: application/x-tiddler-dictionary
|
|||
description: Precision colors for machines and people
|
||||
license: MIT, Ethan Schoonover, https://github.com/altercation/solarized/blob/master/LICENSE
|
||||
name: SolarizedLight
|
||||
color-scheme: light
|
||||
|
||||
alert-background: #eee8d5
|
||||
alert-border: #586e75
|
||||
|
|
|
@ -3,6 +3,7 @@ tags: $:/tags/Palette
|
|||
type: application/x-tiddler-dictionary
|
||||
description: Cold, spartan day colors
|
||||
name: Spartan Day
|
||||
color-scheme: light
|
||||
|
||||
alert-background: <<colour background>>
|
||||
alert-border: <<colour very-muted-foreground>>
|
||||
|
|
|
@ -3,6 +3,7 @@ tags: $:/tags/Palette
|
|||
type: application/x-tiddler-dictionary
|
||||
description: Dark spartan colors
|
||||
name: Spartan Night
|
||||
color-scheme: dark
|
||||
|
||||
alert-background: <<colour background>>
|
||||
alert-border: <<colour very-muted-foreground>>
|
||||
|
|
|
@ -4,6 +4,7 @@ author: Thomas Elmiger
|
|||
type: application/x-tiddler-dictionary
|
||||
name: Twilight
|
||||
description: Delightful, soft darkness.
|
||||
color-scheme: dark
|
||||
|
||||
alert-background: rgb(255, 255, 102)
|
||||
alert-border: rgb(232, 232, 125)
|
||||
|
|
|
@ -3,6 +3,7 @@ name: Vanilla
|
|||
description: Pale and unobtrusive
|
||||
tags: $:/tags/Palette
|
||||
type: application/x-tiddler-dictionary
|
||||
color-scheme: light
|
||||
|
||||
alert-background: #ffe476
|
||||
alert-border: #b99e2f
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
title: $:/core/ui/EditTemplate/body/preview/diffs-current
|
||||
tags: $:/tags/EditPreview
|
||||
caption: differences from current
|
||||
caption: {{$:/language/EditTemplate/Body/Preview/Type/DiffCurrent}}
|
||||
list-after: $:/core/ui/EditTemplate/body/preview/output
|
||||
|
||||
<$list filter="[<currentTiddler>!is[image]]" emptyMessage={{$:/core/ui/EditTemplate/body/preview/output}}>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
title: $:/core/ui/EditTemplate/body/preview/diffs-shadow
|
||||
tags: $:/tags/EditPreview
|
||||
caption: differences from shadow (if any)
|
||||
caption: {{$:/language/EditTemplate/Body/Preview/Type/DiffShadow}}
|
||||
list-after: $:/core/ui/EditTemplate/body/preview/output
|
||||
|
||||
<$list filter="[<currentTiddler>!is[image]]" emptyMessage={{$:/core/ui/EditTemplate/body/preview/output}}>
|
||||
|
|
|
@ -14,7 +14,7 @@ color:$(foregroundColor)$;
|
|||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
||||
\whitespace trim
|
||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||
<span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item">
|
||||
<span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item tc-small-gap-right">
|
||||
<$transclude tiddler="""$icon$"""/><$view field="title" format="text" />
|
||||
<$button class="tc-btn-invisible tc-remove-tag-button" style=<<tag-styles>>><$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="-[{!!title}]"/>{{$:/core/images/close-button}}</$button>
|
||||
</span>
|
||||
|
|
|
@ -12,6 +12,24 @@ title: $:/core/ui/ImportListing
|
|||
</$list>
|
||||
\end
|
||||
|
||||
\define selectionInfo()
|
||||
\whitespace trim
|
||||
<$set name="escUnselected" value={{{[{$:/language/Import/Upgrader/Tiddler/Unselected}escaperegexp[]addprefix[(?g)]]}}}>
|
||||
<$list filter="[all[current]get<messageField>regexp<escUnselected>]" variable="ignore">
|
||||
<$text text={{{[all[current]get<selectionField>match[checked]then{$:/language/Import/Upgrader/Tiddler/Selected}else[]]}}}/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define libraryInfo()
|
||||
\whitespace trim
|
||||
<$set name="escUnselected" value={{{[{$:/language/Import/Upgrader/Tiddler/Unselected}escaperegexp[]addprefix[(?g)]]}}}>
|
||||
<$list filter="[all[current]get<messageField>!regexp<escUnselected>]" variable="ignore">
|
||||
<$text text={{{[all[current]get<messageField>]}}}/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define selectionField() selection-$(payloadTiddler)$
|
||||
|
||||
\define renameField() rename-$(payloadTiddler)$
|
||||
|
@ -69,7 +87,8 @@ title: $:/core/ui/ImportListing
|
|||
</$reveal>
|
||||
</td>
|
||||
<td>
|
||||
<$view field=<<messageField>>/>
|
||||
<<selectionInfo>>
|
||||
<<libraryInfo>>
|
||||
<<overWriteWarning>>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -5,6 +5,7 @@ description: {{$:/language/Buttons/AdvancedSearch/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define advanced-search-button(class)
|
||||
\whitespace trim
|
||||
<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/advanced-search-button}}
|
||||
|
|
|
@ -3,11 +3,14 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/close-all-button}} {{$:/language/Buttons/CloseAll/Caption}}
|
||||
description: {{$:/language/Buttons/CloseAll/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button message="tm-close-all-tiddlers" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/close-all-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/CloseAll/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/CloseAll/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -5,6 +5,7 @@ description: {{$:/language/Buttons/ControlPanel/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define control-panel-button(class)
|
||||
\whitespace trim
|
||||
<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/options-button}}
|
||||
|
|
|
@ -10,7 +10,9 @@ description: {{$:/language/Buttons/Encryption/Hint}}
|
|||
{{$:/core/images/locked-padlock}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
@ -20,7 +22,9 @@ description: {{$:/language/Buttons/Encryption/Hint}}
|
|||
{{$:/core/images/unlocked-padlock}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
|
|
@ -3,12 +3,15 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/fold-all-button}} {{$:/language/Buttons/FoldAll/Caption}}
|
||||
description: {{$:/language/Buttons/FoldAll/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$action-sendmessage $message="tm-fold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]" variable="listItem">
|
||||
{{$:/core/images/fold-all-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/FoldAll/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/FoldAll/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -3,11 +3,14 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/full-screen-button}} {{$:/language/Buttons/FullScreen/Caption}}
|
||||
description: {{$:/language/Buttons/FullScreen/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button message="tm-full-screen" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/full-screen-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/FullScreen/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/FullScreen/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -3,11 +3,14 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/home-button}} {{$:/language/Buttons/Home/Caption}}
|
||||
description: {{$:/language/Buttons/Home/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/home-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Home/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Home/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -3,13 +3,16 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}}
|
||||
description: {{$:/language/Buttons/Import/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-file-input-wrapper">
|
||||
<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/import-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Import/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Import/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
<$browse tooltip={{$:/language/Buttons/Import/Hint}}/>
|
||||
|
|
|
@ -16,7 +16,6 @@ $(languagePluginTitle)$/icon
|
|||
</$set>
|
||||
</span>
|
||||
</$list>
|
||||
<$text text=" "/>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Language/Caption}}/></span>
|
||||
</$list>
|
||||
|
|
|
@ -5,12 +5,15 @@ description: {{$:/language/Buttons/Manager/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define manager-button(class)
|
||||
\whitespace trim
|
||||
<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/list}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Manager/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Manager/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
\end
|
||||
|
|
|
@ -3,6 +3,7 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}
|
||||
description: {{$:/language/Buttons/More/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
\define config-title()
|
||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
\end
|
||||
|
@ -11,7 +12,9 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
|||
{{$:/core/images/down-arrow}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/More/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/More/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ description: {{$:/language/Buttons/NewImage/Hint}}
|
|||
{{$:/core/images/new-image-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewImage/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/NewImage/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
|
|
|
@ -5,12 +5,15 @@ description: {{$:/language/Buttons/NewJournal/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define journalButton()
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/Actions/new-journal}}>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/new-journal-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/NewJournal/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
\end
|
||||
|
|
|
@ -9,6 +9,8 @@ description: {{$:/language/Buttons/NewTiddler/Hint}}
|
|||
{{$:/core/images/new-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/NewTiddler/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
|
|
|
@ -9,7 +9,6 @@ description: {{$:/language/Buttons/Palette/Hint}}
|
|||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/palette}}
|
||||
</$list>
|
||||
<$text text=" "/>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Palette/Caption}}/></span>
|
||||
</$list>
|
||||
|
|
|
@ -3,11 +3,14 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/print-button}} {{$:/language/Buttons/Print/Caption}}
|
||||
description: {{$:/language/Buttons/Print/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button message="tm-print" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/print-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Print/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Print/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -3,11 +3,14 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}}
|
||||
description: {{$:/language/Buttons/Refresh/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button message="tm-browser-refresh" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/refresh-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Refresh/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Refresh/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -3,6 +3,7 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
||||
|
@ -12,7 +13,9 @@ description: {{$:/language/Buttons/SaveWiki/Hint}}
|
|||
{{$:/core/images/save-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/SaveWiki/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</span>
|
||||
</$button>
|
|
@ -14,7 +14,6 @@ $:/core/images/storyview-$(storyview)$
|
|||
<$transclude tiddler=<<icon>>/>
|
||||
</$set>
|
||||
</$list>
|
||||
<$text text=" "/>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>
|
||||
</$list>
|
||||
|
|
|
@ -5,12 +5,15 @@ description: {{$:/language/Buttons/TagManager/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define control-panel-button(class)
|
||||
\whitespace trim
|
||||
<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/tag-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/TagManager/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/TagManager/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
\end
|
||||
|
|
|
@ -9,7 +9,6 @@ description: {{$:/language/Buttons/Theme/Hint}}
|
|||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/theme-button}}
|
||||
</$list>
|
||||
<$text text=" "/>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>
|
||||
</$list>
|
||||
|
|
|
@ -11,7 +11,9 @@ description: {{$:/language/Buttons/Timestamp/Hint}}
|
|||
{{$:/core/images/timestamp-on}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Timestamp/On/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Timestamp/On/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
@ -22,7 +24,9 @@ description: {{$:/language/Buttons/Timestamp/Hint}}
|
|||
{{$:/core/images/timestamp-off}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
|
|
@ -3,12 +3,15 @@ tags: $:/tags/PageControls
|
|||
caption: {{$:/core/images/unfold-all-button}} {{$:/language/Buttons/UnfoldAll/Caption}}
|
||||
description: {{$:/language/Buttons/UnfoldAll/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$action-sendmessage $message="tm-unfold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]" variable="listItem">
|
||||
{{$:/core/images/unfold-all-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/UnfoldAll/Caption}}/></span>
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/UnfoldAll/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
</$button>
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/Clone/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Clone/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/CloseOthers/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/CloseOthers/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/Edit/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Edit/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -11,7 +11,6 @@ description: {{$:/language/Buttons/FoldOthers/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/FoldOthers/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -12,7 +12,6 @@ description: {{$:/language/Buttons/Fold/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Fold/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
@ -26,7 +25,6 @@ description: {{$:/language/Buttons/Fold/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Unfold/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -5,6 +5,7 @@ description: {{$:/language/Buttons/Info/Hint}}
|
|||
|
||||
\whitespace trim
|
||||
\define button-content()
|
||||
\whitespace trim
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/info-button}}
|
||||
</$list>
|
||||
|
|
|
@ -13,7 +13,6 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/More/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -10,6 +10,7 @@ description: {{$:/language/Buttons/NewHere/Hint}}
|
|||
</$set>
|
||||
\end
|
||||
\define newHereButton()
|
||||
\whitespace trim
|
||||
<$button actions=<<newHereActions>> tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/new-here-button}}
|
||||
|
|
|
@ -8,6 +8,7 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}}
|
|||
[[$(currentTiddlerTag)$]] $(journalTags)$
|
||||
\end
|
||||
\define journalButton()
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
|
||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalButtonTags>>/>
|
||||
|
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/OpenWindow/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/OpenWindow/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/Permalink/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Permalink/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -10,7 +10,6 @@ description: {{$:/language/Buttons/Permaview/Hint}}
|
|||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
<$text text=" "/>
|
||||
<$text text={{$:/language/Buttons/Permaview/Caption}}/>
|
||||
</span>
|
||||
</$list>
|
||||
|
|
|
@ -6,6 +6,7 @@ $baseFilename$$(extension)$
|
|||
\end
|
||||
|
||||
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
|
||||
\whitespace trim
|
||||
<$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}} caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}>
|
||||
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip=<<hint>> aria-label=<<caption>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
|
|
|
@ -69,7 +69,7 @@ Returns a revision ID.
|
|||
Retrieves status information from the server. This method is optional.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|callback |Callback function invoked with parameters `err,isLoggedIn,username,isReadOnly` |
|
||||
|callback |Callback function invoked with parameters `err,isLoggedIn,username,isReadOnly,isAnonymous,isPollingDisabled` |
|
||||
|
||||
!! `login(username,password,callback)`
|
||||
|
||||
|
@ -128,33 +128,40 @@ The syncer will use the `getUpdatedTiddlers()` method in preference to the `getS
|
|||
|!Parameter |!Description |
|
||||
|callback |Callback function invoked with parameter `err,tiddlers`, where `tiddlers` is an array of tiddler field objects |
|
||||
|
||||
!! `saveTiddler(tiddler,callback)`
|
||||
!! `saveTiddler(tiddler,options,callback)`
|
||||
|
||||
Saves a tiddler to the server.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|tiddler |Tiddler to be saved |
|
||||
|options |See below |
|
||||
|callback |Callback function invoked with parameter `err,adaptorInfo,revision` |
|
||||
|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler |
|
||||
|
||||
!! `loadTiddler(title,callback)`
|
||||
!! `loadTiddler(title,options,callback)`
|
||||
|
||||
Loads a tiddler from the server.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|title |Title of tiddler to be retrieved |
|
||||
|options |See below |
|
||||
|callback |Callback function invoked with parameter `err,tiddlerFields` |
|
||||
|
||||
!! `deleteTiddler(title,callback,options)`
|
||||
!! `deleteTiddler(title,options,callback)`
|
||||
|
||||
Delete a tiddler from the server.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|title |Title of tiddler to be deleted |
|
||||
|callback |Callback function invoked with parameter `err` |
|
||||
|options |See below |
|
||||
|callback |Callback function invoked with parameter `err` |
|
||||
|
||||
The options parameter contains the following properties:
|
||||
!!! Options
|
||||
|
||||
<<.from-version "5.2.0">> The signature of syncadaptor functions that accept callbacks has been changed so that the callback is always the last argument. A check for the old order of arguments means that this change is backwards compatible. The new order should be prefered when updating or writing new plugins.
|
||||
|
||||
The options parameter may contain the following properties, depending on the method called.
|
||||
|
||||
|!Property |!Description |
|
||||
|changeCount |The //new// changeCount value for this tiddler |
|
||||
|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler |
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
created: 20210203184649726
|
||||
modified: 20210208152038746
|
||||
tags: HookMechanism
|
||||
title: Hook: th-before-importing
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This hook allows plugins to inspect or modify the `importTiddler` object ''before'' any tiddlers are imported. It is invoked after the final "Import" button is clicked, but ''before'' the selected tiddlers are being imported into the store.
|
||||
|
||||
''Intended Usecases'':
|
||||
|
||||
* Manipulate the import "selection state"
|
||||
* Eg: create a customized "log-tiddler" that contains a heading, that should only be written once
|
||||
|
||||
''Important'':
|
||||
|
||||
* This hook ''should not'' be used to manpulate the `importTiddler.fields.text` element!
|
||||
* If you want to give the users a possibility to verify the imported data, use ùpgraders like: `$:/core/modules/upgraders/` instead
|
||||
* If you need to manipulate the imported tiddler content, without default user interaction, consider: [[Hook: th-importing-tiddler]] instead
|
||||
|
||||
The hook is part of the `NavigatorWidget.prototype.handlePerformImportEvent` function.
|
||||
|
||||
Hook function parameters:
|
||||
|
||||
* ''importTiddler'': an object, that contains information about "selected / unselected" tiddlers and more
|
||||
|
||||
Return value:
|
||||
|
||||
* ''importTiddler'': object
|
||||
|
||||
The hook must return the `importTiddler` object. For many usecases the object will be returned unmodified.
|
||||
|
||||
''Example code how to implement a hook in your project''
|
||||
|
||||
```
|
||||
/*\
|
||||
title: $:/plugins/<author>/<plugin>/th-before-importing.js
|
||||
type: application/javascript
|
||||
module-type: startup
|
||||
|
||||
YOUR DISCRCRIPTION COMES HERE!
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false, exports: true */
|
||||
"use strict";
|
||||
|
||||
// Export name and synchronous status
|
||||
exports.name = "<yournamecomesherewithoutspaces>";
|
||||
exports.platforms = ["browser"];
|
||||
exports.after = ["startup"];
|
||||
exports.synchronous = true;
|
||||
|
||||
// Define your variables here!
|
||||
|
||||
exports.startup = function() {
|
||||
$tw.hooks.addHook("th-before-importing",function(importTiddler) {
|
||||
|
||||
// YOUR CODE !
|
||||
|
||||
return importTiddler;
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
```
|
|
@ -1,11 +1,13 @@
|
|||
created: 20170209130829546
|
||||
modified: 20171010115148355
|
||||
modified: 20210203190724491
|
||||
tags: HookMechanism
|
||||
title: Hook: th-importing-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This hook allows plugins to inspect or modify tiddlers as they are imported via the import mechanism. It is invoked when the final "Import" button is clicked, and the selected tiddlers are being imported into the store.
|
||||
|
||||
The hook is part of the `NavigatorWidget.prototype.handlePerformImportEvent` function.
|
||||
|
||||
Use this hook if you want to process each imported tiddler after they have been extracted from the files. See [[Hook: th-importing-file]] if you want to control how tiddlers are extracted from files during an import.
|
||||
|
||||
Hook function parameters:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
caption: 5.1.24
|
||||
caption: 5.2.0
|
||||
created: 20201229120443187
|
||||
modified: 20201229120443187
|
||||
modified: 20210604142913752
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.24
|
||||
title: Release 5.2.0
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define contributor(username)
|
||||
|
@ -17,6 +17,8 @@ type: text/vnd.tiddlywiki
|
|||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5362">> [[all Operator]] to use new linked list implementation
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5369">> [[links Operator]] to use new linked list implementation
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5383">> unneeded escaping of double quotes in tiddler DIVs inside single file wikis (saving about 10% from the size of empty.html)
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5436">> Network performance for node.js
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5736">> refreshing of transclude widget.
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
|
@ -29,14 +31,26 @@ type: text/vnd.tiddlywiki
|
|||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/commit/caec6bc3fea9155eb2b0aae64d577c565dd7b088">> SVG optimiser script
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/c325380231a8c592a6e51d4498c1e6c3a241b539">> plus/minus SVG icons: <<.icon $:/core/images/plus-button>> and <<.icon $:/core/images/minus-button>>
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5294">> support for [[dynamic toolbar buttons|How to create dynamic editor toolbar buttons]]
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5612">> [[average Operator]], [[median Operator]], [[variance Operator]] and [[standard-deviation Operator]] for calculating the arithmetic mean of a list of numbers
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/cf56a17f28f1e44dcb62c5e161be4ac29e27c3f2">> unusedtitle macro to use the prefix parameter
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5672">> link to the existing tiddler when the warning Target tiddler already exists is displayed in EditTemplate
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5699">> (and again [[here|https://github.com/Jermolene/TiddlyWiki5/pull/5705]]) ability to drag 'n drop images in the editor to import and insert
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5707">> text operation [[insert-text|WidgetMessage: tm-edit-text-operation]]
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/5467">> syncadaptor "save" "load" and "delete" methods
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5479">> possibility to import formerly blocked system tiddlers
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5720">> color-scheme field to all themes to differentiate between light and dark themes
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5727">> class to make tags in EditTemplate look like the tag-pills in the ViewTemplate
|
||||
|
||||
! Filter improvements
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5612">> [[average Operator]], [[median Operator]], [[variance Operator]] and [[standard-deviation Operator]] for calculating the arithmetic mean of a list of numbers
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5673">> [[deserializers filter Operator|deserializers Operator]]
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5665">> [[format:titlelist operator|format Operator]]
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/9eda02868f21e9dd1733ffe26352bd7ac96285b4">> new MessageCatcherWidget
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/d25e540dd2f0decf61c52fdc665a28a5dfeda93f">> support for `image/vnd.microsoft.icon` content type
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5458">> Add throttling for changed tiddlers prefixed with $:/volatile/
|
||||
|
||||
! Widget Improvements
|
||||
* <<.link-badge-modified "https://github.com/Jermolene/TiddlyWiki5/commit/b9647b2c48152dac069a1099a0822b32375a66cf">> [[FieldManglerWidget]] to ensure it doesn't propogate events that it traps
|
||||
|
@ -49,6 +63,8 @@ type: text/vnd.tiddlywiki
|
|||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/07caa16e8714afe9a64eb202375e4a2f95da1508">> [[DropzoneWidget]] to also use the specified deserializer for strings either dropped or pasted on to the dropzone
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/44df6fe52f79bee88357afb4fc3d6f4800aa6dde">> issue with widget not being available to filter operator
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/3f986861538a3cc5c3c6da578b45d0d9138a6b2b">> [[ActionPopupWidget]] to create floating popups that must be manually cleared
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/5648">> [[KeyboardWidget]] to allow for more flexibility
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9faaa312998d48c56bd50335820b6b881266af4b">> [[ActionCreateTiddlerWidget]] to make new title available as a variable
|
||||
|
||||
! Client-server Improvements
|
||||
|
||||
|
@ -93,10 +109,13 @@ type: text/vnd.tiddlywiki
|
|||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5377">> the Jasmine test suite output
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9f9ce6595b08032a602981f82940ca113cff8211">> wikitext parser with a subclassing mechanism
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/ef76349c37662e9706acfffc2c2edb51a920183d">> added support for ''utils-browser'' modules
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5464">> th-before-importing hook mechanism to allow plugins to inspect or modify the `importTiddler` object ''before'' any tiddlers are imported
|
||||
|
||||
! Translation improvements
|
||||
|
||||
* <<.link-badge-improved>> Chinese translations
|
||||
* <<.link-badge-improved>> French translations
|
||||
* <<.link-badge-improved>> Spanish translations
|
||||
|
||||
|
||||
! Other Bug Fixes
|
||||
|
@ -117,7 +136,16 @@ type: text/vnd.tiddlywiki
|
|||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/commit/d56e8764a1f02a214df5da1cc95191be2da2491b">> accessibility of button widget when controlling a popup
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/d6ea369f5ef9d3092a360a4286a99902df37782b">> EditTextWidget to use default text for missing fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5552">> css-escape-polyfill to work under Node.js
|
||||
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/dbd3f835bf8399ed1a3da7cc322ec9b6ab783d53">> crash when sorting by non-string fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5711">> some bugs in the [[EventCatcherWidget]] and introduced new `stopPorpagation` attribute
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5691">> CurrentTiddler variable consistency in subfilters and prefixes
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/485779f5b2136b7bcd739352b56188d94b0eb9e4">> crash when accessing variables in filters that don't have a widget context
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8fbf52e419e71d726ea32b6c44e3ccfc4245d825">> unnecessary triggering reload warning when javascript tiddlers are not subsequently imported
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5521">> minor issue with import pragma
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5700">> leading and trailing whitespace in themes
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5469">> configuration list of HTML5 block elements
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5692">> shape and color for disabled button to work with `tc-btn-invisible` class
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5473">> inconsistent spacing of ViewToolbar items
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
|
@ -144,7 +172,7 @@ type: text/vnd.tiddlywiki
|
|||
* <<contributor NicolasPetton>>
|
||||
* <<contributor OdinJorna>>
|
||||
* <<contributor pmario>>
|
||||
* <<contributor saqimtias>>
|
||||
* <<contributor saqimtiaz>>
|
||||
* <<contributor simonbaird>>
|
||||
* <<contributor slaymaker1907>>
|
||||
* <<contributor twMat>>
|
||||
|
|
|
@ -809,6 +809,12 @@ function runTests(wiki) {
|
|||
expect(wiki.filterTiddlers("'-' +[escapecss[]]").join(",")).toBe("\\-");
|
||||
});
|
||||
|
||||
it("should handle the format operator", function() {
|
||||
expect(wiki.filterTiddlers("[[Hello There]] [[GettingStarted]] +[format:titlelist[]]").join(" ")).toBe("[[Hello There]] GettingStarted");
|
||||
expect(wiki.filterTiddlers("[title[Hello There]] +[format:titlelist[]]").join(" ")).toBe("[[Hello There]]");
|
||||
expect(wiki.filterTiddlers("[title[HelloThere]] +[format:titlelist[]]").join(" ")).toBe("HelloThere");
|
||||
});
|
||||
|
||||
it("should handle the deserializers operator", function() {
|
||||
expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe("application/javascript,application/json,application/x-tiddler,application/x-tiddler-html-div,application/x-tiddlers,text/css,text/html,text/plain");
|
||||
});
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
/*\
|
||||
title: test-parsetextreference.js
|
||||
type: application/javascript
|
||||
tags: [[$:/tags/test-spec]]
|
||||
|
||||
Tests for source attribute in parser returned from wiki.parseTextReference
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
describe("Wiki.parseTextReference tests", function() {
|
||||
|
||||
// Create a wiki
|
||||
var wiki = new $tw.Wiki();
|
||||
wiki.addTiddler({
|
||||
title: "TiddlerOne",
|
||||
text: "The quick brown fox in $:/TiddlerTwo",
|
||||
tags: ["one"],
|
||||
authors: "Joe Bloggs",
|
||||
modifier: "JoeBloggs",
|
||||
modified: "201304152222"});
|
||||
wiki.addTiddler({
|
||||
title: "$:/TiddlerTwo",
|
||||
tags: ["two"],
|
||||
authors: "[[John Doe]]",
|
||||
modifier: "John",
|
||||
modified: "201304152211"});
|
||||
wiki.addTiddler({
|
||||
title: "Tiddler Three",
|
||||
text: '{"oct":31,"nov":30,"dec":31}',
|
||||
tags: ["one","two"],
|
||||
type: "application/json",
|
||||
modifier: "John",
|
||||
modified: "201304162202"});
|
||||
wiki.addTiddler({
|
||||
title: "TiddlerFour",
|
||||
text: "The quick brown fox in $:/TiddlerTwo",
|
||||
tags: ["one"],
|
||||
type: "text/vnd.tiddlywiki",
|
||||
authors: "Joe Bloggs",
|
||||
modifier: "JoeBloggs",
|
||||
modified: "201304152222"});
|
||||
// Add a plugin containing some shadow tiddlers
|
||||
var shadowTiddlers = {
|
||||
tiddlers: {
|
||||
"$:/TiddlerFive": {
|
||||
title: "$:/TiddlerFive",
|
||||
text: "Everything in federation",
|
||||
tags: ["two"]
|
||||
},
|
||||
"TiddlerSix": {
|
||||
title: "TiddlerSix",
|
||||
text: "Missing inaction from TiddlerOne",
|
||||
filter: "[[one]] [[a a]] [subfilter{hasList!!list}]",
|
||||
tags: []
|
||||
},
|
||||
"TiddlerSeventh": {
|
||||
title: "TiddlerSeventh",
|
||||
text: "",
|
||||
list: "TiddlerOne [[Tiddler Three]] [[a fourth tiddler]] MissingTiddler",
|
||||
tags: ["one"]
|
||||
},
|
||||
"Tiddler8": {
|
||||
title: "Tiddler8",
|
||||
text: "Tidd",
|
||||
tags: ["one"],
|
||||
"test-field": "JoeBloggs"
|
||||
}
|
||||
}
|
||||
};
|
||||
wiki.addTiddler({
|
||||
title: "$:/ShadowPlugin",
|
||||
text: JSON.stringify(shadowTiddlers),
|
||||
"plugin-type": "plugin",
|
||||
type: "application/json"});
|
||||
wiki.addTiddler({
|
||||
title: "TiddlerNine",
|
||||
text: "this is plain text",
|
||||
type: "text/plain"
|
||||
});
|
||||
|
||||
// Define a parsing shortcut for souce attribute of parser returned by wiki.parseTextReference
|
||||
var parseAndGetSource = function(title,field,index,subTiddler) {
|
||||
var parser = wiki.parseTextReference(title,field,index,{subTiddler: subTiddler});
|
||||
return parser ? parser.source : null;
|
||||
};
|
||||
|
||||
it("should parse text references and return correct source attribute", function(){
|
||||
// Existing tiddler with a text field, no field argument specified
|
||||
expect(parseAndGetSource("TiddlerOne")).toEqual("The quick brown fox in $:/TiddlerTwo");
|
||||
// Existing tiddler with a text field, field argument specified as text
|
||||
expect(parseAndGetSource("TiddlerOne","text")).toEqual("The quick brown fox in $:/TiddlerTwo");
|
||||
// Existing tiddler with no text field
|
||||
expect(parseAndGetSource("$:/TiddlerTwo")).toEqual("");
|
||||
// Existing tiddler, field argument specified as authors
|
||||
expect(parseAndGetSource("TiddlerOne","authors")).toEqual("Joe Bloggs");
|
||||
// Non-existent tiddler, no field argument
|
||||
expect(parseAndGetSource("MissingTiddler")).toEqual(null);
|
||||
// Non-existent tiddler, field argument
|
||||
expect(parseAndGetSource("MissingTiddler","missing-field")).toEqual(null);
|
||||
// Non-existent tiddler, index specified
|
||||
expect(parseAndGetSource("MissingTiddler",null,"missing-index")).toEqual(null);
|
||||
// Existing tiddler with non existent field
|
||||
expect(parseAndGetSource("TiddlerOne","missing-field")).toEqual(null);
|
||||
// Data tiddler with index specified
|
||||
expect(parseAndGetSource("Tiddler Three",null,"oct")).toEqual("31");
|
||||
// Existing tiddler with a text field, type set to vnd.tiddlywiki
|
||||
expect(parseAndGetSource("TiddlerFour")).toEqual("The quick brown fox in $:/TiddlerTwo");
|
||||
// Existing subtiddler of a plugin
|
||||
expect(parseAndGetSource("$:/ShadowPlugin","text",null,"Tiddler8")).toEqual("Tidd");
|
||||
// Non-existent subtiddler of a plugin
|
||||
expect(parseAndGetSource("$:/ShadowPlugin","text",null,"MyMissingTiddler")).toEqual(null);
|
||||
// Plain text tiddler
|
||||
expect(parseAndGetSource("TiddlerNine")).toEqual(undefined);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
|
@ -702,6 +702,19 @@ describe("Widget module", function() {
|
|||
expect(wrapper.innerHTML).toBe("<p>Don't forget me.</p>");
|
||||
});
|
||||
|
||||
/** Special case. \import should parse correctly, even if it's
|
||||
* the only line in the tiddler. Technically doesn't cause a
|
||||
* visual difference, but may affect plugins if it doesn't.
|
||||
*/
|
||||
it("should work when import pragma is standalone", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
var text = "\\import [prefix[XXX]]";
|
||||
var parseTreeNode = parseText(text,wiki);
|
||||
// Test the resulting parse tree node, since there is no
|
||||
// rendering which may expose a problem.
|
||||
expect(parseTreeNode.children[0].attributes.filter.value).toBe('[prefix[XXX]]');
|
||||
});
|
||||
|
||||
/** This test reproduces issue #4504.
|
||||
*
|
||||
* The importvariable widget was creating redundant copies into
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
created: 20210525102327864
|
||||
modified: 20210525102327884
|
||||
title: $:/key-test
|
||||
type: text/vnd.tiddlywiki
|
|
@ -0,0 +1,11 @@
|
|||
created: 20210525102659716
|
||||
modified: 20210525102701077
|
||||
title: $:/key-test/action
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$vars tv-wikilinks="no">
|
||||
|
||||
* event-key:
|
||||
* event-code:
|
||||
* modifier:
|
||||
</$vars>
|
|
@ -0,0 +1,66 @@
|
|||
created: 20210427092418146
|
||||
modified: 20210525130708186
|
||||
tags: KeyboardWidget
|
||||
title: Key Codes (Example 1)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define key-test() $:/key-test
|
||||
|
||||
\import [[Keyboard Codes (Macros)]]
|
||||
|
||||
\define keys()
|
||||
backspace tab clear return enter pause escape space
|
||||
page_up page_down end home printscreen insert delete
|
||||
|
||||
left up right down results in: ArrowLeft ArrowUp ArrowRight ArrowDown
|
||||
|
||||
0 1 2 3
|
||||
shift+0 shift+1 shift+2 shift+3 results in: = ! " with modifierKey: shift
|
||||
ctrl+0 ctrl+1 ctrl+2 ctrl+3
|
||||
alt+0 alt+1 alt+2 alt+3
|
||||
|
||||
ctrl+alt+0 ctrl+alt+1 ctrl+alt+2 ctrl+alt+3
|
||||
alt+shift+0 alt+shift+1 alt+shift+2 alt+shift+3
|
||||
ctrl+shift+0 ctrl+shift+1 ctrl+shift+2 ctrl+shift+3 INFO: ctrl-shift-0 is eaten by windows!!
|
||||
ctrl+alt+shift+0 ctrl+alt+shift+1 ctrl+alt+shift+2 ctrl+alt+shift+3
|
||||
|
||||
a s d
|
||||
shift+a shift+s shift+d
|
||||
ctrl+a ctrl+s ctrl+d
|
||||
alt+a alt+s alt+d
|
||||
|
||||
ctrl+shift+a ctrl+shift+s ctrl+shift+d
|
||||
alt+shift+a alt+shift+s alt+shift+d
|
||||
ctrl+alt+a ctrl+alt+s ctrl+alt+d
|
||||
ctrl+alt+shift+a ctrl+alt+shift+s ctrl+alt+shift+d
|
||||
|
||||
numpad0 numpad1 numpad2 numpad3
|
||||
|
||||
multiply add separator subtract decimal divide
|
||||
|
||||
f1 f2 f3
|
||||
|
||||
semicolon equals comma dash period slash backquote openbracket backslash closebracket quote
|
||||
\end
|
||||
|
||||
! Key Codes
|
||||
|
||||
{{$:/key-test/action}}
|
||||
|
||||
! Input Area
|
||||
|
||||
Depending on your OS and browser keyboard settings, some combinations may be "eaten" by the OS, or the browser!
|
||||
|
||||
--> <$keyboard key={{{ [enlist<keys>join[ ]] }}} actions=<<actionKey>> >
|
||||
<$edit-text tiddler=<<key-test>> placeholder="- Click here. Try keys from list below -" tag=input focus />
|
||||
</$keyboard> <--
|
||||
|
||||
!! Keys to be used
|
||||
|
||||
<pre><code><$vars tv-wikilinks="no"><<keys>></$vars></code></pre>
|
||||
|
||||
All possible keys can be found at: [[Keyboard Codes]]
|
||||
|
||||
! Example Code
|
||||
|
||||
<<showCode>>
|
|
@ -0,0 +1,43 @@
|
|||
created: 20210427130002905
|
||||
modified: 20210525130748774
|
||||
tags: KeyboardWidget
|
||||
title: Key Codes (Example)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define key-test() $:/key-test
|
||||
|
||||
\import [[Keyboard Codes (Macros)]]
|
||||
|
||||
\define keys()
|
||||
1 2 3
|
||||
shift+1 shift+2 shift+3
|
||||
a s d
|
||||
f1 f2 f3
|
||||
\end
|
||||
|
||||
! Key Codes
|
||||
|
||||
{{$:/key-test/action}}
|
||||
|
||||
! Input Area
|
||||
|
||||
Depending on your OS and browser keyboard settings, some combinations may be "eaten" by the OS, or the browser
|
||||
|
||||
--> <$keyboard key={{{ [enlist<keys>join[ ]] }}} actions=<<actionKey>> >
|
||||
<$edit-text tiddler=<<key-test>> placeholder="- Click here to try keys -" tag=input />
|
||||
</$keyboard> <--
|
||||
|
||||
|
||||
!! Keys to be tested
|
||||
|
||||
<$list filter="[enlist<keys>]"><kbd><<currentTiddler>></kbd>, </$list>
|
||||
|
||||
-----
|
||||
|
||||
All usable keys can be found at: [[Keyboard Codes]]
|
||||
|
||||
A more advanced example can be found at: [[Key Codes (Example 1)]]
|
||||
|
||||
! Code
|
||||
|
||||
<<showCode>>
|
|
@ -0,0 +1,50 @@
|
|||
created: 20210429084127864
|
||||
modified: 20210525130830934
|
||||
tags:
|
||||
title: Keyboard Codes (Macros)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define key-test-prefix() $:/key-test
|
||||
|
||||
\define codeState() $:/state/code/$(currentTiddler)$
|
||||
|
||||
\define getText()
|
||||
<$vars tv-wikilinks="no">
|
||||
|
||||
* event-key: ''$(event-key)$''
|
||||
* event-code: ''$(event-code)$''
|
||||
* modifier: ''$(modifier)$''
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define pinDetails()
|
||||
<$action-setfield $tiddler=<<codeState>> text="open"/>
|
||||
\end
|
||||
|
||||
\define unpinDetails()
|
||||
<$action-deletetiddler $tiddler=<<codeState>> />
|
||||
\end
|
||||
|
||||
\define toggleDetails(text)
|
||||
<$list filter="[<codeState>!has[title]]" variable="ignore">
|
||||
<$button class="tc-btn-invisible" actions=<<pinDetails>> >$text$ {{$:/core/images/unfold-button}}</$button>
|
||||
</$list>
|
||||
<$list filter="[<codeState>has[title]]" variable="ignore">
|
||||
<$button class="tc-btn-invisible" actions=<<unpinDetails>> >$text$ {{$:/core/images/fold-button}}</$button>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define actionKey()
|
||||
<$action-setfield $tiddler="$:/key-test/action" text=<<getText>> />
|
||||
\end
|
||||
|
||||
\define showCode()
|
||||
|
||||
''<<toggleDetails """Toggle this tiddler code""">>''
|
||||
|
||||
<$list filter="[<codeState>has[title]]" variable=ignore>
|
||||
<pre><code><$view /></code></pre>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
<pre><code><$view /></code></pre>
|
|
@ -0,0 +1,31 @@
|
|||
created: 20210427090945829
|
||||
modified: 20210525103712235
|
||||
tags: KeyboardWidget
|
||||
title: Keyboard Codes
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! All Key Codes known by the KeyboardWidget
|
||||
|
||||
<kbd>cancel</kbd>, <kbd>help</kbd>, <kbd>backspace</kbd>, <kbd>tab</kbd>, <kbd>clear</kbd>, <kbd>return</kbd>, <kbd>enter</kbd>, <kbd>pause</kbd>, <kbd>escape</kbd>, <kbd>space</kbd>,
|
||||
<kbd>page_up</kbd>, <kbd>page_down</kbd>, <kbd>end</kbd>, <kbd>home</kbd>, <kbd>left</kbd>, <kbd>up</kbd>, <kbd>right</kbd>, <kbd>down</kbd>, <kbd>printscreen</kbd>, <kbd>insert</kbd>, <kbd>delete</kbd>
|
||||
|
||||
<kbd>0</kbd>, <kbd>1</kbd>, <kbd>2</kbd>, <kbd>3</kbd>, <kbd>4</kbd>, <kbd>5</kbd>, <kbd>6</kbd>, <kbd>7</kbd>, <kbd>8</kbd>, <kbd>9</kbd>
|
||||
|
||||
<kbd>a</kbd>, <kbd>b</kbd>, <kbd>c</kbd>, <kbd>d</kbd>, <kbd>e</kbd>, <kbd>f</kbd>, <kbd>g</kbd>, <kbd>h</kbd>, <kbd>i</kbd>, <kbd>j</kbd>, <kbd>k</kbd>, <kbd>l</kbd>, <kbd>m</kbd>, <kbd>n</kbd>, <kbd>o</kbd>, <kbd>p</kbd>, <kbd>q</kbd>, <kbd>r</kbd>, <kbd>s</kbd>, <kbd>t</kbd>, <kbd>u</kbd>, <kbd>v</kbd>, <kbd>w</kbd>, <kbd>x</kbd>, <kbd>y</kbd>, <kbd>z</kbd>
|
||||
|
||||
<kbd>numpad0</kbd>, <kbd>numpad1</kbd>, <kbd>numpad2</kbd>, <kbd>numpad3</kbd>, <kbd>numpad4</kbd>, <kbd>numpad5</kbd>, <kbd>numpad6</kbd>, <kbd>numpad7</kbd>, <kbd>numpad8</kbd>, <kbd>numpad9</kbd>
|
||||
|
||||
<kbd>multiply</kbd>, <kbd>add</kbd>, <kbd>separator</kbd>, <kbd>subtract</kbd>, <kbd>decimal</kbd>, <kbd>divide</kbd>
|
||||
|
||||
<kbd>f1</kbd>, <kbd>f2</kbd>, <kbd>f3</kbd>, <kbd>f4</kbd>, <kbd>f5</kbd>, <kbd>f6</kbd>, <kbd>f7</kbd>, <kbd>f8</kbd>, <kbd>f9</kbd>, <kbd>f10</kbd>, <kbd>f11</kbd>, <kbd>f12</kbd><br/>
|
||||
<kbd>f13</kbd>, <kbd>f14</kbd>, <kbd>f15</kbd>, <kbd>f16</kbd>, <kbd>f17</kbd>, <kbd>f18</kbd>, <kbd>f19</kbd>, <kbd>f20</kbd>, <kbd>f21</kbd>, <kbd>f22</kbd>, <kbd>f23</kbd>, <kbd>f24</kbd>
|
||||
|
||||
<kbd>firefoxsemicolon</kbd>, <kbd>firefoxequals</kbd>, <kbd>firefoxminus</kbd>
|
||||
|
||||
<kbd>semicolon</kbd>, <kbd>equals</kbd>, <kbd>comma</kbd>, <kbd>dash</kbd>, <kbd>period</kbd>, <kbd>slash</kbd>, <kbd>backquote</kbd>, <kbd>openbracket</kbd>, <kbd>backslash</kbd>, <kbd>closebracket</kbd>, <kbd>quote</kbd>
|
||||
|
||||
<kbd>shift</kbd>, <kbd>ctrl</kbd>, <kbd>alt</kbd>, <kbd>meta</kbd>
|
||||
|
||||
! Examples
|
||||
|
||||
<<list-links "[tag[KeyboardWidget]prefix[Key Codes (Example]]">>
|
|
@ -1,5 +1,5 @@
|
|||
created: 20201020102735123
|
||||
modified: 20201020104004306
|
||||
modified: 20210524044020645
|
||||
tags: [[Operator Examples]] [[format Operator]]
|
||||
title: format Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
@ -14,3 +14,18 @@ Created date with a format string supplied as operator parameter:
|
|||
|
||||
Modified date shown as a relative date:
|
||||
<<.operator-example 3 "[[HelloThere]get[modified]format:relativedate[]]">>
|
||||
|
||||
A tiddler title with spaces formatted as a title list:
|
||||
<<.operator-example 4 """[[Hello There]format:titlelist[]]""">>
|
||||
|
||||
All tiddler titles tagged with <<tag TableOfContents>> formatted as a title list :
|
||||
<<.operator-example 5 """[tag[TableOfContents]format:titlelist[]]""">>
|
||||
|
||||
<<.tip "To create a string to save a [[title list|Title List]] into a list field, use `format:titlelist[]` with the [[join operator|join Operator]]">>
|
||||
<<.operator-example 6 """[tag[TableOfContents]format:titlelist[]join[ ]]""">>
|
||||
For example, to save titles tagged `TableOfContents` to the titles field of the tiddler [[format titlelist test]]:
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button> test
|
||||
<$action-setfield $tiddler="format titlelist test" titles={{{ [tag[TableOfContents]format:titlelist[]join[ ]] }}}/>
|
||||
</$button>'/>
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
created: 20170907144257037
|
||||
modified: 20201224034837935
|
||||
modified: 20170907144559822
|
||||
title: lookup Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[all[shadows+tiddlers]tag[$:/tags/PageControls]lookup[$:/config/PageControlButtons/Visibility/]]" "Retrieve the visibility status of each page control button">>
|
||||
<<.operator-example 2 "[all[shadows+tiddlers]tag[$:/tags/PageControls]lookup:show[$:/config/PageControlButtons/Visibility/]]" "Retrieve the visibility status of each page control button, this time with a default value">>
|
||||
<<.operator-example 3 "[all[tiddlers]has[plugin-type]removeprefix[$:/plugins/tiddlywiki/]lookup:missing-description:field[$:/plugins/tiddlywiki/],[description]]" "Retrieve the description of all plugin-tiddlers that are in the `$:/plugins/tiddlywiki/` namespace.">>
|
||||
<<.operator-example 4 "OriginalTiddlerPaths +[lookup:missing-index:index[$:/config/],[HelloThere]]" "Lookup the original tiddler path on disk for the [[Hello There]] tiddler.">>
|
||||
<<.operator-example 5 "OriginalTiddlerPaths +[lookup:missing-index:index[$:/config/],[MissingTiddler]]" "Lookup the original tiddler path on disk for the [[MissingTiddler]] tiddler.">>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
caption: format
|
||||
created: 20201020100834443
|
||||
modified: 20201020104004271
|
||||
modified: 20210524090002126
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: input strings formatted according to the specified suffix <<.place B>>
|
||||
op-parameter: optional format string for the formats
|
||||
|
@ -19,5 +19,6 @@ The suffix <<.place B>> is one of the following supported string formats:
|
|||
|!Format |!Description |
|
||||
|^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional operator parameter. (Defaults to "YYYY MM DD 0hh:0mm") |
|
||||
|^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored. |
|
||||
|^`titlelist` |<<.from-version "5.2.0">>The input string wrapped in double square brackets if it contains a space. Appropriate for use in a [[title list|Title List]]. |
|
||||
|
||||
<<.operator-examples "format">>
|
||||
|
|
|
@ -1,40 +1,24 @@
|
|||
caption: lookup
|
||||
created: 20170907103639431
|
||||
modified: 20210116081305739
|
||||
modified: 20170907144703051
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the lookup values corresponding to each lookup tiddler
|
||||
op-parameter: prefix applied to input titles to yield title of lookup tiddler from which value is retrieved. Now accepts 1 or 2 parameters, see below for details
|
||||
op-parameter-name: P, T
|
||||
op-purpose: applies a prefix to each input title to yield the title of a tiddler from which the final value is retrieved. With a single parameter, the default field is "text" and the default index is "0". If a second parameter is provided, that becomes the target field or index.
|
||||
op-suffix: the default value to be used for missing lookups. This operator can now accept a second suffix, see below for details
|
||||
op-suffix-name: D, I
|
||||
op-output: the lookup values corresponding to each input title
|
||||
op-parameter: prefix applied to input titles to yield title of lookup tiddler from which value is retrieved
|
||||
op-parameter-name: P
|
||||
op-purpose: applies a prefix to each input title to yield the title of a tiddler from which the final value is retrieved
|
||||
op-suffix: the default value to be used for missing lookups
|
||||
op-suffix-name: D
|
||||
tags: [[Filter Operators]]
|
||||
title: lookup Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.15">>
|
||||
|
||||
The action of this operator is as follows with 1 parameter:
|
||||
The action of this operator is as follows:
|
||||
|
||||
* Apply the specified prefix to each input tiddler title, yielding a new list of tiddler titles
|
||||
* Transclude the value of the `text` field each of those tiddlers
|
||||
** Substitute the default value for missing or empty values
|
||||
* Return the list of values
|
||||
|
||||
<<.from-version "5.1.24">>
|
||||
|
||||
The action of this operator is as follows with 2 parameters:
|
||||
|
||||
If there are two parameters provided, use the second parameter as the target field or index.
|
||||
|
||||
<<.note """If there is only one parameter given, the filter checks for a second suffix equal to "index". If this suffix is found, the default target index is "0".
|
||||
In all other cases, the default target field is "text".""">>
|
||||
|
||||
Then:
|
||||
|
||||
* Apply the specified prefix to each input tiddler title, yielding a new list of tiddler titles
|
||||
* Transclude the value of the target field or index
|
||||
** Substitute the default value for missing or empty values
|
||||
* Transclude the value of each of those tiddlers
|
||||
** Substitute the default value for missing or empty tiddlers
|
||||
* Return the list of values
|
||||
|
||||
<<.operator-examples "lookup">>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Ładowanie…
Reference in New Issue