mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-28 05:41:26 +00:00
Compare commits
210 Commits
v5.3.2
...
testcase-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
769969f69f | ||
|
|
7ca70c94d4 | ||
|
|
eb4e9d86ac | ||
|
|
f1299120a6 | ||
|
|
0b475628de | ||
|
|
24dceb1bce | ||
|
|
4234aa968e | ||
|
|
5a7f958c64 | ||
|
|
3751a883f5 | ||
|
|
5c34d273bd | ||
|
|
4f19f0a66b | ||
|
|
70f68c7cc2 | ||
|
|
400514f52f | ||
|
|
6b7cf37f36 | ||
|
|
edc6661948 | ||
|
|
8207b80f9f | ||
|
|
53908b792e | ||
|
|
a856d0b322 | ||
|
|
648855e8a5 | ||
|
|
83ebfc67fb | ||
|
|
d5b7bc7d41 | ||
|
|
00ac5503d9 | ||
|
|
43fe5e9523 | ||
|
|
0db4c44939 | ||
|
|
ff03a1bfc4 | ||
|
|
1d89c7925a | ||
|
|
e378c6c4c9 | ||
|
|
e8a3ffdffc | ||
|
|
6b4bd4728a | ||
|
|
08913314c5 | ||
|
|
39d463337b | ||
|
|
d361a1e3cf | ||
|
|
4758b6afb9 | ||
|
|
fa9e643e54 | ||
|
|
1be73ad664 | ||
|
|
57e74a0ad5 | ||
|
|
22ad43954e | ||
|
|
17e939fa2c | ||
|
|
f0d6779dd3 | ||
|
|
64f5dd942c | ||
|
|
9007e0b8c8 | ||
|
|
07a048975d | ||
|
|
b4e0a9b28b | ||
|
|
67845f8ebe | ||
|
|
a081e58273 | ||
|
|
1d48909012 | ||
|
|
d3722a6602 | ||
|
|
5f74f4c2fa | ||
|
|
9167b190d2 | ||
|
|
df8731f760 | ||
|
|
1fb9098c76 | ||
|
|
e9aa3c6c93 | ||
|
|
105e8195d5 | ||
|
|
eeb4e7a7f7 | ||
|
|
7ce85a2ddb | ||
|
|
804f227815 | ||
|
|
9939759690 | ||
|
|
b595651fe1 | ||
|
|
9cd6affcae | ||
|
|
e43cd2d989 | ||
|
|
f1e707bff4 | ||
|
|
2d92a6fd78 | ||
|
|
2e0e541ebf | ||
|
|
b4d7e34a5a | ||
|
|
b6eab1afd6 | ||
|
|
32cbd53423 | ||
|
|
90a6f31db2 | ||
|
|
d37d6595b5 | ||
|
|
e02cafb938 | ||
|
|
801ed0ea11 | ||
|
|
31ec1bdd50 | ||
|
|
62a5fc075b | ||
|
|
0b6db6e860 | ||
|
|
09f04cb5a6 | ||
|
|
511d480a60 | ||
|
|
3342cfc886 | ||
|
|
ec0b264426 | ||
|
|
8f741e8e67 | ||
|
|
32bf9fd7a1 | ||
|
|
3657e59a08 | ||
|
|
21a5841aab | ||
|
|
edfd27fa45 | ||
|
|
0e7d566df7 | ||
|
|
8481b7d137 | ||
|
|
0fbfdce4b6 | ||
|
|
9079186b18 | ||
|
|
e67eaca030 | ||
|
|
1222bed0de | ||
|
|
78a09fcf56 | ||
|
|
0f395ce81d | ||
|
|
b28f420430 | ||
|
|
0b7914785c | ||
|
|
967e2b7fef | ||
|
|
8d36ecd6bc | ||
|
|
c2b436371b | ||
|
|
24e474bd72 | ||
|
|
a75d4ca003 | ||
|
|
0fb10da8b3 | ||
|
|
0202d7b463 | ||
|
|
b22570a91f | ||
|
|
00bd6f8ee8 | ||
|
|
43a2399698 | ||
|
|
35d1609a2b | ||
|
|
a90b1dbb49 | ||
|
|
72c4b92a4c | ||
|
|
bf9eafbad9 | ||
|
|
28791287b2 | ||
|
|
9082f36008 | ||
|
|
e64aa6c8f9 | ||
|
|
6f9cabd352 | ||
|
|
69e828fc30 | ||
|
|
7d25b13970 | ||
|
|
bede60d362 | ||
|
|
f02fafe365 | ||
|
|
4fba206606 | ||
|
|
070327cb57 | ||
|
|
755a09be10 | ||
|
|
9d874befa4 | ||
|
|
f1effdd2cd | ||
|
|
5b2d35e8d1 | ||
|
|
a75fd2a64a | ||
|
|
4ae6f1ffd4 | ||
|
|
ace6dbc514 | ||
|
|
4cca77b72d | ||
|
|
3543fe53ff | ||
|
|
70178dce78 | ||
|
|
9e6e50eccf | ||
|
|
898cac7f71 | ||
|
|
32de6eca22 | ||
|
|
09e6117fe2 | ||
|
|
984863065e | ||
|
|
c947ba4310 | ||
|
|
b33cfeab06 | ||
|
|
540b3ff81e | ||
|
|
c9675092ed | ||
|
|
d29df793a4 | ||
|
|
e57123936f | ||
|
|
6d721c728f | ||
|
|
ae9250622f | ||
|
|
4dd9db3b46 | ||
|
|
36fc8170a4 | ||
|
|
96e11fa8b0 | ||
|
|
6236e7777c | ||
|
|
af02349e47 | ||
|
|
a21e7b2aac | ||
|
|
a09106f33b | ||
|
|
699d8b9416 | ||
|
|
53ccc29209 | ||
|
|
a3521eb67d | ||
|
|
d4f6befb9b | ||
|
|
a49436160d | ||
|
|
aaad420c3f | ||
|
|
70f0a52842 | ||
|
|
abab9164c5 | ||
|
|
0cf80e824f | ||
|
|
b0bb911103 | ||
|
|
111f71bcf5 | ||
|
|
2b1efac6ee | ||
|
|
bc3132ab2c | ||
|
|
94e0f05af5 | ||
|
|
eaa21589e6 | ||
|
|
207720cb30 | ||
|
|
9bf3c0602d | ||
|
|
a9f9ffd409 | ||
|
|
c3de9df84f | ||
|
|
2099e687cc | ||
|
|
575d80dfe9 | ||
|
|
bc3d64f4b8 | ||
|
|
aa4aeb187c | ||
|
|
fb85e91f82 | ||
|
|
100eaeff30 | ||
|
|
518c5d3ef6 | ||
|
|
38187d26f4 | ||
|
|
8ac4a448ef | ||
|
|
83dfec471d | ||
|
|
1015a1605d | ||
|
|
f08d3d6030 | ||
|
|
232afb4249 | ||
|
|
22f7af05de | ||
|
|
17665233a2 | ||
|
|
a8f477a3ab | ||
|
|
9d10e2b3a7 | ||
|
|
907aed3eab | ||
|
|
83220be7d9 | ||
|
|
a3cba681e0 | ||
|
|
4f01a53917 | ||
|
|
5cb31b7adb | ||
|
|
6a9dc9dcd5 | ||
|
|
46a22ef585 | ||
|
|
3d712127ad | ||
|
|
a3e5ace458 | ||
|
|
6fa81feeba | ||
|
|
95e270a8a6 | ||
|
|
e2d4388c48 | ||
|
|
f68fa89a29 | ||
|
|
d2d00ffa4d | ||
|
|
c6a72875ba | ||
|
|
aaf7dc355d | ||
|
|
e131dd3761 | ||
|
|
f697f008b1 | ||
|
|
cdfa4b6082 | ||
|
|
8051a3dea2 | ||
|
|
267521ad1b | ||
|
|
44010812bd | ||
|
|
2c07310cd3 | ||
|
|
a32d5143ae | ||
|
|
5eae32d762 | ||
|
|
81f1994bbf | ||
|
|
86507baa60 | ||
|
|
497c56d3fa |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ node_modules/
|
|||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
$__StoryList.tid
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# Default to the current version number for building the plugin library
|
# Default to the current version number for building the plugin library
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||||
TW5_BUILD_VERSION=v5.3.2
|
TW5_BUILD_VERSION=v5.3.3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
@@ -156,6 +156,28 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
--build index favicon static \
|
--build index favicon static \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
|
# /tour.html tour edition
|
||||||
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
|
./editions/tour \
|
||||||
|
--verbose \
|
||||||
|
--output $TW5_BUILD_OUTPUT \
|
||||||
|
--rendertiddler $:/core/save/all tour.html text/plain \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
|
# /dev/index.html Developer docs
|
||||||
|
# /dev/favicon.ico Favicon for dev site
|
||||||
|
# /dev/static.html Static rendering of default tiddlers
|
||||||
|
# /dev/alltiddlers.html Static rendering of all tiddlers
|
||||||
|
# /dev/static/* Static single tiddlers
|
||||||
|
# /dev/static/static.css Static stylesheet
|
||||||
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
|
./editions/dev \
|
||||||
|
--verbose \
|
||||||
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
|
--output $TW5_BUILD_OUTPUT/dev \
|
||||||
|
--build index favicon static \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
# /share.html Custom edition for sharing via the URL
|
# /share.html Custom edition for sharing via the URL
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/share \
|
./editions/share \
|
||||||
|
|||||||
40
boot/boot.js
40
boot/boot.js
@@ -177,6 +177,7 @@ document: defaults to current document
|
|||||||
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
|
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
|
||||||
*/
|
*/
|
||||||
$tw.utils.domMaker = function(tag,options) {
|
$tw.utils.domMaker = function(tag,options) {
|
||||||
|
var options = options || {};
|
||||||
var doc = options.document || document;
|
var doc = options.document || document;
|
||||||
var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag);
|
var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag);
|
||||||
if(options["class"]) {
|
if(options["class"]) {
|
||||||
@@ -218,9 +219,34 @@ $tw.utils.error = function(err) {
|
|||||||
heading = dm("h1",{text: errHeading}),
|
heading = dm("h1",{text: errHeading}),
|
||||||
prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}),
|
prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}),
|
||||||
message = dm("div",{text: err, "class":"tc-error-message"}),
|
message = dm("div",{text: err, "class":"tc-error-message"}),
|
||||||
button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
|
closeButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
|
||||||
form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"});
|
downloadButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "download tiddlers" : $tw.language.getString("Buttons/EmergencyDownload/Caption") )})], "class": "tc-error-prompt"}),
|
||||||
|
form = dm("form",{children: [heading,prompt,downloadButton,message,closeButton], "class": "tc-error-form"});
|
||||||
document.body.insertBefore(form,document.body.firstChild);
|
document.body.insertBefore(form,document.body.firstChild);
|
||||||
|
downloadButton.addEventListener("click",function(event) {
|
||||||
|
if($tw && $tw.wiki) {
|
||||||
|
var tiddlers = [];
|
||||||
|
$tw.wiki.each(function(tiddler,title) {
|
||||||
|
tiddlers.push(tiddler.fields);
|
||||||
|
});
|
||||||
|
var link = dm("a"),
|
||||||
|
text = JSON.stringify(tiddlers);
|
||||||
|
if(Blob !== undefined) {
|
||||||
|
var blob = new Blob([text], {type: "text/html"});
|
||||||
|
link.setAttribute("href", URL.createObjectURL(blob));
|
||||||
|
} else {
|
||||||
|
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
|
||||||
|
}
|
||||||
|
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
} else {
|
||||||
|
alert("Emergency tiddler download is not available");
|
||||||
|
}
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
},true);
|
||||||
form.addEventListener("submit",function(event) {
|
form.addEventListener("submit",function(event) {
|
||||||
document.body.removeChild(form);
|
document.body.removeChild(form);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -786,6 +812,7 @@ $tw.utils.Crypto = function() {
|
|||||||
}
|
}
|
||||||
return outputText;
|
return outputText;
|
||||||
};
|
};
|
||||||
|
$tw.sjcl = sjcl;
|
||||||
this.setPassword = function(newPassword) {
|
this.setPassword = function(newPassword) {
|
||||||
currentPassword = newPassword;
|
currentPassword = newPassword;
|
||||||
this.updateCryptoStateTiddler();
|
this.updateCryptoStateTiddler();
|
||||||
@@ -1967,10 +1994,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
|||||||
var value = tiddler[name];
|
var value = tiddler[name];
|
||||||
switch(fieldInfo.source) {
|
switch(fieldInfo.source) {
|
||||||
case "subdirectories":
|
case "subdirectories":
|
||||||
value = path.relative(rootPath, filename).split('/').slice(0, -1);
|
value = path.relative(rootPath, filename).split(path.sep).slice(0, -1);
|
||||||
break;
|
break;
|
||||||
case "filepath":
|
case "filepath":
|
||||||
value = path.relative(rootPath, filename);
|
value = path.relative(rootPath, filename).split(path.sep).join('/');
|
||||||
break;
|
break;
|
||||||
case "filename":
|
case "filename":
|
||||||
value = path.basename(filename);
|
value = path.basename(filename);
|
||||||
@@ -2438,6 +2465,7 @@ $tw.boot.initStartup = function(options) {
|
|||||||
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
|
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
|
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
|
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
|
||||||
|
$tw.utils.registerFileType("application/wasm","base64",".wasm");
|
||||||
$tw.utils.registerFileType("application/font-woff","base64",".woff");
|
$tw.utils.registerFileType("application/font-woff","base64",".woff");
|
||||||
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
|
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
|
||||||
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
|
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
|
||||||
@@ -2452,8 +2480,12 @@ $tw.boot.initStartup = function(options) {
|
|||||||
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
|
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
|
||||||
$tw.utils.registerFileType("application/enex+xml","utf8",".enex");
|
$tw.utils.registerFileType("application/enex+xml","utf8",".enex");
|
||||||
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx");
|
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx");
|
||||||
|
$tw.utils.registerFileType("application/msword","base64",".doc");
|
||||||
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx");
|
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx");
|
||||||
|
$tw.utils.registerFileType("application/excel","base64",".xls");
|
||||||
|
$tw.utils.registerFileType("application/vnd.ms-excel","base64",".xls");
|
||||||
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx");
|
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx");
|
||||||
|
$tw.utils.registerFileType("application/mspowerpoint","base64",".ppt");
|
||||||
$tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"});
|
$tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"});
|
||||||
$tw.utils.registerFileType("application/x-bibtex","utf8",".bib");
|
$tw.utils.registerFileType("application/x-bibtex","utf8",".bib");
|
||||||
$tw.utils.registerFileType("application/epub+zip","base64",".epub");
|
$tw.utils.registerFileType("application/epub+zip","base64",".epub");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ type: text/plain
|
|||||||
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
||||||
|
|
||||||
Copyright (c) 2004-2007, Jeremy Ruston
|
Copyright (c) 2004-2007, Jeremy Ruston
|
||||||
Copyright (c) 2007-2023, UnaMesa Association
|
Copyright (c) 2007-2024, UnaMesa Association
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
7
core/images/default-layout.tid
Normal file
7
core/images/default-layout.tid
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
title: $:/core/images/default-layout
|
||||||
|
tags: $:/tags/Image
|
||||||
|
|
||||||
|
\parameters (size:"22pt")
|
||||||
|
<svg width=<<size>> height=<<size>> class="tc-image-default-layout tc-image-button" viewBox="0 0 128 128">
|
||||||
|
<path d="M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z"/>
|
||||||
|
</svg>
|
||||||
@@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: clear password
|
|||||||
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
|
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
|
||||||
Encryption/SetPassword/Caption: set password
|
Encryption/SetPassword/Caption: set password
|
||||||
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
|
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
|
||||||
|
EmergencyDownload/Caption: download tiddlers as json
|
||||||
ExportPage/Caption: export all
|
ExportPage/Caption: export all
|
||||||
ExportPage/Hint: Export all tiddlers
|
ExportPage/Hint: Export all tiddlers
|
||||||
ExportTiddler/Caption: export tiddler
|
ExportTiddler/Caption: export tiddler
|
||||||
|
|||||||
@@ -206,6 +206,12 @@ Stylesheets/Caption: Stylesheets
|
|||||||
Stylesheets/Expand/Caption: Expand All
|
Stylesheets/Expand/Caption: Expand All
|
||||||
Stylesheets/Hint: This is the rendered CSS of the current stylesheet tiddlers tagged with <<tag "$:/tags/Stylesheet">>
|
Stylesheets/Hint: This is the rendered CSS of the current stylesheet tiddlers tagged with <<tag "$:/tags/Stylesheet">>
|
||||||
Stylesheets/Restore/Caption: Restore
|
Stylesheets/Restore/Caption: Restore
|
||||||
|
TestCases/Caption: Test Cases
|
||||||
|
TestCases/Hint: Test cases are self contained examples for testing and learning
|
||||||
|
TestCases/All/Caption: All Test Cases
|
||||||
|
TestCases/All/Hint: All Test Cases
|
||||||
|
TestCases/Failed/Caption: Failed Test Cases
|
||||||
|
TestCases/Failed/Hint: Only Failed Test Cases
|
||||||
Theme/Caption: Theme
|
Theme/Caption: Theme
|
||||||
Theme/Prompt: Current theme:
|
Theme/Prompt: Current theme:
|
||||||
TiddlerFields/Caption: Tiddler Fields
|
TiddlerFields/Caption: Tiddler Fields
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`.
|
|||||||
filteroperator: Individual filter operator methods.
|
filteroperator: Individual filter operator methods.
|
||||||
global: Global data to be inserted into `$tw`.
|
global: Global data to be inserted into `$tw`.
|
||||||
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
|
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
|
||||||
isfilteroperator: Operands for the ''is'' filter operator.
|
isfilteroperator: Parameters for the ''is'' filter operator.
|
||||||
library: Generic module type for general purpose JavaScript modules.
|
library: Generic module type for general purpose JavaScript modules.
|
||||||
macro: JavaScript macro definitions.
|
macro: JavaScript macro definitions.
|
||||||
parser: Parsers for different content types.
|
parser: Parsers for different content types.
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
|
|||||||
sidebar-tab-foreground: Sidebar tab foreground
|
sidebar-tab-foreground: Sidebar tab foreground
|
||||||
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
||||||
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
|
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
|
||||||
|
testcase-accent-level-1: Test case accent colour with no nesting
|
||||||
|
testcase-accent-level-2: Test case accent colour with 2nd level nesting
|
||||||
|
testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher
|
||||||
site-title-foreground: Site title foreground
|
site-title-foreground: Site title foreground
|
||||||
static-alert-foreground: Static alert foreground
|
static-alert-foreground: Static alert foreground
|
||||||
tab-background-selected: Tab background for selected tabs
|
tab-background-selected: Tab background for selected tabs
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ _canonical_uri: The full URI of an external image tiddler
|
|||||||
author: Name of the author of a plugin
|
author: Name of the author of a plugin
|
||||||
bag: The name of the bag from which a tiddler came
|
bag: The name of the bag from which a tiddler came
|
||||||
caption: The text to be displayed on a tab or button
|
caption: The text to be displayed on a tab or button
|
||||||
|
class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]]
|
||||||
code-body: The view template will display the tiddler as code if set to ''yes''
|
code-body: The view template will display the tiddler as code if set to ''yes''
|
||||||
color: The CSS color value associated with a tiddler
|
color: The CSS color value associated with a tiddler
|
||||||
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
|
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize
|
|||||||
Error/Filter: Filter error
|
Error/Filter: Filter error
|
||||||
Error/FilterSyntax: Syntax error in filter expression
|
Error/FilterSyntax: Syntax error in filter expression
|
||||||
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
|
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
|
||||||
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator
|
Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator
|
||||||
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
|
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
|
||||||
Error/LoadingPluginLibrary: Error loading plugin library
|
Error/LoadingPluginLibrary: Error loading plugin library
|
||||||
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`
|
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ exports.info = {
|
|||||||
name: "listen",
|
name: "listen",
|
||||||
synchronous: true,
|
synchronous: true,
|
||||||
namedParameterMode: true,
|
namedParameterMode: true,
|
||||||
mandatoryParameters: [],
|
mandatoryParameters: []
|
||||||
};
|
};
|
||||||
|
|
||||||
var Command = function(params,commander,callback) {
|
var Command = function(params,commander,callback) {
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ Saves individual tiddlers in their raw text or binary format to the specified fi
|
|||||||
directory: path.resolve(self.commander.outputPath),
|
directory: path.resolve(self.commander.outputPath),
|
||||||
pathFilters: [filenameFilter],
|
pathFilters: [filenameFilter],
|
||||||
wiki: wiki,
|
wiki: wiki,
|
||||||
fileInfo: {}
|
fileInfo: {
|
||||||
|
overwrite: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if(self.commander.verbose) {
|
if(self.commander.verbose) {
|
||||||
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");
|
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");
|
||||||
|
|||||||
@@ -176,7 +176,10 @@ WikiFolderMaker.prototype.saveCustomPlugin = function(pluginTiddler) {
|
|||||||
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
|
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
|
||||||
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
|
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
|
||||||
var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
|
var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
|
||||||
$tw.utils.each(pluginTiddlers,function(tiddler) {
|
$tw.utils.each(pluginTiddlers,function(tiddler,title) {
|
||||||
|
if(!tiddler.title) {
|
||||||
|
tiddler.title = title;
|
||||||
|
}
|
||||||
self.saveTiddler(directory,new $tw.Tiddler(tiddler));
|
self.saveTiddler(directory,new $tw.Tiddler(tiddler));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
26
core/modules/filters/backtranscludes.js
Normal file
26
core/modules/filters/backtranscludes.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/filters/backtranscludes.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: filteroperator
|
||||||
|
|
||||||
|
Filter operator for returning all the backtranscludes from a tiddler
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Export our filter function
|
||||||
|
*/
|
||||||
|
exports.backtranscludes = function(source,operator,options) {
|
||||||
|
var results = [];
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -14,12 +14,9 @@ Filter operators for cryptography, using the Stanford JavaScript library
|
|||||||
|
|
||||||
exports.sha256 = function(source,operator,options) {
|
exports.sha256 = function(source,operator,options) {
|
||||||
var results = [],
|
var results = [],
|
||||||
length = parseInt(operator.operand,10) || 20,
|
length = parseInt(operator.operand,10) || 20;
|
||||||
sha256 = function(text) {
|
|
||||||
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
|
|
||||||
};
|
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.push(sha256(title));
|
results.push($tw.utils.sha256(title,{length: length}));
|
||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|||||||
26
core/modules/filters/transcludes.js
Normal file
26
core/modules/filters/transcludes.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/filters/transcludes.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: filteroperator
|
||||||
|
|
||||||
|
Filter operator for returning all the transcludes from a tiddler
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Export our filter function
|
||||||
|
*/
|
||||||
|
exports.transcludes = function(source,operator,options) {
|
||||||
|
var results = new $tw.utils.LinkedList();
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
results.pushTop(options.wiki.getTiddlerTranscludes(title));
|
||||||
|
});
|
||||||
|
return results.toArray();
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list.
|
|||||||
}
|
}
|
||||||
if(resultsIndex !== -1) {
|
if(resultsIndex !== -1) {
|
||||||
i = i + step;
|
i = i + step;
|
||||||
nextOperandIndex = (i < opLength ? i : i - opLength);
|
nextOperandIndex = (i < opLength ? i : i % opLength);
|
||||||
if(operands.length > 1) {
|
if(operands.length > 1) {
|
||||||
results.splice(resultsIndex,1,operands[nextOperandIndex]);
|
results.splice(resultsIndex,1,operands[nextOperandIndex]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
119
core/modules/indexers/back-indexer.js
Normal file
119
core/modules/indexers/back-indexer.js
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/indexers/back-indexer.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: indexer
|
||||||
|
|
||||||
|
By parsing the tiddler text, indexes the tiddlers' back links, back transclusions, block level back links.
|
||||||
|
|
||||||
|
\*/
|
||||||
|
function BackIndexer(wiki) {
|
||||||
|
this.wiki = wiki;
|
||||||
|
}
|
||||||
|
|
||||||
|
BackIndexer.prototype.init = function() {
|
||||||
|
this.subIndexers = {
|
||||||
|
link: new BackSubIndexer(this,"extractLinks"),
|
||||||
|
transclude: new BackSubIndexer(this,"extractTranscludes"),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BackIndexer.prototype.rebuild = function() {
|
||||||
|
$tw.utils.each(this.subIndexers,function(subIndexer) {
|
||||||
|
subIndexer.rebuild();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
BackIndexer.prototype.update = function(updateDescriptor) {
|
||||||
|
$tw.utils.each(this.subIndexers,function(subIndexer) {
|
||||||
|
subIndexer.update(updateDescriptor);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
function BackSubIndexer(indexer,extractor) {
|
||||||
|
this.wiki = indexer.wiki;
|
||||||
|
this.indexer = indexer;
|
||||||
|
this.extractor = extractor;
|
||||||
|
/**
|
||||||
|
* {
|
||||||
|
* [target title, e.g. tiddler title being linked to]:
|
||||||
|
* {
|
||||||
|
* [source title, e.g. tiddler title that has link syntax in its text]: true
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
this.index = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
BackSubIndexer.prototype.init = function() {
|
||||||
|
// lazy init until first lookup
|
||||||
|
this.index = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
BackSubIndexer.prototype._init = function() {
|
||||||
|
this.index = Object.create(null);
|
||||||
|
var self = this;
|
||||||
|
this.wiki.forEachTiddler(function(sourceTitle,tiddler) {
|
||||||
|
var newTargets = self._getTarget(tiddler);
|
||||||
|
$tw.utils.each(newTargets, function(target) {
|
||||||
|
if(!self.index[target]) {
|
||||||
|
self.index[target] = Object.create(null);
|
||||||
|
}
|
||||||
|
self.index[target][sourceTitle] = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
BackSubIndexer.prototype.rebuild = function() {
|
||||||
|
this.index = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get things that is being referenced in the text, e.g. tiddler names in the link syntax.
|
||||||
|
*/
|
||||||
|
BackSubIndexer.prototype._getTarget = function(tiddler) {
|
||||||
|
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
|
||||||
|
if(parser) {
|
||||||
|
return this.wiki[this.extractor](parser.tree);
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
BackSubIndexer.prototype.update = function(updateDescriptor) {
|
||||||
|
// lazy init/update until first lookup
|
||||||
|
if(!this.index) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var newTargets = [],
|
||||||
|
oldTargets = [],
|
||||||
|
self = this;
|
||||||
|
if(updateDescriptor.old.exists) {
|
||||||
|
oldTargets = this._getTarget(updateDescriptor.old.tiddler);
|
||||||
|
}
|
||||||
|
if(updateDescriptor.new.exists) {
|
||||||
|
newTargets = this._getTarget(updateDescriptor.new.tiddler);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tw.utils.each(oldTargets,function(target) {
|
||||||
|
if(self.index[target]) {
|
||||||
|
delete self.index[target][updateDescriptor.old.tiddler.fields.title];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$tw.utils.each(newTargets,function(target) {
|
||||||
|
if(!self.index[target]) {
|
||||||
|
self.index[target] = Object.create(null);
|
||||||
|
}
|
||||||
|
self.index[target][updateDescriptor.new.tiddler.fields.title] = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
BackSubIndexer.prototype.lookup = function(title) {
|
||||||
|
if(!this.index) {
|
||||||
|
this._init();
|
||||||
|
}
|
||||||
|
if(this.index[title]) {
|
||||||
|
return Object.keys(this.index[title]);
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.BackIndexer = BackIndexer;
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
/*\
|
|
||||||
title: $:/core/modules/indexers/backlinks-indexer.js
|
|
||||||
type: application/javascript
|
|
||||||
module-type: indexer
|
|
||||||
|
|
||||||
Indexes the tiddlers' backlinks
|
|
||||||
|
|
||||||
\*/
|
|
||||||
(function(){
|
|
||||||
|
|
||||||
/*jslint node: true, browser: true */
|
|
||||||
/*global modules: false */
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
function BacklinksIndexer(wiki) {
|
|
||||||
this.wiki = wiki;
|
|
||||||
}
|
|
||||||
|
|
||||||
BacklinksIndexer.prototype.init = function() {
|
|
||||||
this.index = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
BacklinksIndexer.prototype.rebuild = function() {
|
|
||||||
this.index = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
BacklinksIndexer.prototype._getLinks = function(tiddler) {
|
|
||||||
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
|
|
||||||
if(parser) {
|
|
||||||
return this.wiki.extractLinks(parser.tree);
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
BacklinksIndexer.prototype.update = function(updateDescriptor) {
|
|
||||||
if(!this.index) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var newLinks = [],
|
|
||||||
oldLinks = [],
|
|
||||||
self = this;
|
|
||||||
if(updateDescriptor.old.exists) {
|
|
||||||
oldLinks = this._getLinks(updateDescriptor.old.tiddler);
|
|
||||||
}
|
|
||||||
if(updateDescriptor.new.exists) {
|
|
||||||
newLinks = this._getLinks(updateDescriptor.new.tiddler);
|
|
||||||
}
|
|
||||||
|
|
||||||
$tw.utils.each(oldLinks,function(link) {
|
|
||||||
if(self.index[link]) {
|
|
||||||
delete self.index[link][updateDescriptor.old.tiddler.fields.title];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$tw.utils.each(newLinks,function(link) {
|
|
||||||
if(!self.index[link]) {
|
|
||||||
self.index[link] = Object.create(null);
|
|
||||||
}
|
|
||||||
self.index[link][updateDescriptor.new.tiddler.fields.title] = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
BacklinksIndexer.prototype.lookup = function(title) {
|
|
||||||
if(!this.index) {
|
|
||||||
this.index = Object.create(null);
|
|
||||||
var self = this;
|
|
||||||
this.wiki.forEachTiddler(function(title,tiddler) {
|
|
||||||
var links = self._getLinks(tiddler);
|
|
||||||
$tw.utils.each(links, function(link) {
|
|
||||||
if(!self.index[link]) {
|
|
||||||
self.index[link] = Object.create(null);
|
|
||||||
}
|
|
||||||
self.index[link][title] = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if(this.index[title]) {
|
|
||||||
return Object.keys(this.index[title]);
|
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.BacklinksIndexer = BacklinksIndexer;
|
|
||||||
|
|
||||||
})();
|
|
||||||
@@ -35,9 +35,11 @@ exports.run = function(filter,format) {
|
|||||||
// Collect all the fields
|
// Collect all the fields
|
||||||
for(t=0;t<tiddlers.length; t++) {
|
for(t=0;t<tiddlers.length; t++) {
|
||||||
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
||||||
for(f in tiddler.fields) {
|
if(tiddler) {
|
||||||
if(fields.indexOf(f) === -1) {
|
for(f in tiddler.fields) {
|
||||||
fields.push(f);
|
if(fields.indexOf(f) === -1) {
|
||||||
|
fields.push(f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,8 +62,10 @@ exports.run = function(filter,format) {
|
|||||||
for(var t=0;t<tiddlers.length; t++) {
|
for(var t=0;t<tiddlers.length; t++) {
|
||||||
row = [];
|
row = [];
|
||||||
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
||||||
for(f=0; f<fields.length; f++) {
|
if(tiddler) {
|
||||||
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
|
for(f=0; f<fields.length; f++) {
|
||||||
|
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
output.push(row.join(","));
|
output.push(row.join(","));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ exports.parse = function() {
|
|||||||
if(this.match[3]) {
|
if(this.match[3]) {
|
||||||
params = $tw.utils.parseParameterDefinition(this.match[4]);
|
params = $tw.utils.parseParameterDefinition(this.match[4]);
|
||||||
}
|
}
|
||||||
// Is this a multiline definition?
|
// Is the remainder of the line blank after the parameter close paren?
|
||||||
var reEnd;
|
var reEnd;
|
||||||
if(this.match[5]) {
|
if(this.match[5]) {
|
||||||
// If so, the end of the body is marked with \end
|
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
reEnd = new RegExp("((:?^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, the end of the definition is marked by the end of the line
|
// Otherwise, the end of the definition is marked by the end of the line
|
||||||
reEnd = /($|\r?\n)/mg;
|
reEnd = /($|\r?\n)/mg;
|
||||||
|
|||||||
@@ -54,11 +54,11 @@ exports.parse = function() {
|
|||||||
paramMatch = reParam.exec(paramString);
|
paramMatch = reParam.exec(paramString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Is this a multiline definition?
|
// Is the remainder of the \define line blank after the parameter close paren?
|
||||||
var reEnd;
|
var reEnd;
|
||||||
if(this.match[3]) {
|
if(this.match[3]) {
|
||||||
// If so, the end of the body is marked with \end
|
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
reEnd = new RegExp("((?:^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, the end of the definition is marked by the end of the line
|
// Otherwise, the end of the definition is marked by the end of the line
|
||||||
reEnd = /($|\r?\n)/mg;
|
reEnd = /($|\r?\n)/mg;
|
||||||
|
|||||||
@@ -3,30 +3,7 @@ title: $:/core/modules/parsers/wikiparser/rules/quoteblock.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: wikirule
|
module-type: wikirule
|
||||||
|
|
||||||
Wiki text rule for quote blocks. For example:
|
Wiki text rule for quote blocks.
|
||||||
|
|
||||||
```
|
|
||||||
<<<.optionalClass(es) optional cited from
|
|
||||||
a quote
|
|
||||||
<<<
|
|
||||||
|
|
||||||
<<<.optionalClass(es)
|
|
||||||
a quote
|
|
||||||
<<< optional cited from
|
|
||||||
```
|
|
||||||
|
|
||||||
Quotes can be quoted by putting more <s
|
|
||||||
|
|
||||||
```
|
|
||||||
<<<
|
|
||||||
Quote Level 1
|
|
||||||
|
|
||||||
<<<<
|
|
||||||
QuoteLevel 2
|
|
||||||
<<<<
|
|
||||||
|
|
||||||
<<<
|
|
||||||
```
|
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
@@ -47,16 +24,15 @@ exports.init = function(parser) {
|
|||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
var classes = ["tc-quote"];
|
var classes = ["tc-quote"];
|
||||||
// Get all the details of the match
|
// Get all the details of the match
|
||||||
var reEndString = "^" + this.match[1] + "(?!<)";
|
var reEndString = "^\\s*" + this.match[1] + "(?!<)";
|
||||||
// Move past the <s
|
// Move past the <s
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
|
|
||||||
// Parse any classes, whitespace and then the optional cite itself
|
// Parse any classes, whitespace and then the optional cite itself
|
||||||
classes.push.apply(classes, this.parser.parseClasses());
|
classes.push.apply(classes, this.parser.parseClasses());
|
||||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||||
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||||
// before handling the cite, parse the body of the quote
|
// before handling the cite, parse the body of the quote
|
||||||
var tree= this.parser.parseBlocks(reEndString);
|
var tree = this.parser.parseBlocks(reEndString);
|
||||||
// If we got a cite, put it before the text
|
// If we got a cite, put it before the text
|
||||||
if(cite.length > 0) {
|
if(cite.length > 0) {
|
||||||
tree.unshift({
|
tree.unshift({
|
||||||
|
|||||||
@@ -216,6 +216,8 @@ WikiParser.prototype.parsePragmas = function() {
|
|||||||
subTree[0].children = [];
|
subTree[0].children = [];
|
||||||
currentTreeBranch = subTree[0].children;
|
currentTreeBranch = subTree[0].children;
|
||||||
}
|
}
|
||||||
|
// Skip whitespace after the pragma
|
||||||
|
this.skipWhitespace();
|
||||||
}
|
}
|
||||||
return currentTreeBranch;
|
return currentTreeBranch;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ function sendResponse(request,response,statusCode,headers,data,encoding) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// RFC 7231, 6.1. Overview of Status Codes:
|
||||||
|
// Browser clients may cache 200, 203, 204, 206, 300, 301,
|
||||||
|
// 404, 405, 410, 414, and 501 unless given explicit cache controls
|
||||||
|
headers["Cache-Control"] = headers["Cache-Control"] || "no-store";
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
If the gzip=yes is set, check if the user agent permits compression. If so,
|
If the gzip=yes is set, check if the user agent permits compression. If so,
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ exports.startup = function() {
|
|||||||
deferredChanges = Object.create(null);
|
deferredChanges = Object.create(null);
|
||||||
$tw.hooks.invokeHook("th-page-refreshed");
|
$tw.hooks.invokeHook("th-page-refreshed");
|
||||||
}
|
}
|
||||||
|
var throttledRefresh = $tw.perf.report("throttledRefresh",refresh);
|
||||||
|
|
||||||
// Add the change event handler
|
// Add the change event handler
|
||||||
$tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) {
|
$tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) {
|
||||||
// Check if only tiddlers that are throttled have changed
|
// Check if only tiddlers that are throttled have changed
|
||||||
@@ -101,7 +103,7 @@ exports.startup = function() {
|
|||||||
if(isNaN(timeout)) {
|
if(isNaN(timeout)) {
|
||||||
timeout = THROTTLE_REFRESH_TIMEOUT;
|
timeout = THROTTLE_REFRESH_TIMEOUT;
|
||||||
}
|
}
|
||||||
timerId = setTimeout(refresh,timeout);
|
timerId = setTimeout(throttledRefresh,timeout);
|
||||||
$tw.utils.extend(deferredChanges,changes);
|
$tw.utils.extend(deferredChanges,changes);
|
||||||
} else {
|
} else {
|
||||||
$tw.utils.extend(deferredChanges,changes);
|
$tw.utils.extend(deferredChanges,changes);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ exports.startup = function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Initialise the document
|
// Initialise the document
|
||||||
srcDocument.write("<html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>");
|
srcDocument.write("<!DOCTYPE html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>");
|
||||||
srcDocument.close();
|
srcDocument.close();
|
||||||
srcDocument.title = windowTitle;
|
srcDocument.title = windowTitle;
|
||||||
srcWindow.addEventListener("beforeunload",function(event) {
|
srcWindow.addEventListener("beforeunload",function(event) {
|
||||||
|
|||||||
@@ -283,13 +283,13 @@ exports.httpRequest = function(options) {
|
|||||||
// Set up the state change handler
|
// Set up the state change handler
|
||||||
request.onreadystatechange = function() {
|
request.onreadystatechange = function() {
|
||||||
if(this.readyState === 4) {
|
if(this.readyState === 4) {
|
||||||
if(this.status === 200 || this.status === 201 || this.status === 204) {
|
if(this.status >= 200 && this.status < 300) {
|
||||||
// Success!
|
// Success!
|
||||||
options.callback(null,this[returnProp],this);
|
options.callback(null,this[returnProp],this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Something went wrong
|
// Something went wrong
|
||||||
options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,null,this);
|
options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,this[returnProp],this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Handle progress
|
// Handle progress
|
||||||
|
|||||||
@@ -316,11 +316,13 @@ Options include:
|
|||||||
pathFilters: optional array of filters to be used to generate the base path
|
pathFilters: optional array of filters to be used to generate the base path
|
||||||
wiki: optional wiki for evaluating the pathFilters
|
wiki: optional wiki for evaluating the pathFilters
|
||||||
fileInfo: an existing fileInfo object to check against
|
fileInfo: an existing fileInfo object to check against
|
||||||
|
fileInfo.overwrite: if true, turns off filename clash numbers (defaults to false)
|
||||||
*/
|
*/
|
||||||
exports.generateTiddlerFilepath = function(title,options) {
|
exports.generateTiddlerFilepath = function(title,options) {
|
||||||
var directory = options.directory || "",
|
var directory = options.directory || "",
|
||||||
extension = options.extension || "",
|
extension = options.extension || "",
|
||||||
originalpath = (options.fileInfo && options.fileInfo.originalpath) ? options.fileInfo.originalpath : "",
|
originalpath = (options.fileInfo && options.fileInfo.originalpath) ? options.fileInfo.originalpath : "",
|
||||||
|
overwrite = options.fileInfo && options.fileInfo.overwrite || false,
|
||||||
filepath;
|
filepath;
|
||||||
// Check if any of the pathFilters applies
|
// Check if any of the pathFilters applies
|
||||||
if(options.pathFilters && options.wiki) {
|
if(options.pathFilters && options.wiki) {
|
||||||
@@ -381,19 +383,20 @@ exports.generateTiddlerFilepath = function(title,options) {
|
|||||||
filepath += char.charCodeAt(0).toString();
|
filepath += char.charCodeAt(0).toString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Add a uniquifier if the file already exists
|
// Add a uniquifier if the file already exists (default)
|
||||||
var fullPath, oldPath = (options.fileInfo) ? options.fileInfo.filepath : undefined,
|
var fullPath = path.resolve(directory, filepath + extension);
|
||||||
|
if (!overwrite) {
|
||||||
|
var oldPath = (options.fileInfo) ? options.fileInfo.filepath : undefined,
|
||||||
count = 0;
|
count = 0;
|
||||||
do {
|
do {
|
||||||
fullPath = path.resolve(directory,filepath + (count ? "_" + count : "") + extension);
|
fullPath = path.resolve(directory,filepath + (count ? "_" + count : "") + extension);
|
||||||
if(oldPath && oldPath == fullPath) {
|
if(oldPath && oldPath == fullPath) break;
|
||||||
break;
|
count++;
|
||||||
}
|
} while(fs.existsSync(fullPath));
|
||||||
count++;
|
}
|
||||||
} while(fs.existsSync(fullPath));
|
|
||||||
// If the last write failed with an error, or if path does not start with:
|
// If the last write failed with an error, or if path does not start with:
|
||||||
// the resolved options.directory, the resolved wikiPath directory, the wikiTiddlersPath directory,
|
// the resolved options.directory, the resolved wikiPath directory, the wikiTiddlersPath directory,
|
||||||
// or the 'originalpath' directory, then $tw.utils.encodeURIComponentExtended() and resolve to tiddler directory.
|
// or the 'originalpath' directory, then $tw.utils.encodeURIComponentExtended() and resolve to options.directory.
|
||||||
var writePath = $tw.hooks.invokeHook("th-make-tiddler-path",fullPath,fullPath),
|
var writePath = $tw.hooks.invokeHook("th-make-tiddler-path",fullPath,fullPath),
|
||||||
encode = (options.fileInfo || {writeError: false}).writeError == true;
|
encode = (options.fileInfo || {writeError: false}).writeError == true;
|
||||||
if(!encode) {
|
if(!encode) {
|
||||||
|
|||||||
@@ -819,6 +819,15 @@ exports.hashString = function(str) {
|
|||||||
},0);
|
},0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Cryptographic hash function as used by sha256 filter operator
|
||||||
|
options.length .. number of characters returned defaults to 64
|
||||||
|
*/
|
||||||
|
exports.sha256 = function(str, options) {
|
||||||
|
options = options || {}
|
||||||
|
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(str)).substr(0,options.length || 64);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Base64 utility functions that work in either browser or Node.js
|
Base64 utility functions that work in either browser or Node.js
|
||||||
*/
|
*/
|
||||||
@@ -922,7 +931,7 @@ IE does not have sign function
|
|||||||
*/
|
*/
|
||||||
exports.sign = Math.sign || function(x) {
|
exports.sign = Math.sign || function(x) {
|
||||||
x = +x; // convert to a number
|
x = +x; // convert to a number
|
||||||
if (x === 0 || isNaN(x)) {
|
if(x === 0 || isNaN(x)) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
return x > 0 ? 1 : -1;
|
return x > 0 ? 1 : -1;
|
||||||
@@ -935,7 +944,7 @@ exports.strEndsWith = function(str,ending,position) {
|
|||||||
if(str.endsWith) {
|
if(str.endsWith) {
|
||||||
return str.endsWith(ending,position);
|
return str.endsWith(ending,position);
|
||||||
} else {
|
} else {
|
||||||
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) {
|
if(typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) {
|
||||||
position = str.length;
|
position = str.length;
|
||||||
}
|
}
|
||||||
position -= ending.length;
|
position -= ending.length;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ Compute the internal state of the widget
|
|||||||
DeleteFieldWidget.prototype.execute = function() {
|
DeleteFieldWidget.prototype.execute = function() {
|
||||||
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
||||||
this.actionField = this.getAttribute("$field",null);
|
this.actionField = this.getAttribute("$field",null);
|
||||||
|
this.actionTimestamp = this.getAttribute("$timestamp","yes") === "yes";
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -69,11 +70,15 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|||||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||||
if(name.charAt(0) !== "$" && name !== "title") {
|
if(name.charAt(0) !== "$" && name !== "title") {
|
||||||
removeFields[name] = undefined;
|
removeFields[name] = undefined;
|
||||||
hasChanged = true;
|
if(name in tiddler.fields) {
|
||||||
|
hasChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(hasChanged) {
|
if(hasChanged) {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,removeFields,this.wiki.getModificationFields()));
|
var creationFields = this.actionTimestamp ? this.wiki.getCreationFields() : {};
|
||||||
|
var modificationFields = this.actionTimestamp ? this.wiki.getModificationFields() : {};
|
||||||
|
this.wiki.addTiddler(new $tw.Tiddler(creationFields,tiddler,removeFields,modificationFields));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true; // Action was invoked
|
return true; // Action was invoked
|
||||||
|
|||||||
145
core/modules/widgets/data.js
Normal file
145
core/modules/widgets/data.js
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/widgets/data.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: widget
|
||||||
|
|
||||||
|
Widget to dynamically represent one or more tiddlers
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||||
|
|
||||||
|
var DataWidget = function(parseTreeNode,options) {
|
||||||
|
this.dataWidgetTag = parseTreeNode.type;
|
||||||
|
this.initialise(parseTreeNode,options);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Inherit from the base widget class
|
||||||
|
*/
|
||||||
|
DataWidget.prototype = new Widget();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Render this widget into the DOM
|
||||||
|
*/
|
||||||
|
DataWidget.prototype.render = function(parent,nextSibling) {
|
||||||
|
this.parentDomNode = parent;
|
||||||
|
this.computeAttributes();
|
||||||
|
this.execute();
|
||||||
|
var jsonPayload = JSON.stringify(this.readDataTiddlerValues(),null,4);
|
||||||
|
var textNode = this.document.createTextNode(jsonPayload);
|
||||||
|
parent.insertBefore(textNode,nextSibling);
|
||||||
|
this.domNodes.push(textNode);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Compute the internal state of the widget
|
||||||
|
*/
|
||||||
|
DataWidget.prototype.execute = function() {
|
||||||
|
// Construct the child widgets
|
||||||
|
this.makeChildWidgets();
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Read the tiddler value(s) from a data widget – must be called after the .render() method
|
||||||
|
*/
|
||||||
|
DataWidget.prototype.readDataTiddlerValues = function() {
|
||||||
|
var self = this;
|
||||||
|
// Start with a blank object
|
||||||
|
var item = Object.create(null);
|
||||||
|
// Read any attributes not prefixed with $
|
||||||
|
$tw.utils.each(this.attributes,function(value,name) {
|
||||||
|
if(name.charAt(0) !== "$") {
|
||||||
|
item[name] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
item = new $tw.Tiddler(item);
|
||||||
|
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
||||||
|
var tiddlers = [],title;
|
||||||
|
if(this.hasAttribute("$tiddler")) {
|
||||||
|
title = this.getAttribute("$tiddler");
|
||||||
|
if(title) {
|
||||||
|
var tiddler = this.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
|
tiddlers.push(tiddler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.hasAttribute("$filter")) {
|
||||||
|
var filter = this.getAttribute("$filter");
|
||||||
|
if(filter) {
|
||||||
|
var titles = this.wiki.filterTiddlers(filter);
|
||||||
|
$tw.utils.each(titles,function(title) {
|
||||||
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
|
tiddlers.push(tiddler);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.hasAttribute("$compound-tiddler")) {
|
||||||
|
title = this.getAttribute("$compound-tiddler");
|
||||||
|
if(title) {
|
||||||
|
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Convert the literal item to field strings
|
||||||
|
item = item.getFieldStrings();
|
||||||
|
if(tiddlers.length === 0) {
|
||||||
|
if(Object.keys(item).length > 0 && !!item.title) {
|
||||||
|
return [item];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var results = [];
|
||||||
|
$tw.utils.each(tiddlers,function(tiddler,index) {
|
||||||
|
var fields = tiddler.getFieldStrings();
|
||||||
|
results.push($tw.utils.extend({},fields,item));
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Helper to extract tiddlers from text/vnd.tiddlywiki-multiple tiddlers
|
||||||
|
*/
|
||||||
|
DataWidget.prototype.extractCompoundTiddler = function(title) {
|
||||||
|
var tiddler = this.wiki.getTiddler(title);
|
||||||
|
if(tiddler && tiddler.fields.type === "text/vnd.tiddlywiki-multiple") {
|
||||||
|
var text = tiddler.fields.text || "",
|
||||||
|
rawTiddlers = text.split(/\r?\n\+\r?\n/),
|
||||||
|
tiddlers = [];
|
||||||
|
$tw.utils.each(rawTiddlers,function(rawTiddler) {
|
||||||
|
var fields = Object.create(null),
|
||||||
|
split = rawTiddler.split(/\r?\n\r?\n/mg);
|
||||||
|
if(split.length >= 1) {
|
||||||
|
fields = $tw.utils.parseFields(split[0],fields);
|
||||||
|
}
|
||||||
|
if(split.length >= 2) {
|
||||||
|
fields.text = split.slice(1).join("\n\n");
|
||||||
|
}
|
||||||
|
tiddlers.push(new $tw.Tiddler(fields));
|
||||||
|
});
|
||||||
|
return tiddlers;
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||||
|
*/
|
||||||
|
DataWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
|
// It would be expensive to calculate whether the changedTiddlers impact the filter
|
||||||
|
// identified by the $filter attribute so we just refresh ourselves unconditionally
|
||||||
|
this.refreshSelf();
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.data = DataWidget;
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -119,7 +119,7 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if(changedAttributes["class"]) {
|
if(changedAttributes["class"]) {
|
||||||
this.assignDomNodeClasses();
|
this.updateDomNodeClasses();
|
||||||
}
|
}
|
||||||
this.assignAttributes(this.domNodes[0],{
|
this.assignAttributes(this.domNodes[0],{
|
||||||
changedAttributes: changedAttributes,
|
changedAttributes: changedAttributes,
|
||||||
@@ -132,4 +132,4 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
|
|
||||||
exports.draggable = DraggableWidget;
|
exports.draggable = DraggableWidget;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
EditWidget.prototype.refresh = function(changedTiddlers) {
|
EditWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
|
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
|
||||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {
|
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
|||||||
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
|
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
|
||||||
// Accumulate the <$set> widgets from each tiddler
|
// Accumulate the <$set> widgets from each tiddler
|
||||||
$tw.utils.each(this.tiddlerList,function(title) {
|
$tw.utils.each(this.tiddlerList,function(title) {
|
||||||
var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:true});
|
var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:false});
|
||||||
if(parser) {
|
if(parser) {
|
||||||
var parseTreeNode = parser.tree[0];
|
var parseTreeNode = parser.tree[0];
|
||||||
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
LinkWidget.prototype.refresh = function(changedTiddlers) {
|
LinkWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
if($tw.utils.count(changedAttributes) > 0) {
|
if($tw.utils.count(changedAttributes) > 0 || changedTiddlers[this.to]) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ ListWidget.prototype.findExplicitTemplates = function() {
|
|||||||
this.explicitJoinTemplate = null;
|
this.explicitJoinTemplate = null;
|
||||||
this.hasTemplateInBody = false;
|
this.hasTemplateInBody = false;
|
||||||
var searchChildren = function(childNodes) {
|
var searchChildren = function(childNodes) {
|
||||||
|
var foundInlineTemplate = false;
|
||||||
$tw.utils.each(childNodes,function(node) {
|
$tw.utils.each(childNodes,function(node) {
|
||||||
if(node.type === "list-template") {
|
if(node.type === "list-template") {
|
||||||
self.explicitListTemplate = node.children;
|
self.explicitListTemplate = node.children;
|
||||||
@@ -118,12 +119,14 @@ ListWidget.prototype.findExplicitTemplates = function() {
|
|||||||
self.explicitJoinTemplate = node.children;
|
self.explicitJoinTemplate = node.children;
|
||||||
} else if(node.type === "element" && node.tag === "p") {
|
} else if(node.type === "element" && node.tag === "p") {
|
||||||
searchChildren(node.children);
|
searchChildren(node.children);
|
||||||
|
foundInlineTemplate = true;
|
||||||
} else {
|
} else {
|
||||||
self.hasTemplateInBody = true;
|
foundInlineTemplate = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return foundInlineTemplate;
|
||||||
};
|
};
|
||||||
searchChildren(this.parseTreeNode.children);
|
this.hasTemplateInBody = searchChildren(this.parseTreeNode.children);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListWidget.prototype.getTiddlerList = function() {
|
ListWidget.prototype.getTiddlerList = function() {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
//Create element
|
//Create element
|
||||||
var domNode = this.document.createElement("select");
|
var domNode = this.document.createElement("select");
|
||||||
if(this.selectClass) {
|
if(this.selectClass) {
|
||||||
domNode.classname = this.selectClass;
|
domNode.className = this.selectClass;
|
||||||
}
|
}
|
||||||
// Assign data- attributes
|
// Assign data- attributes
|
||||||
this.assignAttributes(domNode,{
|
this.assignAttributes(domNode,{
|
||||||
@@ -62,8 +62,8 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
if(this.selectTooltip) {
|
if(this.selectTooltip) {
|
||||||
domNode.setAttribute("title",this.selectTooltip);
|
domNode.setAttribute("title",this.selectTooltip);
|
||||||
}
|
}
|
||||||
this.renderChildren(domNode,nextSibling);
|
|
||||||
this.parentDomNode.insertBefore(domNode,nextSibling);
|
this.parentDomNode.insertBefore(domNode,nextSibling);
|
||||||
|
this.renderChildren(domNode,null);
|
||||||
this.domNodes.push(domNode);
|
this.domNodes.push(domNode);
|
||||||
this.setSelectValue();
|
this.setSelectValue();
|
||||||
if(this.selectFocus == "yes") {
|
if(this.selectFocus == "yes") {
|
||||||
|
|||||||
160
core/modules/widgets/testcase.js
Normal file
160
core/modules/widgets/testcase.js
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/widgets/testcase.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: widget
|
||||||
|
|
||||||
|
Widget to display a test case
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||||
|
|
||||||
|
var TestCaseWidget = function(parseTreeNode,options) {
|
||||||
|
this.initialise(parseTreeNode,options);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Inherit from the base widget class
|
||||||
|
*/
|
||||||
|
TestCaseWidget.prototype = new Widget();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Render this widget into the DOM
|
||||||
|
*/
|
||||||
|
TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
||||||
|
var self = this;
|
||||||
|
this.parentDomNode = parent;
|
||||||
|
this.computeAttributes();
|
||||||
|
this.execute();
|
||||||
|
// Create container DOM node
|
||||||
|
var domNode = this.document.createElement("div");
|
||||||
|
this.domNodes.push(domNode);
|
||||||
|
parent.insertBefore(domNode,nextSibling);
|
||||||
|
// Render the children into a hidden DOM node
|
||||||
|
var parser = {
|
||||||
|
tree: [{
|
||||||
|
type: "widget",
|
||||||
|
attributes: {},
|
||||||
|
orderedAttributes: [],
|
||||||
|
children: this.parseTreeNode.children || []
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
this.contentRoot = this.wiki.makeWidget(parser,{
|
||||||
|
document: $tw.fakeDocument,
|
||||||
|
parentWidget: this
|
||||||
|
});
|
||||||
|
this.contentContainer = $tw.fakeDocument.createElement("div");
|
||||||
|
this.contentRoot.render(this.contentContainer,null);
|
||||||
|
// Create a wiki
|
||||||
|
this.testcaseWiki = new $tw.Wiki();
|
||||||
|
// Always load the core plugin
|
||||||
|
var loadTiddler = function(title) {
|
||||||
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
|
self.testcaseWiki.addTiddler(tiddler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadTiddler("$:/core");
|
||||||
|
loadTiddler("$:/plugins/tiddlywiki/codemirror");
|
||||||
|
// Load tiddlers from child data widgets
|
||||||
|
var tiddlers = [];
|
||||||
|
this.findChildrenDataWidgets(this.contentRoot.children,"data",function(widget) {
|
||||||
|
Array.prototype.push.apply(tiddlers,widget.readDataTiddlerValues());
|
||||||
|
});
|
||||||
|
var jsonPayload = JSON.stringify(tiddlers);
|
||||||
|
this.testcaseWiki.addTiddlers(tiddlers);
|
||||||
|
// Unpack plugin tiddlers
|
||||||
|
this.testcaseWiki.readPluginInfo();
|
||||||
|
this.testcaseWiki.registerPluginTiddlers("plugin");
|
||||||
|
this.testcaseWiki.unpackPluginTiddlers();
|
||||||
|
this.testcaseWiki.addIndexersToWiki();
|
||||||
|
// Generate a `transclusion` variable that depends on the values of the payload tiddlers so that the template can easily make unique state tiddlers
|
||||||
|
this.setVariable("transclusion",$tw.utils.hashString(jsonPayload));
|
||||||
|
// Generate a `payloadTiddlers` variable that contains the payload in JSON format
|
||||||
|
this.setVariable("payloadTiddlers",jsonPayload);
|
||||||
|
// Render the test rendering if required
|
||||||
|
if(this.testcaseTestOutput && this.testcaseTestExpectedResult) {
|
||||||
|
var testcaseOutputContainer = $tw.fakeDocument.createElement("div");
|
||||||
|
var testcaseOutputWidget = this.testcaseWiki.makeTranscludeWidget(this.testcaseTestOutput,{
|
||||||
|
document: $tw.fakeDocument,
|
||||||
|
parseAsInline: false,
|
||||||
|
parentWidget: this,
|
||||||
|
variables: {
|
||||||
|
currentTiddler: this.testcaseTestOutput
|
||||||
|
}
|
||||||
|
});
|
||||||
|
testcaseOutputWidget.render(testcaseOutputContainer);
|
||||||
|
}
|
||||||
|
// Clear changes queue
|
||||||
|
this.testcaseWiki.clearTiddlerEventQueue();
|
||||||
|
// Run the actions if provided
|
||||||
|
if(this.testcaseWiki.tiddlerExists(this.testcaseTestActions)) {
|
||||||
|
testcaseOutputWidget.invokeActionString(this.testcaseWiki.getTiddlerText(this.testcaseTestActions));
|
||||||
|
testcaseOutputWidget.refresh(this.testcaseWiki.changedTiddlers,testcaseOutputContainer);
|
||||||
|
}
|
||||||
|
// Set up the test result variables
|
||||||
|
var testResult = "",
|
||||||
|
outputHTML = "",
|
||||||
|
expectedHTML = "";
|
||||||
|
if(this.testcaseTestOutput && this.testcaseTestExpectedResult) {
|
||||||
|
outputHTML = testcaseOutputContainer.children[0].innerHTML;
|
||||||
|
expectedHTML = this.testcaseWiki.getTiddlerText(this.testcaseTestExpectedResult);
|
||||||
|
if(outputHTML === expectedHTML) {
|
||||||
|
testResult = "pass";
|
||||||
|
} else {
|
||||||
|
testResult = "fail";
|
||||||
|
}
|
||||||
|
this.setVariable("outputHTML",outputHTML);
|
||||||
|
this.setVariable("expectedHTML",expectedHTML);
|
||||||
|
this.setVariable("testResult",testResult);
|
||||||
|
this.setVariable("currentTiddler",this.testcaseTestOutput);
|
||||||
|
}
|
||||||
|
// Don't display anything if testHideIfPass is "yes" and the tests have passed
|
||||||
|
if(this.testcaseHideIfPass === "yes" && testResult === "pass") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Render the page root template of the subwiki
|
||||||
|
var rootWidget = this.testcaseWiki.makeTranscludeWidget(this.testcaseTemplate,{
|
||||||
|
document: this.document,
|
||||||
|
parseAsInline: false,
|
||||||
|
parentWidget: this
|
||||||
|
});
|
||||||
|
rootWidget.render(domNode);
|
||||||
|
// Trap changes in the wiki and refresh the rendering
|
||||||
|
this.testcaseWiki.addEventListener("change",function(changes) {
|
||||||
|
rootWidget.refresh(changes,domNode);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Compute the internal state of the widget
|
||||||
|
*/
|
||||||
|
TestCaseWidget.prototype.execute = function() {
|
||||||
|
this.testcaseTemplate = this.getAttribute("template","$:/core/ui/testcases/DefaultTemplate");
|
||||||
|
this.testcaseTestOutput = this.getAttribute("testOutput");
|
||||||
|
this.testcaseTestActions = this.getAttribute("testActions");
|
||||||
|
this.testcaseTestExpectedResult = this.getAttribute("testExpectedResult");
|
||||||
|
this.testcaseHideIfPass = this.getAttribute("testHideIfPass");
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||||
|
*/
|
||||||
|
TestCaseWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
|
var changedAttributes = this.computeAttributes();
|
||||||
|
if($tw.utils.count(changedAttributes) > 0) {
|
||||||
|
this.refreshSelf();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return this.contentRoot.refresh(changedTiddlers);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["testcase"] = TestCaseWidget;
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -153,7 +153,7 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
|||||||
} else if(variable.isFunctionDefinition) {
|
} else if(variable.isFunctionDefinition) {
|
||||||
// Function evaluations
|
// Function evaluations
|
||||||
params = self.resolveVariableParameters(variable.params,actualParams);
|
params = self.resolveVariableParameters(variable.params,actualParams);
|
||||||
var variables = Object.create(null);
|
var variables = options.variables || Object.create(null);
|
||||||
// Apply default parameter values
|
// Apply default parameter values
|
||||||
$tw.utils.each(variable.params,function(param,index) {
|
$tw.utils.each(variable.params,function(param,index) {
|
||||||
if(param["default"]) {
|
if(param["default"]) {
|
||||||
@@ -813,6 +813,21 @@ Widget.prototype.allowActionPropagation = function() {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Find child <$data> widgets recursively. The tag name allows aliased versions of the widget to be found too
|
||||||
|
*/
|
||||||
|
Widget.prototype.findChildrenDataWidgets = function(children,tag,callback) {
|
||||||
|
var self = this;
|
||||||
|
$tw.utils.each(children,function(child) {
|
||||||
|
if(child.dataWidgetTag === tag) {
|
||||||
|
callback(child);
|
||||||
|
}
|
||||||
|
if(child.children) {
|
||||||
|
self.findChildrenDataWidgets(child.children,tag,callback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Evaluate a variable with parameters. This is a static convenience method that attempts to evaluate a variable as a function, returning an array of strings
|
Evaluate a variable with parameters. This is a static convenience method that attempts to evaluate a variable as a function, returning an array of strings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -534,8 +534,8 @@ Return an array of tiddler titles that link to the specified tiddler
|
|||||||
*/
|
*/
|
||||||
exports.getTiddlerBacklinks = function(targetTitle) {
|
exports.getTiddlerBacklinks = function(targetTitle) {
|
||||||
var self = this,
|
var self = this,
|
||||||
backlinksIndexer = this.getIndexer("BacklinksIndexer"),
|
backIndexer = this.getIndexer("BackIndexer"),
|
||||||
backlinks = backlinksIndexer && backlinksIndexer.lookup(targetTitle);
|
backlinks = backIndexer && backIndexer.subIndexers.link.lookup(targetTitle);
|
||||||
|
|
||||||
if(!backlinks) {
|
if(!backlinks) {
|
||||||
backlinks = [];
|
backlinks = [];
|
||||||
@@ -549,6 +549,68 @@ exports.getTiddlerBacklinks = function(targetTitle) {
|
|||||||
return backlinks;
|
return backlinks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Return an array of tiddler titles that are directly transcluded within the given parse tree
|
||||||
|
*/
|
||||||
|
exports.extractTranscludes = function(parseTreeRoot) {
|
||||||
|
// Count up the transcludes
|
||||||
|
var transcludes = [],
|
||||||
|
checkParseTree = function(parseTree, parentNode) {
|
||||||
|
for(var t=0; t<parseTree.length; t++) {
|
||||||
|
var parseTreeNode = parseTree[t];
|
||||||
|
if(parseTreeNode.type === "transclude" && parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
|
||||||
|
var value;
|
||||||
|
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
||||||
|
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
||||||
|
value = parentNode.attributes.tiddler.value;
|
||||||
|
} else {
|
||||||
|
value = parseTreeNode.attributes.$tiddler.value;
|
||||||
|
}
|
||||||
|
if(transcludes.indexOf(value) === -1) {
|
||||||
|
transcludes.push(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(parseTreeNode.children) {
|
||||||
|
checkParseTree(parseTreeNode.children, parseTreeNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
checkParseTree(parseTreeRoot);
|
||||||
|
return transcludes;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Return an array of tiddler titles that are transcluded from the specified tiddler
|
||||||
|
*/
|
||||||
|
exports.getTiddlerTranscludes = function(title) {
|
||||||
|
var self = this;
|
||||||
|
// We'll cache the transcludes so they only get computed if the tiddler changes
|
||||||
|
return this.getCacheForTiddler(title,"transcludes",function() {
|
||||||
|
// Parse the tiddler
|
||||||
|
var parser = self.parseTiddler(title);
|
||||||
|
if(parser) {
|
||||||
|
return self.extractTranscludes(parser.tree);
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Return an array of tiddler titles that transclude to the specified tiddler
|
||||||
|
*/
|
||||||
|
exports.getTiddlerBacktranscludes = function(targetTitle) {
|
||||||
|
var self = this,
|
||||||
|
backIndexer = this.getIndexer("BackIndexer"),
|
||||||
|
backtranscludes = backIndexer && backIndexer.subIndexers.transclude.lookup(targetTitle);
|
||||||
|
|
||||||
|
if(!backtranscludes) {
|
||||||
|
backtranscludes = [];
|
||||||
|
}
|
||||||
|
return backtranscludes;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Return a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced
|
Return a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ table-footer-background: #a8a8a8
|
|||||||
table-header-background: #f0f0f0
|
table-header-background: #f0f0f0
|
||||||
tag-background: #ec6
|
tag-background: #ec6
|
||||||
tag-foreground: #ffffff
|
tag-foreground: #ffffff
|
||||||
|
testcase-accent-level-1: #84C5E6
|
||||||
|
testcase-accent-level-2: #E3B740
|
||||||
|
testcase-accent-level-3: #5FD564
|
||||||
tiddler-background: <<colour background>>
|
tiddler-background: <<colour background>>
|
||||||
tiddler-border: <<colour background>>
|
tiddler-border: <<colour background>>
|
||||||
tiddler-controls-foreground-hover: #888888
|
tiddler-controls-foreground-hover: #888888
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: $:/core/save/all-external-js
|
|||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
|
|
||||||
<!-- Important: core library is provided by serving URI encoded $:/core/templates/tiddlywiki5.js -->
|
<!-- Important: core library is provided by serving URI encoded $:/core/templates/tiddlywiki5.js -->
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: $:/core/save/offline-external-js
|
|||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
\define defaultCoreURL() tiddlywikicore-$(version)$.js
|
\define defaultCoreURL() tiddlywikicore-$(version)$.js
|
||||||
<$let coreURL={{{ [[coreURL]is[variable]then<coreURL>else<defaultCoreURL>] }}}>
|
<$let coreURL={{{ [[coreURL]is[variable]then<coreURL>else<defaultCoreURL>] }}}>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
title: $:/core/templates/html-json-skinny-tiddler
|
title: $:/core/templates/html-json-skinny-tiddler
|
||||||
|
|
||||||
<$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>
|
<$text text=<<join>>/><$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ title: $:/core/save/all
|
|||||||
|
|
||||||
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
{{$:/core/templates/tiddlywiki5.html}}
|
{{$:/core/templates/tiddlywiki5.html}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
title: $:/core/save/empty
|
title: $:/core/save/empty
|
||||||
|
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
|
[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
|
||||||
\end
|
\end
|
||||||
{{$:/core/templates/tiddlywiki5.html}}
|
{{$:/core/templates/tiddlywiki5.html}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
title: $:/core/save/lazy-all
|
title: $:/core/save/lazy-all
|
||||||
|
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] +[sort[title]]
|
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] +[sort[title]]
|
||||||
\end
|
\end
|
||||||
\define skinnySaveTiddlerFilter()
|
\define skinnySaveTiddlerFilter()
|
||||||
[!is[system]] -[type[application/javascript]]
|
[!is[system]] -[type[application/javascript]]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
title: $:/core/save/lazy-images
|
title: $:/core/save/lazy-images
|
||||||
|
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]]
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]]
|
||||||
\end
|
\end
|
||||||
\define skinnySaveTiddlerFilter()
|
\define skinnySaveTiddlerFilter()
|
||||||
[!is[system]is[image]]
|
[!is[system]is[image]]
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ title: $:/core/templates/store.area.template.html
|
|||||||
<$let newline={{{ [charcode[10]] }}} join=`,$(newline)$`>
|
<$let newline={{{ [charcode[10]] }}} join=`,$(newline)$`>
|
||||||
<$text text=<<newline>>/>
|
<$text text=<<newline>>/>
|
||||||
<$list filter=<<saveTiddlerFilter>> join=<<join>> template="$:/core/templates/html-json-tiddler"/>
|
<$list filter=<<saveTiddlerFilter>> join=<<join>> template="$:/core/templates/html-json-tiddler"/>
|
||||||
<$vars numTiddlers={{{ [subfilter<saveTiddlerFilter>count[]] }}}>
|
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-json-skinny-tiddler"/>
|
||||||
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} join=<<join>> template="$:/core/templates/html-json-skinny-tiddler"/>
|
|
||||||
</$vars>
|
|
||||||
<$text text=<<newline>>/>
|
<$text text=<<newline>>/>
|
||||||
</$let>
|
</$let>
|
||||||
`]</script>`
|
`]</script>`
|
||||||
@@ -22,8 +20,8 @@ title: $:/core/templates/store.area.template.html
|
|||||||
<!-- Old-style DIV/PRE-based store area -->
|
<!-- Old-style DIV/PRE-based store area -->
|
||||||
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
|
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
|
||||||
`<div id="storeArea" style="display:none;">`
|
`<div id="storeArea" style="display:none;">`
|
||||||
<$list filter=<<saveTiddlerFilter>> template="$:/core/templates/html-div-tiddler"/>
|
<$list filter={{{ [<saveTiddlerFilter>] }}} template="$:/core/templates/html-div-tiddler"/>
|
||||||
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} template="$:/core/templates/html-div-skinny-tiddler"/>
|
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-div-skinny-tiddler"/>
|
||||||
`</div>`
|
`</div>`
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$list>
|
</$list>
|
||||||
|
|||||||
@@ -40,10 +40,8 @@ caption: {{$:/language/Search/Filter/Caption}}
|
|||||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
||||||
</$list></$list>
|
</$list></$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<<lingo Filter/Hint>>
|
<<lingo Filter/Hint>>
|
||||||
|
|
||||||
<div class="tc-search tc-advanced-search">
|
<div class="tc-search tc-advanced-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
@@ -65,11 +63,10 @@ caption: {{$:/language/Search/Filter/Caption}}
|
|||||||
 
|
 
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
<<lingo Filter/Matches>>
|
<p><<lingo Filter/Matches>></p>
|
||||||
<$list filter={{$:/temp/advancedsearch}}>
|
<$list filter={{$:/temp/advancedsearch}}>
|
||||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
|
|||||||
@@ -54,17 +54,18 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
variable="listItem">
|
variable="listItem">
|
||||||
<$vars
|
<$vars
|
||||||
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
||||||
configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
|
configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
|
||||||
searchListState="$:/temp/advancedsearch/selected-item">
|
searchListState="$:/temp/advancedsearch/selected-item">
|
||||||
<$list
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]">
|
||||||
filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"
|
|
||||||
emptyMessage="<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude/></$list>">
|
|
||||||
<$macrocall $name="tabs"
|
<$macrocall $name="tabs"
|
||||||
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
||||||
default={{$:/config/SearchResults/Default}}
|
default={{$:/config/SearchResults/Default}}
|
||||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
||||||
explicitState="$:/state/tab/search-results/advancedsearch" />
|
explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||||
</$list>
|
</$list>
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]] :else[[]]">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"><$transclude mode="block"/></$list>
|
||||||
|
</$list>
|
||||||
</$vars>
|
</$vars>
|
||||||
</$list>
|
</$list>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|||||||
@@ -2,10 +2,19 @@ title: $:/core/ui/ControlPanel/Saving/DownloadSaver
|
|||||||
tags: $:/tags/ControlPanel/Saving
|
tags: $:/tags/ControlPanel/Saving
|
||||||
caption: {{$:/language/ControlPanel/Saving/DownloadSaver/Caption}}
|
caption: {{$:/language/ControlPanel/Saving/DownloadSaver/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/
|
\define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/
|
||||||
|
|
||||||
|
<div class="tc-control-panel-saving" data-setting-title=<<currentTab>>>
|
||||||
|
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
!! <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link>
|
!!.tc-control-panel-accent <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/DownloadSaver/AutoSave" field="text" checked="yes" unchecked="no" default="no"> <<lingo AutoSave/Description>> </$checkbox>
|
<$checkbox tiddler="$:/config/DownloadSaver/AutoSave"
|
||||||
|
field="text" checked="yes" unchecked="no" default="no"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo AutoSave/Description>></span>
|
||||||
|
</$checkbox>
|
||||||
|
</div>
|
||||||
@@ -3,14 +3,22 @@ tags: $:/tags/ControlPanel/Saving
|
|||||||
caption: {{$:/language/ControlPanel/Saving/General/Caption}}
|
caption: {{$:/language/ControlPanel/Saving/General/Caption}}
|
||||||
list-before:
|
list-before:
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/
|
\define lingo-base() $:/language/ControlPanel/Settings/
|
||||||
|
|
||||||
|
<div class="tc-control-panel-saving" data-setting-title=<<currentTab>>>
|
||||||
|
|
||||||
{{$:/language/ControlPanel/Saving/General/Hint}}
|
{{$:/language/ControlPanel/Saving/General/Hint}}
|
||||||
|
|
||||||
!! <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link>
|
!!.tc-control-panel-accent <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link>
|
||||||
|
|
||||||
<<lingo AutoSave/Hint>>
|
<<lingo AutoSave/Hint>>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/AutoSave" value="yes"> <<lingo AutoSave/Enabled/Description>> </$radio>
|
<$radio tiddler="$:/config/AutoSave" value="yes">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo AutoSave/Enabled/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/AutoSave" value="no"> <<lingo AutoSave/Disabled/Description>> </$radio>
|
<$radio tiddler="$:/config/AutoSave" value="no">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo AutoSave/Disabled/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
</div>
|
||||||
@@ -2,7 +2,16 @@ title: $:/core/ui/ControlPanel/Settings/CamelCase
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/
|
\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/
|
||||||
|
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" field="text" checked="enable" unchecked="disable" default="enable"> <$link to="$:/config/WikiParserRules/Inline/wikilink"><<lingo Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink"
|
||||||
|
field="text" checked="enable" unchecked="disable" default="enable"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/WikiParserRules/Inline/wikilink" class="tc-tiny-gap-left">
|
||||||
|
<<lingo Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
@@ -2,13 +2,18 @@ caption: {{$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Caption}}
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
|
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
|
||||||
|
|
||||||
<$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link>
|
<$link to="$:/config/DefaultMoreSidebarTab" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$select tiddler="$:/config/DefaultMoreSidebarTab">
|
<$select tiddler="$:/config/DefaultMoreSidebarTab" class="tc-select">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]">
|
||||||
<option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option>
|
<option value=<<currentTiddler>>><$transclude field="caption">
|
||||||
</$list>
|
<$text text=<<currentTiddler>>/>
|
||||||
|
</$transclude>
|
||||||
|
</option>
|
||||||
|
</$list>
|
||||||
</$select>
|
</$select>
|
||||||
|
|||||||
@@ -5,10 +5,16 @@ title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab
|
|||||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
|
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
<$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link>
|
<$link to="$:/config/DefaultSidebarTab" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$select tiddler="$:/config/DefaultSidebarTab">
|
<$select tiddler="$:/config/DefaultSidebarTab" class="tc-select">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]">
|
||||||
<option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option>
|
<option value=<<currentTiddler>>>
|
||||||
</$list>
|
<$transclude field="caption">
|
||||||
|
<$text text=<<currentTiddler>>/>
|
||||||
|
</$transclude>
|
||||||
|
</option>
|
||||||
|
</$list>
|
||||||
</$select>
|
</$select>
|
||||||
|
|||||||
@@ -2,8 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/EditorToolbar
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/EditorToolbar/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/EditorToolbar/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/
|
\define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/TextEditor/EnableToolbar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/TextEditor/EnableToolbar"><<lingo Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/TextEditor/EnableToolbar"
|
||||||
|
field="text" checked="yes" unchecked="no" default="yes"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/TextEditor/EnableToolbar" class="tc-tiny-gap-left">
|
||||||
|
<<lingo Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/InfoPanelMode
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/
|
\define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/
|
||||||
<$link to="$:/config/TiddlerInfo/Mode"><<lingo Hint>></$link>
|
|
||||||
|
|
||||||
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> <<lingo Popup/Description>> </$radio>
|
<$link to="$:/config/TiddlerInfo/Mode" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky"> <<lingo Sticky/Description>> </$radio>
|
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Popup/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
|
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Sticky/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|||||||
@@ -2,21 +2,25 @@ title: $:/core/ui/ControlPanel/Settings/LinkToBehaviour
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
|
||||||
|
|
||||||
<$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link>
|
<$link to="$:/config/Navigation/openLinkFromInsideRiver" class="tc-control-panel-item">
|
||||||
|
<<lingo "InsideRiver/Hint">>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver">
|
<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver" class="tc-select">
|
||||||
<option value="above"><<lingo "OpenAbove">></option>
|
<option value="above"><<lingo "OpenAbove">></option>
|
||||||
<option value="below"><<lingo "OpenBelow">></option>
|
<option value="below"><<lingo "OpenBelow">></option>
|
||||||
<option value="top"><<lingo "OpenAtTop">></option>
|
<option value="top"><<lingo "OpenAtTop">></option>
|
||||||
<option value="bottom"><<lingo "OpenAtBottom">></option>
|
<option value="bottom"><<lingo "OpenAtBottom">></option>
|
||||||
</$select>
|
</$select>
|
||||||
|
|
||||||
<$link to="$:/config/Navigation/openLinkFromOutsideRiver"><<lingo "OutsideRiver/Hint">></$link>
|
<$link to="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-control-panel-item">
|
||||||
|
<<lingo "OutsideRiver/Hint">>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver">
|
<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-select">
|
||||||
<option value="top"><<lingo "OpenAtTop">></option>
|
<option value="top"><<lingo "OpenAtTop">></option>
|
||||||
<option value="bottom"><<lingo "OpenAtBottom">></option>
|
<option value="bottom"><<lingo "OpenAtBottom">></option>
|
||||||
</$select>
|
</$select>
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ title: $:/core/ui/ControlPanel/Settings/MissingLinks
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/MissingLinks/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/MissingLinks/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/
|
\define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/MissingLinks"><<lingo Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes">
|
||||||
|
<$link to="$:/config/MissingLinks" class="tc-control-panel-item">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Description>></span>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
@@ -2,12 +2,21 @@ title: $:/core/ui/ControlPanel/Settings/NavigationAddressBar
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/
|
\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/
|
||||||
|
|
||||||
<$link to="$:/config/Navigation/UpdateAddressBar"><<lingo Hint>></$link>
|
<$link to="$:/config/Navigation/UpdateAddressBar" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> <<lingo Permaview/Description>> </$radio>
|
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Permaview/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> <<lingo Permalink/Description>> </$radio>
|
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Permalink/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> <<lingo No/Description>> </$radio>
|
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|||||||
@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/NavigationHistory
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/
|
\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/
|
||||||
<$link to="$:/config/Navigation/UpdateHistory"><<lingo Hint>></$link>
|
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> <<lingo Yes/Description>> </$radio>
|
<$link to="$:/config/Navigation/UpdateHistory" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no"> <<lingo No/Description>> </$radio>
|
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Yes/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
|
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|||||||
@@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/NavigationPermalinkviewMode/
|
\define lingo-base() $:/language/ControlPanel/Settings/NavigationPermalinkviewMode/
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/CopyToClipboard"><<lingo CopyToClipboard/Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard"
|
||||||
|
field="text" checked="yes" unchecked="no" default="yes"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/Navigation/Permalinkview/CopyToClipboard" class="tc-tiny-gap-left">
|
||||||
|
<<lingo CopyToClipboard/Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar"><<lingo UpdateAddressBar/Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar"
|
||||||
|
field="text" checked="yes" unchecked="no" default="yes"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar" class="tc-tiny-gap-left">
|
||||||
|
<<lingo UpdateAddressBar/Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
@@ -2,7 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/PerformanceInstrumentation
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/
|
\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><<lingo Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/Performance/Instrumentation"
|
||||||
|
field="text" checked="yes" unchecked="no" default="no"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/Performance/Instrumentation" class="tc-tiny-gap-left">
|
||||||
|
<<lingo Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/TitleLinks
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/TitleLinks/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/TitleLinks/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/
|
\define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/
|
||||||
<$link to="$:/config/Tiddlers/TitleLinks"><<lingo Hint>></$link>
|
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> <<lingo Yes/Description>> </$radio>
|
<$link to="$:/config/Tiddlers/TitleLinks" class="tc-control-panel-item">
|
||||||
|
<<lingo Hint>>
|
||||||
|
</$link>
|
||||||
|
|
||||||
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no"> <<lingo No/Description>> </$radio>
|
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo Yes/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|
||||||
|
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no">
|
||||||
|
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
|
||||||
|
</$radio>
|
||||||
|
|||||||
@@ -2,12 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtonStyle
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
|
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
||||||
|
|
||||||
<$select tiddler="$:/config/Toolbar/ButtonClass">
|
<$link to="$:/config/Toolbar/ButtonClass" class="tc-control-panel-item">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]">
|
<<lingo "Hint">>
|
||||||
<option value={{!!text}}>{{!!caption}}</option>
|
</$link>
|
||||||
</$list>
|
|
||||||
|
<$select tiddler="$:/config/Toolbar/ButtonClass" class="tc-select">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]">
|
||||||
|
<option value={{!!text}}>{{!!caption}}</option>
|
||||||
|
</$list>
|
||||||
</$select>
|
</$select>
|
||||||
|
|||||||
@@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtons
|
|||||||
tags: $:/tags/ControlPanel/Settings
|
tags: $:/tags/ControlPanel/Settings
|
||||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/
|
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/Toolbar/Icons" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Toolbar/Icons"><<lingo Icons/Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/Toolbar/Icons"
|
||||||
|
field="text" checked="yes" unchecked="no" default="yes"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/Toolbar/Icons" class="tc-tiny-gap-left">
|
||||||
|
<<lingo Icons/Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/Toolbar/Text" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Toolbar/Text"><<lingo Text/Description>></$link> </$checkbox>
|
<$checkbox tiddler="$:/config/Toolbar/Text"
|
||||||
|
field="text" checked="yes" unchecked="no" default="no"
|
||||||
|
class="tc-control-panel-item"
|
||||||
|
>
|
||||||
|
<$link to="$:/config/Toolbar/Text" class="tc-tiny-gap-left">
|
||||||
|
<<lingo Text/Description>>
|
||||||
|
</$link>
|
||||||
|
</$checkbox>
|
||||||
|
|||||||
10
core/ui/ControlPanel/TestCases.tid
Normal file
10
core/ui/ControlPanel/TestCases.tid
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/TestCases
|
||||||
|
tags: $:/tags/ControlPanel/Advanced
|
||||||
|
caption: {{$:/language/ControlPanel/TestCases/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
{{$:/language/ControlPanel/TestCases/Hint}}
|
||||||
|
|
||||||
|
<div class="tc-control-panel">
|
||||||
|
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/TestCases]!has[draft.of]]" default="$:/core/ui/ControlPanel/TestCases/All"/>
|
||||||
|
</div>
|
||||||
24
core/ui/ControlPanel/TestCasesAll.tid
Normal file
24
core/ui/ControlPanel/TestCasesAll.tid
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/TestCases/All
|
||||||
|
tags: $:/tags/ControlPanel/TestCases
|
||||||
|
caption: {{$:/language/ControlPanel/TestCases/All/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/
|
||||||
|
<<lingo TestCases/All/Hint>>
|
||||||
|
|
||||||
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [all[tiddlers+shadows]tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]]">
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
|
||||||
|
<$link>
|
||||||
|
|
||||||
|
<$text text=<<currentTiddler>>/>
|
||||||
|
|
||||||
|
</$link>
|
||||||
|
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<$transclude
|
||||||
|
$tiddler="$:/core/ui/TestCaseTemplate"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</$list>
|
||||||
15
core/ui/ControlPanel/TestCasesFailed.tid
Normal file
15
core/ui/ControlPanel/TestCasesFailed.tid
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/TestCases/Failed
|
||||||
|
tags: $:/tags/ControlPanel/TestCases
|
||||||
|
caption: {{$:/language/ControlPanel/TestCases/Failed/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/
|
||||||
|
<<lingo TestCases/Failed/Hint>>
|
||||||
|
|
||||||
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [all[tiddlers+shadows]tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]]">
|
||||||
|
|
||||||
|
<$transclude
|
||||||
|
$tiddler="$:/core/ui/TestCaseTemplate"
|
||||||
|
hideIfPass="yes"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</$list>
|
||||||
@@ -9,9 +9,9 @@ list-before:
|
|||||||
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
|
||||||
|
|
||||||
<div style="border-top:1px solid #eee;">
|
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> style="border-top:1px solid #eee;">
|
||||||
|
|
||||||
!! <$link><$transclude field="caption"/></$link>
|
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
|
||||||
|
|
||||||
<$transclude/>
|
<$transclude/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
title: $:/core/ui/EditTemplate/body/default
|
title: $:/core/ui/EditTemplate/body/default
|
||||||
|
|
||||||
\function edit-preview-state()
|
\function edit-preview-state()
|
||||||
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] +[get[text]] :else[[no]]
|
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualified-preview-state>] +[get[text]] :else[[no]]
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define config-visibility-title()
|
\define config-visibility-title()
|
||||||
@@ -14,15 +14,17 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$let
|
<$let
|
||||||
|
qualified-preview-state=<<qualify "$:/state/showeditpreview">>
|
||||||
|
editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualified-preview-state>] }}}
|
||||||
importTitle=<<qualify $:/ImportImage>>
|
importTitle=<<qualify $:/ImportImage>>
|
||||||
importState=<<qualify $:/state/ImportImage>> >
|
importState=<<qualify $:/state/ImportImage>> >
|
||||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
|
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
|
||||||
<div>
|
<div>
|
||||||
<div class={{{ [function[edit-preview-state]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
<div class={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
||||||
|
|
||||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||||
|
|
||||||
<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore">
|
<$list filter="[<editPreviewStateTiddler>get[text]match[yes]]" variable="ignore">
|
||||||
|
|
||||||
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>
|
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
title: $:/core/ui/EditTemplate/controls
|
title: $:/core/ui/EditTemplate/controls
|
||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
|
|
||||||
\define config-title()
|
\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||||
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
|
||||||
\end
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$let></$list></span>
|
<span class="tc-tiddler-controls tc-titlebar">
|
||||||
<div style="clear: both;"></div>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem">
|
||||||
|
<$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}>
|
||||||
|
<$reveal type="nomatch" state=<<config-title>> text="hide">
|
||||||
|
<$transclude $tiddler=<<listItem>>/>
|
||||||
|
</$reveal>
|
||||||
|
</$let>
|
||||||
|
</$list>
|
||||||
|
</span>
|
||||||
|
<div style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,39 +3,63 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/
|
\procedure lingo-base() $:/language/EditTemplate/
|
||||||
|
|
||||||
\define tag-styles()
|
\procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
||||||
background-color:$(backgroundColor)$;
|
<$wikify name="foregroundColor"
|
||||||
fill:$(foregroundColor)$;
|
text="""<$macrocall $name="contrastcolour"
|
||||||
color:$(foregroundColor)$;
|
target=<<colour>>
|
||||||
|
fallbackTarget=<<fallbackTarget>>
|
||||||
|
colourA=<<colourA>>
|
||||||
|
colourB=<<colourB>>/>
|
||||||
|
"""
|
||||||
|
>
|
||||||
|
<$let backgroundColor=<<colour>> >
|
||||||
|
<span class="tc-tag-label tc-tag-list-item tc-small-gap-right"
|
||||||
|
data-tag-title=<<currentTiddler>>
|
||||||
|
style.color=<<foregroundColor>>
|
||||||
|
style.fill=<<foregroundColor>>
|
||||||
|
style.background-color=<<backgroundColor>>
|
||||||
|
>
|
||||||
|
<$transclude tiddler=<<icon>>/>
|
||||||
|
<$view field="title" format="text"/>
|
||||||
|
<$button class="tc-btn-invisible tc-remove-tag-button"
|
||||||
|
style.fill=<<foregroundColor>>
|
||||||
|
>
|
||||||
|
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
|
||||||
|
{{$:/core/images/close-button}}
|
||||||
|
</$button>
|
||||||
|
</span>
|
||||||
|
</$let>
|
||||||
|
</$wikify>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
\procedure tag-body(colour,palette,icon,tagField:"tags")
|
||||||
\whitespace trim
|
<$macrocall $name="tag-body-inner"
|
||||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
colour=`$(colour)$`
|
||||||
<span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item tc-small-gap-right" data-tag-title=<<currentTiddler>>>
|
colourA={{{ [<palette>getindex[foreground]] }}}
|
||||||
<$transclude tiddler="""$icon$"""/><$view field="title" format="text"/>
|
colourB={{{ [<palette>getindex[background]] }}}
|
||||||
<$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>
|
fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
|
||||||
</span>
|
icon=<<icon>>
|
||||||
</$vars>
|
tagField=<<tagField>>
|
||||||
|
/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body(colour,palette,icon,tagField:"tags")
|
\procedure edit-tags-template(tagField:"tags")
|
||||||
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$""" tagField=<<__tagField__>>/>
|
|
||||||
\end
|
|
||||||
|
|
||||||
\define edit-tags-template(tagField:"tags")
|
|
||||||
\whitespace trim
|
|
||||||
<div class="tc-edit-tags">
|
<div class="tc-edit-tags">
|
||||||
<$list filter="[list[!!$tagField$]sort[title]]" storyview="pop">
|
<$list filter="[<currentTiddler>get<tagField>enlist-input[]sort[title]]" storyview="pop">
|
||||||
<$macrocall $name="tag-body" colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} tagField=<<__tagField__>>/>
|
<$macrocall $name="tag-body"
|
||||||
</$list>
|
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||||
<$vars tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
|
palette={{$:/palette}}
|
||||||
<$macrocall $name="tag-picker" tagField=<<__tagField__>>/>
|
icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}}
|
||||||
</$vars>
|
tagField=<<tagField>>
|
||||||
|
/>
|
||||||
|
</$list>
|
||||||
|
<$let tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
|
||||||
|
<$macrocall $name="tag-picker" tagField=<<tagField>>/>
|
||||||
|
</$let>
|
||||||
</div>
|
</div>
|
||||||
\end
|
\end
|
||||||
<$set name="saveTiddler" value=<<currentTiddler>>>
|
<$let saveTiddler=<<currentTiddler>>>
|
||||||
<$macrocall $name="edit-tags-template" tagField=<<tagField>>/>
|
<$macrocall $name="edit-tags-template" tagField=<<tagField>>/>
|
||||||
</$set>
|
</$let>
|
||||||
|
|||||||
@@ -9,17 +9,8 @@ button-classes: tc-text-editor-toolbar-item-start-group
|
|||||||
shortcuts: ((preview))
|
shortcuts: ((preview))
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$let
|
<span>
|
||||||
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
<$transclude $tiddler={{{ [<edit-preview-state>match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} />
|
||||||
>
|
</span>
|
||||||
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
<$action-setfield $tiddler=<<editPreviewStateTiddler>> $value={{{ [<editPreviewStateTiddler>get[text]toggle[yes],[no]] }}} />
|
||||||
{{$:/core/images/preview-open}}
|
|
||||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
|
||||||
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
||||||
</$reveal>
|
|
||||||
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
|
|
||||||
{{$:/core/images/preview-closed}}
|
|
||||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
|
|
||||||
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
|
||||||
</$reveal>
|
|
||||||
</$let>
|
|
||||||
|
|||||||
5
core/ui/KeyboardShortcuts/refresh.tid
Normal file
5
core/ui/KeyboardShortcuts/refresh.tid
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
title: $:/core/ui/KeyboardShortcuts/refresh
|
||||||
|
tags: $:/tags/KeyboardShortcut
|
||||||
|
key: ((refresh))
|
||||||
|
|
||||||
|
<$action-sendmessage $message="tm-browser-refresh"/>
|
||||||
@@ -1,17 +1,14 @@
|
|||||||
title: $:/core/ui/PageTemplate/pagecontrols
|
title: $:/core/ui/PageTemplate/pagecontrols
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define config-title()
|
\function config-title() [[$:/config/PageControlButtons/Visibility/$(listItem)$]substitute[]]
|
||||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
|
||||||
\end
|
|
||||||
<div class="tc-page-controls">
|
<div class="tc-page-controls">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
|
||||||
<$set name="hidden" value=<<config-title>>>
|
<$list filter="[<config-title>!text[hide]]" storyview="pop" variable="ignore">
|
||||||
<$list filter="[<hidden>!text[hide]]" storyview="pop" variable="ignore">
|
<$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}>
|
||||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
<$transclude $tiddler=<<listItem>> $mode="inline"/>
|
||||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
</$let>
|
||||||
</$set>
|
</$list>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</div>
|
||||||
</$list>
|
|
||||||
</div>
|
|
||||||
@@ -4,48 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}
|
|||||||
description: {{$:/language/Buttons/More/Hint}}
|
description: {{$:/language/Buttons/More/Hint}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define config-title()
|
\define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$
|
||||||
$:/config/PageControlButtons/Visibility/$(listItem)$
|
|
||||||
\end
|
|
||||||
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
|
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
|
||||||
{{$:/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>
|
|
||||||
</$list>
|
|
||||||
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
|
||||||
|
|
||||||
<div class="tc-drop-down">
|
|
||||||
|
|
||||||
<$set name="tv-config-toolbar-icons" value="yes">
|
|
||||||
|
|
||||||
<$set name="tv-config-toolbar-text" value="yes">
|
|
||||||
|
|
||||||
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
|
||||||
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem">
|
|
||||||
|
|
||||||
<$reveal type="match" state=<<config-title>> text="hide">
|
|
||||||
|
|
||||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
|
||||||
|
|
||||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</$reveal>
|
|
||||||
|
|
||||||
</$list>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<$button popup=<<qualify "$:/state/popup/more">>
|
||||||
|
tooltip={{$:/language/Buttons/More/Hint}}
|
||||||
|
aria-label={{$:/language/Buttons/More/Caption}}
|
||||||
|
class=<<tv-config-toolbar-class>>
|
||||||
|
selectedClass="tc-selected"
|
||||||
|
>
|
||||||
|
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||||
|
{{$:/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>
|
||||||
|
</$list>
|
||||||
|
</$button>
|
||||||
|
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
||||||
|
<div class="tc-drop-down">
|
||||||
|
<$set name="tv-config-toolbar-icons" value="yes">
|
||||||
|
<$set name="tv-config-toolbar-text" value="yes">
|
||||||
|
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]"
|
||||||
|
variable="listItem"
|
||||||
|
>
|
||||||
|
<$reveal type="match" state=<<config-title>> text="hide">
|
||||||
|
<$set name="tv-config-toolbar-class"
|
||||||
|
filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"
|
||||||
|
>
|
||||||
|
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||||
|
</$set>
|
||||||
|
</$reveal>
|
||||||
|
</$list>
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
title: $:/core/ui/PageTemplate
|
title: $:/core/ui/PageTemplate
|
||||||
name: {{$:/language/PageTemplate/Name}}
|
name: {{$:/language/PageTemplate/Name}}
|
||||||
description: {{$:/language/PageTemplate/Description}}
|
description: {{$:/language/PageTemplate/Description}}
|
||||||
icon: $:/core/images/layout-button
|
icon: $:/core/images/default-layout
|
||||||
code-body: yes
|
code-body: yes
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|||||||
18
core/ui/TestCaseTemplate.tid
Normal file
18
core/ui/TestCaseTemplate.tid
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
title: $:/core/ui/TestCaseTemplate
|
||||||
|
|
||||||
|
\parameters (hideIfPass:"no")
|
||||||
|
\whitespace trim
|
||||||
|
<$let
|
||||||
|
linkTarget="yes"
|
||||||
|
displayFormat={{!!display-format}}
|
||||||
|
>
|
||||||
|
<$testcase
|
||||||
|
testOutput="Output"
|
||||||
|
testExpectedResult="ExpectedResult"
|
||||||
|
testActions="Actions"
|
||||||
|
testHideIfPass=<<hideIfPass>>
|
||||||
|
>
|
||||||
|
<$data $compound-tiddler=<<currentTiddler>>/>
|
||||||
|
<$data title="Description" text={{!!description}}/>
|
||||||
|
</$testcase>
|
||||||
|
</$let>
|
||||||
64
core/ui/TestCases/DefaultTemplate.tid
Normal file
64
core/ui/TestCases/DefaultTemplate.tid
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
title: $:/core/ui/testcases/DefaultTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\procedure linkcatcherActions()
|
||||||
|
<%if [<navigateTo>has[title]] %>
|
||||||
|
<$qualify title=<<state>> name="qualifiedState">
|
||||||
|
<$action-setfield $tiddler=<<qualifiedState>> text=<<navigateTo>>/>
|
||||||
|
</$qualify>
|
||||||
|
<%endif%>
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$let
|
||||||
|
state={{{ [<qualify "$:/state/testcase">] }}}
|
||||||
|
>
|
||||||
|
<div class="tc-test-case-wrapper">
|
||||||
|
<div class="tc-test-case-header">
|
||||||
|
<h2>
|
||||||
|
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[div]] }}}>
|
||||||
|
<%if [<testResult>!match[]] %>
|
||||||
|
<span class={{{ tc-test-case-result-icon [<testResult>!match[fail]then[tc-test-case-result-icon-pass]] [<testResult>match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}>
|
||||||
|
<%if [<testResult>!match[fail]] %>
|
||||||
|
{{$:/core/images/done-button}}
|
||||||
|
<%else%>
|
||||||
|
{{$:/core/images/close-button}}
|
||||||
|
<%endif%>
|
||||||
|
</span>
|
||||||
|
<%endif%>
|
||||||
|
<$view tiddler="Description" mode="inline"/>
|
||||||
|
</$genesis>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<%if [[Narrative]is[tiddler]] %>
|
||||||
|
<div class="tc-test-case-narrative">
|
||||||
|
<$transclude $tiddler="Narrative" mode="block"/>
|
||||||
|
</div>
|
||||||
|
<%endif%>
|
||||||
|
<%if [<testResult>match[fail]] %>
|
||||||
|
<div class="tc-test-case-result-fail">
|
||||||
|
<div class="tc-test-case-result-fail-header">
|
||||||
|
TEST FAILED
|
||||||
|
</div>
|
||||||
|
<div class="tc-test-case-result-fail-body">
|
||||||
|
<$diff-text source=<<expectedHTML>> dest=<<outputHTML>>/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%endif%>
|
||||||
|
<div class="tc-test-case-panes">
|
||||||
|
<div class="tc-test-case-source">
|
||||||
|
<$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix<state>] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" state=<<state>> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/>
|
||||||
|
</div>
|
||||||
|
<div class="tc-test-case-divider">
|
||||||
|
</div>
|
||||||
|
<div class="tc-test-case-output">
|
||||||
|
<%if [<displayFormat>!match[]else[wikitext]match[plaintext]] %>
|
||||||
|
<pre><$view tiddler="Output" format="plainwikified" mode="block"/></pre>
|
||||||
|
<%else%>
|
||||||
|
<$linkcatcher actions=<<linkcatcherActions>>>
|
||||||
|
<$transclude $tiddler="Output" $mode="block"/>
|
||||||
|
</$linkcatcher>
|
||||||
|
<%endif%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</$let>
|
||||||
24
core/ui/TestCases/DefaultTemplateSourceTabs.tid
Normal file
24
core/ui/TestCases/DefaultTemplateSourceTabs.tid
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
title: $:/core/ui/testcases/DefaultTemplate/SourceTabs
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\procedure body()
|
||||||
|
<$list filter="[<currentTab>fields[]] -text +[limit[1]]" variable="ignore">
|
||||||
|
<table class="tc-field-table">
|
||||||
|
<tbody>
|
||||||
|
<$list filter="[<currentTab>fields[]sort[]] -text -title title +[putfirst[]]" variable="fieldName">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<$text text=<<fieldName>>/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<$view tiddler=<<currentTab>> field=<<fieldName>>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</$list>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</$list>
|
||||||
|
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$transclude $variable="body" $mode="inline"/>
|
||||||
4
core/ui/TestCases/RawJSONTemplate.tid
Normal file
4
core/ui/TestCases/RawJSONTemplate.tid
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
title: $:/core/ui/testcases/RawJSONTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$text text=<<payloadTiddlers>>/>
|
||||||
@@ -2,31 +2,38 @@ title: $:/core/ui/ViewTemplate/title
|
|||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define title-styles()
|
\define title-styles() fill:$(foregroundColor)$;
|
||||||
fill:$(foregroundColor)$;
|
|
||||||
\end
|
|
||||||
<div class="tc-tiddler-title">
|
<div class="tc-tiddler-title">
|
||||||
<div class="tc-titlebar">
|
<div class="tc-titlebar">
|
||||||
<span class="tc-tiddler-controls">
|
<span class="tc-tiddler-controls">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" storyview="pop" variable="listItem"><$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"><$transclude tiddler=<<listItem>>/></$set></$list>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]"
|
||||||
</span>
|
storyview="pop"
|
||||||
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
|
variable="listItem"
|
||||||
<$link>
|
>
|
||||||
<$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" variable="ignore">
|
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
||||||
<$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
<$transclude tiddler=<<listItem>>/>
|
||||||
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
|
</$set>
|
||||||
{{||$:/core/ui/TiddlerIcon}}
|
</$list>
|
||||||
</span>
|
</span>
|
||||||
</$let>
|
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
|
||||||
</$list>
|
<$link>
|
||||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} />
|
<$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]"
|
||||||
</$link>
|
variable="ignore"
|
||||||
</$set>
|
>
|
||||||
</div>
|
<$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
||||||
|
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
|
||||||
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes">
|
{{||$:/core/ui/TiddlerIcon}}
|
||||||
|
</span>
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem"><$transclude tiddler=<<listItem>> mode="block"/></$list>
|
</$let>
|
||||||
|
</$list>
|
||||||
</$reveal>
|
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} />
|
||||||
|
</$link>
|
||||||
|
</$set>
|
||||||
|
</div>
|
||||||
|
<$reveal tag="div" type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem">
|
||||||
|
<$transclude tiddler=<<listItem>> mode="block"/>
|
||||||
|
</$list>
|
||||||
|
</$reveal>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,49 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}
|
|||||||
description: {{$:/language/Buttons/More/Hint}}
|
description: {{$:/language/Buttons/More/Hint}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define config-title()
|
\define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$
|
||||||
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
|
|
||||||
\end
|
<$button popup=<<qualify "$:/state/popup/more">>
|
||||||
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
|
tooltip={{$:/language/Buttons/More/Hint}}
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
aria-label={{$:/language/Buttons/More/Caption}}
|
||||||
{{$:/core/images/down-arrow}}
|
class=<<tv-config-toolbar-class>>
|
||||||
</$list>
|
selectedClass="tc-selected"
|
||||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
>
|
||||||
<span class="tc-btn-text">
|
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||||
<$text text={{$:/language/Buttons/More/Caption}}/>
|
{{$:/core/images/down-arrow}}
|
||||||
</span>
|
</$list>
|
||||||
</$list>
|
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||||
|
<span class="tc-btn-text">
|
||||||
|
<$text text={{$:/language/Buttons/More/Caption}}/>
|
||||||
|
</span>
|
||||||
|
</$list>
|
||||||
</$button>
|
</$button>
|
||||||
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="belowleft" animate="yes">
|
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="belowleft" animate="yes">
|
||||||
|
<div class="tc-drop-down">
|
||||||
<div class="tc-drop-down">
|
<$set name="tv-config-toolbar-icons" value="yes">
|
||||||
|
<$set name="tv-config-toolbar-text" value="yes">
|
||||||
<$set name="tv-config-toolbar-icons" value="yes">
|
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]"
|
||||||
<$set name="tv-config-toolbar-text" value="yes">
|
variable="listItem"
|
||||||
|
>
|
||||||
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
<$reveal type="match" state=<<config-title>> text="hide">
|
||||||
|
<$set name="tv-config-toolbar-class"
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem">
|
filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"
|
||||||
|
>
|
||||||
<$reveal type="match" state=<<config-title>> text="hide">
|
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||||
|
</$set>
|
||||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
</$reveal>
|
||||||
|
</$list>
|
||||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
</$set>
|
||||||
|
</$set>
|
||||||
</$set>
|
</$set>
|
||||||
|
</div>
|
||||||
</$reveal>
|
|
||||||
|
|
||||||
</$list>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</$set>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</$reveal>
|
</$reveal>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
title: $:/config/OfficialPluginLibrary
|
title: $:/config/OfficialPluginLibrary
|
||||||
tags: $:/tags/PluginLibrary
|
tags: $:/tags/PluginLibrary
|
||||||
url: https://tiddlywiki.com/library/v5.3.2/index.html
|
url: https://tiddlywiki.com/library/v5.3.3/index.html
|
||||||
caption: {{$:/language/OfficialPluginLibrary}}
|
caption: {{$:/language/OfficialPluginLibrary}}
|
||||||
|
|
||||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ new-tiddler: {{$:/language/Buttons/NewTiddler/Hint}}
|
|||||||
picture: {{$:/language/Buttons/Picture/Hint}}
|
picture: {{$:/language/Buttons/Picture/Hint}}
|
||||||
preview: {{$:/language/Buttons/Preview/Hint}}
|
preview: {{$:/language/Buttons/Preview/Hint}}
|
||||||
quote: {{$:/language/Buttons/Quote/Hint}}
|
quote: {{$:/language/Buttons/Quote/Hint}}
|
||||||
|
refresh: {{$:/language/Buttons/Refresh/Hint}}
|
||||||
save-tiddler: {{$:/language/Buttons/Save/Hint}}
|
save-tiddler: {{$:/language/Buttons/Save/Hint}}
|
||||||
save-wiki: {{$:/language/Buttons/SaveWiki/Hint}}
|
save-wiki: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||||
sidebar-search: {{$:/language/Buttons/SidebarSearch/Hint}}
|
sidebar-search: {{$:/language/Buttons/SidebarSearch/Hint}}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: $:/config/ViewTemplateBodyFilters/
|
title: $:/config/ViewTemplateBodyFilters/
|
||||||
tags: $:/tags/ViewTemplateBodyFilter
|
tags: $:/tags/ViewTemplateBodyFilter
|
||||||
|
|
||||||
|
testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]]
|
||||||
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
|
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
|
||||||
core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]][tag[$:/tags/EditorToolbar]] [tag[$:/tags/Actions]] :then[[$:/core/ui/ViewTemplate/body/code]]
|
core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]][tag[$:/tags/EditorToolbar]] [tag[$:/tags/Actions]] :then[[$:/core/ui/ViewTemplate/body/code]]
|
||||||
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[!is[image]limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[!is[image]limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ underline: meta-U
|
|||||||
new-image: ctrl-I
|
new-image: ctrl-I
|
||||||
new-journal: ctrl-J
|
new-journal: ctrl-J
|
||||||
new-tiddler: ctrl-N
|
new-tiddler: ctrl-N
|
||||||
|
refresh: meta-R
|
||||||
save-wiki: meta-S
|
save-wiki: meta-S
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ underline: ctrl-U
|
|||||||
new-image: alt-I
|
new-image: alt-I
|
||||||
new-journal: alt-J
|
new-journal: alt-J
|
||||||
new-tiddler: alt-N
|
new-tiddler: alt-N
|
||||||
|
refresh: ctrl-R
|
||||||
|
|||||||
@@ -1,76 +1,69 @@
|
|||||||
title: $:/core/macros/CSS
|
title: $:/core/macros/CSS
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro $:/tags/Global
|
||||||
|
|
||||||
\define colour(name)
|
\procedure colour(name)
|
||||||
<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"><$transclude tiddler="$:/config/DefaultColourMappings/$name$"/></$transclude></$transclude>
|
\whitespace trim
|
||||||
|
<$transclude $tiddler={{$:/palette}} $index=`$(name)$`>
|
||||||
|
<$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`>
|
||||||
|
<$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/>
|
||||||
|
</$transclude>
|
||||||
|
</$transclude>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define color(name)
|
\procedure color(name)
|
||||||
<<colour $name$>>
|
<$macrocall $name=colour name=`$(name)$`/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define box-shadow(shadow)
|
\function box-shadow(shadow)
|
||||||
``
|
[[ -webkit-box-shadow: $(shadow)$;
|
||||||
-webkit-box-shadow: $shadow$;
|
-moz-box-shadow: $(shadow)$;
|
||||||
-moz-box-shadow: $shadow$;
|
box-shadow: $(shadow)$;]substitute[]]
|
||||||
box-shadow: $shadow$;
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define filter(filter)
|
\function filter(filter)
|
||||||
``
|
[[ -webkit-filter: $(filter)$;
|
||||||
-webkit-filter: $filter$;
|
-moz-filter: $(filter)$;
|
||||||
-moz-filter: $filter$;
|
filter: $(filter)$;]substitute[]]
|
||||||
filter: $filter$;
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define transition(transition)
|
\function transition(transition)
|
||||||
``
|
[[ -webkit-transition: $(transition)$;
|
||||||
-webkit-transition: $transition$;
|
-moz-transition: $(transition)$;
|
||||||
-moz-transition: $transition$;
|
transition: $(transition)$;]substitute[]]
|
||||||
transition: $transition$;
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define transform-origin(origin)
|
\function transform-origin(origin)
|
||||||
``
|
[[ -webkit-transform-origin: $(origin)$;
|
||||||
-webkit-transform-origin: $origin$;
|
-moz-transform-origin: $(origin)$;
|
||||||
-moz-transform-origin: $origin$;
|
transform-origin: $(origin)$;]substitute[]]
|
||||||
transform-origin: $origin$;
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define background-linear-gradient(gradient)
|
\function background-linear-gradient(gradient)
|
||||||
``
|
[[ background-image: linear-gradient($(gradient)$);
|
||||||
background-image: linear-gradient($gradient$);
|
background-image: -o-linear-gradient($(gradient)$);
|
||||||
background-image: -o-linear-gradient($gradient$);
|
background-image: -moz-linear-gradient($(gradient)$);
|
||||||
background-image: -moz-linear-gradient($gradient$);
|
background-image: -webkit-linear-gradient($(gradient)$);
|
||||||
background-image: -webkit-linear-gradient($gradient$);
|
background-image: -ms-linear-gradient($(gradient)$);]substitute[]]
|
||||||
background-image: -ms-linear-gradient($gradient$);
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define column-count(columns)
|
\function column-count(columns)
|
||||||
``
|
[[-moz-column-count: $(columns)$;
|
||||||
-moz-column-count: $columns$;
|
-webkit-column-count: $(columns)$;
|
||||||
-webkit-column-count: $columns$;
|
column-count: $(columns)$;]substitute[]]
|
||||||
column-count: $columns$;
|
|
||||||
``
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define datauri(title)
|
\procedure datauri(title)
|
||||||
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/>
|
<$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define if-sidebar(text)
|
\procedure if-sidebar(text)
|
||||||
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal>
|
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define if-no-sidebar(text)
|
\procedure if-no-sidebar(text)
|
||||||
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal>
|
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define if-background-attachment(text)
|
\procedure if-background-attachment(text)
|
||||||
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$</$reveal>
|
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal>
|
||||||
\end
|
\end
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
title: $:/core/macros/copy-to-clipboard
|
title: $:/core/macros/copy-to-clipboard
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro $:/tags/Global
|
||||||
|
|
||||||
\define copy-to-clipboard(src,class:"tc-btn-invisible",style)
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$button class=<<__class__>> style=<<__style__>> message="tm-copy-to-clipboard" param=<<__src__>> tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}>
|
|
||||||
{{$:/core/images/copy-clipboard}}
|
\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style)
|
||||||
 
|
<$button message="tm-copy-to-clipboard"
|
||||||
<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/>
|
param=<<src>>
|
||||||
|
class=<<class>>
|
||||||
|
style=<<style>>
|
||||||
|
tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}
|
||||||
|
>
|
||||||
|
{{$:/core/images/copy-clipboard}}
|
||||||
|
<span class="tc-tiny-gap-left">
|
||||||
|
<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/>
|
||||||
|
</span>
|
||||||
</$button>
|
</$button>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style)
|
\procedure copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style)
|
||||||
\whitespace trim
|
|
||||||
<div style="position: relative;">
|
<div style="position: relative;">
|
||||||
<div style="position: absolute; bottom: 0; right: 0;">
|
<div style="position: absolute; bottom: 0; right: 0;">
|
||||||
<$macrocall $name="copy-to-clipboard" src=<<__src__>> class=<<__class__>> style=<<__style__>>/>
|
<$macrocall $name="copy-to-clipboard" src=<<src>> class=<<class>> style=<<style>>/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
title: $:/core/macros/diff
|
title: $:/core/macros/diff
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro $:/tags/Global
|
||||||
|
|
||||||
\define compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle)
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>>>
|
|
||||||
<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>>>
|
\procedure compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle)
|
||||||
<$diff-text source=<<source>> dest=<<dest>>/>
|
<$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>>>
|
||||||
</$set>
|
<$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>>>
|
||||||
|
<$diff-text source=<<source>> dest=<<dest>>/>
|
||||||
|
</$set>
|
||||||
</$set>
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude)
|
\procedure compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude)
|
||||||
\whitespace trim
|
|
||||||
<table class="tc-diff-tiddlers">
|
<table class="tc-diff-tiddlers">
|
||||||
<tbody>
|
<tbody>
|
||||||
<$set name="sourceFields" filter="[<__sourceTiddlerTitle__>fields[]sort[]]">
|
<$set name="sourceFields" filter="[<sourceTiddlerTitle>fields[]sort[]]">
|
||||||
<$set name="destFields" filter="[<__destSubTiddlerTitle__>subtiddlerfields<__destTiddlerTitle__>sort[]]">
|
<$set name="destFields" filter="[<destSubTiddlerTitle>subtiddlerfields<destTiddlerTitle>sort[]]">
|
||||||
<$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<__exclude__>] +[sort[]]" variable="fieldName">
|
<$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<exclude>] +[sort[]]" variable="fieldName">
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<$text text=<<fieldName>>/>
|
<$text text=<<fieldName>>/>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>> field=<<fieldName>>>
|
<$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>> field=<<fieldName>>>
|
||||||
<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>> field=<<fieldName>>>
|
<$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>> field=<<fieldName>>>
|
||||||
<$diff-text source=<<source>> dest=<<dest>>> </$diff-text>
|
<$diff-text source=<<source>> dest=<<dest>>> </$diff-text>
|
||||||
</$set>
|
</$set>
|
||||||
</$set>
|
</$set>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$set>
|
||||||
</$set>
|
</$set>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
\end
|
\end
|
||||||
|
|||||||
@@ -1,177 +1,182 @@
|
|||||||
title: $:/core/macros/tag-picker
|
title: $:/core/macros/tag-picker
|
||||||
tags: $:/tags/Macro
|
tags: tags: $:/tags/Macro $:/tags/Global
|
||||||
first-search-filter: [tags[]!is[system]search:title<userInput>sort[]]
|
first-search-filter: [subfilter<tagListFilter>!is[system]search:title<userInput>sort[]]
|
||||||
second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
|
second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput>sort[]]
|
||||||
|
|
||||||
\define get-tagpicker-focus-selector() [data-tiddler-title="$(currentTiddlerCSSEscaped)$"] .tc-add-tag-name input
|
<!-- first-search-filter and second-search-filter fields are not used here in the code, but they are defined as parameters for keyboard-driven-input macro -->
|
||||||
|
|
||||||
\define delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/>
|
|
||||||
|
|
||||||
\define add-tag-actions(actions,tagField:"tags")
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$set name="tag" value={{{ [<__tiddler__>get[text]] }}}>
|
|
||||||
<$list
|
<!-- tf.tagpicker-dropdown-id is needed if several tap-pickers are shown in one tiddler -->
|
||||||
filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]"
|
\function tf.tagpicker-dropdown-id()
|
||||||
variable="ignore"
|
[<qualify $:/state/popup/tags-auto-complete>]
|
||||||
emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>"
|
[[$(saveTiddler)$-[$(tagField)$-$(tagListFilter)$]substitute[]sha256[]] +[join[/]]
|
||||||
>
|
|
||||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
|
||||||
<$transclude $variable="__actions__"/>
|
|
||||||
</$list>
|
|
||||||
</$set>
|
|
||||||
<<delete-tag-state-tiddlers>>
|
|
||||||
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define clear-tags-actions-inner()
|
\function tf.tagpicker-dropdown-class() [<tf.tagpicker-dropdown-id>sha256[]addprefix[tc-]]
|
||||||
\whitespace trim
|
\function tf.get-tagpicker-focus-selector() [<tf.tagpicker-dropdown-class>addprefix[.]] .tc-popup-handle +[join[ ]]
|
||||||
<$list
|
|
||||||
filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]"
|
<!-- clean up temporary tiddlers, so the next "pick" starts with a clean input -->
|
||||||
variable="ignore"
|
<!-- This could probably be optimized / removed if we would use different temp-tiddlers
|
||||||
emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>"
|
(future improvement because keeping track is comlex for humans)
|
||||||
>
|
-->
|
||||||
|
\procedure delete-tag-state-tiddlers()
|
||||||
|
<$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
<!-- trigger __toggle tag__ by keyboard -->
|
||||||
|
\procedure add-tag-actions()
|
||||||
|
<$let tag=<<_tf.getTag>> >
|
||||||
|
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/>
|
||||||
|
<% if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %>
|
||||||
|
<!-- tag has been removed - do nothing -->
|
||||||
|
<% else %>
|
||||||
|
<<actions>>
|
||||||
|
<% endif %>
|
||||||
<<delete-tag-state-tiddlers>>
|
<<delete-tag-state-tiddlers>>
|
||||||
</$list>
|
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||||
|
</$let>
|
||||||
|
\end
|
||||||
|
<!-- <$action-log /> -->
|
||||||
|
|
||||||
|
<!-- ESC key removes the text from the input
|
||||||
|
The second ESC tries to close the "draft tiddler"
|
||||||
|
-->
|
||||||
|
\procedure clear-tags-actions-inner()
|
||||||
|
<% if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %>
|
||||||
|
<<delete-tag-state-tiddlers>>
|
||||||
|
<% else %>
|
||||||
|
<<cancel-delete-tiddler-actions "cancel">>
|
||||||
|
<% endif %>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define clear-tags-actions()
|
<!-- triggered by keyboard only -->
|
||||||
\whitespace trim
|
\procedure clear-tags-actions()
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
<$let userInput=<<_tf.getUserInput>> >
|
||||||
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>">
|
<!-- this list __cannot__ be transformed to conditional IF. The list variable is used! -->
|
||||||
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" >
|
||||||
|
<$list-empty>
|
||||||
|
<<clear-tags-actions-inner>>
|
||||||
|
</$list-empty>
|
||||||
|
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/>
|
||||||
|
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$let>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-picker-inner(actions,tagField:"tags")
|
<!-- similar to add-tag-actions __but__ add-only -->
|
||||||
\whitespace trim
|
\procedure add-button-actions()
|
||||||
<$vars
|
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="[<tag>trim[]]"/>
|
||||||
newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">>
|
<<actions>>
|
||||||
newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">>
|
<<delete-tag-state-tiddlers>>
|
||||||
fallbackTarget={{$(palette)$##tag-background}}
|
<$action-sendmessage $message="tm-focus-selector" $param=<<tf.get-tagpicker-focus-selector>>/>
|
||||||
colourA={{$(palette)$##foreground}}
|
\end
|
||||||
colourB={{$(palette)$##background}}
|
<!-- <$action-log /> -->
|
||||||
>
|
|
||||||
<$vars
|
<!-- create dropdown list -->
|
||||||
storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}}
|
\procedure tag-picker-listTags(filter, suffix)
|
||||||
tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}
|
<$let userInput=<<_tf.getUserInput>> >
|
||||||
|
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]"
|
||||||
|
emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem"
|
||||||
>
|
>
|
||||||
<$vars
|
<$list filter=<<filter>> variable="tag">
|
||||||
refreshTitle=<<qualify "$:/temp/NewTagName/refresh">>
|
<!-- The buttonClasses filter is used to define tc-tag-button-selected state -->
|
||||||
nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]"
|
<!-- tf.get-tagpicker-focus-selector has to be resolved for $:/core/ui/TagPickerTagTemplate,
|
||||||
systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]"
|
othwerwise qualify in tf.tagpicker-dropdown-id causes problems -->
|
||||||
|
<$let currentTiddler=<<tag>>
|
||||||
|
button-classes=`tc-btn-invisible ${[<tag>addsuffix<suffix>] -[<tagSelectionState>get[text]] :then[[]] ~tc-tag-button-selected }$`
|
||||||
|
get-tagpicker-focus-selector=`${[<tf.get-tagpicker-focus-selector>]}$`
|
||||||
|
>
|
||||||
|
{{||$:/core/ui/TagPickerTagTemplate}}
|
||||||
|
</$let>
|
||||||
|
</$list>
|
||||||
|
</$list>
|
||||||
|
</$let>
|
||||||
|
\end
|
||||||
|
|
||||||
|
<!-- tag-picker-inner is the main function -->
|
||||||
|
\procedure tag-picker-inner()
|
||||||
|
<div class={{{ [[tc-edit-add-tag]] [<tf.tagpicker-dropdown-class>] +[join[ ]] }}}>
|
||||||
|
<div class="tc-edit-add-tag-ui">
|
||||||
|
<span class="tc-add-tag-name tc-small-gap-right">
|
||||||
|
<$macrocall $name="keyboard-driven-input"
|
||||||
|
tiddler=<<newTagNameTiddler>>
|
||||||
|
storeTitle=<<storeTitle>>
|
||||||
|
refreshTitle=<<refreshTitle>>
|
||||||
|
selectionStateTitle=<<tagSelectionState>>
|
||||||
|
inputAcceptActions=<<add-tag-actions>>
|
||||||
|
inputCancelActions=<<clear-tags-actions>>
|
||||||
|
tag="input"
|
||||||
|
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
|
||||||
|
focusPopup=<<tf.tagpicker-dropdown-id>>
|
||||||
|
class="tc-edit-texteditor tc-popup-handle"
|
||||||
|
tabindex=<<tabIndex>>
|
||||||
|
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
|
||||||
|
filterMinLength={{$:/config/Tags/MinLength}}
|
||||||
|
cancelPopups=<<cancelPopups>>
|
||||||
|
configTiddlerFilter="[[$:/core/macros/tag-picker]]"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<$button popup=<<tf.tagpicker-dropdown-id>> class="tc-btn-invisible tc-btn-dropdown"
|
||||||
|
tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}
|
||||||
>
|
>
|
||||||
<div class="tc-edit-add-tag">
|
{{$:/core/images/down-arrow}}
|
||||||
<div>
|
</$button>
|
||||||
<span class="tc-add-tag-name tc-small-gap-right">
|
<% if [<storeTitle>has[text]] %>
|
||||||
<$macrocall
|
<$button actions=<<delete-tag-state-tiddlers>> class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
|
||||||
$name="keyboard-driven-input"
|
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
|
||||||
tiddler=<<newTagNameTiddler>>
|
>
|
||||||
storeTitle=<<storeTitle>>
|
{{$:/core/images/close-button}}
|
||||||
refreshTitle=<<refreshTitle>>
|
</$button>
|
||||||
selectionStateTitle=<<tagSelectionState>>
|
<% endif %>
|
||||||
inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>"
|
<span class="tc-add-tag-button tc-small-gap-left">
|
||||||
inputCancelActions=<<clear-tags-actions>>
|
<$let tag=<<_tf.getTag>>>
|
||||||
tag="input"
|
<$button set=<<newTagNameTiddler>> actions=<<add-button-actions>> >
|
||||||
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
|
{{$:/language/EditTemplate/Tags/Add/Button}}
|
||||||
focusPopup=<<qualify "$:/state/popup/tags-auto-complete">>
|
</$button>
|
||||||
class="tc-edit-texteditor tc-popup-handle"
|
</$let>
|
||||||
tabindex=<<tabIndex>>
|
</span>
|
||||||
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
|
</div>
|
||||||
filterMinLength={{$:/config/Tags/MinLength}}
|
<div class="tc-block-dropdown-wrapper">
|
||||||
cancelPopups=<<cancelPopups>>
|
<% if [<tf.tagpicker-dropdown-id>has[text]] %>
|
||||||
configTiddlerFilter="[[$:/core/macros/tag-picker]]"
|
<div class="tc-block-dropdown tc-block-tags-dropdown">
|
||||||
/>
|
<$macrocall $name="tag-picker-listTags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" />
|
||||||
</span>
|
<hr>
|
||||||
<$button popup=<<qualify "$:/state/popup/tags-auto-complete">>
|
<$macrocall $name="tag-picker-listTags" filter=<<systemTagsFilter>> suffix="-secondaryList" />
|
||||||
class="tc-btn-invisible tc-btn-dropdown"
|
|
||||||
tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}}
|
|
||||||
aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}
|
|
||||||
>
|
|
||||||
{{$:/core/images/down-arrow}}
|
|
||||||
</$button>
|
|
||||||
<$reveal state=<<storeTitle>> type="nomatch" text="">
|
|
||||||
<$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
|
|
||||||
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}}
|
|
||||||
aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
|
|
||||||
>
|
|
||||||
{{$:/core/images/close-button}}<<delete-tag-state-tiddlers>>
|
|
||||||
</$button>
|
|
||||||
</$reveal>
|
|
||||||
<span class="tc-add-tag-button tc-small-gap-left">
|
|
||||||
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
|
|
||||||
<$button set=<<newTagNameTiddler>> setTo="" class="">
|
|
||||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
|
||||||
<$transclude $variable="__actions__"/>
|
|
||||||
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
|
|
||||||
<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
|
|
||||||
</$set>
|
|
||||||
{{$:/language/EditTemplate/Tags/Add/Button}}
|
|
||||||
</$button>
|
|
||||||
</$set>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="tc-block-dropdown-wrapper">
|
|
||||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
|
||||||
<div class="tc-block-dropdown tc-block-tags-dropdown">
|
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
|
||||||
<$list
|
|
||||||
filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]"
|
|
||||||
emptyMessage="<div class='tc-search-results'
|
|
||||||
>
|
|
||||||
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
|
||||||
<$list filter=<<nonSystemTagsFilter>> variable="tag">
|
|
||||||
<$list
|
|
||||||
filter="[<tag>addsuffix[-primaryList]] -[<tagSelectionState>get[text]]"
|
|
||||||
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
|
|
||||||
>
|
|
||||||
<$vars button-classes="tc-btn-invisible"
|
|
||||||
actions=<<__actions__>>
|
|
||||||
tagField=<<__tagField__>>
|
|
||||||
currentTiddler=<<tag>>
|
|
||||||
>
|
|
||||||
{{||$:/core/ui/TagPickerTagTemplate}}
|
|
||||||
</$vars>
|
|
||||||
</$list>
|
|
||||||
</$list>
|
|
||||||
</$list>
|
|
||||||
<hr>
|
|
||||||
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>
|
|
||||||
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
|
||||||
<$list filter=<<systemTagsFilter>> variable="tag">
|
|
||||||
<$list filter="[<tag>addsuffix[-secondaryList]] -[<tagSelectionState>get[text]]"
|
|
||||||
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
|
|
||||||
>
|
|
||||||
<$vars button-classes="tc-btn-invisible"
|
|
||||||
actions=<<__actions__>>
|
|
||||||
tagField=<<__tagField__>>
|
|
||||||
currentTiddler=<<tag>>
|
|
||||||
>
|
|
||||||
{{||$:/core/ui/TagPickerTagTemplate}}
|
|
||||||
</$vars>
|
|
||||||
</$list>
|
|
||||||
</$list>
|
|
||||||
</$list>
|
|
||||||
</$set>
|
|
||||||
</div>
|
|
||||||
</$reveal>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</$vars>
|
<% endif %>
|
||||||
</$vars>
|
</div>
|
||||||
</$vars>
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-picker(actions,tagField:"tags")
|
<!-- prepare all variables for tag-picker keyboard handling -->
|
||||||
\whitespace trim
|
\procedure tag-picker(actions, tagField:"tags", tiddler, tagListFilter:"[tags[]]")
|
||||||
<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}>
|
|
||||||
<$list
|
\function _tf.getUserInput() [<storeTitle>get[text]]
|
||||||
filter="[<newTagNameTiddler>match[]]"
|
\function _tf.getTag() [<newTagNameTiddler>get[text]]
|
||||||
emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>"
|
|
||||||
>
|
<!-- keep those variables because they may "blead" into macros using old syntax -->
|
||||||
<$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>>
|
<$let
|
||||||
<$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/>
|
palette={{$:/palette}}
|
||||||
</$set>
|
colourA={{{ [<palette>getindex[foreground]] }}}
|
||||||
</$list>
|
colourB={{{ [<palette>getindex[background]] }}}
|
||||||
</$vars>
|
fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
|
||||||
\end
|
|
||||||
|
saveTiddler={{{ [<tiddler>is[blank]then<currentTiddler>else<tiddler>] }}}
|
||||||
|
|
||||||
|
newTagNameTiddler={{{ [[$:/temp/NewTagName]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}}
|
||||||
|
storeTitle={{{ [[$:/temp/NewTagName/input]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}}
|
||||||
|
|
||||||
|
newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">>
|
||||||
|
tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}
|
||||||
|
|
||||||
|
refreshTitle=<<qualify "$:/temp/NewTagName/refresh">>
|
||||||
|
|
||||||
|
nonSystemTagsFilter="[subfilter<tagListFilter>!is[system]search:title<userInput>sort[]]"
|
||||||
|
systemTagsFilter="[subfilter<tagListFilter>is[system]search:title<userInput>sort[]]"
|
||||||
|
|
||||||
|
cancelPopups="yes"
|
||||||
|
>
|
||||||
|
<$macrocall $name="tag-picker-inner"/>
|
||||||
|
</$let>
|
||||||
|
\end
|
||||||
@@ -21,7 +21,9 @@ color:$(foregroundColor)$;
|
|||||||
>
|
>
|
||||||
<<__actions__>>
|
<<__actions__>>
|
||||||
<$transclude tiddler=<<__icon__>>/>
|
<$transclude tiddler=<<__icon__>>/>
|
||||||
<$view tiddler=<<__tag__>> field="title" format="text" />
|
<span class={{{ [<__tag__>is[missing]then[tc-tag-missing]else[tc-tag-exists]] }}}>
|
||||||
|
<$view tiddler=<<__tag__>> field="title" format="text" />
|
||||||
|
</span>
|
||||||
</$element-tag$>
|
</$element-tag$>
|
||||||
</$let>
|
</$let>
|
||||||
\end
|
\end
|
||||||
|
|||||||
10
core/wiki/macros/testcase.tid
Normal file
10
core/wiki/macros/testcase.tid
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
title: $:/core/macros/testcase
|
||||||
|
tags: $:/tags/Macro $:/tags/Global
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
|
\procedure testcase(tiddler)
|
||||||
|
<$tiddler tiddler=<<tiddler>>>
|
||||||
|
<$transclude $tiddler="$:/core/ui/TestCaseTemplate">
|
||||||
|
</$tiddler>
|
||||||
|
\end
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
title: $:/tags/ViewTemplateBodyFilter
|
title: $:/tags/ViewTemplateBodyFilter
|
||||||
list: $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/default
|
list: $:/config/ViewTemplateBodyFilters/testcase $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/default
|
||||||
@@ -16,6 +16,7 @@ Welcome to the developer documentation for TiddlyWiki (https://tiddlywiki.com/).
|
|||||||
** [[Adding Babel Polyfill to TiddlyWiki]]
|
** [[Adding Babel Polyfill to TiddlyWiki]]
|
||||||
** [[TiddlyWiki Drag and Drop Interoperability]]
|
** [[TiddlyWiki Drag and Drop Interoperability]]
|
||||||
** [[Javascript Widget Tutorial]]
|
** [[Javascript Widget Tutorial]]
|
||||||
|
** [[Using TiddlyWiki as a library in another Node.js application]]
|
||||||
* The original developer documentation from https://tiddlywiki.com:
|
* The original developer documentation from https://tiddlywiki.com:
|
||||||
** [[TiddlyWiki for Developers]]
|
** [[TiddlyWiki for Developers]]
|
||||||
** [[TiddlyWiki Coding Style Guidelines]]
|
** [[TiddlyWiki Coding Style Guidelines]]
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user