mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-15 06:29:48 +00:00
Compare commits
33 Commits
v5.1.22
...
single-tid
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d9b00bdb5 | ||
|
|
b88bfda0b4 | ||
|
|
834610cdb9 | ||
|
|
5272b13af1 | ||
|
|
5f25b21c0d | ||
|
|
f256b7791d | ||
|
|
66fc63ed7f | ||
|
|
f703330962 | ||
|
|
0ea4bfe99f | ||
|
|
7f99b8c32e | ||
|
|
95111db7ee | ||
|
|
5e148c1d26 | ||
|
|
1ff40c6b22 | ||
|
|
a0084eee9a | ||
|
|
55740fbfaf | ||
|
|
226a635c5c | ||
|
|
a5dca25078 | ||
|
|
a15a711d4a | ||
|
|
9bc8cbfe98 | ||
|
|
f8b81616fb | ||
|
|
b7611e23b4 | ||
|
|
eacbb928e9 | ||
|
|
04d6677949 | ||
|
|
ee25af758e | ||
|
|
33aa37f7dc | ||
|
|
0d40b691e7 | ||
|
|
81fda40486 | ||
|
|
7a50edb56d | ||
|
|
f76e3f5d41 | ||
|
|
9f2ce65a71 | ||
|
|
9a77ec4591 | ||
|
|
8625d6cd01 | ||
|
|
aba835fb74 |
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve TiddlyWiki 5
|
||||
title: "[BUG]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for TiddlyWiki 5
|
||||
title: "[IDEA]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: Pull Request
|
||||
about: Propose a change to TiddlyWiki 5
|
||||
title: ""
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your PR related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you are proposing**
|
||||
A clear and concise description of the changes you are proposing. Include images to show visual changes.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
If you link to discussions elsewhere then please copy and paste the important text, and don't expect readers to scan the entire discussion to find the relevant part.
|
||||
@@ -1,6 +1,6 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "12"
|
||||
- "12.4.0"
|
||||
|
||||
stages:
|
||||
- name: test
|
||||
|
||||
47
boot/boot.js
47
boot/boot.js
@@ -409,10 +409,10 @@ $tw.utils.resolvePath = function(sourcepath,rootpath) {
|
||||
};
|
||||
|
||||
/*
|
||||
Parse a semantic version string into its constituent parts -- see https://semver.org
|
||||
Parse a semantic version string into its constituent parts
|
||||
*/
|
||||
$tw.utils.parseVersion = function(version) {
|
||||
var match = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(version);
|
||||
var match = /^((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(version);
|
||||
if(match) {
|
||||
return {
|
||||
version: match[1],
|
||||
@@ -427,37 +427,25 @@ $tw.utils.parseVersion = function(version) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Returns +1 if the version string A is greater than the version string B, 0 if they are the same, and +1 if B is greater than A.
|
||||
Missing or malformed version strings are parsed as 0.0.0
|
||||
*/
|
||||
$tw.utils.compareVersions = function(versionStringA,versionStringB) {
|
||||
var defaultVersion = {
|
||||
major: 0,
|
||||
minor: 0,
|
||||
patch: 0
|
||||
},
|
||||
versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion,
|
||||
versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion,
|
||||
diff = [
|
||||
versionA.major - versionB.major,
|
||||
versionA.minor - versionB.minor,
|
||||
versionA.patch - versionB.patch
|
||||
];
|
||||
if((diff[0] > 0) || (diff[0] === 0 && diff[1] > 0) || (diff[0] === 0 & diff[1] === 0 & diff[2] > 0)) {
|
||||
return +1;
|
||||
} else if((diff[0] < 0) || (diff[0] === 0 && diff[1] < 0) || (diff[0] === 0 & diff[1] === 0 & diff[2] < 0)) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Returns true if the version string A is greater than the version string B. Returns true if the versions are the same
|
||||
*/
|
||||
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
|
||||
return $tw.utils.compareVersions(versionStringA,versionStringB) !== -1;
|
||||
var defaultVersion = {
|
||||
major: 0,
|
||||
minor: 0,
|
||||
patch: 0
|
||||
},
|
||||
versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion,
|
||||
versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion,
|
||||
diff = [
|
||||
versionA.major - versionB.major,
|
||||
versionA.minor - versionB.minor,
|
||||
versionA.patch - versionB.patch
|
||||
];
|
||||
return (diff[0] > 0) ||
|
||||
(diff[0] === 0 && diff[1] > 0) ||
|
||||
(diff[0] === 0 && diff[1] === 0 && diff[2] >= 0);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2268,7 +2256,6 @@ $tw.boot.startup = function(options) {
|
||||
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
|
||||
$tw.utils.registerFileType("application/font-woff","base64",".woff");
|
||||
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
|
||||
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
|
||||
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
|
||||
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);
|
||||
$tw.utils.registerFileType("video/webm","base64",".webm");
|
||||
|
||||
4
core/images/storyview-solo.tid
Normal file
4
core/images/storyview-solo.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/images/storyview-solo
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg width="22pt" height="22pt" class="tc-image-storyview-single tc-image-button" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M8.007 0A8.01 8.01 0 000 8.007v111.986A8.01 8.01 0 008.007 128h111.986a8.01 8.01 0 008.007-8.007V8.007A8.01 8.01 0 00119.993 0H8.007zm15.992 16A8 8 0 0016 24.009V71.99C16 76.414 19.588 80 24 80h80a8 8 0 008-8.009V24.01c0-4.423-3.588-8.009-8-8.009H24z"/></svg>
|
||||
@@ -70,7 +70,6 @@ Plugins/Caption: Plugins
|
||||
Plugins/Disable/Caption: disable
|
||||
Plugins/Disable/Hint: Disable this plugin when reloading page
|
||||
Plugins/Disabled/Status: (disabled)
|
||||
Plugins/Downgrade/Caption: downgrade
|
||||
Plugins/Empty/Hint: None
|
||||
Plugins/Enable/Caption: enable
|
||||
Plugins/Enable/Hint: Enable this plugin when reloading page
|
||||
@@ -88,11 +87,6 @@ Plugins/Plugins/Hint: Plugins
|
||||
Plugins/Reinstall/Caption: reinstall
|
||||
Plugins/Themes/Caption: Themes
|
||||
Plugins/Themes/Hint: Theme plugins
|
||||
Plugins/Update/Caption: update
|
||||
Plugins/Updates/Caption: Updates
|
||||
Plugins/Updates/Hint: Available updates to installed plugins
|
||||
Plugins/Updates/UpdateAll/Caption: Update <<update-count>> plugins
|
||||
Plugins/SubPluginPrompt: With <<count>> sub-plugins available
|
||||
Saving/Caption: Saving
|
||||
Saving/DownloadSaver/AutoSave/Description: Permit automatic saving for the download saver
|
||||
Saving/DownloadSaver/AutoSave/Hint: Enable Autosave for Download Saver
|
||||
|
||||
@@ -4,6 +4,7 @@ All/Caption: All
|
||||
Contents/Caption: Contents
|
||||
Drafts/Caption: Drafts
|
||||
Explorer/Caption: Explorer
|
||||
History/Caption: History
|
||||
Missing/Caption: Missing
|
||||
More/Caption: More
|
||||
Open/Caption: Open
|
||||
|
||||
@@ -51,9 +51,9 @@ Command.prototype.execute = function() {
|
||||
}
|
||||
}
|
||||
};
|
||||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar),collectPublisherPlugins);
|
||||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar),collectPublisherPlugins);
|
||||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar),collectPlugins);
|
||||
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));
|
||||
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));
|
||||
collectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));
|
||||
// Save the upgrade library tiddler
|
||||
var pluginFields = {
|
||||
title: upgradeLibraryTitle,
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/compare.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
General purpose comparison operator
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.compare = function(source,operator,options) {
|
||||
var suffixes = operator.suffixes || [],
|
||||
type = (suffixes[0] || [])[0],
|
||||
mode = (suffixes[1] || [])[0],
|
||||
typeFn = types[type] || types.number,
|
||||
modeFn = modes[mode] || modes.eq,
|
||||
invert = operator.prefix === "!",
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(modeFn(typeFn(title,operator.operand)) !== invert) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
var types = {
|
||||
"number": function(a,b) {
|
||||
return compare($tw.utils.parseNumber(a),$tw.utils.parseNumber(b));
|
||||
},
|
||||
"integer": function(a,b) {
|
||||
return compare($tw.utils.parseInt(a),$tw.utils.parseInt(b));
|
||||
},
|
||||
"string": function(a,b) {
|
||||
return compare("" + a,"" +b);
|
||||
},
|
||||
"date": function(a,b) {
|
||||
var dateA = $tw.utils.parseDate(a),
|
||||
dateB = $tw.utils.parseDate(b);
|
||||
if(!isFinite(dateA)) {
|
||||
dateA = new Date(0);
|
||||
}
|
||||
if(!isFinite(dateB)) {
|
||||
dateB = new Date(0);
|
||||
}
|
||||
return compare(dateA,dateB);
|
||||
},
|
||||
"version": function(a,b) {
|
||||
return $tw.utils.compareVersions(a,b);
|
||||
}
|
||||
};
|
||||
|
||||
function compare(a,b) {
|
||||
if(a > b) {
|
||||
return +1;
|
||||
} else if(a < b) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
var modes = {
|
||||
"eq": function(value) {return value === 0;},
|
||||
"ne": function(value) {return value !== 0;},
|
||||
"gteq": function(value) {return value >= 0;},
|
||||
"gt": function(value) {return value > 0;},
|
||||
"lteq": function(value) {return value <= 0;},
|
||||
"lt": function(value) {return value < 0;}
|
||||
}
|
||||
|
||||
})();
|
||||
@@ -16,28 +16,13 @@ Filter operator for returning the names of the fields on the selected tiddlers
|
||||
Export our filter function
|
||||
*/
|
||||
exports.fields = function(source,operator,options) {
|
||||
var results = [],
|
||||
fieldName,
|
||||
suffixes = (operator.suffixes || [])[0] || [],
|
||||
operand = $tw.utils.parseStringArray(operator.operand);
|
||||
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
if(suffixes.indexOf("include") !== -1) {
|
||||
for(fieldName in tiddler.fields) {
|
||||
(operand.indexOf(fieldName) !== -1) ? $tw.utils.pushTop(results,fieldName) : "";
|
||||
}
|
||||
} else if (suffixes.indexOf("exclude") !== -1) {
|
||||
for(fieldName in tiddler.fields) {
|
||||
(operand.indexOf(fieldName) !== -1) ? "" : $tw.utils.pushTop(results,fieldName);
|
||||
}
|
||||
} // else if
|
||||
else {
|
||||
for(fieldName in tiddler.fields) {
|
||||
$tw.utils.pushTop(results,fieldName);
|
||||
}
|
||||
} // else
|
||||
} // if (tiddler)
|
||||
for(var fieldName in tiddler.fields) {
|
||||
$tw.utils.pushTop(results,fieldName);
|
||||
}
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
38
core/modules/filters/getstoryviewmode.js
Normal file
38
core/modules/filters/getstoryviewmode.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/getstoryviewmode.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for retrieving modes from a storyview. Only "singletiddlermode" is implemented at present
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter functions
|
||||
*/
|
||||
|
||||
exports.getstoryviewmode = function(source,operator,options) {
|
||||
// Initialise the storyviews if they've not been done already
|
||||
var storyviews = {};
|
||||
$tw.modules.applyMethods("storyview",storyviews);
|
||||
if(operator.operand !== "singletiddlermode") {
|
||||
return [];
|
||||
}
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var storyview = storyviews[title];
|
||||
if(storyview && storyview.singleTiddlerMode) {
|
||||
results.push("yes");
|
||||
} else {
|
||||
results.push("no");
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -3,7 +3,7 @@ title: $:/core/modules/filters/has.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for checking if a tiddler has the specified field or index
|
||||
Filter operator for checking if a tiddler has the specified field
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -33,23 +33,7 @@ exports.has = function(source,operator,options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(operator.suffix === "index") {
|
||||
if(invert) {
|
||||
source(function(tiddler,title) {
|
||||
if(!tiddler || (tiddler && (!$tw.utils.hop($tw.wiki.getTiddlerDataCached(tiddler,Object.create(null)),operator.operand)))) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && $tw.utils.hop($tw.wiki.getTiddlerDataCached(tiddler,Object.create(null)),operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if(invert) {
|
||||
source(function(tiddler,title) {
|
||||
if(!tiddler || !$tw.utils.hop(tiddler.fields,operator.operand) || (tiddler.fields[operator.operand] === "")) {
|
||||
|
||||
@@ -114,9 +114,9 @@ exports.minall = makeNumericReducingOperator(
|
||||
function makeNumericBinaryOperator(fnCalc) {
|
||||
return function(source,operator,options) {
|
||||
var result = [],
|
||||
numOperand = $tw.utils.parseNumber(operator.operand);
|
||||
numOperand = parseNumber(operator.operand);
|
||||
source(function(tiddler,title) {
|
||||
result.push($tw.utils.stringifyNumber(fnCalc($tw.utils.parseNumber(title),numOperand)));
|
||||
result.push(stringifyNumber(fnCalc(parseNumber(title),numOperand)));
|
||||
});
|
||||
return result;
|
||||
};
|
||||
@@ -129,10 +129,18 @@ function makeNumericReducingOperator(fnCalc,initialValue) {
|
||||
source(function(tiddler,title) {
|
||||
result.push(title);
|
||||
});
|
||||
return [$tw.utils.stringifyNumber(result.reduce(function(accumulator,currentValue) {
|
||||
return fnCalc(accumulator,$tw.utils.parseNumber(currentValue));
|
||||
return [stringifyNumber(result.reduce(function(accumulator,currentValue) {
|
||||
return fnCalc(accumulator,parseNumber(currentValue));
|
||||
},initialValue))];
|
||||
};
|
||||
}
|
||||
|
||||
function parseNumber(str) {
|
||||
return parseFloat(str) || 0;
|
||||
}
|
||||
|
||||
function stringifyNumber(num) {
|
||||
return num + "";
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
@@ -70,7 +70,7 @@ function makeStringReducingOperator(fnCalc,initialValue) {
|
||||
});
|
||||
return [result.reduce(function(accumulator,currentValue) {
|
||||
return fnCalc(accumulator,currentValue,operator.operand || "");
|
||||
},initialValue) || ""];
|
||||
},initialValue)];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ exports.params = [
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function(filter,spaces) {
|
||||
return this.wiki.getTiddlersAsJson(filter,$tw.utils.parseInt(spaces));
|
||||
return this.wiki.getTiddlersAsJson(filter,spaces);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -60,7 +60,7 @@ var listTypes = {
|
||||
"#": {listTag: "ol", itemTag: "li"},
|
||||
";": {listTag: "dl", itemTag: "dt"},
|
||||
":": {listTag: "dl", itemTag: "dd"},
|
||||
">": {listTag: "blockquote", itemTag: "div"}
|
||||
">": {listTag: "blockquote", itemTag: "p"}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -37,44 +37,48 @@ Story.prototype.getStoryList = function() {
|
||||
Story.prototype.addToStory = function(navigateTo,navigateFromTitle,options) {
|
||||
options = options || {};
|
||||
var storyList = this.getStoryList();
|
||||
// See if the tiddler is already there
|
||||
var slot = storyList.indexOf(navigateTo);
|
||||
// Quit if it already exists in the story river
|
||||
if(slot >= 0) {
|
||||
return;
|
||||
}
|
||||
// First we try to find the position of the story element we navigated from
|
||||
var fromIndex = storyList.indexOf(navigateFromTitle);
|
||||
if(fromIndex >= 0) {
|
||||
// The tiddler is added from inside the river
|
||||
// Determine where to insert the tiddler; Fallback is "below"
|
||||
switch(options.openLinkFromInsideRiver) {
|
||||
case "top":
|
||||
slot = 0;
|
||||
break;
|
||||
case "bottom":
|
||||
slot = storyList.length;
|
||||
break;
|
||||
case "above":
|
||||
slot = fromIndex;
|
||||
break;
|
||||
case "below": // Intentional fall-through
|
||||
default:
|
||||
slot = fromIndex + 1;
|
||||
break;
|
||||
}
|
||||
if(options.singleTiddlerMode) {
|
||||
storyList = [navigateTo];
|
||||
} else {
|
||||
// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is "top"
|
||||
if(options.openLinkFromOutsideRiver === "bottom") {
|
||||
// Insert at bottom
|
||||
slot = storyList.length;
|
||||
} else {
|
||||
// Insert at top
|
||||
slot = 0;
|
||||
// See if the tiddler is already there
|
||||
var slot = storyList.indexOf(navigateTo);
|
||||
// Quit if it already exists in the story river
|
||||
if(slot >= 0) {
|
||||
return;
|
||||
}
|
||||
// First we try to find the position of the story element we navigated from
|
||||
var fromIndex = storyList.indexOf(navigateFromTitle);
|
||||
if(fromIndex >= 0) {
|
||||
// The tiddler is added from inside the river
|
||||
// Determine where to insert the tiddler; Fallback is "below"
|
||||
switch(options.openLinkFromInsideRiver) {
|
||||
case "top":
|
||||
slot = 0;
|
||||
break;
|
||||
case "bottom":
|
||||
slot = storyList.length;
|
||||
break;
|
||||
case "above":
|
||||
slot = fromIndex;
|
||||
break;
|
||||
case "below": // Intentional fall-through
|
||||
default:
|
||||
slot = fromIndex + 1;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is "top"
|
||||
if(options.openLinkFromOutsideRiver === "bottom") {
|
||||
// Insert at bottom
|
||||
slot = storyList.length;
|
||||
} else {
|
||||
// Insert at top
|
||||
slot = 0;
|
||||
}
|
||||
}
|
||||
// Add the tiddler
|
||||
storyList.splice(slot,0,navigateTo);
|
||||
}
|
||||
// Add the tiddler
|
||||
storyList.splice(slot,0,navigateTo);
|
||||
// Save the story
|
||||
this.saveStoryList(storyList);
|
||||
};
|
||||
@@ -93,11 +97,20 @@ Story.prototype.saveStoryList = function(storyList) {
|
||||
Story.prototype.addToHistory = function(navigateTo,navigateFromClientRect) {
|
||||
var titles = $tw.utils.isArray(navigateTo) ? navigateTo : [navigateTo];
|
||||
// Add a new record to the top of the history stack
|
||||
var historyList = this.wiki.getTiddlerData(this.historyTitle,[]);
|
||||
var historyList = this.wiki.getTiddlerData(this.historyTitle,[]),
|
||||
historyTitles = this.wiki.getTiddlerList(this.historyTitle);
|
||||
$tw.utils.each(titles,function(title) {
|
||||
historyList.push({title: title, fromPageRect: navigateFromClientRect});
|
||||
var p;
|
||||
do {
|
||||
p = historyTitles.indexOf(title);
|
||||
if(p !== -1) {
|
||||
historyTitles.splice(p,1);
|
||||
}
|
||||
} while(p !== -1);
|
||||
historyTitles.unshift(title);
|
||||
});
|
||||
this.wiki.setTiddlerData(this.historyTitle,historyList,{"current-tiddler": titles[titles.length-1]});
|
||||
this.wiki.setTiddlerData(this.historyTitle,historyList,{"current-tiddler": titles[titles.length-1], list: historyTitles});
|
||||
};
|
||||
|
||||
Story.prototype.storyCloseTiddler = function(targetTitle) {
|
||||
|
||||
23
core/modules/storyviews/solo.js
Normal file
23
core/modules/storyviews/solo.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/*\
|
||||
title: $:/core/modules/storyviews/solo.js
|
||||
type: application/javascript
|
||||
module-type: storyview
|
||||
|
||||
Flip between individual tiddlers
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var SoloListView = function(listWidget) {
|
||||
};
|
||||
|
||||
// Engage single tiddler mode
|
||||
SoloListView.singleTiddlerMode = true;
|
||||
|
||||
exports.solo = SoloListView;
|
||||
|
||||
})();
|
||||
@@ -39,6 +39,9 @@ var ZoominListView = function(listWidget) {
|
||||
});
|
||||
};
|
||||
|
||||
// Engage single tiddler mode
|
||||
ZoominListView.singleTiddlerMode = true;
|
||||
|
||||
ZoominListView.prototype.navigateTo = function(historyInfo) {
|
||||
var duration = $tw.utils.getAnimationDuration(),
|
||||
listElementIndex = this.listWidget.findListItem(0,historyInfo.title);
|
||||
|
||||
@@ -801,16 +801,4 @@ exports.getSystemInfo = function(str,ending,position) {
|
||||
return results.join("\n");
|
||||
};
|
||||
|
||||
exports.parseNumber = function(str) {
|
||||
return parseFloat(str) || 0;
|
||||
};
|
||||
|
||||
exports.parseInt = function(str) {
|
||||
return parseInt(str,10) || 0;
|
||||
};
|
||||
|
||||
exports.stringifyNumber = function(num) {
|
||||
return num + "";
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -9,7 +9,7 @@ Action widget to create a new tiddler with a unique name and specified fields.
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw:false, require:false, exports:false */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
@@ -36,15 +36,9 @@ Compute the internal state of the widget
|
||||
*/
|
||||
CreateTiddlerWidget.prototype.execute = function() {
|
||||
this.actionBaseTitle = this.getAttribute("$basetitle");
|
||||
this.hasBase = !!this.actionBaseTitle;
|
||||
this.actionSaveTitle = this.getAttribute("$savetitle");
|
||||
this.actionSaveDraftTitle = this.getAttribute("$savedrafttitle");
|
||||
this.actionTimestamp = this.getAttribute("$timestamp","yes") === "yes";
|
||||
//Following params are new since 5.1.22
|
||||
this.actionTemplate = this.getAttribute("$template");
|
||||
this.useTemplate = !!this.actionTemplate;
|
||||
this.actionOverwrite = this.getAttribute("$overwrite","no");
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -63,7 +57,7 @@ CreateTiddlerWidget.prototype.refresh = function(changedTiddlers) {
|
||||
Invoke the action associated with this widget
|
||||
*/
|
||||
CreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
var title = this.wiki.getTiddlerText("$:/language/DefaultNewTiddlerTitle"), // Get the initial new-tiddler title
|
||||
var title = this.wiki.generateNewTitle(this.actionBaseTitle),
|
||||
fields = {},
|
||||
creationFields,
|
||||
modificationFields;
|
||||
@@ -76,22 +70,7 @@ CreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
creationFields = this.wiki.getCreationFields();
|
||||
modificationFields = this.wiki.getModificationFields();
|
||||
}
|
||||
if(this.hasBase && this.actionOverwrite === "no") {
|
||||
title = this.wiki.generateNewTitle(this.actionBaseTitle);
|
||||
} else if (this.hasBase && this.actionOverwrite === "yes") {
|
||||
title = this.actionBaseTitle
|
||||
}
|
||||
// NO $basetitle BUT $template parameter is available
|
||||
// the title MUST be unique, otherwise the template would be overwritten
|
||||
if (!this.hasBase && this.useTemplate) {
|
||||
title = this.wiki.generateNewTitle(this.actionTemplate);
|
||||
} else if (!this.hasBase && !this.useTemplate) {
|
||||
// If NO $basetitle AND NO $template use initial title
|
||||
// DON'T overwrite any stuff
|
||||
title = this.wiki.generateNewTitle(title);
|
||||
}
|
||||
var templateTiddler = this.wiki.getTiddler(this.actionTemplate) || {};
|
||||
var tiddler = this.wiki.addTiddler(new $tw.Tiddler(templateTiddler.fields,creationFields,fields,modificationFields,{title: title}));
|
||||
var tiddler = this.wiki.addTiddler(new $tw.Tiddler(creationFields,fields,modificationFields,{title: title}));
|
||||
if(this.actionSaveTitle) {
|
||||
this.wiki.setTextReference(this.actionSaveTitle,title,this.getVariable("currentTiddler"));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ CountWidget.prototype.execute = function() {
|
||||
if(this.filter) {
|
||||
this.currentCount = this.wiki.filterTiddlers(this.filter,this).length;
|
||||
} else {
|
||||
this.currentCount = "0";
|
||||
this.currentCount = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ DropZoneWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
// Create element
|
||||
var domNode = this.document.createElement("div");
|
||||
domNode.className = this.dropzoneClass || "tc-dropzone";
|
||||
domNode.className = "tc-dropzone";
|
||||
// Add event handlers
|
||||
if(this.dropzoneEnable) {
|
||||
$tw.utils.addEventListeners(domNode,[
|
||||
@@ -190,7 +190,6 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
DropZoneWidget.prototype.execute = function() {
|
||||
this.dropzoneClass = this.getAttribute("class");
|
||||
this.dropzoneDeserializer = this.getAttribute("deserializer");
|
||||
this.dropzoneEnable = (this.getAttribute("enable") || "yes") === "yes";
|
||||
// Make child widgets
|
||||
|
||||
@@ -42,53 +42,44 @@ FieldsWidget.prototype.execute = function() {
|
||||
// Get parameters from our attributes
|
||||
this.tiddlerTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.template = this.getAttribute("template");
|
||||
this.sort = this.getAttribute("sort","yes") === "yes";
|
||||
this.sortReverse = this.getAttribute("sortReverse","no") === "yes";
|
||||
this.exclude = this.getAttribute("exclude");
|
||||
this.include = this.getAttribute("include",null);
|
||||
this.stripTitlePrefix = this.getAttribute("stripTitlePrefix","no") === "yes";
|
||||
// Get the value to display
|
||||
var tiddler = this.wiki.getTiddler(this.tiddlerTitle);
|
||||
|
||||
// Get the inclusion and exclusion list
|
||||
var excludeArr = (this.exclude) ? this.exclude.split(" ") : ["text"];
|
||||
// Include takes precedence
|
||||
var includeArr = (this.include) ? this.include.split(" ") : null;
|
||||
|
||||
// Get the exclusion list
|
||||
var exclude;
|
||||
if(this.exclude) {
|
||||
exclude = this.exclude.split(" ");
|
||||
} else {
|
||||
exclude = ["text"];
|
||||
}
|
||||
// Compose the template
|
||||
var text = [];
|
||||
if(this.template && tiddler) {
|
||||
var fields = [];
|
||||
if (includeArr) { // Include takes precedence
|
||||
for(var i=0; i<includeArr.length; i++) {
|
||||
if(tiddler.fields[includeArr[i]]) {
|
||||
fields.push(includeArr[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(var fieldName in tiddler.fields) {
|
||||
if(excludeArr.indexOf(fieldName) === -1) {
|
||||
fields.push(fieldName);
|
||||
}
|
||||
for(var fieldName in tiddler.fields) {
|
||||
if(exclude.indexOf(fieldName) === -1) {
|
||||
fields.push(fieldName);
|
||||
}
|
||||
}
|
||||
if (this.sort) fields.sort();
|
||||
if (this.sortReverse) fields.reverse();
|
||||
for(var f=0, fmax=fields.length; f<fmax; f++) {
|
||||
fields.sort();
|
||||
for(var f=0; f<fields.length; f++) {
|
||||
fieldName = fields[f];
|
||||
var row = this.template,
|
||||
value = tiddler.getFieldString(fieldName);
|
||||
if(this.stripTitlePrefix && fieldName === "title") {
|
||||
var reStrip = /^\{[^\}]+\}(.+)/mg,
|
||||
reMatch = reStrip.exec(value);
|
||||
if(reMatch) {
|
||||
value = reMatch[1];
|
||||
if(exclude.indexOf(fieldName) === -1) {
|
||||
var row = this.template,
|
||||
value = tiddler.getFieldString(fieldName);
|
||||
if(this.stripTitlePrefix && fieldName === "title") {
|
||||
var reStrip = /^\{[^\}]+\}(.+)/mg,
|
||||
reMatch = reStrip.exec(value);
|
||||
if(reMatch) {
|
||||
value = reMatch[1];
|
||||
}
|
||||
}
|
||||
row = $tw.utils.replaceString(row,"$name$",fieldName);
|
||||
row = $tw.utils.replaceString(row,"$value$",value);
|
||||
row = $tw.utils.replaceString(row,"$encoded_value$",$tw.utils.htmlEncode(value));
|
||||
text.push(row);
|
||||
}
|
||||
row = $tw.utils.replaceString(row,"$name$",fieldName);
|
||||
row = $tw.utils.replaceString(row,"$value$",value);
|
||||
row = $tw.utils.replaceString(row,"$encoded_value$",$tw.utils.htmlEncode(value));
|
||||
text.push(row);
|
||||
}
|
||||
}
|
||||
this.text = text.join("");
|
||||
@@ -99,13 +90,11 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
FieldsWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if( changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude ||
|
||||
changedAttributes.include || changedAttributes.sort || changedAttributes.sortReverse ||
|
||||
changedTiddlers[this.tiddlerTitle] || changedAttributes.stripTitlePrefix) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
if(changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude || changedAttributes.stripTitlePrefix || changedTiddlers[this.tiddlerTitle]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@ NavigatorWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.storyTitle = this.getAttribute("story");
|
||||
this.historyTitle = this.getAttribute("history");
|
||||
this.openLinkFromInsideRiver = this.getAttribute("openLinkFromInsideRiver","top");
|
||||
this.openLinkFromOutsideRiver = this.getAttribute("openLinkFromOutsideRiver","top");
|
||||
this.singleTiddlerMode = this.getAttribute("singleTiddlerMode","no") === "yes";
|
||||
this.relinkOnRename = this.getAttribute("relinkOnRename","no").toLowerCase().trim() === "yes";
|
||||
this.setVariable("tv-story-list",this.storyTitle);
|
||||
this.setVariable("tv-history-list",this.historyTitle);
|
||||
// Construct the child widgets
|
||||
@@ -71,7 +75,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
NavigatorWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.story || changedAttributes.history) {
|
||||
if(changedAttributes.story || changedAttributes.history || changedAttributes.openLinkFromInsideRiver || changedAttributes.openLinkFromOutsideRiver || changedAttributes.singleTiddlerMode || changedAttributes.relinkOnRename) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
@@ -122,12 +126,17 @@ NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.addToStory = function(title,fromTitle) {
|
||||
if(this.storyTitle) {
|
||||
this.wiki.addToStory(title,fromTitle,this.storyTitle,{
|
||||
openLinkFromInsideRiver: this.getAttribute("openLinkFromInsideRiver","top"),
|
||||
openLinkFromOutsideRiver: this.getAttribute("openLinkFromOutsideRiver","top")
|
||||
});
|
||||
}
|
||||
this.wiki.addToStory(title,fromTitle,this.storyTitle,{
|
||||
openLinkFromInsideRiver: this.openLinkFromInsideRiver,
|
||||
openLinkFromOutsideRiver: this.openLinkFromOutsideRiver,
|
||||
singleTiddlerMode: this.singleTiddlerMode
|
||||
});
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.removeFromStory = function(title) {
|
||||
var storyList = this.getStoryList();
|
||||
this.removeTitleFromStory(storyList,title);
|
||||
this.saveStoryList(storyList);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -155,11 +164,34 @@ NavigatorWidget.prototype.handleNavigateEvent = function(event) {
|
||||
|
||||
// Close a specified tiddler
|
||||
NavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
storyList = this.getStoryList();
|
||||
// Look for tiddlers with this title to close
|
||||
this.removeTitleFromStory(storyList,title);
|
||||
this.saveStoryList(storyList);
|
||||
var title = event.param || event.tiddlerTitle;
|
||||
if(this.singleTiddlerMode) {
|
||||
// Get the history stack and find the topmost occurance of the current tiddler
|
||||
var history = this.wiki.getTiddlerDataCached(this.historyTitle,[]),
|
||||
currPos = history.findIndex(function(historyRecord) {
|
||||
return historyRecord.title === title;
|
||||
}),
|
||||
newTitle;
|
||||
// Skip over any duplicates
|
||||
while(currPos > 0 && history[currPos - 1].title === title) {
|
||||
currPos--;
|
||||
}
|
||||
// Get the new title
|
||||
if(currPos > 0) {
|
||||
newTitle = history[currPos - 1].title;
|
||||
}
|
||||
// Navigate to the new title if we've got one
|
||||
if(newTitle) {
|
||||
this.addToStory(newTitle);
|
||||
this.addToHistory(newTitle);
|
||||
} else {
|
||||
// If there's nothing to navigate back to then we really do close the last tiddler
|
||||
this.removeFromStory(title);
|
||||
}
|
||||
} else {
|
||||
// Look for tiddlers with this title to close
|
||||
this.removeFromStory(title);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -323,8 +355,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
newTiddler = $tw.hooks.invokeHook("th-saving-tiddler",newTiddler);
|
||||
this.wiki.addTiddler(newTiddler);
|
||||
// If enabled, relink references to renamed tiddler
|
||||
var shouldRelink = this.getAttribute("relinkOnRename","no").toLowerCase().trim() === "yes";
|
||||
if(isRename && shouldRelink && this.wiki.tiddlerExists(draftOf)) {
|
||||
if(isRename && this.relinkOnRename && this.wiki.tiddlerExists(draftOf)) {
|
||||
console.log("Relinking '" + draftOf + "' to '" + draftTitle + "'");
|
||||
this.wiki.relinkTiddler(draftOf,draftTitle);
|
||||
}
|
||||
|
||||
@@ -49,8 +49,7 @@ RangeWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.inputDomNode.value = this.getValue();
|
||||
// Add a click event handler
|
||||
$tw.utils.addEventListeners(this.inputDomNode,[
|
||||
{name: "input", handlerObject: this, handlerMethod: "handleInputEvent"},
|
||||
{name: "change", handlerObject: this, handlerMethod: "handleInputEvent"}
|
||||
{name: "input", handlerObject: this, handlerMethod: "handleInputEvent"}
|
||||
]);
|
||||
// Insert the label into the DOM and render any children
|
||||
parent.insertBefore(this.inputDomNode,nextSibling);
|
||||
@@ -125,4 +124,4 @@ RangeWidget.prototype.refresh = function(changedTiddlers) {
|
||||
|
||||
exports.range = RangeWidget;
|
||||
|
||||
})();
|
||||
})();
|
||||
@@ -580,9 +580,7 @@ Sorts an array of tiddler titles according to an ordered list
|
||||
exports.sortByList = function(array,listTitle) {
|
||||
var self = this,
|
||||
replacedTitles = Object.create(null);
|
||||
// Given a title, this function will place it in the correct location
|
||||
// within titles.
|
||||
function moveItemInList(title) {
|
||||
function replaceItem(title) {
|
||||
if(!$tw.utils.hop(replacedTitles, title)) {
|
||||
replacedTitles[title] = true;
|
||||
var newPos = -1,
|
||||
@@ -595,37 +593,26 @@ exports.sortByList = function(array,listTitle) {
|
||||
} else if(afterTitle === "") {
|
||||
newPos = titles.length;
|
||||
} else if(beforeTitle) {
|
||||
// if this title is placed relative
|
||||
// to another title, make sure that
|
||||
// title is placed before we place
|
||||
// this one.
|
||||
moveItemInList(beforeTitle);
|
||||
replaceItem(beforeTitle);
|
||||
newPos = titles.indexOf(beforeTitle);
|
||||
} else if(afterTitle) {
|
||||
// Same deal
|
||||
moveItemInList(afterTitle);
|
||||
replaceItem(afterTitle);
|
||||
newPos = titles.indexOf(afterTitle);
|
||||
if(newPos >= 0) {
|
||||
++newPos;
|
||||
}
|
||||
}
|
||||
// If a new position is specified, let's move it
|
||||
if (newPos !== -1) {
|
||||
// get its current Pos, and make sure
|
||||
// sure that it's _actually_ in the list
|
||||
// and that it would _actually_ move
|
||||
// (#4275) We don't bother calling
|
||||
// indexOf unless we have a new
|
||||
// position to work with
|
||||
var currPos = titles.indexOf(title);
|
||||
if(currPos >= 0 && newPos !== currPos) {
|
||||
// move it!
|
||||
titles.splice(currPos,1);
|
||||
if(newPos >= currPos) {
|
||||
newPos--;
|
||||
}
|
||||
titles.splice(newPos,0,title);
|
||||
// We get the currPos //after// figuring out the newPos, because recursive replaceItem calls might alter title's currPos
|
||||
var currPos = titles.indexOf(title);
|
||||
if(newPos === -1) {
|
||||
newPos = currPos;
|
||||
}
|
||||
if(currPos >= 0 && newPos !== currPos) {
|
||||
titles.splice(currPos,1);
|
||||
if(newPos >= currPos) {
|
||||
newPos--;
|
||||
}
|
||||
titles.splice(newPos,0,title);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -653,7 +640,7 @@ exports.sortByList = function(array,listTitle) {
|
||||
var sortedTitles = titles.slice(0);
|
||||
for(t=0; t<sortedTitles.length; t++) {
|
||||
title = sortedTitles[t];
|
||||
moveItemInList(title);
|
||||
replaceItem(title);
|
||||
}
|
||||
return titles;
|
||||
}
|
||||
|
||||
@@ -120,19 +120,3 @@ toolbar-cancel-button:
|
||||
toolbar-done-button:
|
||||
untagged-background: #504945
|
||||
very-muted-foreground: #bdae93
|
||||
wikilist-background: <<colour page-background>>
|
||||
wikilist-button-background: <<colour button-background>>
|
||||
wikilist-button-foreground: <<colour button-foreground>>
|
||||
wikilist-item: <<colour background>>
|
||||
wikilist-toolbar-background: <<colour background>>
|
||||
wikilist-toolbar-foreground: <<colour foreground>>
|
||||
wikilist-title: <<colour foreground>>
|
||||
wikilist-title-svg: <<colour wikilist-title>>
|
||||
wikilist-url: <<colour muted-foreground>>
|
||||
wikilist-button-open-hover: <<colour primary>>
|
||||
wikilist-button-open: <<colour dropzone-background>>
|
||||
wikilist-button-remove: <<colour dirty-indicator>>
|
||||
wikilist-button-remove-hover: <<colour alert-background>>
|
||||
wikilist-droplink-dragover: <<colour dropzone-background>>
|
||||
wikilist-button-reveal: <<colour sidebar-tiddler-link-foreground-hover>>
|
||||
wikilist-button-reveal-hover: <<colour message-background>>
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"title": "$:/core",
|
||||
"name": "Core",
|
||||
"description": "TiddlyWiki5 core",
|
||||
"author": "JeremyRuston",
|
||||
"core-version": ">=5.0.0",
|
||||
|
||||
@@ -20,7 +20,7 @@ tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$
|
||||
|
||||
<div class=<<containerClasses>>>
|
||||
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" singleTiddlerMode={{{ [<storyviewTitle>getstoryviewmode[singletiddlermode]] }}}>
|
||||
|
||||
<$transclude mode="block"/>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ $:/config/Plugins/Disabled/$(currentTiddler)$
|
||||
</div>
|
||||
<div class="tc-plugin-info-chunk tc-plugin-info-description">
|
||||
<h1>
|
||||
''<$text text={{{ [<currentTiddler>get[name]] ~[<currentTiddler>split[/]last[1]] }}}/>'': <$view field="description"><$view field="title"/></$view> $disabledMessage$
|
||||
''<$view field="description"><$view field="title"/></$view>'' $disabledMessage$
|
||||
</h1>
|
||||
<h2>
|
||||
<$view field="title"/>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/Modals/AddPlugins
|
||||
subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}
|
||||
|
||||
\define install-plugin-actions()
|
||||
\define install-plugin-button()
|
||||
<div>
|
||||
<$button class={{{ [<assetInfo>get[original-title]get[version]then[tc-reinstall]] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
||||
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
|
||||
<$set name="url" value={{!!url}}>
|
||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||
@@ -10,31 +12,14 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
|
||||
</$list>
|
||||
</$set>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define install-plugin-button()
|
||||
<div>
|
||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
||||
<$set name="reinstall-type" value={{{ [<libraryVersion>compare:version:eq<installedVersion>then[tc-reinstall]] [<libraryVersion>compare:version:gt<installedVersion>then[tc-reinstall-upgrade]] [<libraryVersion>compare:version:lt<installedVersion>then[tc-reinstall-downgrade]] }}}>
|
||||
<$button actions=<<install-plugin-actions>> class={{{ [<assetInfo>get[original-title]has[version]then<reinstall-type>] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
||||
{{$:/core/images/download-button}}
|
||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}">
|
||||
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="""
|
||||
<$list filter="[<libraryVersion>compare:version:lt<installedVersion>]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}">
|
||||
{{$:/language/ControlPanel/Plugins/Downgrade/Caption}}
|
||||
</$list>
|
||||
""">
|
||||
{{$:/language/ControlPanel/Plugins/Update/Caption}}
|
||||
</$list>
|
||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/Install/Caption}}""">
|
||||
{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}
|
||||
</$list>
|
||||
</$button>
|
||||
<div>
|
||||
</div>
|
||||
<$reveal stateTitle=<<assetInfo>> stateField="requires-reload" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}}</$reveal>
|
||||
</$set>
|
||||
</$set>
|
||||
</$set>
|
||||
</div>
|
||||
\end
|
||||
|
||||
@@ -66,19 +51,18 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
<h1><strong><$text text={{{ [<assetInfo>get[name]] ~[<assetInfo>get[original-title]split[/]last[1]] }}}/></strong>: <$view tiddler=<<assetInfo>> field="description"/></h1>
|
||||
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
||||
<div><em><$view tiddler=<<assetInfo>> field="version"/></em></div>
|
||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion"><div><em>{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}</em></div></$list>
|
||||
</div>
|
||||
<div class="tc-plugin-info-chunk tc-plugin-info-buttons">
|
||||
<<install-plugin-button>>
|
||||
</div>
|
||||
</div>
|
||||
<$set name="original-title" value={{{ [<assetInfo>get[original-title]] }}}>
|
||||
<$reveal type="match" text="yes" state=<<popup-state>>>
|
||||
<div class="tc-plugin-info-dropdown">
|
||||
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]] ~[<assetInfo>get[original-title]!is[tiddler]]" variable="ignore">
|
||||
<div class="tc-plugin-info-dropdown-message">
|
||||
<$list filter="[<assetInfo>get[original-title]!is[tiddler]]">
|
||||
{{$:/language/ControlPanel/Plugins/NotInstalled/Hint}}
|
||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/NotInstalled/Hint}}""">
|
||||
<em>
|
||||
{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}
|
||||
</em>
|
||||
</$list>
|
||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]]" variable="ignore">
|
||||
@@ -91,29 +75,20 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
</$list>
|
||||
</$set>
|
||||
</div>
|
||||
</$list>
|
||||
<div class="tc-plugin-info-dropdown-body">
|
||||
<$transclude tiddler=<<assetInfo>> field="readme" mode="block"/>
|
||||
</div>
|
||||
<$set name="original-title" value={{{ [<assetInfo>get[original-title]] }}}>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>limit[1]]" variable="ignore">
|
||||
<div class="tc-plugin-info-sub-plugins">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>sort[title]]" variable="assetInfo">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>sort[title]sort[name]]" variable="assetInfo">
|
||||
<<display-plugin-info "$type$">>
|
||||
</$list>
|
||||
</div>
|
||||
</$list>
|
||||
</$set>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>limit[1]]" variable="ignore">
|
||||
<$reveal type="nomatch" text="yes" state=<<popup-state>> tag="div" class="tc-plugin-info-sub-plugin-indicator">
|
||||
<$wikify name="count" text="""<$count filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>]"/>""">
|
||||
<$button class="tc-btn-invisible" set=<<popup-state>> setTo="yes">
|
||||
{{$:/language/ControlPanel/Plugins/SubPluginPrompt}}
|
||||
</$button>
|
||||
</$wikify>
|
||||
</$reveal>
|
||||
</$list>
|
||||
</$set>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
@@ -133,7 +108,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
</$button>
|
||||
</$reveal>
|
||||
<div class="tc-plugin-library-listing">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search:author,description,original-title,readme,title{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[title]]" variable="assetInfo">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search:author,description,original-title,readme,title{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[title]sort[name]]" variable="assetInfo">
|
||||
<$list filter="[[$:/temp/RemoteAssetSearch/$(currentTiddler)$]has[text]] ~[<assetInfo>!has[parent-plugin]]" variable="ignore"><!-- Hide sub-plugins if we're not searching -->
|
||||
<<display-plugin-info "$type$">>
|
||||
</$list>
|
||||
@@ -144,11 +119,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\define display-server-connection()
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
||||
|
||||
<$set name="transclusion" value=<<connectionTiddler>>>
|
||||
|
||||
<<tabs "[[$:/core/ui/ControlPanel/Plugins/Add/Updates]] [[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" "$:/core/ui/ControlPanel/Plugins/Add/Plugins">>
|
||||
|
||||
</$set>
|
||||
<<tabs "[[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" "$:/core/ui/ControlPanel/Plugins/Add/Plugins">>
|
||||
|
||||
</$list>
|
||||
\end
|
||||
@@ -164,33 +135,22 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\define plugin-library-listing()
|
||||
<div class="tc-tab-set">
|
||||
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
|
||||
<div class="tc-tab-buttons">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
|
||||
<$button set=<<qualify "$:/state/addplugins/tab">> setTo=<<currentTiddler>> default=<<defaultTab>> selectedClass="tc-tab-selected">
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude field="caption"/>
|
||||
</$set>
|
||||
</$button>
|
||||
</$list>
|
||||
</div>
|
||||
<div class="tc-tab-divider"/>
|
||||
<div class="tc-tab-content">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
|
||||
<$reveal type="match" state=<<qualify "$:/state/addplugins/tab">> text=<<currentTiddler>> default=<<defaultTab>>>
|
||||
<h2><$link><$transclude field="caption"><$view field="title"/></$transclude></$link></h2>
|
||||
<div class="tc-plugin-library">
|
||||
|
||||
!! <$link><$transclude field="caption"><$view field="title"/></$transclude></$link>
|
||||
|
||||
//<$view field="url"/>//
|
||||
<$transclude mode="block"/>
|
||||
|
||||
<$transclude/>
|
||||
|
||||
<$set name=PluginLibraryURL value={{!!url}}>
|
||||
<<close-library-button>>
|
||||
</$set>
|
||||
|
||||
<<display-server-connection>>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$set>
|
||||
</div>
|
||||
\end
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
|
||||
@@ -7,7 +7,7 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
||||
\define plugin-table(type)
|
||||
<$set name="plugin-type" value="""$type$""">
|
||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[title]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
|
||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
|
||||
</$set>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
title: $:/core/ui/ControlPanel/Plugins/Add/Updates
|
||||
caption: <$importvariables filter="$:/core/ui/ControlPanel/Plugins/Add/Updates">{{$:/language/ControlPanel/Plugins/Updates/Caption}} (<<update-count>>)</$importvariables>
|
||||
|
||||
\define each-updateable-plugin(body)
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo">
|
||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||
<$list filter="[<assetInfo>get[original-title]has[version]!version<libraryVersion>]" variable="ignore">
|
||||
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
||||
<$list filter="[<installedversion>!match<libraryVersion>]" variable="ignore">
|
||||
$body$
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define update-all-actions()
|
||||
<$macrocall $name="each-updateable-plugin" body="""
|
||||
<<install-plugin-actions>>
|
||||
"""/>
|
||||
\end
|
||||
|
||||
\define update-count()
|
||||
<$wikify name="count-filter" text=<<each-updateable-plugin "[[<$text text=<<assetInfo>>/>]]">>><$count filter=<<count-filter>>/></$wikify>
|
||||
\end
|
||||
|
||||
<$button actions=<<update-all-actions>> class="tc-btn-invisible tc-install-plugin tc-reinstall-upgrade">
|
||||
{{$:/core/images/download-button}} {{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}}
|
||||
</$button>
|
||||
|
||||
<div class="tc-plugin-library-listing">
|
||||
<$macrocall $name="each-updateable-plugin" body="""
|
||||
<$macrocall $name="display-plugin-info" type={{{ [<assetInfo>get[original-plugin-type]] }}}/>
|
||||
"""/>
|
||||
</div>
|
||||
@@ -1,5 +1,7 @@
|
||||
title: $:/core/ui/ListItemTemplate
|
||||
|
||||
<div class="tc-menu-list-item">
|
||||
<$link />
|
||||
<$link to={{!!title}}>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
</div>
|
||||
@@ -18,11 +18,13 @@ tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$
|
||||
|
||||
<$set name="storyviewTitle" value={{$:/view}}>
|
||||
|
||||
<$set name="tv-storyview-single-tiddler-mode" value={{{ [<storyviewTitle>getstoryviewmode[singletiddlermode]] }}}>
|
||||
|
||||
<$set name="languageTitle" value={{{ [{$:/language}get[name]] }}}>
|
||||
|
||||
<div class=<<containerClasses>>>
|
||||
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" singleTiddlerMode=<<tv-storyview-single-tiddler-mode>> openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
|
||||
<$dropzone enable=<<tv-enable-drag-and-drop>>>
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ title: $:/core/ui/PluginInfo/Default/contents
|
||||
<ul>
|
||||
<$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<<lingo Empty/Hint>>>
|
||||
<li>
|
||||
<$link />
|
||||
<$link to={{!!title}}>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
</li>
|
||||
</$list>
|
||||
</ul>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
title: $:/core/ui/PluginListItemTemplate
|
||||
|
||||
<div class="tc-menu-list-item">
|
||||
<$link to={{!!title}}><$view field="description"><$view field="title"/></$view></$link>
|
||||
<$link to={{!!title}}>
|
||||
<$view field="description">
|
||||
<$view field="title"/>
|
||||
</$view>
|
||||
</$link>
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/core/ui/SideBar/Open
|
||||
tags: $:/tags/SideBar
|
||||
caption: {{$:/language/SideBar/Open/Caption}}
|
||||
caption: <$list filter="[<tv-storyview-single-tiddler-mode>prefix[yes]]" emptyMessage="{{$:/language/SideBar/Open/Caption}}">{{$:/language/SideBar/History/Caption}}</$list>
|
||||
|
||||
\whitespace trim
|
||||
\define lingo-base() $:/language/CloseAll/
|
||||
@@ -23,6 +23,7 @@ $button$
|
||||
</$droppable>
|
||||
\end
|
||||
|
||||
\define open()
|
||||
<div class="tc-sidebar-tab-open">
|
||||
<$list filter="[list<tv-story-list>]" history=<<tv-history-list>> storyview="pop">
|
||||
<div class="tc-sidebar-tab-open-item">
|
||||
@@ -34,4 +35,8 @@ $button$
|
||||
<$macrocall $name="droppable-item" button="""<$button message="tm-close-all-tiddlers" class="tc-btn-invisible tc-btn-mini"><<lingo Button>></$button>"""/>
|
||||
</div>
|
||||
</$tiddler>
|
||||
</div>
|
||||
\end
|
||||
|
||||
<$list filter="[<tv-storyview-single-tiddler-mode>prefix[yes]]" emptyMessage=<<open>>>
|
||||
<$list filter="[list[$:/HistoryList]limit[100]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$list>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
title: $:/core/ui/ViewTemplate/subtitle
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||
<div class="tc-subtitle">
|
||||
<$link to={{!!modifier}} />
|
||||
<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
|
||||
<$link to={{!!modifier}}>
|
||||
<$view field="modifier"/>
|
||||
</$link> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
|
||||
</div>
|
||||
</$reveal>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
title: $:/core/ui/ViewTemplate/title
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
\define title-styles()
|
||||
fill:$(foregroundColor)$;
|
||||
\end
|
||||
|
||||
@@ -4,7 +4,6 @@ tags: $:/tags/Macro
|
||||
title: $:/core/macros/timeline
|
||||
|
||||
\define timeline-title()
|
||||
\whitespace trim
|
||||
<!-- Override this macro with a global macro
|
||||
of the same name if you need to change
|
||||
how titles are displayed on the timeline
|
||||
@@ -18,7 +17,9 @@ title: $:/core/macros/timeline
|
||||
<$view field="$dateField$" format="date" template="$format$"/>
|
||||
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
|
||||
<div class="tc-menu-list-subitem">
|
||||
<$link to={{!!title}}><<timeline-title>></$link>
|
||||
<$link to={{!!title}}>
|
||||
<<timeline-title>>
|
||||
</$link>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
title: $:/tags/PluginLibrary
|
||||
list: $:/config/OfficialPluginLibrary
|
||||
@@ -4,10 +4,13 @@ title: $:/snippets/viewswitcher
|
||||
$:/core/images/storyview-$(storyview)$
|
||||
\end
|
||||
<$linkcatcher to="$:/view">
|
||||
<div class="tc-chooser tc-viewswitcher">
|
||||
<div class="tc-chooser">
|
||||
<$list filter="[storyviews[]]" variable="storyview">
|
||||
<$set name="cls" filter="[<storyview>prefix{$:/view}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>>
|
||||
<$link to=<<storyview>>><$transclude tiddler=<<icon>>/><$text text=<<storyview>>/></$link>
|
||||
<$link to=<<storyview>>>
|
||||
<$transclude tiddler=<<icon>>/>
|
||||
<$text text=<<storyview>>/>
|
||||
</$link>
|
||||
</div>
|
||||
</$set>
|
||||
</$list>
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/filesystem",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/highlight"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"en-GB",
|
||||
@@ -31,4 +30,4 @@
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"en-GB",
|
||||
@@ -34,4 +33,4 @@
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
# Ensure the new release banner image is up to date
|
||||
# Update ''master'' with changes from ''tiddlywiki-com''
|
||||
# Verify the version numbers in [[$:/config/OfficialPluginLibrary]] in `core/wiki/config/OfficialPluginLibrary.tid`
|
||||
# Verify the version numbers in [[$:/config/OfficialPluginLibrary]] in `editions/tw5.com`
|
||||
# Move the latest release note from the prerelease edition into the tw5.com edition
|
||||
# Adjust the release date and the ''released'' field of the latest release tiddler (eg, [[Release 5.1.3]])
|
||||
# Ensure [[TiddlyWiki Releases]] has the new version as the default tab
|
||||
|
||||
@@ -31,7 +31,7 @@ Click the link to the plugin tiddler to open it. Assuming it doesn't currently e
|
||||
|!Field |!Value |
|
||||
|''dependents'' |Space separated list of dependent plugins (use square brackets for titles containing spaces) |
|
||||
|''description'' |Plugin description |
|
||||
|''name'' |Plugin name |
|
||||
|''name'' |Plugin name (only needed for themes) |
|
||||
|''plugin-type'' |Either "plugin" for a regular plugin, "theme" for a theme, or "language" for a language pack |
|
||||
|''type'' |Set to "application/json" |
|
||||
|''version'' |Set to the version number of the plugin (eg "0.0.1") |
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/nodewebkitsaver",
|
||||
"tiddlywiki/github-fork-ribbon",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/github-fork-ribbon"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/filesystem",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/highlight"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"es-ES"
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,7 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/filesystem",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/highlight"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"fr-FR"
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"ja-JP"
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,7 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/filesystem",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/highlight"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"ko-KR"
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
caption: 5.1.22
|
||||
created: 20200415160825341
|
||||
modified: 20200415160825341
|
||||
released: 20200415160825341
|
||||
created: 20200401124910939
|
||||
modified: 20200401124910939
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.22
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -16,11 +15,9 @@ Plugins [[can now|https://github.com/Jermolene/TiddlyWiki5/pull/4259]] be loaded
|
||||
|
||||
The [[plugin listing|$:/core/ui/ControlPanel/Plugins]] and the [[plugin chooser|$:/core/ui/ControlPanel/Modals/AddPlugins]] in the control panel feature several improvements:
|
||||
|
||||
* A new ''"Updates" tab'' listing all upgrades available from a plugin library, and a button to update all of them with one click
|
||||
* Tabs are now used to display plugin libraries within the plugin chooser
|
||||
* The plugin chooser now displays plugins that provide add-on functionality to another plugin as nested ''"sub-plugins"'', making the main listing easier to navigate
|
||||
* Plugins may now declare dependencies that are ''automatically installed'' without user intervention
|
||||
* All plugins are now displayed more consistently, including a concise, informal name (in addition to the description and title)
|
||||
* The plugin chooser now displays plugins that provide add-on functionality to another plugin as nested "sub-plugins", making the main listing easier to navigate
|
||||
* Plugins may now declare dependencies that are automatically installed without user intervention
|
||||
* All plugins now feature a concise, informal name (in addition to the description and title)
|
||||
|
||||
!! Client-Server Improvements
|
||||
|
||||
@@ -41,35 +38,30 @@ This release sees several improvements to the client-server configuration:
|
||||
|
||||
See the [[pull request on GitHub for more details|https://github.com/Jermolene/TiddlyWiki5/pull/4373]].
|
||||
|
||||
!! New [[compare Operator]]
|
||||
!! New Menu Bar Plugin
|
||||
|
||||
[[Added|https://github.com/Jermolene/TiddlyWiki5/issues/4554]] a new filter operator for comparing numbers, strings, dates and version numbers. For example:
|
||||
[[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ad2d4503e584ce9f931dbd1e98f95738b2841e51]] new ''menubar'' plugin that creates a menu bar that is responsive on mobile devices, and supports search, dropdowns and links
|
||||
|
||||
:`[[2]compare:number:eq[3]]`
|
||||
;returns nothing
|
||||
:`[[2]compare:number:lt[3]]`
|
||||
; returns "2"
|
||||
:`[[2]compare:number:eq[2]]`
|
||||
; returns "2"
|
||||
:`=1.2 =1.8 =2.3 =3.4 =7.2 +[compare:number:gt[1.5]compare:number:lt[2.5]]`
|
||||
; returns "1.8" "2.3"
|
||||
:`[[1]compare:number:gt[2]then[yes]else[no]]`
|
||||
; returns "no"
|
||||
!! New Freelinks Plugin
|
||||
|
||||
!! New Plugins
|
||||
[[Added|https://github.com/Jermolene/TiddlyWiki5/commit/447cd56da9db2ee169607f32923081ac47e78354]] new ''freelinks'' plugin to automatically create links from any tiddler title, without having to type double square brackets or use CamelCase.
|
||||
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ad2d4503e584ce9f931dbd1e98f95738b2841e51]] new ''menubar'' plugin that creates a menu bar that is responsive on mobile devices, and supports search, dropdowns and links
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/447cd56da9db2ee169607f32923081ac47e78354]] new ''freelinks'' plugin to automatically create links from any tiddler title, without having to type double square brackets or use CamelCase.
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/9b48a1c82955d1050c426fef559f42f4b8ec56e7]] new ''dynannotate'' plugin containing primitives for overlaying annotations or highlights over other content
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/005c584d85505b9477169ef822752eed39dde66a]] new ''share'' plugin for sharing tiddlers via the URL location hash
|
||||
* [[Switched|https://github.com/Jermolene/TiddlyWiki5/pull/3876]] the ''markdown'' plugin to the newer and improved [[remarkable|https://github.com/jonschlinkert/remarkable]] library
|
||||
!! New Dynannotate Plugin
|
||||
|
||||
[[Added|https://github.com/Jermolene/TiddlyWiki5/commit/9b48a1c82955d1050c426fef559f42f4b8ec56e7]] new ''dynannotate'' plugin containing primitives for overlaying annotations or highlights over other content
|
||||
|
||||
!! New Share Plugin
|
||||
|
||||
[[Added|https://github.com/Jermolene/TiddlyWiki5/commit/005c584d85505b9477169ef822752eed39dde66a]] new ''share'' plugin for sharing tiddlers via the URL location hash
|
||||
|
||||
!! Improved Markdown Plugin
|
||||
|
||||
[[Switched|https://github.com/Jermolene/TiddlyWiki5/pull/3876]] to the newer and improved [[remarkable|https://github.com/jonschlinkert/remarkable]] library
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
* Improved Chinese translation
|
||||
* Improved Dutch translation
|
||||
* Improved French translation
|
||||
* Improved German translations
|
||||
* Improved Portuguese translation
|
||||
|
||||
! Performance Improvements
|
||||
@@ -77,7 +69,6 @@ See the [[pull request on GitHub for more details|https://github.com/Jermolene/T
|
||||
* [[Optimised|https://github.com/Jermolene/TiddlyWiki5/pull/4108]] ImportVariablesWidget to improve performance of global macros
|
||||
* [[Optimised|https://github.com/Jermolene/TiddlyWiki5/commit/18f5333e01eb62ece65a86c457bf8a398f156930]] core SVG images to save approximately 100KB from the core plugin
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4421]] indexer for backlinks
|
||||
* [[Optimised|https://github.com/Jermolene/TiddlyWiki5/pull/4397]] [[sort Operator]]
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
@@ -112,7 +103,6 @@ See the [[pull request on GitHub for more details|https://github.com/Jermolene/T
|
||||
* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/7b66df688ae745537929a25799ef4a72d4437fcd]] AndTidWiki saver
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/5a5c967a3943beb6a4fa513cb34d231e46304452]] new [[SystemTag: $:/tags/Macro/View]] for creating macros that are only available within the view template
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4404]] support for embedding `.webm` and `.ogg` video files
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c7d8492842844d7de12b7a327f978ff114708d84]] support for embedding `.woff2` font files
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/3df1f9c9d0cc92b596262c0220ecf529c7fbb858]] ''spaces'' parameter to [[jsontiddlers Macro]] for controlling the formatting of the output
|
||||
* [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/4afde5a722afc91c826305800ba536c5fe8ef2e5]] the [[colour Macro]] to add support for specifying a fallback for colours not in the current colour palette
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/6091b013864af3d9918df69894f4aa05d1b8ffeb]] new [[Hidden Setting: Default Tiddler Icon]]
|
||||
@@ -120,10 +110,6 @@ See the [[pull request on GitHub for more details|https://github.com/Jermolene/T
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ae9ce4f01c6048aeb5604a93b57c2f3e4f959162]] new ''tc-tiddler-overridden-shadow'' class to tiddler frames for tiddlers that override a shadow tiddler
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4490]] support for a custom class to modal wrapper
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/091bcfce7d1a9c09140992e649f41ae17d27f307]] [[datauri Macro]] to work with tiddlers with a ''_canonical_uri'' field
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4332]] invaldi HTML produced in ">" in blockquote lists
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4540]] new "index" option to the [[has Operator]] for detecting the presence of data tiddler items
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4433]] the FieldsWidget with an "include" attribute and more sorting options, and the [[fields Operator]] with new "include" and "exclude" suffixes
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4436]] ActionCreateTiddlerWidget with attributes for specifying a template and for controlling overwriting existing tiddlers
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
@@ -143,19 +129,12 @@ See the [[pull request on GitHub for more details|https://github.com/Jermolene/T
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/3eacdc19fdb4ed7ce864a04dd87a5e1c6492daac]] GitHub and GitLab savers to use default path of `/` if none specified
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4432]] support for embedding ZIP files in some environments
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/665b63ec38b75dfe62009d2f5514682de60e953f]] lack of refresh when ButtonWidget ''actions'' attribute changes
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4534]] the RangeWidget to work in Internet Explorer 10/11
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/bdc5ac592f17b5ed3bb5ae782e56ced62406d653]] CountWidget to display "0" for an empty filter, instead of "undefined"
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4559]] MakeLibraryCommand to respect environment variables
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4396]] not to return "null" for an empty list
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4551]] z-index for CodeMirror autocomplete dropdowns
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4552]] unwanted whitespace within sidebar links
|
||||
|
||||
! Contributors
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
* [[@activescott|https://github.com/activescott]]
|
||||
* [[@Arlen22|https://github.com/Arlen22]]
|
||||
* [[@BramChen|https://github.com/BramChen]]
|
||||
* [[@BurningTreeC|https://github.com/BurningTreeC]]
|
||||
* [[@donmor|https://github.com/donmor]]
|
||||
@@ -166,14 +145,9 @@ See the [[pull request on GitHub for more details|https://github.com/Jermolene/T
|
||||
* [[@hoelzro|https://github.com/hoelzro]]
|
||||
* [[@Janno|https://github.com/Janno]]
|
||||
* [[@joshuafontany|https://github.com/joshuafontany]]
|
||||
* [[@inmysocks|https://github.com/inmysocks]]
|
||||
* [[@kookma|https://github.com/kookma]]
|
||||
* [[@linonetwo|https://github.com/linonetwo]]
|
||||
* [[@m42e|https://github.com/m42e]]
|
||||
* [[@MidnightLightning|https://github.com/MidnightLightning]]
|
||||
* [[@mklauber|https://github.com/mklauber]]
|
||||
* [[@pmario|https://github.com/pmario]]
|
||||
* [[@s-l-lee|https://github.com/s-l-lee]]
|
||||
* [[@s-light|https://github.com/s-light]]
|
||||
* [[@saqimtiaz|https://github.com/saqimtiaz]]
|
||||
* [[@xcazin|https://github.com/xcazin]]
|
||||
@@ -1,37 +0,0 @@
|
||||
caption: 5.1.23
|
||||
created: 20200401124910939
|
||||
modified: 20200401124910939
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.23
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.22...v5.1.23]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
*
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
*
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
*
|
||||
|
||||
! Contributors
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
*
|
||||
@@ -1,6 +1,25 @@
|
||||
title: TiddlyWiki Pre-release
|
||||
modified: 20150428204930183
|
||||
|
||||
!! Experimental Single Tiddler Mode
|
||||
|
||||
This build of the TiddlyWiki Pre-release is built from the "single-tiddler-mode" branch, and incorporates the work in progress from this pull request:
|
||||
|
||||
https://github.com/Jermolene/TiddlyWiki5/pull/3412
|
||||
|
||||
Essentially, "Single Tiddler Mode" means that the ''zoomin'' storyview no longer keeps previously navigated tiddlers hidden but open. Instead, there is only ever one tiddler open in the story river.
|
||||
|
||||
This has some implications for familiar TiddlyWiki features:
|
||||
|
||||
* The "close" button now navigates to the previous tiddler in the history stack
|
||||
* The "open" tab in the sidebar mutates into a more useful new "history" tab when "single tiddler mode" is engaged
|
||||
|
||||
You can switch storyviews here to experiment with the effect:
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
|
||||
---
|
||||
|
||||
This is a pre-release build of TiddlyWiki, [[also available in empty form|https://tiddlywiki.com/prerelease/empty.html]]. It is provided for testing purposes. ''Please don't try to use it for anything important'' -- you should use the latest official release from https://tiddlywiki.com.
|
||||
|
||||
<$list filter="[tag[ReleaseNotes]!has[released]!sort[created]]">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/view
|
||||
|
||||
classic
|
||||
solo
|
||||
@@ -1,84 +0,0 @@
|
||||
/*\
|
||||
title: test-compare-filters.js
|
||||
type: application/javascript
|
||||
tags: [[$:/tags/test-spec]]
|
||||
|
||||
Tests the compare filter.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/* jslint node: true, browser: true */
|
||||
/* eslint-env node, browser, jasmine */
|
||||
/* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
|
||||
/* global $tw, require */
|
||||
"use strict";
|
||||
|
||||
describe("'compare' filter tests", function() {
|
||||
|
||||
var wiki = new $tw.Wiki();
|
||||
|
||||
it("should compare numerical equality", function() {
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:eq[0003]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:ne[000003]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:eq[3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:ne[3]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:eq[2]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:ne[2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:eq[x]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:ne[x]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:eq[3]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:ne[3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:eq[2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:ne[2]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:eq[x]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:ne[x]]").join(",")).toBe("");
|
||||
});
|
||||
|
||||
it("should compare numerical magnitude", function() {
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:gt[3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:lt[3]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:gt[2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:lt[2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:gt[x]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]compare:number:lt[x]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:gt[3]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:lt[3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:gt[2]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:lt[2]]").join(",")).toBe("2");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:gt[x]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[2]!compare:number:lt[x]]").join(",")).toBe("2");
|
||||
});
|
||||
|
||||
it("should compare string", function() {
|
||||
expect(wiki.filterTiddlers("[[Monday]compare:string:lt[M]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[Monday]compare:string:lt[W]]").join(",")).toBe("Monday");
|
||||
expect(wiki.filterTiddlers("Monday Tuesday Wednesday Thursday Friday Saturday Sunday +[compare:string:gt[M]sort[]]").join(",")).toBe("Monday,Saturday,Sunday,Thursday,Tuesday,Wednesday");
|
||||
expect(wiki.filterTiddlers("Monday Tuesday Wednesday Thursday Friday Saturday Sunday +[compare:string:gt[M]compare:string:lt[W]sort[]]").join(",")).toBe("Monday,Saturday,Sunday,Thursday,Tuesday");
|
||||
});
|
||||
|
||||
it("should compare dates", function() {
|
||||
expect(wiki.filterTiddlers("[[20200101]compare:date:gt[201912311852]]").join(",")).toBe("20200101");
|
||||
});
|
||||
|
||||
it("should compare version numbers", function() {
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:eq[v1.1.0]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:eq[v1.2.2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:eq[v1.2.3]]").join(",")).toBe("v1.2.3");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:eq[v1.2.4]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:eq[v2.0.0]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:gt[v1.1.0]]").join(",")).toBe("v1.2.3");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:gt[v1.2.2]]").join(",")).toBe("v1.2.3");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:gt[v1.2.3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:gt[v1.2.4]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:gt[v2.0.0]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:lt[v1.1.0]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:lt[v1.2.2]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:lt[v1.2.3]]").join(",")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:lt[v1.2.4]]").join(",")).toBe("v1.2.3");
|
||||
expect(wiki.filterTiddlers("[[v1.2.3]compare:version:lt[v2.0.0]]").join(",")).toBe("v1.2.3");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
@@ -450,10 +450,6 @@ function runTests(wiki) {
|
||||
expect(wiki.filterTiddlers("[[John. Paul. George. Ringo.]] +[split[.]trim[]]").join(",")).toBe("John,Paul,George,Ringo,");
|
||||
expect(wiki.filterTiddlers("John Paul George Ringo +[split[e]]").join(",")).toBe("John,Paul,G,org,,Ringo");
|
||||
expect(wiki.filterTiddlers("John Paul George Ringo +[join[ ]split[e]join[ee]split[ ]]").join(",")).toBe("John,Paul,Geeorgee,Ringo");
|
||||
// Ensure that join doesn't return null if passed empty list
|
||||
expect(wiki.filterTiddlers("Test +[butlast[]join[ ]]")).toEqual([""]);
|
||||
// Ensure that join correctly handles empty strings in source
|
||||
expect(wiki.filterTiddlers("[[]] Paul +[join[-]]").join(",")).toBe("-Paul");
|
||||
expect(wiki.filterTiddlers("[[ John ]] [[Paul ]] [[ George]] Ringo +[trim[]join[-]]").join(",")).toBe("John-Paul-George-Ringo");
|
||||
});
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ describe("With no indexers", function() {
|
||||
});
|
||||
|
||||
describe("With all indexers", function() {
|
||||
var wikiOptions = {},
|
||||
var wikiOptions = {enableIndexers: []},
|
||||
wiki = setupWiki();
|
||||
runTests(wiki,wikiOptions);
|
||||
});
|
||||
|
||||
@@ -107,30 +107,6 @@ describe("Utility tests", function() {
|
||||
|
||||
});
|
||||
|
||||
it("should compare versions", function() {
|
||||
var cv = $tw.utils.compareVersions;
|
||||
expect(cv("v0.0.0","v0.0.0")).toEqual(0);
|
||||
expect(cv("0.0.0","v0.0.0")).toEqual(0);
|
||||
expect(cv("v0.0.0","0.0.0")).toEqual(0);
|
||||
expect(cv("v0.0.0","not a version")).toEqual(0);
|
||||
expect(cv("v0.0.0",undefined)).toEqual(0);
|
||||
expect(cv("not a version","v0.0.0")).toEqual(0);
|
||||
expect(cv(undefined,"v0.0.0")).toEqual(0);
|
||||
expect(cv("v1.0.0","v1.0.0")).toEqual(0);
|
||||
expect(cv("v1.0.0","1.0.0")).toEqual(0);
|
||||
|
||||
expect(cv("v1.0.1",undefined)).toEqual(+1);
|
||||
expect(cv("v1.0.1","v1.0.0")).toEqual(+1);
|
||||
expect(cv("v1.1.1","v1.1.0")).toEqual(+1);
|
||||
expect(cv("v1.1.2","v1.1.1")).toEqual(+1);
|
||||
expect(cv("1.1.2","v1.1.1")).toEqual(+1);
|
||||
|
||||
expect(cv("v1.0.0","v1.0.1")).toEqual(-1);
|
||||
expect(cv("v1.1.0","v1.1.1")).toEqual(-1);
|
||||
expect(cv("v1.1.1","v1.1.2")).toEqual(-1);
|
||||
expect(cv("1.1.1","1.1.2")).toEqual(-1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"description": "Documentation from tw5.com edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/tw5.com-docs",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/tw5.com-docs"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/filesystem",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/mobiledragdrop",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/mobiledragdrop"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
created: 20200131142401129
|
||||
modified: 20200131152023958
|
||||
tags: ActionCreateTiddlerWidget
|
||||
title: ActionCreateTiddlerWidget Example 1
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define testCreate()
|
||||
<$action-createtiddler />
|
||||
\end
|
||||
|
||||
This example will create "New Tiddler", "New Tiddler 1", " New Tiddler 2" and so on
|
||||
|
||||
```
|
||||
\define testCreate()
|
||||
<$action-createtiddler />
|
||||
\end
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
Create Tiddler
|
||||
</$button>
|
||||
```
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
<$action-setfield $tiddler="$:/state/tab/sidebar-1206596165" text="$:/core/ui/SideBar/Recent"/>
|
||||
Create Tiddler
|
||||
</$button> - Clicking this button, will also open the Right sidebar: Recent tab
|
||||
@@ -1,28 +0,0 @@
|
||||
created: 20200131144828713
|
||||
modified: 20200131152102232
|
||||
tags: ActionCreateTiddlerWidget
|
||||
title: ActionCreateTiddlerWidget Example 2
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/>
|
||||
\end
|
||||
|
||||
This example will use the base title defined in [[$:/language/DefaultNewTiddlerTitle]].
|
||||
|
||||
It will overwrite the tiddler, if the button is clicked several times.
|
||||
|
||||
```
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/>
|
||||
\end
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
Create Tiddler
|
||||
</$button>
|
||||
```
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
<$action-setfield $tiddler="$:/state/tab/sidebar-1206596165" text="$:/core/ui/SideBar/Recent"/>
|
||||
Create Tiddler
|
||||
</$button> - Clicking this button, will also open the Right sidebar: Recent tab
|
||||
@@ -1,28 +0,0 @@
|
||||
created: 20200131145355658
|
||||
modified: 20200131152045990
|
||||
tags: ActionCreateTiddlerWidget
|
||||
title: ActionCreateTiddlerWidget Example 3
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/>
|
||||
\end
|
||||
|
||||
This example will uses a base-title and a template: [[ActionCreateTiddlerWidget Template]]
|
||||
|
||||
It will create: "base", "base 1", "base 2" and so on
|
||||
|
||||
```
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/>
|
||||
\end
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
Create Tiddler
|
||||
</$button>
|
||||
```
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
<$action-setfield $tiddler="$:/state/tab/sidebar-1206596165" text="$:/core/ui/SideBar/Recent"/>
|
||||
Create Tiddler
|
||||
</$button> - Clicking this button, will also open the Right sidebar: Recent tab
|
||||
@@ -1,28 +0,0 @@
|
||||
created: 20200131150229551
|
||||
modified: 20200131152051626
|
||||
tags: ActionCreateTiddlerWidget
|
||||
title: ActionCreateTiddlerWidget Example 4
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" />
|
||||
\end
|
||||
|
||||
This example will uses a base-title: "base" and a template: [[ActionCreateTiddlerWidget Template]].
|
||||
|
||||
There will be new fields "aa" and "bb" which are added to the new tiddlers.
|
||||
|
||||
```
|
||||
\define testCreate()
|
||||
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" />
|
||||
\end
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
Create Tiddler
|
||||
</$button>
|
||||
```
|
||||
|
||||
<$button actions=<<testCreate>> >
|
||||
<$action-setfield $tiddler="$:/state/tab/sidebar-1206596165" text="$:/core/ui/SideBar/Recent"/>
|
||||
Create Tiddler
|
||||
</$button> - Clicking this button, will also open the Right sidebar: Recent tab
|
||||
@@ -1,8 +0,0 @@
|
||||
created: 20200131145608087
|
||||
modified: 20200131150801682
|
||||
tags: test
|
||||
title: ActionCreateTiddlerWidget Template
|
||||
type: text/vnd.tiddlywiki
|
||||
x: x
|
||||
|
||||
This is a tiddler used as a template in: [[ActionCreateTiddlerWidget Example 3]]
|
||||
@@ -10,4 +10,4 @@ The code and documentation of TiddlyWiki is hosted on GitHub at:
|
||||
|
||||
https://github.com/Jermolene/TiddlyWiki5
|
||||
|
||||
GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to a Git service]].
|
||||
GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to GitHub]].
|
||||
|
||||
@@ -4,7 +4,7 @@ tags: Learning
|
||||
title: TaskManagementExample (Draggable)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This is a version of the TaskManagementExample enhanced with the ability to drag and drop the task list to re-order them.
|
||||
This is a version of the TaskManagementDemo enhanced with the ability to drag and drop the task list to re-order them.
|
||||
|
||||
! Outstanding tasks
|
||||
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
created: 20160107225427489
|
||||
modified: 20200312172056083
|
||||
modified: 20160107225651558
|
||||
tags: Features
|
||||
title: Modals
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Modals (or "wizards") fade the main TiddlyWiki window to display an isolated tiddler that must be explicitly dismissed by the user.
|
||||
|
||||
The tiddler to be displayed can contain the following optional fields that are used to customize the modal:
|
||||
|
||||
|!Field |!Description |
|
||||
|footer|The footer text for the modal|
|
||||
|subtitle|The subtitle text for a modal|
|
||||
|class|An additional class to apply to the modal wrapper|
|
||||
|
||||
Modals are displayed with the [[WidgetMessage: tm-modal]].
|
||||
|
||||
<$button message="tm-modal" param="SampleWizard">Open demo modal</$button>
|
||||
<$button message="tm-modal" param="SampleWizard">Open demo modal</$button>
|
||||
@@ -1,51 +0,0 @@
|
||||
created: 20200412181551706
|
||||
modified: 20200412181551706
|
||||
tags: [[Filter Operators]] [[Mathematics Operators]] [[String Operators]] [[Negatable Operators]]
|
||||
title: compare Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: compare
|
||||
op-purpose: filter the input by comparing each item against the operand
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details
|
||||
op-parameter: the value to compare
|
||||
op-output: those input titles matching the specified comparison
|
||||
op-neg-output: those input titles <<.em not>> matching the specified comparison
|
||||
|
||||
<<.from-version "5.1.22">>The <<.op compare>> filter allows numerical, string and date comparisons to be performed.
|
||||
|
||||
The <<.op compare>> operator uses an extended syntax to specify all the options:
|
||||
|
||||
```
|
||||
[compare:<type>:<mode>[<operand>]]
|
||||
```
|
||||
|
||||
The ''type'' can be:
|
||||
|
||||
* "number" - invalid numbers are interpreted as zero
|
||||
* "integer" - invalid integers are interpreted as zero
|
||||
* "string"
|
||||
* "date" - invalid dates are interpreted as 1st January 1970
|
||||
* "version" - invalid versions are interpreted as "v0.0.0"
|
||||
|
||||
The ''mode'' can be:
|
||||
|
||||
* "eq" - equal to
|
||||
* "ne" - not equal ot
|
||||
* "gteq" - greater than or equal to
|
||||
* "gt" - greater than
|
||||
* "lteq" - less than or equal to
|
||||
* "lt" - less than
|
||||
|
||||
The operator compares each item in the selection against the value of the parameter, retaining only those items that pass the specified condition.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
[[2]compare:number:eq[3]] returns nothing
|
||||
[[2]compare:number:lt[3]] returns "2"
|
||||
[[2]compare:number:eq[2]] returns "2"
|
||||
```
|
||||
|
||||
Note that several of the variants of the <<.op compare>> operator are synonyms for existing operators, and are provided in the interests of consistency. For example, `compare:string:eq[x]` is a synonym for `match[x]`.
|
||||
|
||||
<<.operator-examples "compare">>
|
||||
@@ -1,11 +0,0 @@
|
||||
created: 20200412212935849
|
||||
modified: 20200412212935849
|
||||
tags: [[compare Operator]] [[Operator Examples]]
|
||||
title: compare Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[[20200101]compare:date:gt[201912311852]]" "compares two partial dates">>
|
||||
<<.operator-example 2 "[[202001011852]compare:integer:gt[20191231]]" "compares the same two strings as integers">>
|
||||
<<.operator-example 3 "[list[Days of the Week]compare:string:gt[M]compare:string:lt[W]]">>
|
||||
<<.operator-example 4 "[[v5.1.23-prerelease]compare:version:gt[v5.1.22]]">>
|
||||
<<.operator-example 5 "[[1]compare:number:gt[2]then[yes]else[no]]">>
|
||||
@@ -1,12 +1,8 @@
|
||||
created: 20150118134611000
|
||||
modified: 20200129165627964
|
||||
modified: 20150118183206000
|
||||
tags: [[fields Operator]] [[Operator Examples]]
|
||||
title: fields Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[[HelloThere]fields[]]" "fields of HelloThere">>
|
||||
<<.operator-example 2 "[[HelloThere]fields:include[list title text non-existing]]" """fields of HelloThere using a "short list" of fields. Fields are only shown, if they exist""">>
|
||||
<<.operator-example 3 "[[HelloThere]fields:include[list title text]sortby[title list text]]" "fields of HelloThere special sorting">>
|
||||
<<.operator-example 4 "[[HelloThere]fields:exclude[list title text]]" "fields of HelloThere using the exclude suffix">>
|
||||
<<.operator-example 5 "[[HelloThere]fields[]] -list -title -text" "fields of HelloThere, using several filter runs instead of exclude suffix">>
|
||||
<<.operator-example 6 "[tag[Common Operators]fields[]]" "fields of all tiddlers tagged as [[Common Operators]]">>
|
||||
<<.operator-example 2 "[tag[Common Operators]fields[]]" "fields of all tiddlers tagged as [[Common Operators]]">>
|
||||
|
||||
@@ -8,6 +8,4 @@ type: text/vnd.tiddlywiki
|
||||
<<.operator-example 1 "[has[color]]">>
|
||||
<<.operator-example 2 "[tag[Concepts]!has[modified]]">>
|
||||
<<.operator-example 3 "[has:field[emptyfield]]">>
|
||||
<<.operator-example 4 "[all[current]!has:field[doesntexist]]">>
|
||||
<<.operator-example 5 "[all[tiddlers+shadows]has:index[foreground]]">>
|
||||
<<.operator-example 6 "[all[current]!has:index[doesntexist]]">>
|
||||
<<.operator-example 4 "[all[current]!has:field[doesntexist]]">>
|
||||
@@ -1,17 +1,14 @@
|
||||
caption: fields
|
||||
created: 20140924115616653
|
||||
modified: 20200129165038748
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: all the field names contained in the input tiddlers
|
||||
op-parameter: <<.from-version "5.1.22">> optional: a [[list of field names|TiddlerFields]]
|
||||
op-purpose: select all field names of the input titles
|
||||
op-suffix: <<.from-version "5.1.22">> optional: `include`, `exclude` parameter list
|
||||
modified: 20150203184828000
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: fields Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: fields
|
||||
op-purpose: select all field names of the input titles
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: none
|
||||
op-output: all the field names contained in the input tiddlers
|
||||
|
||||
Each input title is processed in turn. Its list of field names is retrieved (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output.
|
||||
|
||||
<<.from-version "5.1.22">> If the `include` suffix is used, fields are only included, if they exist. It doesn't matter, if fields have a value. The `exclude` suffix is there for convenience, since it would be possible to use a second filter run. For more info see the examples.
|
||||
Each input title is processed in turn. Its list of field names is retrieved (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output.
|
||||
|
||||
<<.operator-examples "fields">>
|
||||
|
||||
@@ -2,13 +2,12 @@ caption: has
|
||||
created: 20140410103123179
|
||||
modified: 20190518145446047
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> does <<.em not>> exist
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist
|
||||
op-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> has a non-empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]]<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]] or, optionally an [[index|TextReference]]
|
||||
op-parameter: the name of a [[field|TiddlerFields]]
|
||||
op-parameter-name: F
|
||||
op-purpose: filter the input by field existence
|
||||
op-suffix: <<.from-version "5.1.14">> optionally, the keyword `field` or <<.from-version "5.1.22">> optionally, the keyword `index`
|
||||
op-suffix: <<.from-version "5.1.14">> optionally, the keyword `field`
|
||||
op-suffix-name: S
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]]
|
||||
title: has Operator
|
||||
|
||||
@@ -15,11 +15,11 @@ The following substitutions are made:
|
||||
|
||||
|!Character |!Replacement |
|
||||
|`\` |`\\` |
|
||||
|`"` |`\"` |
|
||||
|`"` |`\\"` |
|
||||
|`\r` (carriage return) |`\\r` |
|
||||
|`\n` (line feed) |`\\n` |
|
||||
|`\x08` (backspace) |`\\b` |
|
||||
|`\x0c` (form field) |`\\f` |
|
||||
|`\x08` (backpsace) |`\\b` |
|
||||
|`\x0c` (formfield) |`\\f` |
|
||||
|`\t` (tab) |`\\t` |
|
||||
|Characters from 0x00 to 0x1f |`\\x##` where ## is two hex digits |
|
||||
|Characters from 0x80 to 0xffff |`\\u####` where #### is four hex digits |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20130822170200000
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]] [[HelloThumbnail - TWEUM2017]]
|
||||
modified: 20200415160825341
|
||||
modified: 20190910152313608
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -3,12 +3,4 @@ modified: 20160817104802841
|
||||
tags: [[Editor toolbar]]
|
||||
title: Text preview
|
||||
|
||||
Pressing the eye icon {{$:/core/ui/EditorToolbar/preview}} will open or close a preview window for your WikiText (The icon-eye will also open or close).
|
||||
|
||||
Right to the eye there is another icon, {{$:/core/images/chevron-down}}, which when clicked, shows you a dropdown which gives you access to six different types of preview:
|
||||
|
||||
* //output// shows you the text as you see it when you do not edit the tiddler.
|
||||
* //html// shows you the [[source code|https://www.w3schools.com/html/html_intro.asp]] of that output. Your web browser uses this source code to display webpages.
|
||||
* //parsetree// and //widgettree// show you the two object trees that ~TiddlyWiki internally generates from ~WikiText. The //parsetree// collects basic information about your ~WikiText. From the informations of the parsetree the //widgettree// then generates extended informations and finally the above html (and the widgettree also does other things).
|
||||
* //differences from current// shows you the differences since the tiddler was last saved. Deleted parts are <span style="color:red;">red</span>, added parts are <span style="color:green;">green</span>.
|
||||
* //differences from shadow (if any)// does the same, but this time it shows you the differences to the underlying [[shadow-tiddler|ShadowTiddlers]].
|
||||
Pressing the eye icon {{$:/core/ui/EditorToolbar/preview}} will open or close a preview window (and the eye) of the text you are editing.
|
||||
BIN
editions/tw5.com/tiddlers/images/New Release Banner.jpg
Normal file
BIN
editions/tw5.com/tiddlers/images/New Release Banner.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
@@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
The [[web server configuration parameter|WebServer Parameters]] ''path-prefix'' can be used to set an optional prefix for all paths served.
|
||||
|
||||
This example causes the server to serve from http://127.0.0.1/MyApp instead of the default http://127.0.0.1/.
|
||||
This example causes the server to serve from http://127.0.0.1/MyApp instead of the default http://127.0.0.1/MyApp.
|
||||
|
||||
```
|
||||
tiddlywiki mywikifolder --listen "path-prefix=/MyApp"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: action-createtiddler
|
||||
created: 20161020152745942
|
||||
modified: 20200131151847266
|
||||
modified: 20190604113017742
|
||||
tags: Widgets ActionWidgets
|
||||
title: ActionCreateTiddlerWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -23,38 +23,9 @@ The ''action-createtiddler'' widget is invisible. Any content within it is ignor
|
||||
|$savetitle |A text reference identifying a field or index into which the title of the newly created tiddler will be stored after it is created |
|
||||
|$savedrafttitle |<<.from-version "5.1.20">> A text reference identifying a field or index into which the draft title associated with the newly created tiddler will be stored after it is created. This is useful when using a sequence of action widgets to create a new tiddler, put it into edit mode, and position it within the list of its parent tag |
|
||||
|$timestamp |Specifies whether the timestamp(s) of the target tiddler will be updated (''modified'' and ''modifier'', plus ''created'' and ''creator'' for newly created tiddlers). Can be "yes" (the default) or "no" |
|
||||
|$template |<<.from-version "5.1.22">> The title of a template tiddler, that will be used to create a new tiddler |
|
||||
|$overwrite |<<.from-version "5.1.22">> If set to "yes", it will overwrite existing tiddlers. ''Be careful!'' |
|
||||
|//{any attributes not starting with $}// |Each attribute name specifies a field to be created in the new tiddler |
|
||||
|
||||
! Examples
|
||||
|
||||
<<<
|
||||
<$macrocall $name='wikitext-example-without-html' src={{ActionCreateTiddlerWidget Example}}/>
|
||||
<<<
|
||||
|
||||
---
|
||||
|
||||
<<<
|
||||
<$transclude tiddler="ActionCreateTiddlerWidget Example 1" mode=block/>
|
||||
<<<
|
||||
|
||||
---
|
||||
|
||||
<<<
|
||||
{{ActionCreateTiddlerWidget Example 2}}
|
||||
<<<
|
||||
|
||||
---
|
||||
|
||||
<<<
|
||||
{{ActionCreateTiddlerWidget Example 3}}
|
||||
<<<
|
||||
|
||||
---
|
||||
|
||||
<<<
|
||||
{{ActionCreateTiddlerWidget Example 4}}
|
||||
<<<
|
||||
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src={{ActionCreateTiddlerWidget Example}}/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: dropzone
|
||||
created: 20131024141900000
|
||||
modified: 20200403103224328
|
||||
modified: 20200315144454996
|
||||
tags: Widgets
|
||||
title: DropzoneWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -16,7 +16,6 @@ It sends a [[WidgetMessage: tm-import-tiddlers]] carrying a JSON representation
|
||||
|!Attribute |!Description |
|
||||
|deserializer |<<.from-version "5.1.15">> Optional name of deserializer to be used (by default the deserializer is derived from the file extension) |
|
||||
|enable |<<.from-version "5.1.22">> Optional value "no" to disable the dropzone functionality (defaults to "yes") |
|
||||
|class |<<.from-version "5.1.22">> Optional CSS class to be assigned to the dropzone (defaults to "tc-drag-over") |
|
||||
|
||||
The list of available deserializers can be inspected by executing `Object.keys($tw.Wiki.tiddlerDeserializerModules).sort().join("\n")` in the browser JavaScript console.
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@ The content of the `<$fields>` widget is ignored.
|
||||
|tiddler |Title of the tiddler from which the fields are to be displayed (defaults to the [[current tiddler|Current Tiddler]]) |
|
||||
|template |Text of the template (see above) |
|
||||
|exclude |Lists of fields to be excluded (defaults to "text") |
|
||||
|include |Lists of fields to be included, if the field exists. This parameter takes precedence over "exclude" |
|
||||
|sort |Sorts the fields by name (defaults to "yes"). Set to "no", if "include" order should be retained! |
|
||||
|sortReverse |Reverses the sort order|
|
||||
|stripTitlePrefix |If set to "yes" then curly bracketed prefixes are removed from titles (for example `{prefix}HelloThere` converts to `HelloThere`) |
|
||||
|
||||
The `stripTitlePrefix` attribute is used when building TiddlyWiki Classic; see `editions/tw2` in the TiddlyWiki5 repo.
|
||||
|
||||
@@ -15,13 +15,13 @@ The content of the `<$range>` widget is ignored.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|tiddler |Title of the tiddler to manipulate (defaults to the [[current tiddler|Current Tiddler]]) |
|
||||
|field |The field of the //tiddler// bound to the range slider|
|
||||
|field |The field of the //tiddler// bound to the radio button |
|
||||
|index|<<.from-version "5.1.22">> The index of the //tiddler//, a [[DataTiddler|DataTiddlers]], to which the radio button is bound<<.tip "be sure to set the //tiddler// correctly">> |
|
||||
|min |The minimum value to be able to be set by the `<$range>` widget |
|
||||
|max |The maximum value to be able to be set by the `<$range>` widget |
|
||||
|increment |The minimum amount by which a value may be changed. Defaults to 1 |
|
||||
|default |If the field is missing or empty this is the default position for the widget handle relative to the min and max values.|
|
||||
|class |CSS classes to be assigned to the label around the range slider |
|
||||
|default |The default value displayed if the field is missing or empty |
|
||||
|class |CSS classes to be assigned to the label around the radio button |
|
||||
|
||||
! Examples
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
The reveal widget hides or shows its content depending upon the value of a [[state tiddler|StateTiddlers]]. The type of the widget determines the condition for the content being displayed:
|
||||
|
||||
* type=''match'': the content is displayed if the state tiddler matches the text attribute value
|
||||
* type=''nomatch'': the content is displayed if the state tiddler doesn't match the text attribute value
|
||||
* type=''match'': the content is displayed if the state tiddler matches a specified value
|
||||
* type=''nomatch'': the content is displayed if the state tiddler doesn't match a specified value
|
||||
* type=''popup'': the content is displayed as a popup as described in the PopupMechanism
|
||||
* type=''lt'': the content is displayed if the state tiddler contains an integer with a value ''less than'' the text attribute value
|
||||
* type=''gt'': the content is displayed if the state tiddler contains an integer with a value ''greater than'' the text attribute value
|
||||
* type=''lteq'': the content is displayed if the state tiddler contains an integer with a value ''less than or equal to'' the text attribute value
|
||||
* type=''gteq'': the content is displayed if the state tiddler contains an integer with a value ''greater than or equal to'' the text attribute value
|
||||
* type=''lt'': the content is displayed if the state tiddler contains an integer with a value ''less than'' a specified value
|
||||
* type=''gt'': the content is displayed if the state tiddler contains an integer with a value ''greater than'' a specified value
|
||||
* type=''lteq'': the content is displayed if the state tiddler contains an integer with a value ''less than or equal to'' a specified value
|
||||
* type=''gteq'': the content is displayed if the state tiddler contains an integer with a value ''greater than or equal to'' a specified value
|
||||
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
@@ -39,10 +39,6 @@ The following formats can be specified in the `format` attribute:
|
||||
|''stripcomments'' |The field is interpreted as JavaScript source code and any lines beginning `\\#` are stripped |
|
||||
|''jsencoded'' |The field is displayed as a JavaScript encoded string |
|
||||
|
||||
!! "WikiText format"
|
||||
|
||||
To display the field content as regular WikiText, for example with working links, use the [[TranscludeWidget]] instead.
|
||||
|
||||
! SubTiddler Access
|
||||
|
||||
The view widget allows access to the individual tiddlers stored within a [[plugin|Plugins]].
|
||||
|
||||
@@ -11,7 +11,7 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d
|
||||
* ''Avoid the "Recent" tab''. It is computationally slow to generate and update in response to tiddler changes.
|
||||
* ''Use the "Vanilla" theme''. The default "Snow White" theme includes visual effects like shadows, transparency and blurring that can be slow to render on older devices
|
||||
* ''Avoid large tiddlers''. Large bitmaps can significantly slow TiddlyWiki's performance. For example, an image taken with a modern smartphone will often be 5MB or more. Use ExternalImages whenever possible
|
||||
* ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is particularly easy when using zoomin story view to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the <<.icon $:/core/images/close-all-button>> ''close all'' button
|
||||
* ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is easy to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the {{$:/core/images/close-all-button}} ''close all'' button, or use zoomin story view which only keeps one tiddler open at a time.
|
||||
|
||||
!! WikiText
|
||||
|
||||
@@ -28,4 +28,3 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d
|
||||
** Note that the field indexer currently defaults to indexing field values of less than 128 characters; longer values can still be searched for, but no index will be constructed
|
||||
** Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, `[all[shadows+tiddlers]caption[x]...` is optimised.
|
||||
* Use the [[throttling|RefreshThrottling]] feature of the RefreshMechanism judiciously
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"tiddlywiki/browser-sniff",
|
||||
"tiddlywiki/railroad",
|
||||
"tiddlywiki/evernote",
|
||||
"tiddlywiki/internals",
|
||||
"tiddlywiki/menubar"
|
||||
],
|
||||
"themes": [
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"description": "Demo of Tank integration",
|
||||
"plugins": [
|
||||
"tiddlywiki/tiddlyweb",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/tiddlyweb"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@@ -12,4 +11,4 @@
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","tw5tank.html","text/plain"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"description": "Chinese (Simplified) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"description": "Chinese (Traditional) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@@ -41,4 +40,4 @@
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user