mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 10:54:46 +00:00
Compare commits
89 Commits
parser-var
...
full-text-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2340b1215b | ||
|
|
d5c4aa250a | ||
|
|
70561bd481 | ||
|
|
2f5f0db00f | ||
|
|
4a6aa865b3 | ||
|
|
f29d24a1f5 | ||
|
|
2818f52f95 | ||
|
|
9453c4d684 | ||
|
|
42b965c9f0 | ||
|
|
e9a635dc81 | ||
|
|
26ade60e93 | ||
|
|
e7245a709c | ||
|
|
a6efc14a7c | ||
|
|
9fbcdeb29e | ||
|
|
ef1b7d619a | ||
|
|
ec70e5c179 | ||
|
|
4de0dc301b | ||
|
|
769ffa19b7 | ||
|
|
635ec65d3f | ||
|
|
da06b64845 | ||
|
|
ecb3c86e7b | ||
|
|
c6cd4d33e6 | ||
|
|
77fe6244a2 | ||
|
|
f6e485b897 | ||
|
|
4b5d287c90 | ||
|
|
c01e9cef12 | ||
|
|
655501140b | ||
|
|
cae32d39a5 | ||
|
|
bc5609820f | ||
|
|
b8fa6f0f0a | ||
|
|
9605d94b6c | ||
|
|
49b11bc493 | ||
|
|
9a4eb1e835 | ||
|
|
e71bf27dae | ||
|
|
c985fd63f9 | ||
|
|
f5ad5010bc | ||
|
|
12be7ac7e9 | ||
|
|
651619076a | ||
|
|
57ba4c8cba | ||
|
|
6a01ab20a0 | ||
|
|
81e3ab0bc5 | ||
|
|
e43ffe860b | ||
|
|
d0081a7247 | ||
|
|
972456ca07 | ||
|
|
c9efa23f02 | ||
|
|
3843c61132 | ||
|
|
f6938d6abb | ||
|
|
aa7a00d080 | ||
|
|
4c6de22711 | ||
|
|
83f976ea54 | ||
|
|
3153c588ec | ||
|
|
0ce1843070 | ||
|
|
f7f55e8eff | ||
|
|
5cc1600072 | ||
|
|
1a91f81976 | ||
|
|
b9234fe238 | ||
|
|
4cdbe6540b | ||
|
|
4877891980 | ||
|
|
a1b486436e | ||
|
|
c3a8cc7eb4 | ||
|
|
707e9d8926 | ||
|
|
adf0c1a12a | ||
|
|
fd4cfaeb02 | ||
|
|
ae8ee5b955 | ||
|
|
84479bc403 | ||
|
|
794dfb96f2 | ||
|
|
d254612826 | ||
|
|
c8721b38fd | ||
|
|
f863acf8ac | ||
|
|
7e7ecbe7a5 | ||
|
|
4ecd885a0c | ||
|
|
dbda09b9fc | ||
|
|
41931082e6 | ||
|
|
5af76c5ea1 | ||
|
|
1446a1e44c | ||
|
|
69c12618d9 | ||
|
|
651fb777ab | ||
|
|
34a51d2e23 | ||
|
|
2fc62c1a52 | ||
|
|
5ebd98779a | ||
|
|
405c618b6b | ||
|
|
773dcce713 | ||
|
|
87dc67d0cd | ||
|
|
68b455565b | ||
|
|
c60402b06d | ||
|
|
c187f4b238 | ||
|
|
4eda601a32 | ||
|
|
8bfd8f3a26 | ||
|
|
ba9de17b87 |
15
.eslintignore
Normal file
15
.eslintignore
Normal file
@@ -0,0 +1,15 @@
|
||||
# Known minified files
|
||||
/boot/sjcl.js
|
||||
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
|
||||
/core/modules/utils/diff-match-patch/diff_match_patch.js
|
||||
/plugins/tiddlywiki/async/files/async.min.v1.5.0.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/anyword-hint.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/css-hint.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/html-hint.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/javascript-hint.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/show-hint.js
|
||||
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/xml-hint.js
|
||||
/plugins/tiddlywiki/codemirror-closebrackets/files/addon/edit/closebrackets.js
|
||||
/plugins/tiddlywiki/codemirror-closebrackets/files/addon/edit/matchbrackets.js
|
||||
/plugins/tiddlywiki/codemirror-closetag/files/addon/edit/closetag.js
|
||||
/plugins/tiddlywiki/codemirror-closetag/files/addon/fold/xml-fold.js
|
||||
267
.eslintrc.yml
Normal file
267
.eslintrc.yml
Normal file
@@ -0,0 +1,267 @@
|
||||
env:
|
||||
browser: true
|
||||
commonjs: true
|
||||
es2021: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
globals:
|
||||
"$tw": "writable" # temporary
|
||||
parserOptions:
|
||||
ecmaVersion: 5
|
||||
rules:
|
||||
array-bracket-newline: 'off'
|
||||
array-bracket-spacing: 'off'
|
||||
array-callback-return: 'off'
|
||||
array-element-newline: 'off'
|
||||
arrow-body-style: error
|
||||
arrow-parens:
|
||||
- error
|
||||
- as-needed
|
||||
arrow-spacing:
|
||||
- error
|
||||
- after: true
|
||||
before: true
|
||||
block-scoped-var: 'off'
|
||||
block-spacing: 'off'
|
||||
brace-style: 'off'
|
||||
callback-return: 'off'
|
||||
camelcase: 'off'
|
||||
capitalized-comments: 'off'
|
||||
class-methods-use-this: error
|
||||
comma-dangle: 'off'
|
||||
comma-spacing: 'off'
|
||||
comma-style: 'off'
|
||||
complexity: 'off'
|
||||
computed-property-spacing: 'off'
|
||||
consistent-return: 'off'
|
||||
consistent-this: 'off'
|
||||
curly: 'off'
|
||||
default-case: 'off'
|
||||
default-case-last: error
|
||||
default-param-last: error
|
||||
dot-location: 'off'
|
||||
dot-notation: 'off'
|
||||
eol-last: 'off'
|
||||
eqeqeq: 'off'
|
||||
func-call-spacing: 'off'
|
||||
func-name-matching: 'off'
|
||||
func-names: 'off'
|
||||
func-style: 'off'
|
||||
function-call-argument-newline: 'off'
|
||||
function-paren-newline: 'off'
|
||||
generator-star-spacing: error
|
||||
global-require: 'off'
|
||||
grouped-accessor-pairs: error
|
||||
guard-for-in: 'off'
|
||||
handle-callback-err: 'off'
|
||||
id-blacklist: error
|
||||
id-denylist: error
|
||||
id-length: 'off'
|
||||
id-match: error
|
||||
implicit-arrow-linebreak: error
|
||||
indent: 'off'
|
||||
indent-legacy: 'off'
|
||||
init-declarations: 'off'
|
||||
jsx-quotes: error
|
||||
key-spacing: 'off'
|
||||
keyword-spacing: 'off'
|
||||
line-comment-position: 'off'
|
||||
linebreak-style: 'off'
|
||||
lines-around-comment: 'off'
|
||||
lines-around-directive: 'off'
|
||||
lines-between-class-members: error
|
||||
max-classes-per-file: error
|
||||
max-depth: 'off'
|
||||
max-len: 'off'
|
||||
max-lines: 'off'
|
||||
max-lines-per-function: 'off'
|
||||
max-nested-callbacks: error
|
||||
max-params: 'off'
|
||||
max-statements: 'off'
|
||||
max-statements-per-line: 'off'
|
||||
multiline-comment-style: 'off'
|
||||
multiline-ternary: 'off'
|
||||
new-parens: 'off'
|
||||
newline-after-var: 'off'
|
||||
newline-before-return: 'off'
|
||||
newline-per-chained-call: 'off'
|
||||
no-alert: 'off'
|
||||
no-array-constructor: 'off'
|
||||
no-await-in-loop: error
|
||||
no-bitwise: 'off'
|
||||
no-buffer-constructor: 'off'
|
||||
no-caller: error
|
||||
no-catch-shadow: 'off'
|
||||
no-confusing-arrow: error
|
||||
no-console: 'off'
|
||||
no-constant-condition:
|
||||
- error
|
||||
- checkLoops: false
|
||||
no-constructor-return: error
|
||||
no-continue: 'off'
|
||||
no-div-regex: 'off'
|
||||
no-duplicate-imports: error
|
||||
no-else-return: 'off'
|
||||
no-empty-function: 'off'
|
||||
no-eq-null: 'off'
|
||||
no-eval: 'off'
|
||||
no-extend-native: 'off'
|
||||
no-extra-bind: 'off'
|
||||
no-extra-label: 'off'
|
||||
no-extra-parens: 'off'
|
||||
no-floating-decimal: 'off'
|
||||
no-implicit-coercion:
|
||||
- error
|
||||
- boolean: false
|
||||
number: false
|
||||
string: false
|
||||
no-implicit-globals: 'off'
|
||||
no-implied-eval: error
|
||||
no-inline-comments: 'off'
|
||||
no-invalid-this: 'off'
|
||||
no-iterator: error
|
||||
no-label-var: 'off'
|
||||
no-labels: 'off'
|
||||
no-lone-blocks: 'off'
|
||||
no-lonely-if: 'off'
|
||||
no-loop-func: 'off'
|
||||
no-loss-of-precision: error
|
||||
no-magic-numbers: 'off'
|
||||
no-mixed-operators: 'off'
|
||||
no-mixed-requires: 'off'
|
||||
no-multi-assign: 'off'
|
||||
no-multi-spaces: 'off'
|
||||
no-multi-str: error
|
||||
no-multiple-empty-lines: 'off'
|
||||
no-native-reassign: 'off'
|
||||
no-negated-condition: 'off'
|
||||
no-negated-in-lhs: error
|
||||
no-nested-ternary: 'off'
|
||||
no-new: 'off'
|
||||
no-new-func: 'off'
|
||||
no-new-object: 'off'
|
||||
no-new-require: error
|
||||
no-new-wrappers: error
|
||||
no-octal-escape: error
|
||||
no-param-reassign: 'off'
|
||||
no-path-concat: error
|
||||
no-plusplus: 'off'
|
||||
no-process-env: 'off'
|
||||
no-process-exit: 'off'
|
||||
no-promise-executor-return: error
|
||||
no-proto: 'off'
|
||||
no-restricted-exports: error
|
||||
no-restricted-globals: error
|
||||
no-restricted-imports: error
|
||||
no-restricted-modules: error
|
||||
no-restricted-properties: error
|
||||
no-restricted-syntax: error
|
||||
no-return-assign: 'off'
|
||||
no-return-await: error
|
||||
no-script-url: 'off'
|
||||
no-self-compare: 'off'
|
||||
no-sequences: 'off'
|
||||
no-shadow: 'off'
|
||||
no-spaced-func: 'off'
|
||||
no-sync: 'off'
|
||||
no-tabs: 'off'
|
||||
no-template-curly-in-string: error
|
||||
no-ternary: 'off'
|
||||
no-throw-literal: 'off'
|
||||
no-trailing-spaces: 'off'
|
||||
no-undef-init: 'off'
|
||||
no-undefined: 'off'
|
||||
no-underscore-dangle: 'off'
|
||||
no-unmodified-loop-condition: 'off'
|
||||
no-unneeded-ternary: 'off'
|
||||
no-unreachable-loop: error
|
||||
no-unused-expressions: 'off'
|
||||
no-use-before-define: 'off'
|
||||
no-useless-backreference: error
|
||||
no-useless-call: 'off'
|
||||
no-useless-computed-key: error
|
||||
no-useless-concat: 'off'
|
||||
no-useless-constructor: error
|
||||
no-useless-rename: error
|
||||
no-useless-return: 'off'
|
||||
no-var: 'off'
|
||||
no-void: 'off'
|
||||
no-warning-comments: 'off'
|
||||
no-whitespace-before-property: error
|
||||
nonblock-statement-body-position:
|
||||
- error
|
||||
- any
|
||||
object-curly-newline: 'off'
|
||||
object-curly-spacing: 'off'
|
||||
object-property-newline: 'off'
|
||||
object-shorthand: 'off'
|
||||
one-var: 'off'
|
||||
one-var-declaration-per-line: 'off'
|
||||
operator-assignment: 'off'
|
||||
operator-linebreak: 'off'
|
||||
padded-blocks: 'off'
|
||||
padding-line-between-statements: error
|
||||
prefer-arrow-callback: 'off'
|
||||
prefer-const: 'off'
|
||||
prefer-destructuring: 'off'
|
||||
prefer-exponentiation-operator: 'off'
|
||||
prefer-named-capture-group: 'off'
|
||||
prefer-numeric-literals: error
|
||||
prefer-object-spread: 'off'
|
||||
prefer-promise-reject-errors: error
|
||||
prefer-reflect: 'off'
|
||||
prefer-regex-literals: 'off'
|
||||
prefer-rest-params: 'off'
|
||||
prefer-spread: 'off'
|
||||
prefer-template: 'off'
|
||||
quote-props: 'off'
|
||||
quotes: 'off'
|
||||
radix: 'off'
|
||||
require-atomic-updates: error
|
||||
require-await: error
|
||||
require-jsdoc: 'off'
|
||||
require-unicode-regexp: 'off'
|
||||
rest-spread-spacing: error
|
||||
semi: 'off'
|
||||
semi-spacing: 'off'
|
||||
semi-style: 'off'
|
||||
sort-imports: error
|
||||
sort-keys: 'off'
|
||||
sort-vars: 'off'
|
||||
space-before-blocks: 'off'
|
||||
space-before-function-paren: 'off'
|
||||
space-in-parens: 'off'
|
||||
space-infix-ops: 'off'
|
||||
space-unary-ops: 'off'
|
||||
spaced-comment: 'off'
|
||||
strict: 'off'
|
||||
switch-colon-spacing: 'off'
|
||||
symbol-description: error
|
||||
template-curly-spacing: error
|
||||
template-tag-spacing: error
|
||||
unicode-bom:
|
||||
- error
|
||||
- never
|
||||
valid-jsdoc: 'off'
|
||||
valid-typeof:
|
||||
- error
|
||||
- requireStringLiterals: false
|
||||
vars-on-top: 'off'
|
||||
wrap-iife: 'off'
|
||||
wrap-regex: 'off'
|
||||
yield-star-spacing: error
|
||||
yoda: 'off'
|
||||
|
||||
# temporary rules
|
||||
no-useless-escape: 'off'
|
||||
no-unused-vars: 'off'
|
||||
no-empty: 'off'
|
||||
no-extra-semi: 'off'
|
||||
no-redeclare: 'off'
|
||||
no-control-regex: "off"
|
||||
no-mixed-spaces-and-tabs: "off"
|
||||
no-extra-boolean-cast: "off"
|
||||
no-prototype-builtins: "off"
|
||||
no-undef: "off"
|
||||
no-unreachable: "off"
|
||||
no-self-assign: "off"
|
||||
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -39,9 +39,9 @@ jobs:
|
||||
- name: "Set dynamic environment variables"
|
||||
run: |
|
||||
TW5_BUILD_BRANCH=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||
echo ::set-env name=TW5_BUILD_BRANCH::${TW5_BUILD_BRANCH}
|
||||
echo ::set-env name=TW5_BUILD_VERSION::$(./bin/get-plugin-library-version-number)
|
||||
echo ::set-env name=TW5_BUILD_DETAILS::Prerelease built from branch \'$TW5_BUILD_BRANCH\' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date +'%F %T %Z')
|
||||
echo "TW5_BUILD_BRANCH=${TW5_BUILD_BRANCH}" >> $GITHUB_ENV
|
||||
echo "TW5_BUILD_VERSION=$(./bin/get-plugin-library-version-number)" >> $GITHUB_ENV
|
||||
echo "TW5_BUILD_DETAILS=Prerelease built from branch '$TW5_BUILD_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date +'%F %T %Z')" >> $GITHUB_ENV
|
||||
- run: "./bin/build-site.sh"
|
||||
- run: "./bin/ci-push.sh"
|
||||
env:
|
||||
@@ -65,9 +65,9 @@ jobs:
|
||||
- name: "Set dynamic environment variables"
|
||||
run: |
|
||||
TW5_BUILD_BRANCH=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||
echo ::set-env name=TW5_BUILD_BRANCH::${TW5_BUILD_BRANCH}
|
||||
echo ::set-env name=TW5_BUILD_VERSION::$(./bin/get-plugin-library-version-number)
|
||||
echo ::set-env name=TW5_BUILD_DETAILS::Built from branch \'$TW5_BUILD_BRANCH\' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date +'%F %T %Z')
|
||||
echo "TW5_BUILD_BRANCH=${TW5_BUILD_BRANCH}" >> $GITHUB_ENV
|
||||
echo "TW5_BUILD_VERSION=$(./bin/get-plugin-library-version-number)" >> $GITHUB_ENV
|
||||
echo "TW5_BUILD_DETAILS=Built from branch '$TW5_BUILD_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date +'%F %T %Z')" >> $GITHUB_ENV
|
||||
- run: "./bin/build-site.sh"
|
||||
- run: "./bin/ci-push.sh"
|
||||
env:
|
||||
|
||||
@@ -2,19 +2,14 @@
|
||||
|
||||
# Push output back to GitHub
|
||||
|
||||
# Exit script immediately if any command fails
|
||||
set -e
|
||||
|
||||
cd output || exit 1
|
||||
|
||||
git config --global user.email "actions@github.com" || exit 1
|
||||
|
||||
git config --global user.name "GitHub Actions" || exit 1
|
||||
|
||||
git add -A . || exit 1
|
||||
|
||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))" || exit 1
|
||||
|
||||
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null || exit 1
|
||||
|
||||
git push deploy master &>/dev/null || exit 1
|
||||
|
||||
cd .. || exit 1
|
||||
cd output
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git add -A .
|
||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
||||
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null
|
||||
git push deploy master &>/dev/null
|
||||
cd ..
|
||||
|
||||
29
boot/boot.js
29
boot/boot.js
@@ -267,8 +267,16 @@ $tw.utils.htmlDecode = function(s) {
|
||||
Get the browser location.hash. We don't use location.hash because of the way that Firefox auto-urldecodes it (see http://stackoverflow.com/questions/1703552/encoding-of-window-location-hash)
|
||||
*/
|
||||
$tw.utils.getLocationHash = function() {
|
||||
var parts = window.location.href.split('#');
|
||||
return "#" + (parts.length > 1 ? parts[1] : "");
|
||||
var href = window.location.href;
|
||||
var idx = href.indexOf('#');
|
||||
if(idx === -1) {
|
||||
return "#";
|
||||
} else if(idx < href.length-1 && href[idx+1] === '#') {
|
||||
// Special case: ignore location hash if it itself starts with a #
|
||||
return "#";
|
||||
} else {
|
||||
return href.substring(idx);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -652,11 +660,13 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
|
||||
var promptInfo = {
|
||||
serviceName: options.serviceName,
|
||||
callback: options.callback,
|
||||
form: form
|
||||
form: form,
|
||||
owner: this
|
||||
};
|
||||
this.passwordPrompts.push(promptInfo);
|
||||
// Make sure the wrapper is displayed
|
||||
this.setWrapperDisplay();
|
||||
return promptInfo;
|
||||
};
|
||||
|
||||
$tw.utils.PasswordPrompt.prototype.removePrompt = function(promptInfo) {
|
||||
@@ -1270,7 +1280,7 @@ $tw.Wiki = function(options) {
|
||||
$tw.utils.each(titles || getTiddlerTitles(),function(title) {
|
||||
var tiddler = tiddlers[title];
|
||||
if(tiddler) {
|
||||
if(tiddler.fields.type === "application/json" && tiddler.hasField("plugin-type")) {
|
||||
if(tiddler.fields.type === "application/json" && tiddler.hasField("plugin-type") && tiddler.fields.text) {
|
||||
pluginInfo[tiddler.fields.title] = JSON.parse(tiddler.fields.text);
|
||||
results.modifiedPlugins.push(tiddler.fields.title);
|
||||
}
|
||||
@@ -1822,7 +1832,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
// Read the specification
|
||||
var filesInfo = JSON.parse(fs.readFileSync(filepath + path.sep + "tiddlywiki.files","utf8"));
|
||||
// Helper to process a file
|
||||
var processFile = function(filename,isTiddlerFile,fields) {
|
||||
var processFile = function(filename,isTiddlerFile,fields,isEditableFile) {
|
||||
var extInfo = $tw.config.fileExtensionInfo[path.extname(filename)],
|
||||
type = (extInfo || {}).type || fields.type || "text/plain",
|
||||
typeInfo = $tw.config.contentTypeInfo[type] || {},
|
||||
@@ -1875,7 +1885,11 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
}
|
||||
});
|
||||
});
|
||||
tiddlers.push({tiddlers: fileTiddlers});
|
||||
if(isEditableFile) {
|
||||
tiddlers.push({filepath: pathname, hasMetaFile: !!metadata && !isTiddlerFile, tiddlers: fileTiddlers});
|
||||
} else {
|
||||
tiddlers.push({tiddlers: fileTiddlers});
|
||||
}
|
||||
};
|
||||
// Process the listed tiddlers
|
||||
$tw.utils.each(filesInfo.tiddlers,function(tidInfo) {
|
||||
@@ -1905,7 +1919,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
for(var t=0; t<files.length; t++) {
|
||||
var filename = files[t];
|
||||
if(filename !== "tiddlywiki.files" && !metaRegExp.test(filename) && fileRegExp.test(filename)) {
|
||||
processFile(dirPath + path.sep + filename,dirSpec.isTiddlerFile,dirSpec.fields);
|
||||
processFile(dirPath + path.sep + filename,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2258,6 +2272,7 @@ $tw.boot.initStartup = function(options) {
|
||||
$tw.utils.registerFileType("application/zip","base64",".zip");
|
||||
$tw.utils.registerFileType("application/x-zip-compressed","base64",".zip");
|
||||
$tw.utils.registerFileType("image/jpeg","base64",[".jpg",".jpeg"],{flags:["image"]});
|
||||
$tw.utils.registerFileType("image/jpg","base64",[".jpg",".jpeg"],{flags:["image"]});
|
||||
$tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]});
|
||||
$tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]});
|
||||
$tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]});
|
||||
|
||||
@@ -13,6 +13,11 @@ Listing/Preview/TextRaw: Text (Raw)
|
||||
Listing/Preview/Fields: Fields
|
||||
Listing/Preview/Diff: Diff
|
||||
Listing/Preview/DiffFields: Diff (Fields)
|
||||
Listing/Rename/Tooltip: Rename tiddler before importing
|
||||
Listing/Rename/Prompt: Rename to:
|
||||
Listing/Rename/ConfirmRename: Rename tiddler
|
||||
Listing/Rename/CancelRename: Cancel
|
||||
Listing/Rename/OverwriteWarning: A tiddler with this title already exists.
|
||||
Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin
|
||||
Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)
|
||||
Upgrader/Plugins/Upgraded: Upgraded plugin from <<incoming>> to <<upgraded>>
|
||||
|
||||
@@ -26,6 +26,7 @@ Error/Caption: Error
|
||||
Error/EditConflict: File changed on server
|
||||
Error/Filter: Filter error
|
||||
Error/FilterSyntax: Syntax error in filter expression
|
||||
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
|
||||
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator
|
||||
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
|
||||
Error/LoadingPluginLibrary: Error loading plugin library
|
||||
@@ -63,11 +64,15 @@ OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library
|
||||
OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to ~JavaScript plugins to take effect
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
Shortcuts/Input/AdvancedSearch/Hint: Open the ~AdvancedSearch panel from within the sidebar search field
|
||||
Shortcuts/Input/Accept/Hint: Accept the selected item
|
||||
Shortcuts/Input/AcceptVariant/Hint: Accept the selected item (variant)
|
||||
Shortcuts/Input/Cancel/Hint: Clear the input field
|
||||
Shortcuts/Input/Down/Hint: Select the next item
|
||||
Shortcuts/Input/Tab-Left/Hint: Select the previous Tab
|
||||
Shortcuts/Input/Tab-Right/Hint: Select the next Tab
|
||||
Shortcuts/Input/Up/Hint: Select the previous item
|
||||
Shortcuts/SidebarLayout/Hint: Change the sidebar layout
|
||||
SystemTiddler/Tooltip: This is a system tiddler
|
||||
SystemTiddlers/Include/Prompt: Include system tiddlers
|
||||
TagManager/Colour/Heading: Colour
|
||||
|
||||
25
core/modules/filterrunprefixes/all.js
Normal file
25
core/modules/filterrunprefixes/all.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/all.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
Union of sets without de-duplication.
|
||||
Equivalent to = filter run prefix.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.all = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
Array.prototype.push.apply(results,operationSubFunction(source,widget));
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
28
core/modules/filterrunprefixes/and.js
Normal file
28
core/modules/filterrunprefixes/and.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/and.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
Intersection of sets.
|
||||
Equivalent to + filter run prefix.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.and = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved
|
||||
source = $tw.wiki.makeTiddlerIterator(results);
|
||||
results.splice(0,results.length);
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
27
core/modules/filterrunprefixes/else.js
Normal file
27
core/modules/filterrunprefixes/else.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/else.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
Equivalent to ~ filter run prefix.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.else = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length === 0) {
|
||||
// Main result so far is empty
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
25
core/modules/filterrunprefixes/except.js
Normal file
25
core/modules/filterrunprefixes/except.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/except.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
Difference of sets.
|
||||
Equivalent to - filter run prefix.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.except = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
31
core/modules/filterrunprefixes/filter.js
Normal file
31
core/modules/filterrunprefixes/filter.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/filter.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.filter = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length > 0) {
|
||||
var resultsToRemove = [];
|
||||
$tw.utils.each(results,function(result) {
|
||||
var filtered = operationSubFunction($tw.wiki.makeTiddlerIterator([result]),widget);
|
||||
if(filtered.length === 0) {
|
||||
resultsToRemove.push(result);
|
||||
}
|
||||
});
|
||||
$tw.utils.removeArrayEntries(results,resultsToRemove);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
30
core/modules/filterrunprefixes/intersection.js
Normal file
30
core/modules/filterrunprefixes/intersection.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/intersection.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.intersection = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length !== 0) {
|
||||
var secondRunResults = operationSubFunction(source,widget);
|
||||
var firstRunResults = results.splice(0);
|
||||
$tw.utils.each(firstRunResults,function(title) {
|
||||
if(secondRunResults.indexOf(title) !== -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
24
core/modules/filterrunprefixes/or.js
Normal file
24
core/modules/filterrunprefixes/or.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/or.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
|
||||
Equivalent to a filter run with no prefix.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.or = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -119,7 +119,7 @@ exports.parseFilter = function(filterString) {
|
||||
p = 0, // Current position in the filter string
|
||||
match;
|
||||
var whitespaceRegExp = /(\s+)/mg,
|
||||
operandRegExp = /((?:\+|\-|~|=)?)(?:(\[)|(?:"([^"]*)")|(?:'([^']*)')|([^\s\[\]]+))/mg;
|
||||
operandRegExp = /((?:\+|\-|~|=|\:(\w+))?)(?:(\[)|(?:"([^"]*)")|(?:'([^']*)')|([^\s\[\]]+))/mg;
|
||||
while(p < filterString.length) {
|
||||
// Skip any whitespace
|
||||
whitespaceRegExp.lastIndex = p;
|
||||
@@ -140,16 +140,19 @@ exports.parseFilter = function(filterString) {
|
||||
};
|
||||
if(match[1]) {
|
||||
operation.prefix = match[1];
|
||||
p++;
|
||||
p = p + operation.prefix.length;
|
||||
if(match[2]) {
|
||||
operation.namedPrefix = match[2];
|
||||
}
|
||||
}
|
||||
if(match[2]) { // Opening square bracket
|
||||
if(match[3]) { // Opening square bracket
|
||||
p = parseFilterOperation(operation.operators,filterString,p);
|
||||
} else {
|
||||
p = match.index + match[0].length;
|
||||
}
|
||||
if(match[3] || match[4] || match[5]) { // Double quoted string, single quoted string or unquoted title
|
||||
if(match[4] || match[5] || match[6]) { // Double quoted string, single quoted string or unquoted title
|
||||
operation.operators.push(
|
||||
{operator: "title", operand: match[3] || match[4] || match[5]}
|
||||
{operator: "title", operand: match[4] || match[5] || match[6]}
|
||||
);
|
||||
}
|
||||
results.push(operation);
|
||||
@@ -166,6 +169,14 @@ exports.getFilterOperators = function() {
|
||||
return this.filterOperators;
|
||||
};
|
||||
|
||||
exports.getFilterRunPrefixes = function() {
|
||||
if(!this.filterPrefixes) {
|
||||
$tw.Wiki.prototype.filterRunPrefixes = {};
|
||||
$tw.modules.applyMethods("filterrunprefix",this.filterRunPrefixes);
|
||||
}
|
||||
return this.filterRunPrefixes;
|
||||
}
|
||||
|
||||
exports.filterTiddlers = function(filterString,widget,source) {
|
||||
var fn = this.compileFilter(filterString);
|
||||
return fn.call(this,source,widget);
|
||||
@@ -241,35 +252,29 @@ exports.compileFilter = function(filterString) {
|
||||
return resultArray;
|
||||
}
|
||||
};
|
||||
var filterRunPrefixes = self.getFilterRunPrefixes();
|
||||
// Wrap the operator functions in a wrapper function that depends on the prefix
|
||||
operationFunctions.push((function() {
|
||||
switch(operation.prefix || "") {
|
||||
case "": // No prefix means that the operation is unioned into the result
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
return filterRunPrefixes["or"](operationSubFunction);
|
||||
case "=": // The results of the operation are pushed into the result without deduplication
|
||||
return function(results,source,widget) {
|
||||
Array.prototype.push.apply(results,operationSubFunction(source,widget));
|
||||
};
|
||||
return filterRunPrefixes["all"](operationSubFunction);
|
||||
case "-": // The results of this operation are removed from the main result
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));
|
||||
};
|
||||
return filterRunPrefixes["except"](operationSubFunction);
|
||||
case "+": // This operation is applied to the main results so far
|
||||
return function(results,source,widget) {
|
||||
// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved
|
||||
source = self.makeTiddlerIterator(results);
|
||||
results.splice(0,results.length);
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
return filterRunPrefixes["and"](operationSubFunction);
|
||||
case "~": // This operation is unioned into the result only if the main result so far is empty
|
||||
return function(results,source,widget) {
|
||||
if(results.length === 0) {
|
||||
// Main result so far is empty
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
}
|
||||
};
|
||||
return filterRunPrefixes["else"](operationSubFunction);
|
||||
default:
|
||||
if(operation.namedPrefix && filterRunPrefixes[operation.namedPrefix]) {
|
||||
return filterRunPrefixes[operation.namedPrefix](operationSubFunction);
|
||||
} else {
|
||||
return function(results,source,widget) {
|
||||
results.splice(0,results.length);
|
||||
results.push($tw.language.getString("Error/FilterRunPrefix"));
|
||||
};
|
||||
}
|
||||
}
|
||||
})());
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ title: $:/core/modules/filters/reduce.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator evaluats a subfilter for each item, making the running total available in the variable `accumulator`, and the current index available in the variable `index`
|
||||
Filter operator evaluates a subfilter for each item, making the running total available in the variable `accumulator`, and the current index available in the variable `index`
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
@@ -56,14 +56,14 @@ exports.trim = function(source,operator,options) {
|
||||
return result;
|
||||
};
|
||||
|
||||
// makeStringBinaryOperator(
|
||||
// function(a) {return [$tw.utils.trim(a)];}
|
||||
// );
|
||||
|
||||
exports.split = makeStringBinaryOperator(
|
||||
function(a,b) {return ("" + a).split(b);}
|
||||
);
|
||||
|
||||
exports["enlist-input"] = makeStringBinaryOperator(
|
||||
function(a) {return $tw.utils.parseStringArray("" + a);}
|
||||
);
|
||||
|
||||
exports.join = makeStringReducingOperator(
|
||||
function(accumulator,value,operand) {
|
||||
if(accumulator === null) {
|
||||
|
||||
@@ -153,7 +153,7 @@ SaverHandler.prototype.saveWiki = function(options) {
|
||||
var self = this,
|
||||
method = options.method || "save";
|
||||
// Ignore autosave if disabled
|
||||
if(method === "autosave" && this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") {
|
||||
if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
||||
return false;
|
||||
}
|
||||
var variables = options.variables || {},
|
||||
|
||||
60
core/modules/savers/custom.js
Normal file
60
core/modules/savers/custom.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/custom.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Looks for `window.$tw.customSaver` first on the current window, then
|
||||
on the parent window (of an iframe). If present, the saver must define
|
||||
save: function(text,method,callback) { ... }
|
||||
and the saver may define
|
||||
priority: number
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var findSaver = function(window) {
|
||||
try {
|
||||
return window && window.$tw && window.$tw.customSaver;
|
||||
} catch (err) {
|
||||
// Catching the exception is the most reliable way to detect cross-origin iframe errors.
|
||||
// For example, instead of saying that `window.parent.$tw` is undefined, Firefox will throw
|
||||
// Uncaught DOMException: Permission denied to access property "$tw" on cross-origin object
|
||||
console.log({ msg: "custom saver is disabled", reason: err });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
var saver = findSaver(window) || findSaver(window.parent) || {};
|
||||
|
||||
var CustomSaver = function(wiki) {
|
||||
};
|
||||
|
||||
CustomSaver.prototype.save = function(text,method,callback) {
|
||||
return saver.save(text, method, callback);
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
CustomSaver.prototype.info = {
|
||||
name: "custom",
|
||||
priority: saver.priority || 4000,
|
||||
capabilities: ["save","autosave"]
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return !!(saver.save);
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new CustomSaver(wiki);
|
||||
};
|
||||
})();
|
||||
@@ -106,6 +106,8 @@ exports.startup = function() {
|
||||
// Fix up the link between the root widget and the page container
|
||||
$tw.rootWidget.domNodes = [$tw.pageContainer];
|
||||
$tw.rootWidget.children = [$tw.pageWidgetNode];
|
||||
// Run any post-render startup actions
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/PostRender");
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -64,17 +64,12 @@ exports.startup = function() {
|
||||
document: $tw.browser ? document : $tw.fakeDocument
|
||||
});
|
||||
// Execute any startup actions
|
||||
var executeStartupTiddlers = function(tag) {
|
||||
$tw.utils.each($tw.wiki.filterTiddlers("[all[shadows+tiddlers]tag[" + tag + "]!has[draft.of]]"),function(title) {
|
||||
$tw.rootWidget.invokeActionString($tw.wiki.getTiddlerText(title),$tw.rootWidget);
|
||||
});
|
||||
};
|
||||
executeStartupTiddlers("$:/tags/StartupAction");
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction");
|
||||
if($tw.browser) {
|
||||
executeStartupTiddlers("$:/tags/StartupAction/Browser");
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/Browser");
|
||||
}
|
||||
if($tw.node) {
|
||||
executeStartupTiddlers("$:/tags/StartupAction/Node");
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/Node");
|
||||
}
|
||||
// Kick off the language manager and switcher
|
||||
$tw.language = new $tw.Language();
|
||||
|
||||
@@ -150,6 +150,11 @@ function openStartupTiddlers(options) {
|
||||
// Save the story list
|
||||
$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: "", list: storyList},$tw.wiki.getModificationFields());
|
||||
// Update history
|
||||
var story = new $tw.Story({
|
||||
wiki: $tw.wiki,
|
||||
storyTitle: DEFAULT_STORY_TITLE,
|
||||
historyTitle: DEFAULT_HISTORY_TITLE
|
||||
});
|
||||
if(!options.disableHistory) {
|
||||
// If a target tiddler was specified add it to the history stack
|
||||
if(target && target !== "") {
|
||||
@@ -157,9 +162,9 @@ function openStartupTiddlers(options) {
|
||||
if(target.indexOf("[[") === 0 && target.substr(-2) === "]]") {
|
||||
target = target.substr(2,target.length - 4);
|
||||
}
|
||||
$tw.wiki.addToHistory(target);
|
||||
story.addToHistory(target);
|
||||
} else if(storyList.length > 0) {
|
||||
$tw.wiki.addToHistory(storyList[0]);
|
||||
story.addToHistory(storyList[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,8 +113,16 @@ function Syncer(options) {
|
||||
return confirmationMessage;
|
||||
});
|
||||
// Listen out for login/logout/refresh events in the browser
|
||||
$tw.rootWidget.addEventListener("tm-login",function() {
|
||||
self.handleLoginEvent();
|
||||
$tw.rootWidget.addEventListener("tm-login",function(event) {
|
||||
var username = event && event.paramObject && event.paramObject.username,
|
||||
password = event && event.paramObject && event.paramObject.password;
|
||||
if(username && password) {
|
||||
// Login with username and password
|
||||
self.login(username,password,function() {});
|
||||
} else {
|
||||
// No username and password, so we display a prompt
|
||||
self.handleLoginEvent();
|
||||
}
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-logout",function() {
|
||||
self.handleLogoutEvent();
|
||||
@@ -400,15 +408,27 @@ Syncer.prototype.handleLoginEvent = function() {
|
||||
var self = this;
|
||||
this.getStatus(function(err,isLoggedIn,username) {
|
||||
if(!err && !isLoggedIn) {
|
||||
$tw.passwordPrompt.createPrompt({
|
||||
serviceName: $tw.language.getString("LoginToTiddlySpace"),
|
||||
callback: function(data) {
|
||||
self.login(data.username,data.password,function(err,isLoggedIn) {
|
||||
self.syncFromServer();
|
||||
});
|
||||
return true; // Get rid of the password prompt
|
||||
}
|
||||
if(self.syncadaptor && self.syncadaptor.displayLoginPrompt) {
|
||||
self.syncadaptor.displayLoginPrompt(self);
|
||||
} else {
|
||||
self.displayLoginPrompt();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Dispay a password prompt
|
||||
*/
|
||||
Syncer.prototype.displayLoginPrompt = function() {
|
||||
var self = this;
|
||||
var promptInfo = $tw.passwordPrompt.createPrompt({
|
||||
serviceName: $tw.language.getString("LoginToTiddlySpace"),
|
||||
callback: function(data) {
|
||||
self.login(data.username,data.password,function(err,isLoggedIn) {
|
||||
self.syncFromServer();
|
||||
});
|
||||
return true; // Get rid of the password prompt
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -49,7 +49,12 @@ Handle an event
|
||||
*/
|
||||
PageScroller.prototype.handleEvent = function(event) {
|
||||
if(event.type === "tm-scroll") {
|
||||
return this.scrollIntoView(event.target);
|
||||
if(event.paramObject && event.paramObject.selector) {
|
||||
this.scrollSelectorIntoView(null,event.paramObject.selector);
|
||||
} else {
|
||||
this.scrollIntoView(event.target);
|
||||
}
|
||||
return false; // Event was handled
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -117,6 +122,14 @@ PageScroller.prototype.scrollIntoView = function(element,callback) {
|
||||
drawFrame();
|
||||
};
|
||||
|
||||
PageScroller.prototype.scrollSelectorIntoView = function(baseElement,selector,callback) {
|
||||
baseElement = baseElement || document.body;
|
||||
var element = baseElement.querySelector(selector);
|
||||
if(element) {
|
||||
this.scrollIntoView(element,callback);
|
||||
}
|
||||
};
|
||||
|
||||
exports.PageScroller = PageScroller;
|
||||
|
||||
})();
|
||||
|
||||
@@ -87,8 +87,14 @@ ListWidget.prototype.getTiddlerList = function() {
|
||||
};
|
||||
|
||||
ListWidget.prototype.getEmptyMessage = function() {
|
||||
var emptyMessage = this.getAttribute("emptyMessage",""),
|
||||
parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true});
|
||||
var parser,
|
||||
emptyMessage = this.getAttribute("emptyMessage","");
|
||||
// this.wiki.parseText() calls
|
||||
// new Parser(..), which should only be done, if needed, because it's heavy!
|
||||
if (emptyMessage === "") {
|
||||
return [];
|
||||
}
|
||||
parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true});
|
||||
if(parser) {
|
||||
return parser.tree;
|
||||
} else {
|
||||
|
||||
@@ -62,6 +62,11 @@ NavigatorWidget.prototype.execute = function() {
|
||||
this.historyTitle = this.getAttribute("history");
|
||||
this.setVariable("tv-story-list",this.storyTitle);
|
||||
this.setVariable("tv-history-list",this.historyTitle);
|
||||
this.story = new $tw.Story({
|
||||
wiki: this.wiki,
|
||||
storyTitle: this.storyTitle,
|
||||
historyTitle: this.historyTitle
|
||||
});
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
@@ -123,7 +128,7 @@ NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle
|
||||
|
||||
NavigatorWidget.prototype.addToStory = function(title,fromTitle) {
|
||||
if(this.storyTitle) {
|
||||
this.wiki.addToStory(title,fromTitle,this.storyTitle,{
|
||||
this.story.addToStory(title,fromTitle,this.storyTitle,{
|
||||
openLinkFromInsideRiver: this.getAttribute("openLinkFromInsideRiver","top"),
|
||||
openLinkFromOutsideRiver: this.getAttribute("openLinkFromOutsideRiver","top")
|
||||
});
|
||||
@@ -136,7 +141,7 @@ title: a title string or an array of title strings
|
||||
fromPageRect: page coordinates of the origin of the navigation
|
||||
*/
|
||||
NavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {
|
||||
this.wiki.addToHistory(title,fromPageRect,this.historyTitle);
|
||||
this.story.addToHistory(title,fromPageRect,this.historyTitle);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -558,10 +563,14 @@ NavigatorWidget.prototype.handlePerformImportEvent = function(event) {
|
||||
$tw.utils.each(importData.tiddlers,function(tiddlerFields) {
|
||||
var title = tiddlerFields.title;
|
||||
if(title && importTiddler && importTiddler.fields["selection-" + title] !== "unchecked") {
|
||||
var tiddler = new $tw.Tiddler(tiddlerFields);
|
||||
if($tw.utils.hop(importTiddler.fields,["rename-" + title])) {
|
||||
var tiddler = new $tw.Tiddler(tiddlerFields,{title : importTiddler.fields["rename-" + title]});
|
||||
} else {
|
||||
var tiddler = new $tw.Tiddler(tiddlerFields);
|
||||
}
|
||||
tiddler = $tw.hooks.invokeHook("th-importing-tiddler",tiddler);
|
||||
self.wiki.addTiddler(tiddler);
|
||||
importReport.push("# [[" + tiddlerFields.title + "]]");
|
||||
importReport.push("# [[" + tiddler.fields.title + "]]");
|
||||
}
|
||||
});
|
||||
// Replace the $:/Import tiddler with an import report
|
||||
|
||||
@@ -58,7 +58,11 @@ ScrollableWidget.prototype.handleScrollEvent = function(event) {
|
||||
if(this.outerDomNode.scrollWidth <= this.outerDomNode.offsetWidth && this.outerDomNode.scrollHeight <= this.outerDomNode.offsetHeight && this.fallthrough === "yes") {
|
||||
return true;
|
||||
}
|
||||
this.scrollIntoView(event.target);
|
||||
if(event.paramObject && event.paramObject.selector) {
|
||||
this.scrollSelectorIntoView(null,event.paramObject.selector);
|
||||
} else {
|
||||
this.scrollIntoView(event.target);
|
||||
}
|
||||
return false; // Handled event
|
||||
};
|
||||
|
||||
@@ -130,6 +134,14 @@ ScrollableWidget.prototype.scrollIntoView = function(element) {
|
||||
}
|
||||
};
|
||||
|
||||
ScrollableWidget.prototype.scrollSelectorIntoView = function(baseElement,selector,callback) {
|
||||
baseElement = baseElement || document.body;
|
||||
var element = baseElement.querySelector(selector);
|
||||
if(element) {
|
||||
this.scrollIntoView(element,callback);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
|
||||
@@ -571,6 +571,16 @@ Widget.prototype.invokeActionString = function(actions,triggeringWidget,event,va
|
||||
return widgetNode.invokeActions(this,event);
|
||||
};
|
||||
|
||||
/*
|
||||
Execute action tiddlers by tag
|
||||
*/
|
||||
Widget.prototype.executeStartupTiddlers = function(tag) {
|
||||
var self = this;
|
||||
$tw.utils.each(self.wiki.filterTiddlers("[all[shadows+tiddlers]tag[" + tag + "]!has[draft.of]]"),function(title) {
|
||||
self.invokeActionString(self.wiki.getTiddlerText(title),self);
|
||||
});
|
||||
};
|
||||
|
||||
Widget.prototype.allowActionPropagation = function() {
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -378,10 +378,10 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,is
|
||||
y = Number(b);
|
||||
if(isNumeric && (!isNaN(x) || !isNaN(y))) {
|
||||
return compareNumbers(x,y);
|
||||
} else if(isAlphaNumeric) {
|
||||
return isDescending ? b.localeCompare(a,undefined,{numeric: true,sensitivity: "base"}) : a.localeCompare(b,undefined,{numeric: true,sensitivity: "base"});
|
||||
} else if($tw.utils.isDate(a) && $tw.utils.isDate(b)) {
|
||||
return isDescending ? b - a : a - b;
|
||||
} else if(isAlphaNumeric) {
|
||||
return isDescending ? b.localeCompare(a,undefined,{numeric: true,sensitivity: "base"}) : a.localeCompare(b,undefined,{numeric: true,sensitivity: "base"});
|
||||
} else {
|
||||
a = String(a);
|
||||
b = String(b);
|
||||
@@ -1426,7 +1426,8 @@ historyTitle: title of history tiddler (defaults to $:/HistoryList)
|
||||
*/
|
||||
exports.addToHistory = function(title,fromPageRect,historyTitle) {
|
||||
var story = new $tw.Story({wiki: this, historyTitle: historyTitle});
|
||||
story.addToHistory(title,fromPageRect);
|
||||
story.addToHistory(title,fromPageRect);
|
||||
console.log("$tw.wiki.addToHistory() is deprecated since V5.1.23! Use the this.story.addToHistory() from the story-object!")
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1438,7 +1439,8 @@ options: see story.js
|
||||
*/
|
||||
exports.addToStory = function(title,fromTitle,storyTitle,options) {
|
||||
var story = new $tw.Story({wiki: this, storyTitle: storyTitle});
|
||||
story.addToStory(title,fromTitle,options);
|
||||
story.addToStory(title,fromTitle,options);
|
||||
console.log("$tw.wiki.addToStory() is deprecated since V5.1.23! Use the this.story.addToStory() from the story-object!")
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,6 +2,6 @@ title: $:/core/save/all-external-js
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
\end
|
||||
{{$:/core/templates/tiddlywiki5-external-js.html}}
|
||||
|
||||
@@ -2,6 +2,6 @@ title: $:/core/save/all
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
\end
|
||||
{{$:/core/templates/tiddlywiki5.html}}
|
||||
|
||||
@@ -3,5 +3,5 @@ icon: $:/core/images/advanced-search-button
|
||||
color: #bbb
|
||||
|
||||
<div class="tc-advanced-search">
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" "$:/core/ui/AdvancedSearch/System">>
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" default="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/advanced-search-results"/>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,26 @@ tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Filter/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/advanced-search-results" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list>
|
||||
|
||||
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
|
||||
<<lingo Filter/Hint>>
|
||||
|
||||
<div class="tc-search tc-advanced-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input" focus={{$:/config/Search/AutoFocus}}/>
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/temp/advancedsearch]]" firstSearchFilterField="text"
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
inputCancelActions=<<cancel-search-actions>>/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +30,11 @@ caption: {{$:/language/Search/Filter/Caption}}
|
||||
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
|
||||
<div class="tc-search-results">
|
||||
<<lingo Filter/Matches>>
|
||||
<$list filter={{$:/temp/advancedsearch}} template="$:/core/ui/ListItemTemplate"/>
|
||||
<$list filter={{$:/temp/advancedsearch}}>
|
||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
</span>
|
||||
</$list>
|
||||
</div>
|
||||
</$set>
|
||||
</$reveal>
|
||||
|
||||
@@ -3,7 +3,8 @@ tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
<<cancel-search-actions>>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input""" />
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
||||
@@ -9,7 +9,7 @@ tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
<$linkcatcher actions="""<$action-setfield $tiddler="$:/temp/advancedsearch" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/input" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/><$action-sendmessage $message="tm-focus-selector" $param='.tc-advanced-search input' />""">
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link>
|
||||
|
||||
@@ -1,35 +1,53 @@
|
||||
title: $:/core/ui/AdvancedSearch/Shadows
|
||||
tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Shadows/Caption}}
|
||||
first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/advanced-search-results" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
||||
|
||||
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
|
||||
<<lingo Shadows/Hint>>
|
||||
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input" focus={{$:/config/Search/AutoFocus}}/>
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
<<cancel-search-actions>>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
|
||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
|
||||
<$set name="resultCount" value="""<$count filter="[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
|
||||
<$set name="resultCount" value="""<$count filter="[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]"/>""">
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
<<lingo Shadows/Matches>>
|
||||
|
||||
<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]">
|
||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
</span>
|
||||
</$list>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,32 +3,51 @@ tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Standard/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/advanced-search-results" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define next-search-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/advancedsearch" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/advancedsearch/standard/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
||||
|
||||
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
|
||||
<<lingo Standard/Hint>>
|
||||
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input" focus={{$:/config/Search/AutoFocus}}/>
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$keyboard key="shift-alt-Right" actions=<<next-search-tab>>>
|
||||
<$keyboard key="shift-alt-Left" actions=<<next-search-tab "before">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
<<cancel-search-actions>>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$set name="searchTiddler" value="$:/temp/advancedsearch">
|
||||
<$vars userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} searchListState="$:/temp/advancedsearch/selected-item">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]" emptyMessage="""
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]">
|
||||
<$transclude/>
|
||||
</$list>
|
||||
""">
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}}/>
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/advancedsearch/standard/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||
</$list>
|
||||
</$set>
|
||||
</$vars>
|
||||
</$list>
|
||||
</$reveal>
|
||||
|
||||
@@ -1,35 +1,52 @@
|
||||
title: $:/core/ui/AdvancedSearch/System
|
||||
tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/System/Caption}}
|
||||
first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler) <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/advanced-search-results" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
||||
|
||||
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
|
||||
<<lingo System/Hint>>
|
||||
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input" focus={{$:/config/Search/AutoFocus}}/>
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||
type="search" tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/System]]"
|
||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
<<cancel-search-actions>>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
|
||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
|
||||
<$set name="resultCount" value="""<$count filter="[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
|
||||
<$set name="resultCount" value="""<$count filter="[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]"/>""">
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
<<lingo System/Matches>>
|
||||
|
||||
<$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
<$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]">
|
||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
</span>
|
||||
</$list>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
title: $:/core/ui/DefaultSearchResultList
|
||||
tags: $:/tags/SearchResults
|
||||
caption: {{$:/language/Search/DefaultResults/Caption}}
|
||||
first-search-filter: [!is[system]search:title<userInput>sort[title]limit[250]]
|
||||
second-search-filter: [!is[system]search<userInput>sort[title]limit[250]]
|
||||
|
||||
\define searchResultList()
|
||||
//<small>{{$:/language/Search/Matches/Title}}</small>//
|
||||
|
||||
<$list filter="[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]">
|
||||
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||
<$list filter={{{ [<configTiddler>get[first-search-filter]] }}}>
|
||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
</span>
|
||||
</$list>
|
||||
</$list>
|
||||
|
||||
//<small>{{$:/language/Search/Matches/All}}</small>//
|
||||
|
||||
<$list filter="[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]">
|
||||
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||
<$list filter={{{ [<configTiddler>get[second-search-filter]] }}}>
|
||||
<span class={{{[<currentTiddler>addsuffix[-secondaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
</span>
|
||||
</$list>
|
||||
</$list>
|
||||
|
||||
\end
|
||||
<<searchResultList>>
|
||||
|
||||
@@ -21,6 +21,22 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
||||
\end
|
||||
|
||||
\define delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
|
||||
\define cancel-search-actions-inner()
|
||||
<$list filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]" variable="ignore" emptyMessage="""<<delete-state-tiddlers>><$action-sendmessage $message="tm-cancel-tiddler"/>""">
|
||||
<<delete-state-tiddlers>>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions()
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list filter="[<newFieldNameTiddler>get[text]!match<userInput>]" emptyMessage="""<<cancel-search-actions-inner>>""">
|
||||
<$action-setfield $tiddler=<<newFieldNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define new-field()
|
||||
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||
<$reveal type="nomatch" text="" default=<<name>>>
|
||||
@@ -68,13 +84,17 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
|
||||
<$fieldmangler>
|
||||
<div class="tc-edit-field-add">
|
||||
<em class="tc-edit">
|
||||
<<lingo Fields/Add/Prompt>>
|
||||
<em class="tc-edit tc-big-gap-right">
|
||||
<<lingo Fields/Add/Prompt>>
|
||||
</em>
|
||||
<div class="tc-edit-field-add-name-wrapper">
|
||||
<$edit-text tiddler=<<newFieldNameTiddler>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<<qualify "$:/state/popup/field-dropdown">> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}} cancelPopups="yes"/>
|
||||
|
||||
<$button popup=<<qualify "$:/state/popup/field-dropdown">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>
|
||||
<$vars refreshTitle=<<qualify "$:/temp/fieldname/refresh">> storeTitle=<<qualify "$:/temp/fieldname/input">> searchListState=<<qualify "$:/temp/fieldname/selected-item">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<newFieldNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
||||
selectionStateTitle=<<searchListState>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}}
|
||||
focusPopup=<<qualify "$:/state/popup/field-dropdown">> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}
|
||||
focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}} cancelPopups="yes"
|
||||
configTiddlerFilter="[[$:/config/EditMode/fieldname-filter]]" inputCancelActions=<<cancel-search-actions>> />
|
||||
<$button popup=<<qualify "$:/state/popup/field-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>
|
||||
<$reveal state=<<qualify "$:/state/popup/field-dropdown">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
@@ -82,33 +102,38 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
<div class="tc-dropdown-item">
|
||||
<<lingo Fields/Add/Dropdown/User>>
|
||||
</div>
|
||||
<$set name="newFieldName" value={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||
<$set name="newFieldName" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list filter="[!is[shadow]!is[system]fields[]search:title<newFieldName>sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type" variable="currentField">
|
||||
<$list filter="[<currentField>addsuffix[-primaryList]] -[<searchListState>get[text]]" emptyMessage="""<$link to=<<currentField>> class="tc-list-item-selected"><$text text=<<currentField>>/></$link>""">
|
||||
<$link to=<<currentField>>>
|
||||
<$text text=<<currentField>>/>
|
||||
</$link>
|
||||
</$list>
|
||||
</$list>
|
||||
<div class="tc-dropdown-item">
|
||||
<<lingo Fields/Add/Dropdown/System>>
|
||||
</div>
|
||||
<$list filter="[fields[]search:title<newFieldName>sort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField">
|
||||
<$list filter="[<currentField>addsuffix[-secondaryList]] -[<searchListState>get[text]]" emptyMessage="""<$link to=<<currentField>> class="tc-list-item-selected"><$text text=<<currentField>>/></$link>""">
|
||||
<$link to=<<currentField>>>
|
||||
<$text text=<<currentField>>/>
|
||||
</$link>
|
||||
</$list>
|
||||
</$list>
|
||||
</$set>
|
||||
</$linkcatcher>
|
||||
</$set>
|
||||
</div>
|
||||
</$reveal>
|
||||
</$vars>
|
||||
</div>
|
||||
<span class="tc-edit-field-add-value">
|
||||
<span class="tc-edit-field-add-value tc-small-gap-right">
|
||||
<$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
||||
<$keyboard key="((add-field))" actions=<<new-field-actions>>>
|
||||
<$edit-text tiddler=<<newFieldValueTiddler>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||
</$keyboard>
|
||||
</$set>
|
||||
</span>
|
||||
</span>
|
||||
<span class="tc-edit-field-add-button">
|
||||
<$macrocall $name="new-field"/>
|
||||
</span>
|
||||
|
||||
@@ -4,10 +4,10 @@ tags: $:/tags/EditTemplate
|
||||
\define lingo-base() $:/language/EditTemplate/
|
||||
\whitespace trim
|
||||
<div class="tc-edit-type-selector-wrapper">
|
||||
<em class="tc-edit"><<lingo Type/Prompt>></em>
|
||||
<em class="tc-edit tc-big-gap-right"><<lingo Type/Prompt>></em>
|
||||
<div class="tc-type-selector-dropdown-wrapper">
|
||||
<div class="tc-type-selector"><$fieldmangler>
|
||||
<$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes"/> <$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}</$button>
|
||||
<$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes"/><$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}</$button>
|
||||
</$fieldmangler></div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
|
||||
@@ -4,41 +4,59 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
||||
|
||||
\define add-link-actions()
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
||||
<$action-deletetiddler $tiddler=<<dropdown-state>> />
|
||||
<$action-deletetiddler $tiddler=<<searchTiddler>> />
|
||||
<$action-deletetiddler $tiddler=<<linkTiddler>> />
|
||||
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
\end
|
||||
|
||||
\define get-focus-selector() [data-tiddler-title="$(cssEscapedTitle)$"] .tc-create-wikitext-link input
|
||||
|
||||
\define cancel-search-actions-inner()
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="""<$action-deletetiddler $filter="[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>"""><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions() <$list filter="[<storeTitle>!has[text]] +[<searchTiddler>!has[text]]" emptyMessage="""<<cancel-search-actions-inner>>"""><$action-sendmessage $message="tm-edit-text-operation" $param="wrap-selection" prefix="" suffix=""/></$list>
|
||||
|
||||
\define external-link()
|
||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
||||
{{$:/core/images/chevron-right}}
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define body(config-title)
|
||||
''<<lingo Hint>>''
|
||||
|
||||
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" >
|
||||
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
|
||||
|
||||
<$vars linkTiddler=<<searchTiddler>>>
|
||||
<$keyboard key="ENTER" actions=<<add-link-actions>>>
|
||||
<$edit-text tiddler=<<searchTiddler>> type="search" tag="input" focus="true" placeholder={{$:/language/Search/Search}} default=""/>
|
||||
<$reveal tag="span" state=<<searchTiddler>> type="nomatch" text="">
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">> class="tc-create-wikitext-link">
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
||||
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
||||
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
||||
<<external-link>>
|
||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
||||
<$action-setfield $tiddler=<<searchTiddler>> text="" />
|
||||
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$keyboard>
|
||||
</$vars>
|
||||
|
||||
<$reveal tag="div" state=<<searchTiddler>> type="nomatch" text="">
|
||||
<$reveal tag="div" state=<<storeTitle>> type="nomatch" text="">
|
||||
|
||||
<$linkcatcher actions=<<add-link-actions>> to=<<linkTiddler>>>
|
||||
|
||||
<$vars userInput={{{ [<storeTitle>get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}>
|
||||
|
||||
{{$:/core/ui/SearchResults}}
|
||||
|
||||
</$vars>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
</$reveal>
|
||||
@@ -47,4 +65,4 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
||||
|
||||
\end
|
||||
|
||||
<$macrocall $name="body" config-title=<<qualify "$:/state/Link/">>/>
|
||||
<$macrocall $name="body" config-title=<<qualify "$:/state/Link/">>/>
|
||||
|
||||
@@ -2,17 +2,23 @@ title: $:/core/ui/ImportListing
|
||||
|
||||
\define lingo-base() $:/language/Import/
|
||||
|
||||
\define messageField()
|
||||
message-$(payloadTiddler)$
|
||||
\define messageField() message-$(payloadTiddler)$
|
||||
|
||||
\define payloadTitleFilter() [<currentTiddler>get<renameField>minlength[1]else<payloadTiddler>]
|
||||
|
||||
\define overWriteWarning()
|
||||
<$text text={{{[subfilter<payloadTitleFilter>!is[tiddler]then[]] ~[<lingo-base>addsuffix[Listing/Rename/OverwriteWarning]get[text]]}}}/>
|
||||
\end
|
||||
|
||||
\define selectionField()
|
||||
selection-$(payloadTiddler)$
|
||||
\end
|
||||
\define selectionField() selection-$(payloadTiddler)$
|
||||
|
||||
\define previewPopupState()
|
||||
$(currentTiddler)$!!popup-$(payloadTiddler)$
|
||||
\end
|
||||
\define renameField() rename-$(payloadTiddler)$
|
||||
|
||||
\define newImportTitleTiddler() $:/temp/NewImportTitle-$(payloadTiddler)$
|
||||
|
||||
\define previewPopupState() $(currentTiddler)$!!popup-$(payloadTiddler)$
|
||||
|
||||
\define renameFieldState() $(currentTiddler)$!!state-rename-$(payloadTiddler)$
|
||||
|
||||
\define select-all-actions()
|
||||
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
|
||||
@@ -20,10 +26,10 @@ $(currentTiddler)$!!popup-$(payloadTiddler)$
|
||||
</$list>
|
||||
\end
|
||||
|
||||
<table>
|
||||
<table class="tc-import-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<th align="left">
|
||||
<$checkbox tiddler="$:/state/import/select-all" field="text" checked="checked" unchecked="unchecked" default="checked" actions=<<select-all-actions>>>
|
||||
<<lingo Listing/Select/Caption>>
|
||||
</$checkbox>
|
||||
@@ -41,21 +47,35 @@ $(currentTiddler)$!!popup-$(payloadTiddler)$
|
||||
<$checkbox field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/>
|
||||
</td>
|
||||
<td>
|
||||
<$reveal type="nomatch" state=<<previewPopupState>> text="yes" tag="div">
|
||||
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<previewPopupState>> setTo="yes">
|
||||
{{$:/core/images/right-arrow}} <$text text=<<payloadTiddler>>/>
|
||||
<$reveal type="nomatch" state=<<renameFieldState>> text="yes" tag="div">
|
||||
<$reveal type="nomatch" state=<<previewPopupState>> text="yes" tag="div" class="tc-flex">
|
||||
<$button class="tc-btn-invisible tc-btn-dropdown tc-flex-grow-1" set=<<previewPopupState>> setTo="yes">
|
||||
<span class="tc-small-gap-right">{{$:/core/images/right-arrow}}</span><$text text={{{[subfilter<payloadTitleFilter>]}}}/>
|
||||
</$button>
|
||||
<$button class="tc-btn-invisible tc-small-gap-left" set=<<renameFieldState>> setTo="yes" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/Tooltip]get[text]]}}}>{{$:/core/images/edit-button}}</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<previewPopupState>> text="yes" tag="div">
|
||||
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<previewPopupState>> setTo="no">
|
||||
{{$:/core/images/down-arrow}} <$text text=<<payloadTiddler>>/>
|
||||
<span class="tc-small-gap-right">{{$:/core/images/down-arrow}}</span><$text text={{{[subfilter<payloadTitleFilter>]}}}/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<renameFieldState>> text="yes" tag="div">
|
||||
<$text text={{{[<lingo-base>addsuffix[Listing/Rename/Prompt]get[text]]}}}/>
|
||||
</$reveal>
|
||||
</td>
|
||||
<td>
|
||||
<$view field=<<messageField>>/>
|
||||
<<overWriteWarning>>
|
||||
</td>
|
||||
</tr>
|
||||
<$reveal type="match" state=<<renameFieldState>> text="yes" tag="tr">
|
||||
<td colspan="3">
|
||||
<div class="tc-flex">
|
||||
<$edit-text tiddler=<<newImportTitleTiddler>> default={{{[subfilter<payloadTitleFilter>]}}} tag="input" class="tc-import-rename tc-flex-grow-1"/><span class="tc-small-gap-left"><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/CancelRename]get[text]]}}}>{{$:/core/images/close-button}}<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button><span class="tc-small-gap-right"/></span><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/ConfirmRename]get[text]]}}}>{{$:/core/images/done-button}}<$action-setfield $field=<<renameField>> $value={{{[<newImportTitleTiddler>get[text]minlength[1]else<payloadTiddler>]}}} /><$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button>
|
||||
</div>
|
||||
</td>
|
||||
</$reveal>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<$reveal type="match" text="yes" state=<<previewPopupState>> tag="div">
|
||||
|
||||
@@ -4,5 +4,5 @@ key: ((advanced-search))
|
||||
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input"""/>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input""" preventScroll="true"/>
|
||||
</$navigator>
|
||||
|
||||
8
core/ui/KeyboardShortcuts/change-sidebar-layout.tid
Normal file
8
core/ui/KeyboardShortcuts/change-sidebar-layout.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/core/ui/KeyboardShortcuts/change-sidebar-layout
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((change-sidebar-layout))
|
||||
|
||||
<$list filter="[{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]]"
|
||||
emptyMessage="""<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fixed-fluid"/>""">
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fluid-fixed"/>
|
||||
</$list>
|
||||
7
core/ui/KeyboardShortcuts/save-wiki.tid
Normal file
7
core/ui/KeyboardShortcuts/save-wiki.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/KeyboardShortcuts/save-wiki
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((save-wiki))
|
||||
|
||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
||||
</$wikify>
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/KeyboardShortcut/toggle-sidebar
|
||||
title: $:/core/ui/KeyboardShortcuts/toggle-sidebar
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((toggle-sidebar))
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ title: $:/PaletteManager
|
||||
<$set name="state" value={{{ [[$:/state/palettemanager/]addsuffix<currentTiddler>addsuffix[/]addsuffix<colourName>] }}}>
|
||||
<$wikify name="newColourName" text="""<$macrocall $name="resolve-colour" macrocall={{{ [<currentTiddler>getindex<colourName>] }}}/>""">
|
||||
<$reveal state=<<state>> type="nomatch" text="show">
|
||||
<$button tooltip=<<colour-tooltip show>> aria-label=<<colour-tooltip show>> class="tc-btn-invisible" set=<<state>> setTo="show">{{$:/core/images/down-arrow}} <$text text=<<newColourName>>/></$button><br>
|
||||
<$button tooltip=<<colour-tooltip show>> aria-label=<<colour-tooltip show>> class="tc-btn-invisible" set=<<state>> setTo="show">{{$:/core/images/down-arrow}}<$text text=<<newColourName>> class="tc-small-gap-left"/></$button><br>
|
||||
</$reveal>
|
||||
<$reveal state=<<state>> type="match" text="show">
|
||||
<$button tooltip=<<colour-tooltip hide>> aria-label=<<colour-tooltip show>> class="tc-btn-invisible" actions="""<$action-deletetiddler $tiddler=<<state>>/>""">{{$:/core/images/up-arrow}} <$text text=<<newColourName>>/></$button><br>
|
||||
<$button tooltip=<<colour-tooltip hide>> aria-label=<<colour-tooltip show>> class="tc-btn-invisible" actions="""<$action-deletetiddler $tiddler=<<state>>/>""">{{$:/core/images/up-arrow}}<$text text=<<newColourName>> class="tc-small-gap-left"/></$button><br>
|
||||
</$reveal>
|
||||
<$reveal state=<<state>> type="match" text="show">
|
||||
<$set name="colourName" value=<<newColourName>>>
|
||||
@@ -88,6 +88,6 @@ title: $:/PaletteManager
|
||||
|
||||
<$button message="tm-new-tiddler" param={{$:/palette}}><<lingo Clone/Caption>></$button>
|
||||
|
||||
<$checkbox tiddler="$:/state/palettemanager/showexternal" field="text" checked="yes" unchecked="no"> <<lingo Names/External/Show>></$checkbox>
|
||||
<$checkbox tiddler="$:/state/palettemanager/showexternal" field="text" checked="yes" unchecked="no"><span class="tc-small-gap-left"><<lingo Names/External/Show>></span></$checkbox>
|
||||
|
||||
<<palette-manager-table>>
|
||||
|
||||
@@ -8,7 +8,7 @@ title: $:/core/ui/SearchResults
|
||||
</$list>
|
||||
""">
|
||||
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}}/>
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/search-results/sidebar"/>
|
||||
|
||||
</$list>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ $button$
|
||||
<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">
|
||||
<$macrocall $name="droppable-item" button="""<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="tc-btn-invisible tc-btn-mini">{{$:/core/images/close-button}}</$button> <$link to={{!!title}}><$view field="title"/></$link>"""/>
|
||||
<$macrocall $name="droppable-item" button="""<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="tc-btn-invisible tc-btn-mini tc-small-gap-right">{{$:/core/images/close-button}}</$button><$link to={{!!title}}><$view field="title"/></$link>"""/>
|
||||
</div>
|
||||
</$list>
|
||||
<$tiddler tiddler="">
|
||||
|
||||
@@ -19,40 +19,52 @@ tags: $:/tags/SideBarSegment
|
||||
|
||||
\define search-results-list()
|
||||
\whitespace trim
|
||||
<$list filter="[{$(searchTiddler)$}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$vars userInput={{$(searchTiddler)$}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}>
|
||||
<$list filter="[<userInput>minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
|
||||
<$tiddler tiddler=<<configTiddler>>>
|
||||
|
||||
{{$:/core/ui/SearchResults}}
|
||||
|
||||
</$tiddler>
|
||||
|
||||
</$list>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define delete-state-tiddlers() <$action-deletetiddler $filter="[[$:/temp/search]] [<searchTiddler>] [<searchListState>]"/>
|
||||
|
||||
\define cancel-search-actions() <$action-deletetiddler $filter="[<__storeTitle__>] [<__tiddler__>] [<__selectionStateTitle__>]"/>
|
||||
\define cancel-search-actions() <$list filter="[<searchTiddler>get[text]!match{$:/temp/search}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/search]] [<searchTiddler>] [<searchListState>]"/>"""><$action-setfield $tiddler="$:/temp/search" text={{{ [<searchTiddler>get[text]] }}}/><$action-setfield $tiddler="$:/temp/search/refresh" text="yes"/></$list>
|
||||
|
||||
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
|
||||
\define input-accept-variant-actions() <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
||||
\define input-accept-variant-actions() <$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<nextTab>>/>"""/>
|
||||
|
||||
\define advanced-search-actions() <$action-setfield $tiddler="$:/temp/advancedsearch" text={{$:/temp/search/input}}/><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/search/input}}/><<delete-state-tiddlers>><$action-navigate $to="$:/AdvancedSearch"/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/><$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input""" preventScroll="true"/>
|
||||
|
||||
<div class="tc-sidebar-lists tc-sidebar-search">
|
||||
|
||||
<$vars searchTiddler="$:/temp/search/input" searchListState=<<qualify "$:/state/search-list/selected-item">> titleSearchFilter="[!is[system]search:title<userInput>sort[title]limit[250]]" allSearchFilter="[!is[system]search<userInput>sort[title]limit[250]]">
|
||||
<$vars searchTiddler="$:/temp/search/input" searchListState=<<qualify "$:/state/search-list/selected-item">>>
|
||||
<div class="tc-search">
|
||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$keyboard key="((advanced-search-sidebar))" actions=<<advanced-search-actions>>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/search" storeTitle=<<searchTiddler>>
|
||||
selectionStateTitle=<<searchListState>> refreshTitle="$:/temp/search/refresh" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify "$:/state/popup/search-dropdown">>
|
||||
class="tc-popup-handle" primaryListFilter=<<titleSearchFilter>> secondaryListFilter=<<allSearchFilter>>
|
||||
filterMinLength={{$:/config/Search/MinLength}} inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>> cancelPopups="yes" />
|
||||
class="tc-popup-handle" filterMinLength={{$:/config/Search/MinLength}} inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>> cancelPopups="yes"
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
<$reveal state=<<searchTiddler>> type="nomatch" text="">
|
||||
<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" text={{$:/temp/search}}/>
|
||||
<<delete-state-tiddlers>>
|
||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||
<<advanced-search-actions>>
|
||||
{{$:/core/images/advanced-search-button}}
|
||||
</$button>
|
||||
<$button class="tc-btn-invisible">
|
||||
<<delete-state-tiddlers>>
|
||||
<<cancel-search-actions>><$action-sendmessage $message="tm-focus-selector" $param=".tc-search input"/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
<<count-popup-button>>
|
||||
|
||||
@@ -16,11 +16,13 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
|
||||
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
|
||||
<$link>
|
||||
<$set name="foregroundColor" value={{!!color}}>
|
||||
<$list filter="[all[current]has[icon]]~[[$:/config/DefaultTiddlerIcon]has[text]]">
|
||||
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
|
||||
<$transclude tiddler={{!!icon}}>
|
||||
<$transclude tiddler={{$:/config/DefaultTiddlerIcon}}/>
|
||||
</$transclude>
|
||||
</span>
|
||||
</$list>
|
||||
</$set>
|
||||
<$list filter="[all[current]removeprefix[$:/]]">
|
||||
<h2 class="tc-title" title={{$:/language/SystemTiddler/Tooltip}}>
|
||||
|
||||
3
core/wiki/config/EditModeFieldnameFilter.tid
Normal file
3
core/wiki/config/EditModeFieldnameFilter.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/config/EditMode/fieldname-filter
|
||||
first-search-filter: [!is[shadow]!is[system]fields[]search:title<userInput>sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type
|
||||
second-search-filter: [fields[]search:title<userInput>sort[]] -[!is[shadow]!is[system]fields[]]
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/config/SaverFilter
|
||||
|
||||
[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]
|
||||
[all[]] -[prefix[$:/HistoryList]] -[prefix[$:/StoryList]] -[status[pending]plugin-type[import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]
|
||||
|
||||
@@ -2,8 +2,10 @@ title: $:/config/ShortcutInfo/
|
||||
|
||||
add-field: {{$:/language/EditTemplate/Fields/Add/Button/Hint}}
|
||||
advanced-search: {{$:/language/Buttons/AdvancedSearch/Hint}}
|
||||
advanced-search-sidebar: {{$:/language/Shortcuts/Input/AdvancedSearch/Hint}}
|
||||
bold: {{$:/language/Buttons/Bold/Hint}}
|
||||
cancel-edit-tiddler: {{$:/language/Buttons/Cancel/Hint}}
|
||||
change-sidebar-layout: {{$:/language/Shortcuts/SidebarLayout/Hint}}
|
||||
excise: {{$:/language/Buttons/Excise/Hint}}
|
||||
heading-1: {{$:/language/Buttons/Heading1/Hint}}
|
||||
heading-2: {{$:/language/Buttons/Heading2/Hint}}
|
||||
@@ -15,6 +17,8 @@ input-accept: {{$:/language/Shortcuts/Input/Accept/Hint}}
|
||||
input-accept-variant: {{$:/language/Shortcuts/Input/AcceptVariant/Hint}}
|
||||
input-cancel: {{$:/language/Shortcuts/Input/Cancel/Hint}}
|
||||
input-down: {{$:/language/Shortcuts/Input/Down/Hint}}
|
||||
input-tab-left: {{$:/language/Shortcuts/Input/Tab-Left/Hint}}
|
||||
input-tab-right: {{$:/language/Shortcuts/Input/Tab-Right/Hint}}
|
||||
input-up: {{$:/language/Shortcuts/Input/Up/Hint}}
|
||||
italic: {{$:/language/Buttons/Italic/Hint}}
|
||||
link: {{$:/language/Buttons/Link/Hint}}
|
||||
@@ -30,6 +34,7 @@ picture: {{$:/language/Buttons/Picture/Hint}}
|
||||
preview: {{$:/language/Buttons/Preview/Hint}}
|
||||
quote: {{$:/language/Buttons/Quote/Hint}}
|
||||
save-tiddler: {{$:/language/Buttons/Save/Hint}}
|
||||
save-wiki: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
sidebar-search: {{$:/language/Buttons/SidebarSearch/Hint}}
|
||||
stamp: {{$:/language/Buttons/Stamp/Hint}}
|
||||
strikethrough: {{$:/language/Buttons/Strikethrough/Hint}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/config/SyncFilter
|
||||
|
||||
[is[tiddler]] -[[$:/core]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]
|
||||
[is[tiddler]] -[[$:/core]] -[prefix[$:/StoryList]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]
|
||||
|
||||
@@ -6,3 +6,4 @@ underline: meta-U
|
||||
new-image: ctrl-I
|
||||
new-journal: ctrl-J
|
||||
new-tiddler: ctrl-N
|
||||
save-wiki: meta-S
|
||||
|
||||
@@ -2,7 +2,9 @@ title: $:/config/shortcuts/
|
||||
|
||||
add-field: enter
|
||||
advanced-search: ctrl-shift-A
|
||||
advanced-search-sidebar: alt-Enter
|
||||
cancel-edit-tiddler: escape
|
||||
change-sidebar-layout: shift-alt-Down
|
||||
excise: ctrl-E
|
||||
sidebar-search: ctrl-shift-F
|
||||
heading-1: ctrl-1
|
||||
@@ -12,9 +14,11 @@ heading-4: ctrl-4
|
||||
heading-5: ctrl-5
|
||||
heading-6: ctrl-6
|
||||
input-accept: Enter
|
||||
input-accept-variant: Alt-Enter
|
||||
input-accept-variant: ctrl-Enter
|
||||
input-cancel: Escape
|
||||
input-down: Down
|
||||
input-tab-left: alt-Left
|
||||
input-tab-right: alt-Right
|
||||
input-up: Up
|
||||
link: ctrl-L
|
||||
linkify: alt-shift-L
|
||||
@@ -26,6 +30,7 @@ picture: ctrl-shift-I
|
||||
preview: alt-P
|
||||
quote: ctrl-Q
|
||||
save-tiddler: ctrl+enter
|
||||
save-wiki: ctrl-S
|
||||
stamp: ctrl-S
|
||||
strikethrough: ctrl-T
|
||||
subscript: ctrl-shift-B
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
title: $:/core/macros/keyboard-driven-input
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define change-input-tab(stateTitle,tag,beforeafter,defaultState,actions)
|
||||
<$set name="tabsList" filter="[all[shadows+tiddlers]tag<__tag__>!has[draft.of]]">
|
||||
<$vars currentState={{{ [<__stateTitle__>!is[missing]get[text]] ~[<__defaultState__>] }}} firstTab={{{ [enlist<tabsList>nth[1]] }}} lastTab={{{ [enlist<tabsList>last[]] }}}>
|
||||
<$set name="nextTab" value={{{ [all[shadows+tiddlers]tag<__tag__>!has[draft.of]$beforeafter$<currentState>] ~[[$beforeafter$]removeprefix[after]suffix[]addprefix<firstTab>] ~[[$beforeafter$]removeprefix[before]suffix[]addprefix<lastTab>] }}}>
|
||||
<$action-setfield $tiddler=<<__stateTitle__>> text=<<nextTab>>/>
|
||||
$actions$
|
||||
</$set>
|
||||
</$vars>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define keyboard-input-actions()
|
||||
<$list filter="[<__index__>match[]]">
|
||||
<$action-setfield $tiddler=<<__storeTitle__>> text={{{ [<__tiddler__>get<__field__>] }}}/>
|
||||
@@ -13,9 +24,11 @@ tags: $:/tags/Macro
|
||||
\define input-next-actions(afterOrBefore:"after",reverse:"")
|
||||
<$list filter="[<__storeTitle__>get[text]minlength<__filterMinLength__>] [<__filterMinLength__>match[0]] +[limit[1]]" variable="ignore">
|
||||
<$vars userInput={{{ [<__storeTitle__>get[text]] }}} selectedItem={{{ [<__selectionStateTitle__>get[text]] }}}>
|
||||
<$set name="filteredList" filter="[subfilter<__primaryListFilter__>addsuffix[-primaryList]] =[subfilter<__secondaryListFilter__>addsuffix[-secondaryList]]">
|
||||
<$set name="configTiddler" value={{{ [subfilter<__configTiddlerFilter__>] }}}>
|
||||
<$vars primaryListFilter={{{ [<configTiddler>get<__firstSearchFilterField__>] }}} secondaryListFilter={{{ [<configTiddler>get<__secondSearchFilterField__>] }}}>
|
||||
<$set name="filteredList" filter="[subfilter<primaryListFilter>addsuffix[-primaryList]] =[subfilter<secondaryListFilter>addsuffix[-secondaryList]]">
|
||||
<$set name="nextItem" value={{{ [enlist<filteredList>$afterOrBefore$<selectedItem>] ~[enlist<filteredList>$reverse$nth[1]] }}}>
|
||||
<$list filter="[<nextItem>minlength[1]]">
|
||||
<$list filter="[<nextItem>minlength[1]]" variable="ignore">
|
||||
<$action-setfield $tiddler=<<__selectionStateTitle__>> text=<<nextItem>>/>
|
||||
<$list filter="[<__index__>match[]]">
|
||||
<$action-setfield $tiddler=<<__tiddler__>> $field=<<__field__>> $value={{{ [<nextItem>] +[splitregexp[(?:.(?!-))+$]] }}}/>
|
||||
@@ -28,10 +41,13 @@ tags: $:/tags/Macro
|
||||
</$set>
|
||||
</$set>
|
||||
</$vars>
|
||||
</$set>
|
||||
</$vars>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define keyboard-driven-input(tiddler,storeTitle,field:"text",index:"",tag:"input",type,focus:"",inputAcceptActions,inputAcceptVariantActions,inputCancelActions,placeholder:"",default:"",class,primaryListFilter,secondaryListFilter,focusPopup,rows,minHeight,tabindex,size,autoHeight,filterMinLength:"0",refreshTitle,selectionStateTitle,cancelPopups:"")
|
||||
\define keyboard-driven-input(tiddler,storeTitle,field:"text",index:"",tag:"input",type,focus:"",inputAcceptActions,inputAcceptVariantActions,inputCancelActions,placeholder:"",default:"",class,focusPopup,rows,minHeight,tabindex,size,autoHeight,filterMinLength:"0",refreshTitle,selectionStateTitle,cancelPopups:"",configTiddlerFilter,firstSearchFilterField:"first-search-filter",secondSearchFilterField:"second-search-filter")
|
||||
\whitespace trim
|
||||
<$keyboard key="((input-accept))" actions=<<__inputAcceptActions__>>>
|
||||
<$keyboard key="((input-accept-variant))" actions=<<__inputAcceptVariantActions__>>>
|
||||
<$keyboard key="((input-up))" actions=<<input-next-actions "before" "reverse[]">>>
|
||||
|
||||
@@ -43,7 +43,7 @@ tags: $:/tags/Macro
|
||||
<$tiddler tiddler="">
|
||||
<$droppable actions=<<list-links-draggable-drop-actions>> tag="div" enable=<<tv-enable-drag-and-drop>>>
|
||||
<div class="tc-droppable-placeholder">
|
||||
|
||||
{{$:/core/images/blank}}
|
||||
</div>
|
||||
<div style="height:0.5em;"/>
|
||||
</$droppable>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
title: $:/core/macros/tabs
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain)
|
||||
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
|
||||
<$set name="qualifiedState" value=<<qualify "$state$">>>
|
||||
<$set name="tabsState" filter="[<__explicitState__>minlength[1]] ~[<qualifiedState>]">
|
||||
<div class="tc-tab-set $class$">
|
||||
<div class="tc-tab-buttons $class$">
|
||||
<$list filter="$tabsList$" variable="currentTab" storyview="pop"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$list filter="$tabsList$" variable="currentTab" storyview="pop"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<tabsState>> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$tiddler tiddler=<<save-currentTiddler>>>
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude tiddler="$buttonTemplate$" mode="inline">
|
||||
@@ -12,13 +14,13 @@ tags: $:/tags/Macro
|
||||
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
</$set></$tiddler></$button></$tiddler></$set></$list>
|
||||
</$set></$tiddler>$actions$</$button></$tiddler></$set></$list>
|
||||
</div>
|
||||
<div class="tc-tab-divider $class$"/>
|
||||
<div class="tc-tab-content $class$">
|
||||
<$list filter="$tabsList$" variable="currentTab">
|
||||
|
||||
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$" retain="""$retain$""">
|
||||
<$reveal type="match" state=<<tabsState>> text=<<currentTab>> default="$default$" retain="""$retain$""">
|
||||
|
||||
<$transclude tiddler="$template$" mode="block">
|
||||
|
||||
@@ -31,4 +33,6 @@ tags: $:/tags/Macro
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
</$set>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
title: $:/core/macros/tag-picker
|
||||
tags: $:/tags/Macro
|
||||
first-search-filter: [tags[]!is[system]search:title<userInput>sort[]]
|
||||
second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
|
||||
|
||||
\define get-tagpicker-focus-selector() [data-tiddler-title="$(currentTiddlerCSSEscaped)$"] .tc-add-tag-name input
|
||||
|
||||
\define delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/>
|
||||
|
||||
@@ -25,30 +29,40 @@ $actions$
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define clear-tags-actions()
|
||||
<$list filter="[<__storeTitle__>has[text]] [<__tiddler__>has[text]]" variable="ignore" emptyMessage="""<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-cancel-tiddler"/>""">
|
||||
\define clear-tags-actions-inner()
|
||||
<$list filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]" variable="ignore" emptyMessage="""<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-cancel-tiddler"/>""">
|
||||
<<delete-tag-state-tiddlers>>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define clear-tags-actions()
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="""<<clear-tags-actions-inner>>""">
|
||||
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define tag-picker-inner(actions)
|
||||
\whitespace trim
|
||||
<$vars tagSelectionState=<<qualify "$:/state/selected-tag">> storeTitle=<<qualify "$:/temp/NewTagName/input">> refreshTitle=<<qualify "$:/temp/NewTagName/refresh">> nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]" systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]">
|
||||
<div class="tc-edit-add-tag">
|
||||
<div>
|
||||
<span class="tc-add-tag-name">
|
||||
<span class="tc-add-tag-name tc-small-gap-right">
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<newTagNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
||||
selectionStateTitle=<<tagSelectionState>> primaryListFilter=<<nonSystemTagsFilter>> secondaryListFilter=<<systemTagsFilter>>
|
||||
inputAcceptActions="""<$macrocall $name="add-tag-actions" actions=<<__actions__>>/>""" inputCancelActions=<<clear-tags-actions>> tag="input"
|
||||
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify "$:/state/popup/tags-auto-complete">>
|
||||
class="tc-edit-texteditor tc-popup-handle" tabindex=<<tabIndex>> focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
|
||||
filterMinLength={{$:/config/Tags/MinLength}} cancelPopups=<<cancelPopups>> />
|
||||
</span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class="tc-add-tag-button">
|
||||
selectionStateTitle=<<tagSelectionState>> inputAcceptActions="""<$macrocall $name="add-tag-actions" actions=<<__actions__>>/>"""
|
||||
inputCancelActions=<<clear-tags-actions>> tag="input" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
|
||||
focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-edit-texteditor tc-popup-handle" tabindex=<<tabIndex>>
|
||||
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} filterMinLength={{$:/config/Tags/MinLength}}
|
||||
cancelPopups=<<cancelPopups>> configTiddlerFilter="[[$:/core/macros/tag-picker]]"/>
|
||||
</span><$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><span class="tc-add-tag-button tc-small-gap-left">
|
||||
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
|
||||
<$button set=<<newTagNameTiddler>> setTo="" class="">
|
||||
<$action-sendmessage $message="tm-add-tag" $param=<<tag>>/>
|
||||
$actions$
|
||||
<<delete-tag-state-tiddlers>>
|
||||
<$set name="currentTiddlerCSSEscaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
||||
<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
|
||||
</$set>
|
||||
{{$:/language/EditTemplate/Tags/Add/Button}}
|
||||
</$button>
|
||||
</$set>
|
||||
|
||||
@@ -16,7 +16,7 @@ tags: $:/tags/Macro
|
||||
<$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
|
||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
|
||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}><$view field='caption'><$view field='title'/></$view></$link>">
|
||||
<<toc-caption>>
|
||||
</$list>
|
||||
<$macrocall $name="toc-body" tag=<<item>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/>
|
||||
@@ -37,7 +37,7 @@ tags: $:/tags/Macro
|
||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$link>
|
||||
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
|
||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
||||
{{$:/core/images/right-arrow}}
|
||||
@@ -105,7 +105,7 @@ tags: $:/tags/Macro
|
||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
|
||||
<li class=<<toc-item-class>>>
|
||||
<$link>
|
||||
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
|
||||
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
|
||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20130825162100000
|
||||
modified: 20200113094126878
|
||||
modified: 20201025162413404
|
||||
tags: dev moduletypes
|
||||
title: SyncAdaptorModules
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -80,6 +80,15 @@ Attempts to login to the server with specified credentials. This method is optio
|
||||
|password |Password |
|
||||
|callback |Callback function invoked with parameter `err` |
|
||||
|
||||
!! `displayLoginPrompt(syncer)`
|
||||
|
||||
Invoked by the syncer to display a custom login promopt. This method is optional.
|
||||
|
||||
|!Parameter |!Description |
|
||||
|syncer |Reference to the syncer object making the call |
|
||||
|
||||
The custom login prompt should send the widget message `tm-login` with the username and password in parameters ''username'' and ''password''.
|
||||
|
||||
!! `logout(callback)`
|
||||
|
||||
Attempts to logout of the server. This method is optional.
|
||||
|
||||
@@ -1,40 +1,26 @@
|
||||
caption: 5.1.23
|
||||
created: 20200912173852160
|
||||
modified: 20200912173852160
|
||||
created: 20201018143621963
|
||||
modified: 20201018143621963
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.23
|
||||
type: text/vnd.tiddlywiki
|
||||
my-field: randomburger
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.22...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4725]] support for navigating the search and new tag dropdowns via the keyboard. The [[keyboard-driven-input Macro]] can be used to add this capability to other dropdowns.
|
||||
|
||||
! New and Improved Plugins
|
||||
|
||||
* Consent Banner Plugin
|
||||
** [[New|https://github.com/Jermolene/TiddlyWiki5/commit/4a84ed0018df7fd67000404bb5ef8a7ca50509c1]] plugin to help make websites compliant with cookie legislation by displaying a consent banner
|
||||
* JSZip Plugin
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/6a0ff7db1807f45b73061ced82f5a85f1a529bbf]] ability to dynamically create Zip files, giving TiddlyWiki the ability to build static sites within the browser
|
||||
* Freelinks Plugin
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1f354a972e0217e034d1f59d31577c1fd6b186f3]] (and [[here|https://gitxhub.com/Jermolene/TiddlyWiki5/commit/c9692d7a508cfdb0446e67061201961dca64d8dd]]) support for ignoring case when matching titles
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/05e6c1bf62cd51df6aa025d0ad07f7959cde6fa0]] bug with autolinking within HTML `<a>` elements
|
||||
* Twitter Plugin
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/3a20fb1e3a41a032574d227a8c770a11ae0a5d58]] warning if wiki needs to be saved and reloaded
|
||||
* [[Dynaview Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/b0e40e86413c1769c8be8a84652b66ef6ac8b997]] examples
|
||||
* [[CodeMirror Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4662]] issue with `e.toggleComment` being undefined with CodeMirror Sublime keymap
|
||||
* [[Markdown Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4680]] encoding of Markdown image files
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/e01b354f7d9e137cb355f7090f5e68661a4ead41]] issue with whitespace and linebraks
|
||||
* [[New|https://github.com/Jermolene/TiddlyWiki5/commit/4a84ed0018df7fd67000404bb5ef8a7ca50509c1]] [[Consent Banner Plugin]] to help make websites compliant with cookie legislation by displaying a consent banner
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/6a0ff7db1807f45b73061ced82f5a85f1a529bbf]] [[JSZip Plugin]] ability to dynamically create Zip files, giving TiddlyWiki the ability to build static sites within the browser
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/14a28b77796461c9167898793ab9851e029e0354]] new [[filter|filter Operator]] and [[reduce|reduce Operator]] operators for processing lists of items
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/1446a1e44cd084b0905f3fdcd8b339f23edf2384]] the [[WidgetMessage: tm-scroll]] message to allow the target element to be specified by a CSS selector, making it possible to scroll to positions within a tiddler
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
* New Arabic (Palestine) translation
|
||||
* Catalan
|
||||
* Chinese
|
||||
* Improved Catalan translation
|
||||
* Improved Chinese translation
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
@@ -43,18 +29,25 @@ type: text/vnd.tiddlywiki
|
||||
! Usability Improvements
|
||||
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/8cf458d3b3f1e38c14a2819529e08dca4a7e297c]] "Solarized Dark" palette
|
||||
* [[Updated|https://github.com/Jermolene/TiddlyWiki5/pull/4590]] Vanilla theme to use palette colours for the [[browser selection outline|https://developer.mozilla.org/en-US/docs/Web/CSS/::selection]]
|
||||
* [[Updated|https://github.com/Jermolene/TiddlyWiki5/pull/4590]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/274a07b4fd2ca2d1b95c8ddf52fe055c44260d9b]]) the Vanilla theme to optionally use palette colours for the [[browser selection outline|https://developer.mozilla.org/en-US/docs/Web/CSS/::selection]]
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1546a4a1895b93a47b79c9d37b94be039604443a]] warning message about using the online plugin library with the client-server configuration
|
||||
* [[Improved|https://github.com/Jermolene/TiddlyWiki5/pull/4585]] Gruvbox palette readability of toolbar buttons
|
||||
* [[Changed|https://github.com/Jermolene/TiddlyWiki5/commit/9cd5415dfe54b47819920aa3cf6ac2d5e3a9188e]] favicon for the prerelease edition
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/484c9e986fc6f323e30460a88f134da3a4e8a89e]] the $:/PaletteManager to show "indirect" colours (ie, colours defined by another `<<colour>>` macro)
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4791]] a 'tabIndex' property to the tiddler editor input area to make it easier to use the tab key to move between edit controls
|
||||
|
||||
! Hackability Improvements
|
||||
! Filter Improvements
|
||||
|
||||
* [[Adedd|https://github.com/Jermolene/TiddlyWiki5/pull/4777]] new Hyperdrive saver for use with Beaker Browser v1.0
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/4966f6ab625c8ce2c9f0812a726ba928d68ea00b]] new [[slugify Operator]] and [[duplicateslugs Operator]] for generating human readable filenames/URLs
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/619c0752bd3c6e71d1fcdb74daa03cfe8257afe4]] new [[sortsub Operator]] for sorting by a user defined subfilter
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4785]] new [[format Operator]] for formatting dates
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4811]] the [[trim Operator]] to optionally trim a given string instead of whitespace, and trim from front, back, or both sides of input tiddlers
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/5af76c5ea10db2b59cc20f963a836c6a9faa8b10]] the [[Table-of-Contents Macros]] to support custom link targets
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/ae13a0fee118c50169b7835c950df1dade33788f]] the MacroCallWidget to be able to optionally render the raw text of the macro (previously the output was always wikified)
|
||||
* [[Adedd|https://github.com/Jermolene/TiddlyWiki5/pull/4777]] new Hyperdrive saver for use with Beaker Browser v1.0
|
||||
* [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/e71a27ac2d71f2e48f9e4e9156b59bb3ecc2a105]] LinkWidget to work within SVG elements
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c86a621d5d205e1ae0ce999b90ebe09addc45a9f]] ''accept'' attribute to the BrowseWidget
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/77a929faa3a33768e52cf2a34ecbef9c554a6a7b]] ActionPopupWidget to allow popups to be dismissed
|
||||
@@ -66,15 +59,15 @@ type: text/vnd.tiddlywiki
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4741]] [[WidgetMessage: tm-import-tiddlers]] to override the title $:/Import and to better control whether the import tiddler is opened automatically
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4740]] the EditWidget to pass all attributes through to the sub-widget
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/bd2cf5c46498222a32ebda92da3ae50bde33decb]] the internal `<$element>` widget to add a hook so that plugins can intercept DOM node creation
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4811]] the [[trim Operator]] to optionally trim off a prefixing or suffixing string from input tiddler titles
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/95e30138f0b34135031d50c1606e8b0059ca6653]] LinkCatcherWidget to pass keyboard modifier status to actions
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4724]] original event to `tm-navigate` event
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/4811]] the [[trim Operator]] to optionally trim a given string instead of whitespace, and trim from front, back, or both sides of input tiddlers
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/651fb777abd11c88e58b4bdfbced01d6db508852]] the password prompt to enable it to be customised
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/69c12618d963c711edd72a60427bd15ec4fa0e6e]] syncer to enable syncadaptors to customise the login prompt
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4632]] hover effect for search dropdown items
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4584]] restored missing parameter to `saveTiddler()` method sync adaptors
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4584]] restored missing parameter to `saveTiddler()` method of syncadaptors
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/678e25f510786fbc38f505f8b594f57f39e33a04]] MakeLibraryCommand to skip non-directories
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4601]] erroneous use of `$tw.wiki`
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4647]] ''class'' attribute of DroppableWidget
|
||||
@@ -99,6 +92,28 @@ type: text/vnd.tiddlywiki
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4813]] incorrect base64 encoding of astral plane Unicode text
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4770]] server error when saving a new tiddler created by following a tiddler link
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4751]] a `plugin-priority` field to the TiddlyWeb plugin so that language plugins can override its language strings
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4853]] bug whereby joining an empty list would not return an empty list
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/59f233cd46616646fa8889f65aa9cc7d704d8c9a]] bug exporting tiddlers with double quoted titles
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
* Freelinks Plugin
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1f354a972e0217e034d1f59d31577c1fd6b186f3]] (and [[here|https://gitxhub.com/Jermolene/TiddlyWiki5/commit/c9692d7a508cfdb0446e67061201961dca64d8dd]]) support for ignoring case when matching titles
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/05e6c1bf62cd51df6aa025d0ad07f7959cde6fa0]] bug with autolinking within HTML `<a>` elements
|
||||
* Twitter Plugin
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/3a20fb1e3a41a032574d227a8c770a11ae0a5d58]] warning if wiki needs to be saved and reloaded
|
||||
* [[Dynaview Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/b0e40e86413c1769c8be8a84652b66ef6ac8b997]] examples (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/f7fe47914e19ba7198b7768ca832ee03c289a2bc]])
|
||||
* [[CodeMirror Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4662]] issue with `e.toggleComment` being undefined with CodeMirror Sublime keymap
|
||||
* [[Markdown Plugin]]
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4680]] encoding of Markdown image files
|
||||
** [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/e01b354f7d9e137cb355f7090f5e68661a4ead41]] issue with whitespace and linebraks
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4862]] ''tc-tiddlylink-external'' class to external links
|
||||
* [[Amazon Web Services Plugin]]
|
||||
** [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0338f0fee23d176a94de9009492d2e43a916fbfa]] a new ''aws-encodeuricomponent'' filter that also encodes single quotes
|
||||
* ~BibTeX Plugin
|
||||
** [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/f863acf8ac716dbf892f2d63efa0a130aadfec6a]] to a later fork of the underlying third party ~BibTeX parsing library
|
||||
|
||||
! Contributors
|
||||
|
||||
@@ -112,7 +127,9 @@ type: text/vnd.tiddlywiki
|
||||
* [[@danielo515|https://github.com/danielo515]]
|
||||
* [[@ento|https://github.com/ento]]
|
||||
* [[@favadi|https://github.com/favadi]]
|
||||
* [[@fkohrt|https://github.com/fkohrt]]
|
||||
* [[@flibbles|https://github.com/flibbles]]
|
||||
* [[@gera2ld|https://github.com/gera2ld]]
|
||||
* [[@ibnishak|https://github.com/ibnishak]]
|
||||
* [[@idotobi|https://github.com/idotobi]]
|
||||
* [[@jdangerx|https://github.com/jdangerx]]
|
||||
@@ -124,5 +141,5 @@ type: text/vnd.tiddlywiki
|
||||
* [[@passuf|https://github.com/passuf]]
|
||||
* [[@pmario|https://github.com/pmario]]
|
||||
* [[@rmunn|https://github.com/rmunn]]
|
||||
* [[@saqimtias|https://github.com/saqimtias]]
|
||||
* [[@saqimtiaz|https://github.com/saqimtiaz]]
|
||||
* [[@twMat|https://github.com/twMat]]
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"tiddlywiki/codemirror",
|
||||
"tiddlywiki/comments",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/jszip"
|
||||
"tiddlywiki/jszip",
|
||||
"tiddlywiki/search"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
||||
@@ -160,6 +160,13 @@ function runTests(wiki) {
|
||||
expect(wiki.filterTiddlers("[enlist[one two three]addsuffix[!]]").join(",")).toBe("one!,two!,three!");
|
||||
});
|
||||
|
||||
it("should handle the enlist-input operator", function() {
|
||||
expect(wiki.filterTiddlers("[[one two three]enlist-input[]]").join(",")).toBe("one,two,three");
|
||||
expect(wiki.filterTiddlers("[[one two three]] [[four five six]] +[enlist-input[]]").join(",")).toBe("one,two,three,four,five,six");
|
||||
expect(wiki.filterTiddlers("[[one two three]] [[four five six]] [[seven eight]] +[enlist-input[]]").join(",")).toBe("one,two,three,four,five,six,seven,eight");
|
||||
expect(wiki.filterTiddlers("[[]] +[enlist-input[]]").join(",")).toBe("");
|
||||
});
|
||||
|
||||
it("should handle the then and else operators", function() {
|
||||
expect(wiki.filterTiddlers("[modifier[JoeBloggs]then[Susi]]").join(",")).toBe("Susi");
|
||||
expect(wiki.filterTiddlers("[!modifier[JoeBloggs]then[Susi]]").join(",")).toBe("Susi,Susi,Susi,Susi,Susi,Susi,Susi,Susi");
|
||||
@@ -685,6 +692,17 @@ function runTests(wiki) {
|
||||
expect(wiki.filterTiddlers("b a b c +[sortby[b a c b]]").join(",")).toBe("b,a,c");
|
||||
});
|
||||
|
||||
it("should handle the sortan operator", function() {
|
||||
expect(wiki.filterTiddlers("b a c +[sortan[]]").join(",")).toBe("a,b,c");
|
||||
expect(wiki.filterTiddlers("b2 a3 a1 b1 c2 a2 c3 b3 c1 +[sortan[]]").join(",")).toBe("a1,a2,a3,b1,b2,b3,c1,c2,c3");
|
||||
expect(wiki.filterTiddlers("b2 a10 c10 a1 b1 c2 a2 b10 c1 +[sortan[]]").join(",")).toBe("a1,a2,a10,b1,b2,b10,c1,c2,c10");
|
||||
expect(wiki.filterTiddlers("TiddlerOne $:/TiddlerTwo [[Tiddler Three]] +[sortan[]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three,TiddlerOne");
|
||||
});
|
||||
|
||||
it("should handle the sortan operator sorting on date fields", function() {
|
||||
expect(wiki.filterTiddlers("TiddlerOne $:/TiddlerTwo [[Tiddler Three]] +[sortan[modified]]").join(",")).toBe("$:/TiddlerTwo,TiddlerOne,Tiddler Three");
|
||||
});
|
||||
|
||||
it("should handle the slugify operator", function() {
|
||||
expect(wiki.filterTiddlers("[[Joe Bloggs]slugify[]]").join(",")).toBe("joe-bloggs");
|
||||
expect(wiki.filterTiddlers("[[Joe Bloggs2]slugify[]]").join(",")).toBe("joe-bloggs2");
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
created: 20200907161522189
|
||||
modified: 20200907162234327
|
||||
tags: Resources
|
||||
title: "Reveal.js" by Devin Weaver
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://sukima.github.io/tiddlywiki-reveal-js/
|
||||
|
||||
Embed [[Reveal.js|https://revealjs.com]] presentations inside your [[TiddlyWiki]].
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
reveal.js enables you to create beautiful interactive slide decks using HTML.
|
||||
|
||||
With the power of TiddlyWiki and Reveal.js one can…
|
||||
|
||||
* …make an interactive tiddler with fancy animations
|
||||
* …Make it go full screen for professional keynote
|
||||
* …Distribute the slideshow with examples and additional resources in one HTML file
|
||||
<<<
|
||||
@@ -1,16 +1,21 @@
|
||||
created: 20180323092308399
|
||||
modified: 20190307183936035
|
||||
modified: 20201025161723719
|
||||
tags: Features
|
||||
title: StartupActions
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki executes any ActionWidgets found in tiddlers with the following system tags during startup:
|
||||
|
||||
* <<tag "$:/tags/StartupAction">> (executed on all platforms)
|
||||
* <<tag "$:/tags/StartupAction/Browser">> (only executed when running in the browser)
|
||||
* <<tag "$:/tags/StartupAction/Node">> (only executed when running under Node.js)
|
||||
* Executed during initial startup:
|
||||
** <<tag "$:/tags/StartupAction">> (executed on all platforms)
|
||||
** <<tag "$:/tags/StartupAction/Browser">> (only executed when running in the browser)
|
||||
** <<tag "$:/tags/StartupAction/Node">> (only executed when running under Node.js)
|
||||
* Executed after startup rendering:
|
||||
** <<.from-version "5.1.23">> <<tag "$:/tags/StartupAction/PostRender">> (only executed when running in the browser)
|
||||
|
||||
Startup actions are useful for customising TiddlyWiki according to environmental factors such as the screen size. For example, the following action widgets when placed in a tiddler tagged `$:/tags/StartupAction/Browser` will cause the sidebar to be hidden by default when the screen width is less than 1000 pixels:
|
||||
!! Initial Startup Actions
|
||||
|
||||
The initial startup actions are useful for customising TiddlyWiki according to environmental factors such as the screen size. For example, the following action widgets when placed in a tiddler tagged `$:/tags/StartupAction/Browser` will cause the sidebar to be hidden by default when the screen width is less than 1000 pixels:
|
||||
|
||||
```
|
||||
<$reveal type="lt" state="$:/info/browser/screen/width" text="3000">
|
||||
@@ -28,8 +33,12 @@ Startup actions are useful for customising TiddlyWiki according to environmental
|
||||
<$action-setfield $tiddler="$:/language" text={{{ [[$:/languages/en-GB]] [plugin-type[language]sort[description]removeprefix[$:/languages/]] +[prefix{$:/info/browser/language}] ~[[en-GB]] +[addprefix[$:/languages/]] }}}/>
|
||||
```
|
||||
|
||||
Note that global macros are not available within startup action tiddlers by default. If you need to access them then you'll need to explicitly include them with an ''import'' [[pragma|Pragma]] at the top of the tiddler:
|
||||
Note that global macros are not available within initial startup action tiddlers by default. If you need to access them then you'll need to explicitly include them with an ''import'' [[pragma|Pragma]] at the top of the tiddler:
|
||||
|
||||
```
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
```
|
||||
|
||||
!! Post-Render Startup Actions
|
||||
|
||||
<<.from-version "5.1.23">> Post-render startup actions occur after the TiddlyWiki user interface has been rendered. This makes it possible to perform actions that depend on the rendered display (such as displaying modals).
|
||||
|
||||
29
editions/tw5.com/tiddlers/filters/enlist-input Operator.tid
Normal file
29
editions/tw5.com/tiddlers/filters/enlist-input Operator.tid
Normal file
@@ -0,0 +1,29 @@
|
||||
caption: enlist-input
|
||||
created: 20201102215459192
|
||||
modified: 20201102221854719
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the titles stored as a [[title list|Title List]] in each input title
|
||||
op-purpose: select titles by interpreting each input title as a [[title list|Title List]]
|
||||
tags: [[Filter Operators]] [[String Operators]] [[Selection Constructors]]
|
||||
title: enlist-input Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.23">>
|
||||
|
||||
<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its operand as a title list">>
|
||||
|
||||
```
|
||||
<$vars days={{{ [[Days of the Week]get[list]] }}}>
|
||||
|
||||
{{{ [enlist<days>] }}}
|
||||
|
||||
</$vars>
|
||||
```
|
||||
|
||||
is equivalent to:
|
||||
|
||||
```
|
||||
{{{ [[Days of the Week]get[list]enlist-input[]] }}}
|
||||
```
|
||||
|
||||
<<.operator-examples "enlist-input">>
|
||||
@@ -0,0 +1,8 @@
|
||||
created: 20201102220519567
|
||||
modified: 20201102221137200
|
||||
tags: [[enlist-input Operator]] [[Operator Examples]]
|
||||
title: enlist-input Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[[Days of the Week]get[list]enlist-input[]]">>
|
||||
<<.operator-example 2 "'HelloThere GettingStarted [[Customise TiddlyWiki]]' +[enlist-input[]]">>
|
||||
@@ -0,0 +1,16 @@
|
||||
created: 20201020102735123
|
||||
modified: 20201020104004306
|
||||
tags: [[Operator Examples]] [[format Operator]]
|
||||
title: format Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
These examples use the tiddler HelloThere.
|
||||
|
||||
Created date with no format string specified:
|
||||
<<.operator-example 1 "[[HelloThere]get[created]format:date[]]">>
|
||||
|
||||
Created date with a format string supplied as operator parameter:
|
||||
<<.operator-example 2 "[[HelloThere]get[created]format:date[DDth MMM YYYY]]">>
|
||||
|
||||
Modified date shown as a relative date:
|
||||
<<.operator-example 3 "[[HelloThere]get[modified]format:relativedate[]]">>
|
||||
@@ -6,14 +6,19 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
\define add-price() [get[price]multiply{!!quantity}add<accumulator>]
|
||||
\define num-items() [get[quantity]add<accumulator>]
|
||||
\define join-with-commas() [<index>compare:number:gt[0]then<accumulator>addsuffix[, ]addsuffix<currentTiddler>else<currentTiddler>]
|
||||
\define display-variable(name)
|
||||
''<$text text=<<__name__>>/>'': <code><$text text={{{ [<__name__>getvariable[]] }}}/></code>
|
||||
\end
|
||||
\define reduce-tip()
|
||||
Remember that <<.op reduce>> always produces output, so <<.op else>> will never trigger after <<.op reduce>>.
|
||||
\end
|
||||
|
||||
These examples use the following predefined variables:
|
||||
|
||||
* <<display-variable add-price>>
|
||||
* <<display-variable num-items>>
|
||||
* <<display-variable join-with-commas>>
|
||||
|
||||
They also use the following data tiddlers:
|
||||
|
||||
@@ -32,3 +37,25 @@ Number of items:
|
||||
Total price:
|
||||
|
||||
<<.operator-example 2 "[tag[shopping]reduce<add-price>]">>
|
||||
|
||||
Using `<index>` to act differently on the first item than the rest:
|
||||
|
||||
<<.operator-example 3 "[tag[shopping]reduce<join-with-commas>]">>
|
||||
|
||||
Empty input, no suffix:
|
||||
|
||||
<<.operator-example 4 "[tag[non-existent]reduce<add-price>]">>
|
||||
|
||||
Note how the output contains a single item with no text. This is not "empty output" for the purposes of the <<.op else>> operator.
|
||||
|
||||
<$macrocall $name=".tip" _=<<reduce-tip>> />
|
||||
|
||||
Empty input, no suffix, followed by <<.op else>>:
|
||||
|
||||
<<.operator-example 5 "[tag[non-existent]reduce<add-price>else[0]]">>
|
||||
|
||||
Note how the output still contains a single item with no text: <<.op else>> did not trigger. If you want the value to be 0 when <<.op reduce>> has no items to process, you need to specify 0 as the initial value by passing it as a suffix to <<.op reduce>>.
|
||||
|
||||
Empty input, suffix provided:
|
||||
|
||||
<<.operator-example 6 "[tag[non-existent]reduce:0<add-price>]">>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: filter
|
||||
created: 20200929174420821
|
||||
modified: 20201006173606828
|
||||
modified: 20201027185144953
|
||||
op-input: a [[selection of titles|Title Selection]] passed as input to the filter
|
||||
op-neg-input: a [[selection of titles|Title Selection]] passed as input to the filter
|
||||
op-neg-output: those input titles that <<.em "do not">> pass the filter <<.place S>>
|
||||
@@ -30,4 +30,18 @@ Simple filter operations can be concatenated together directly (eg `[tag[HelloTh
|
||||
|
||||
<<.tip "Compare with the similar [[subfilter|subfilter Operator]] operator which runs a subfilter and directly returns the results">>
|
||||
|
||||
<<.tip "Compare with the analagous named filter run prefix `:filter`">>
|
||||
|
||||
```
|
||||
\define larger-than-1k() [get[text]length[]compare:integer:gteq[1000]]
|
||||
|
||||
{{{ [tag[HelloThere]filter<larger-than-1k>] }}}
|
||||
```
|
||||
|
||||
is equivalent to:
|
||||
|
||||
```
|
||||
{{{ [tag[HelloThere]] :filter[get[text]length[]compare:integer:gteq[1000]] }}}
|
||||
```
|
||||
|
||||
<<.operator-examples "filter">>
|
||||
|
||||
23
editions/tw5.com/tiddlers/filters/format.tid
Normal file
23
editions/tw5.com/tiddlers/filters/format.tid
Normal file
@@ -0,0 +1,23 @@
|
||||
caption: format
|
||||
created: 20201020100834443
|
||||
modified: 20201020104004271
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: input strings formatted according to the specified suffix <<.place B>>
|
||||
op-parameter: optional format string for the formats
|
||||
op-parameter-name: C
|
||||
op-purpose: format the input string according to one of supported formats
|
||||
op-suffix: one of supported formats
|
||||
op-suffix-name: B
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: format Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.23">>
|
||||
|
||||
The suffix <<.place B>> is one of the following supported string formats:
|
||||
|
||||
|!Format |!Description |
|
||||
|^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional operator parameter. (Defaults to "YYYY MM DD 0hh:0mm") |
|
||||
|^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored. |
|
||||
|
||||
<<.operator-examples "format">>
|
||||
@@ -12,6 +12,10 @@ tags: [[Filter Operators]]
|
||||
title: reduce Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define reduce-tip()
|
||||
The <<.op reduce>> operator will always produce output, even if its input was empty. If its input is empty, the output of <<.op reduce>> will be the initial value of the accumulator, i.e. the value of the suffix. One result of this fact is that the <<.op else>> operator will never be triggered if it follows a <<.op reduce>>. The "Empty input" examples show what happens when <<.op reduce>> receives no input.
|
||||
\end
|
||||
|
||||
<<.from-version "5.1.23">> The <<.op reduce>> operator runs a subfilter for each input title, passing the result of the previous subfilter run as a variable. The initial value of the accumulator can optionally be specified. It returns the result of the final subfilter run.
|
||||
|
||||
The <<.op reduce>> operator is used to flatten a list of items down to a single item by repeatedly applying a formula. A typical use is to add up the values in a given field of a list of tiddlers.
|
||||
@@ -24,4 +28,6 @@ The following variables are available within the subfilter:
|
||||
* ''revIndex'' - the reverse numeric index of the current list item (with zero being the last item in the list)
|
||||
* ''length'' - the total length of the input list
|
||||
|
||||
<$macrocall $name=".tip" _=<<reduce-tip>> />
|
||||
|
||||
<<.operator-examples "reduce">>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150124182421000
|
||||
modified: 20190610165329062
|
||||
modified: 20201102224444831
|
||||
tags: [[Filter Syntax]]
|
||||
title: Filter Expression
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -17,25 +17,31 @@ A <<.def "filter expression">> is the outermost level of the [[filter syntax|Fil
|
||||
If a run has:
|
||||
|
||||
* no prefix, its output titles are [[dominantly appended|Dominant Append]] to the filter's output
|
||||
* <<.from-version "5.1.20">> the prefix `=`, output titles are appended to the filter's output without de-duplication
|
||||
* the prefix `=`, output titles are appended to the filter's output without de-duplication. <<.from-version "5.1.20">>
|
||||
* the prefix `-`, output titles are <<.em removed>> from the filter's output (if such tiddlers exist)
|
||||
* the prefix `+`, it receives the filter output so far as its input; its output then <<.em "replaces">> all filter ouput so far and forms the input for the next run
|
||||
* <<.from-version "5.1.18">> the prefix `~`, if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output. If the filter output so far is not an empty list then the run is ignored
|
||||
* the prefix `+`, it receives the filter output so far as its input; its output then <<.em "replaces">> all filter output so far and forms the input for the next run
|
||||
* the prefix `~`, if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output. If the filter output so far is not an empty list then the run is ignored. <<.from-version "5.1.18">>
|
||||
* named prefixes for filter runs are available. <<.from-version "5.1.23">>
|
||||
* named prefix `:filter`, it receives the filter output so far as its input. The next run is evaluated for each title of the input, removing every input title for which the output is an empty list. <<.from-version "5.1.23">>
|
||||
* named prefix `:intersection` replaces all filter output so far with titles that are present in the output of this run, as well as the output from previous runs. Forms the input for the next run. <<.from-version "5.1.23">>
|
||||
|
||||
<<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">>
|
||||
|
||||
In technical / logical terms:
|
||||
|
||||
|!Run |!Interpretation |!Output |
|
||||
|`run` |de-duplicated union of sets |... OR run |
|
||||
|`=run` |union of sets without de-duplication |... OR run |
|
||||
|`+run` |intersection of sets |... AND run |
|
||||
|`-run` |difference of sets |... AND NOT run |
|
||||
|`~run` |else |... ELSE run |
|
||||
|!Run |!Equivalent named prefix |!Interpretation |!Output |
|
||||
|`run` |`:or[run]` |de-duplicated union of sets |... OR run |
|
||||
|`=run` |`:all[run]` |union of sets without de-duplication |... OR run |
|
||||
|`+run` |`:and[run]` |accumulation of filter steps |... AND run |
|
||||
|`-run` |`:except[run]` |difference of sets |... AND NOT run |
|
||||
|`~run` |`:else[run]` |else |... ELSE run |
|
||||
||`:intersection`|intersection of sets||
|
||||
|
||||
The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order). But the `+` prefix can change this:
|
||||
|
||||
|Prefix|Input|h
|
||||
|`-`, `~`, `=` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]|
|
||||
|`+`|the filter output of all previous runs so far|
|
||||
|`-`, `~`, `=`, `:intersection` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]|
|
||||
|`+`, `:filter`|the filter output of all previous runs so far|
|
||||
|
||||
Precisely because of varying inputs, be aware that both prefixes `-` and `+` do not behave inverse to one another!
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ tags: [[Hidden Settings]]
|
||||
title: Hidden Setting: Disable Drag and Drop
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
To disable all the drag and drop operations that are built into the core, set the following tiddler to "no":
|
||||
<.from-version "5.1.22">> To disable all the drag and drop operations that are built into the core, set the following tiddler to "no":
|
||||
|
||||
$:/config/DragAndDrop/Enable
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20140919155729620
|
||||
modified: 20150221224034000
|
||||
modified: 20201017134038305
|
||||
tags: Macros [[Core Macros]]
|
||||
title: Table-of-Contents Macros
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -34,6 +34,8 @@ The tree displays the <<.field caption>> field of a tiddler if it has one, or th
|
||||
|
||||
Each tiddler in the tree is normally displayed as a link. To suppress this, give the tiddler a <<.field toc-link>> field with the the value <<.value no>>. In the [[examples|Table-of-Contents Macros (Examples)]], the SecondThree tiddler is set up like this. Clicking such a tiddler in the tree causes its branch to expand or collapse.
|
||||
|
||||
<<.from-version "5.1.23">> By default, the links open the tiddlers making up the table of contents. Alternatively, if the tiddler contains a <<.field target>> field then its contents will be used as the target of the link.
|
||||
|
||||
The table of contents is generated as an HTML ordered list. The `<ol>` elements always have the class `tc-toc`. Expandable trees have the additional class `tc-toc-expandable`. Selectively expandable trees (including those in the two-panel browser) have `tc-toc-selective-expandable`.
|
||||
|
||||
To make a table of contents appear in the sidebar, see [[How to add a new tab to the sidebar]].
|
||||
|
||||
@@ -27,6 +27,10 @@ By default the tabs are arranged horizontally above the content. To get vertical
|
||||
: Optionally, the title of a tiddler to use as a [[template|TemplateTiddlers]] for transcluding the content of the button for the selected tab
|
||||
;retain
|
||||
: Optionally, "yes" specifies that the content of the tabs should be retained when switching to another tab, avoiding re-rendering it (this can be useful to avoid video or audio sources unexpectedly resetting)
|
||||
;actions
|
||||
: Optionally, actions can be specified that are triggered when changing a tab
|
||||
;explicitState
|
||||
: Optionally, an explicit state title can be specified. It will be preferred over the internally computed (qualified) state title
|
||||
|
||||
Within the template, the title of the selected tab is available in the <<.var currentTab>> variable.
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ To create the input field or textarea, the <<.def keyboard-driven-input>> [[macr
|
||||
|
||||
The additional parameters are:
|
||||
|
||||
| |purpose |h
|
||||
|parameter |purpose |h
|
||||
|storeTitle |the title of the tiddler that stores the user input |
|
||||
|selectionStateTitle |the title of the tiddler that stores the selected entry with a -primaryList or -secondaryList suffix to make it unique |
|
||||
|inputAcceptActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-accept}}</kbd> |
|
||||
|inputAcceptVariantActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-accept-variant}}</kbd> |
|
||||
|inputCancelActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-cancel}}</kbd> |
|
||||
|primaryListFilter |a filter that specifies the first item-list |
|
||||
|secondaryListFilter |a second filter that specifies a second item-list |
|
||||
|configTiddlerFilter |a ''filter'' that specifies the tiddler that stores the first item-filter in its <<.field first-search-filter>> field and the second item-filter in its <<.field second-search-filter>> field |
|
||||
|firstSearchFilterField |the field of the configTiddler where the first search-filter is stored. Defaults to <<.field first-search-filter>> |
|
||||
|secondSearchFilterField |the field of the configTiddler where the second search-filter is stored. Defaults to <<.field second-search-filter>> |
|
||||
|filterMinLength |the minimum length of the user input after which items are filtered |
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20140811112445887
|
||||
modified: 20140811113336694
|
||||
modified: 20201025163134940
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-login
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -9,3 +9,4 @@ The login message prompts the user for a username and password and attempts to l
|
||||
|
||||
The login message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SyncAdaptorModule|SyncAdaptorModules]] (typically the ''tiddlywiki/tiddlywebadaptor'' plugin).
|
||||
|
||||
<<.from-version "5.1.23">> The login message can optionally accept parameters called ''username'' and ''password'' that immediately attempts to login with the specified credentials without displaying the prompt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-scroll
|
||||
created: 20160425000906330
|
||||
modified: 20160425001655166
|
||||
modified: 20201014152456174
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-scroll
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -8,6 +8,5 @@ type: text/vnd.tiddlywiki
|
||||
The `tm-scroll` message causes the surrounding scrollable container to scroll to the specified DOM node into view. The `tm-scroll` is handled in various places in the core itself, but can also be handled by a [[ScrollableWidget]].
|
||||
|
||||
|!Name |!Description |
|
||||
|target |Target DOM node the scrollable container should scroll to. |
|
||||
|
||||
Due to the nature of the parameter, the `tm-scroll` can only be generated within javascript code.
|
||||
|target |Target DOM node the scrollable container should scroll to (note that this parameter can only be set via JavaScript code) |
|
||||
|selector |<<.from-version "5.1.23">> Optional string [[CSS selector|https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors]] as an alternate means of identifying the target DOM node |
|
||||
|
||||
@@ -51,6 +51,7 @@ Directory specifications in the `directories` array may take the following forms
|
||||
** ''path'' - (required) the absolute or relative path to the directory containing the tiddler files (relative paths are interpreted relative to the path of the `tiddlywiki.files` file). Note that the directory is not recursively searched; sub-directories are ignored
|
||||
** ''filesRegExp'' - (optional) a [[regular expression|https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions]] that matches the filenames of the files that should be processed within the directory
|
||||
** ''isTiddlerFile'' - (required) if `true`, the file will be treated as a [[tiddler file|TiddlerFiles]] and deserialised to extract the tiddlers. Otherwise, the raw content of the file is assigned to the `text` field without any parsing
|
||||
** ''isEditableFile'' - (optional) if `true`, changes to the tiddler be saved back to the original file. <<.from-version "5.1.23">>
|
||||
** ''fields'' - (required) an object containing values that override or customise the fields provided in the tiddler file (see above)
|
||||
|
||||
Fields can be overridden for particular files by creating a file with the same name plus the suffix `.meta` -- see TiddlerFiles.
|
||||
|
||||
14
editions/tw5.com/tiddlers/plugins/Consent Banner Plugin.tid
Normal file
14
editions/tw5.com/tiddlers/plugins/Consent Banner Plugin.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
created: 20201019084534263
|
||||
modified: 20201019084658478
|
||||
tags: OfficialPlugins
|
||||
title: Consent Banner Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The Consent Banner Plugin helps make websites that are compliant with "cookie legislation" such as the [[EU General Data Protection Regulation|https://gdpr.eu/cookies/]].
|
||||
It presents a banner inviting the user to accept or reject cookies, keeping track of their consent in local storage so that the banner can be hidden on subsequent visits.
|
||||
|
||||
By default, content embedded with <iframe>, <embed> and <object> is blocked unless the user consents to accept cookies.
|
||||
|
||||
Consent status is available via a configuration tiddler so that it is possible to construct content that behaves differently depending upon whether consent has been granted. As an example, a macro is provided for embedding ~YouTube videos that automatically uses the youtube-nocookie.com variant of video URLs unless the user has accepted cookies.
|
||||
|
||||
Please note that using this plugin does not guarantee compliance with any particular legislation. You will need to understand the technical issues specific to your situation, and if necessary seek legal advice.
|
||||
7
editions/tw5.com/tiddlers/plugins/JSZip Plugin.tid
Normal file
7
editions/tw5.com/tiddlers/plugins/JSZip Plugin.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
created: 20201019084712096
|
||||
modified: 20201019084824422
|
||||
tags: OfficialPlugins
|
||||
title: JSZip Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This plugin provides primitives for creating Zip files in the browser. It also makes the [[JSZip|https://stuk.github.io/jszip/]] library available for use by other plugins.
|
||||
@@ -5,12 +5,12 @@ created: 20131129101027725
|
||||
delivery: App
|
||||
description: iPad/iPhone app for working with TiddlyWiki
|
||||
method: save
|
||||
modified: 20200507104206754
|
||||
modified: 20201007205336209
|
||||
tags: Saving iOS
|
||||
title: Saving on iPad/iPhone
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The iPad/iPhone app ''Quine 2'' makes it possible to view, edit and then save changes to TiddlyWiki5 on iOS. [[Download it here|https://itunes.apple.com/us/app/quine/id1228682923?mt=8]].
|
||||
The iPad/iPhone app ''Quine 2'' makes it possible to view, edit and then save changes to TiddlyWiki5 on iOS. [[Download it here|https://apps.apple.com/us/app/quine-2/id1450128957]].
|
||||
|
||||
Instructions for use:
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: $:/tags/Macro/View
|
||||
created: 20200103092530990
|
||||
description: marks global macros
|
||||
description: marks global macros only active in View template
|
||||
modified: 20200103092606462
|
||||
tags: SystemTags
|
||||
title: SystemTag: $:/tags/Macro/View
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/Macro/View` marks macros that are only made available within the main view templates and the preview panel.
|
||||
The [[system tag|SystemTags]] `$:/tags/Macro/View` marks macros that are only made available within the main view templates and the preview panel.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: $:/tags/Texteditor/Snippet
|
||||
caption: $:/tags/TextEditor/Snippet
|
||||
created: 20180926170345251
|
||||
description: marks text snippets
|
||||
modified: 20180926171456546
|
||||
modified: 20200828154100425
|
||||
tags: SystemTags
|
||||
title: SystemTag: $:/tags/Texteditor/Snippet
|
||||
title: SystemTag: $:/tags/TextEditor/Snippet
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/Texteditor/Snippet` marks text snippets
|
||||
The [[system tag|SystemTags]] `$:/tags/TextEditor/Snippet` marks text snippets
|
||||
@@ -2,13 +2,17 @@ tags: Variables [[Core Variables]]
|
||||
title: modifier Variable
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Within the ''action'' string of the DroppableWidget, the <<.def modifier>> [[variable|Variables]] contains the modifier key(s) held during the drag-process.
|
||||
The possible keys are ''ctrl'', ''shift'' or both ''ctrl'' and ''shift''
|
||||
Within the ''action'' string of the DroppableWidget, the ''action'' string of the ButtonWidget and the ''action'' string of the LinkCatcherWidget, the <<.def modifier>> [[variable|Variables]] contains the modifier key(s) held during the drag-process.
|
||||
The possible keys are ''ctrl'', ''shift'', ''alt'', ''ctrl'' and ''shift'', ''alt'' and ''shift'', ''ctrl'' and ''alt'', ''ctrl'' and ''alt'' and ''shift''
|
||||
|
||||
The variable contains a string that identifies the keys:
|
||||
|
||||
|Modifier Key |Variable Content |h
|
||||
|ctrl |ctrl |
|
||||
|alt |alt |
|
||||
|shift |shift |
|
||||
|ctrl+shift |ctrl-shift |
|
||||
|no modifier (normal drag) |normal |
|
||||
|alt+shift |alt-shift |
|
||||
|ctrl+alt |ctrl-alt |
|
||||
|ctrl+alt+shift |ctrl-alt-shift |
|
||||
|no modifier (normal click / drag) |normal |
|
||||
|
||||
@@ -13,6 +13,11 @@ Listing/Preview/TextRaw: 文本 (原始)
|
||||
Listing/Preview/Fields: 字段
|
||||
Listing/Preview/Diff: 差异
|
||||
Listing/Preview/DiffFields: 差异 (字段)
|
||||
Listing/Rename/Prompt: 重新命名为:
|
||||
Listing/Rename/Tooltip: 导入前重新命名条目
|
||||
Listing/Rename/ConfirmRename: 重新命名条目
|
||||
Listing/Rename/CancelRename: 取消
|
||||
Listing/Rename/OverwriteWarning: 具有此标题的条目已存在。
|
||||
Upgrader/Plugins/Suppressed/Incompatible: 封锁的不兼容或过时插件
|
||||
Upgrader/Plugins/Suppressed/Version: 封锁的插件 (由于传入的 <<incoming>> 较现有版本 <<existing>> 旧)
|
||||
Upgrader/Plugins/Upgraded: 升级插件,从 <<incoming>> 到 <<upgraded>>
|
||||
|
||||
@@ -25,7 +25,9 @@ Encryption/SetPassword: 设定密码
|
||||
Error/Caption: 错误
|
||||
Error/EditConflict: 服务器上的文件已更改
|
||||
Error/Filter: 筛选器错误
|
||||
Error/FilterRunPrefix: 筛选器错误:筛选器 run 的未知首码
|
||||
Error/FilterSyntax: 筛选器运算式中的语法错误
|
||||
Error/FormatFilterOperator: 筛选器错误:`format` 筛选器运算符的未知尾码
|
||||
Error/IsFilterOperator: 筛选器错误︰'is' 筛选器运算符的未知操作数
|
||||
Error/LoadingPluginLibrary: 加载插件程式库时,发生错误
|
||||
Error/NetworkErrorAlert: `<h2>''网络错误''</h2>与服务器的连缐似乎已中断。这可能表示您的网络连缐有问题。请尝试恢复网路连缐才能继续。<br><br>''恢复连缐时,所有未保存的更改,将自动同步''。`
|
||||
@@ -36,7 +38,7 @@ Error/WhileSaving: 保存时,发生错误
|
||||
Error/XMLHttpRequest: XMLHttpRequest 错误代码
|
||||
InternalJavaScriptError/Title: 内部的 JavaScript 错误
|
||||
InternalJavaScriptError/Hint: 喔,真是令人尴尬。建议刷新您的浏览器,重新启动 TiddlyWiki
|
||||
InvalidFieldName: 栏位名称 "<$text text=<<fieldName>>/>" 包含无效字符,栏位名称只能包含小写字母、数字、底线 (`_`)、 连字号 (`-`) 和小数点 (`.`)
|
||||
InvalidFieldName: 字段名称 "<$text text=<<fieldName>>/>" 包含无效字符,字段名称只能包含小写字母、数字、底线 (`_`)、 连字号 (`-`) 和小数点 (`.`)
|
||||
LazyLoadingWarning: <p>正在从 ''<$text text={{!!_canonical_uri}}/>'' 加载外部内容 ...</p><p>如果此信息未消失,可能是条目内容类型与外部内容的类型不匹配,或是您可能正在使用的浏览器,不支援单文件式维基的外部内容。请参阅 https://tiddlywiki.com/#ExternalText</p>
|
||||
LoginToTiddlySpace: 登录 TiddlySpace
|
||||
Manager/Controls/FilterByTag/None: (无)
|
||||
@@ -49,7 +51,7 @@ Manager/Controls/Show/Option/Tiddlers: 条目
|
||||
Manager/Controls/Show/Prompt: 显示︰
|
||||
Manager/Controls/Sort/Prompt: 排序︰
|
||||
Manager/Item/Colour: 颜色
|
||||
Manager/Item/Fields: 栏位
|
||||
Manager/Item/Fields: 字段
|
||||
Manager/Item/Icon/None: (无)
|
||||
Manager/Item/Icon: 图标
|
||||
Manager/Item/RawText: 原始文字
|
||||
@@ -64,9 +66,13 @@ PluginReloadWarning: 请保存 {{$:/core/ui/Buttons/save-wiki}} 并刷新页面
|
||||
RecentChanges/DateFormat: YYYY年0MM月0DD日
|
||||
Shortcuts/Input/Accept/Hint: 接受选取的项目
|
||||
Shortcuts/Input/AcceptVariant/Hint: 接受选取项目 (变种)
|
||||
Shortcuts/Input/Cancel/Hint: 清除输入栏位
|
||||
Shortcuts/Input/AdvancedSearch/Hint: 从侧边栏搜寻字段内打开[[进阶搜寻|$:/AdvancedSearch]]面板
|
||||
Shortcuts/Input/Cancel/Hint: 清除输入字段
|
||||
Shortcuts/Input/Down/Hint: 选择下一个项目
|
||||
Shortcuts/Input/Tab-Left/Hint: 选择上一个页签
|
||||
Shortcuts/Input/Tab-Right/Hint: 选择下一个页签
|
||||
Shortcuts/Input/Up/Hint: 选择前一个项目
|
||||
Shortcuts/SidebarLayout/Hint: 更改侧边栏布局
|
||||
SystemTiddler/Tooltip: 此为系统条目
|
||||
SystemTiddlers/Include/Prompt: 包括系统条目
|
||||
TagManager/Colour/Heading: 颜色
|
||||
|
||||
@@ -13,6 +13,11 @@ Listing/Preview/TextRaw: 文字 (原始)
|
||||
Listing/Preview/Fields: 欄位
|
||||
Listing/Preview/Diff: 差異
|
||||
Listing/Preview/DiffFields: 差異 (欄位)
|
||||
Listing/Rename/Prompt: 重新命名為:
|
||||
Listing/Rename/Tooltip: 導入前重新命名條目
|
||||
Listing/Rename/ConfirmRename: 重新命名條目
|
||||
Listing/Rename/CancelRename: 取消
|
||||
Listing/Rename/OverwriteWarning: 具有此標題的條目已存在。
|
||||
Upgrader/Plugins/Suppressed/Incompatible: 封鎖的不相容或過時插件
|
||||
Upgrader/Plugins/Suppressed/Version: 封鎖的插件 (由於傳入的 <<incoming>> 較現有版本 <<existing>> 舊)
|
||||
Upgrader/Plugins/Upgraded: 升級插件,從 <<incoming>> 到 <<upgraded>>
|
||||
|
||||
@@ -25,7 +25,9 @@ Encryption/SetPassword: 設定密碼
|
||||
Error/Caption: 錯誤
|
||||
Error/EditConflict: 伺服器上的檔案已更改
|
||||
Error/Filter: 篩選器錯誤
|
||||
Error/FilterRunPrefix: 篩選器錯誤:篩選器 run 的未知首碼
|
||||
Error/FilterSyntax: 篩選器運算式中的語法錯誤
|
||||
Error/FormatFilterOperator: 篩選器錯誤:`format` 篩選器運算子的未知尾碼
|
||||
Error/IsFilterOperator: 篩選器錯誤︰'is' 篩選器運算子的未知運算元
|
||||
Error/LoadingPluginLibrary: 載入插件程式庫時,發生錯誤
|
||||
Error/NetworkErrorAlert: `<h2>''網路錯誤''</h2>與伺服器的連線似乎已中斷。這可能表示您的網路連線有問題。請嘗試恢復網路連線才能繼續。<br><br>''恢復連線時,所有未儲存的變更,將自動同步''。`
|
||||
@@ -64,9 +66,13 @@ PluginReloadWarning: 請儲存 {{$:/core/ui/Buttons/save-wiki}} 並刷新頁面
|
||||
RecentChanges/DateFormat: YYYY年0MM月0DD日
|
||||
Shortcuts/Input/Accept/Hint: 接受選取的項目
|
||||
Shortcuts/Input/AcceptVariant/Hint: 接受選取項目 (變種)
|
||||
Shortcuts/Input/AdvancedSearch/Hint: 從側邊欄搜尋欄位內開啟[[進階搜尋|$:/AdvancedSearch]]面板
|
||||
Shortcuts/Input/Cancel/Hint: 清除輸入欄位
|
||||
Shortcuts/Input/Down/Hint: 選擇下一個項目
|
||||
Shortcuts/Input/Tab-Left/Hint: 選擇上一個頁籤
|
||||
Shortcuts/Input/Tab-Right/Hint: 選擇下一個頁籤
|
||||
Shortcuts/Input/Up/Hint: 選擇前一個項目
|
||||
Shortcuts/SidebarLayout/Hint: 更改側邊欄版面
|
||||
SystemTiddler/Tooltip: 此為系統條目
|
||||
SystemTiddlers/Include/Prompt: 包括系統條目
|
||||
TagManager/Colour/Heading: 顏色
|
||||
|
||||
@@ -409,3 +409,11 @@ Dazhong Xia, @jdangerx, 2020/06/23
|
||||
Diep Pham, @favadi, 2020/07/30
|
||||
|
||||
Adithya Badidey, @adithya-badidey, 2020/08/10
|
||||
|
||||
Kamal Habash, @Kamal-Habash, 2020/08/28
|
||||
|
||||
Florian Kohrt, @fkohrt, 2020/09/10
|
||||
|
||||
Gerald Liu, @gera2ld, 2020/09/25
|
||||
|
||||
Ryan Kramer, @default-kramer, 2020/10/24
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
"wiki"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.10.0"
|
||||
},
|
||||
"bundleDependencies": [],
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
|
||||
0
plugins/tiddlywiki/bibtex/files/LICENSE
Executable file → Normal file
0
plugins/tiddlywiki/bibtex/files/LICENSE
Executable file → Normal file
0
plugins/tiddlywiki/bibtex/files/README.md
Executable file → Normal file
0
plugins/tiddlywiki/bibtex/files/README.md
Executable file → Normal file
68
plugins/tiddlywiki/bibtex/files/bibtexParse.js
Executable file → Normal file
68
plugins/tiddlywiki/bibtex/files/bibtexParse.js
Executable file → Normal file
@@ -1,9 +1,12 @@
|
||||
/* start bibtexParse 0.0.22 */
|
||||
/* start bibtexParse 0.0.24 */
|
||||
|
||||
//Original work by Henrik Muehe (c) 2010
|
||||
//
|
||||
//CommonJS port by Mikola Lysenko 2013
|
||||
//
|
||||
//Choice of compact (default) or pretty output from toBibtex:
|
||||
// Nick Bailey, 2017.
|
||||
//
|
||||
//Port to Browser lib by ORCID / RCPETERS
|
||||
//
|
||||
//Issues:
|
||||
@@ -24,7 +27,7 @@
|
||||
(function(exports) {
|
||||
|
||||
function BibtexParser() {
|
||||
|
||||
|
||||
this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
||||
this.notKey = [',','{','}',' ','='];
|
||||
this.pos = 0;
|
||||
@@ -52,8 +55,8 @@
|
||||
if (this.input.substring(this.pos, this.pos + s.length) == s) {
|
||||
this.pos += s.length;
|
||||
} else {
|
||||
throw "Token mismatch, expected " + s + ", found "
|
||||
+ this.input.substring(this.pos);
|
||||
throw TypeError("Token mismatch: match", "expected " + s + ", found "
|
||||
+ this.input.substring(this.pos));
|
||||
};
|
||||
this.skipWhitespace(canCommentOut);
|
||||
};
|
||||
@@ -112,7 +115,7 @@
|
||||
} else if (this.input[this.pos] == '{') {
|
||||
bracecount++;
|
||||
} else if (this.pos >= this.input.length - 1) {
|
||||
throw "Unterminated value";
|
||||
throw TypeError("Unterminated value: value_braces");
|
||||
};
|
||||
};
|
||||
if (this.input[this.pos] == '\\' && escaped == false)
|
||||
@@ -133,7 +136,7 @@
|
||||
if (this.input[this.pos] == '}')
|
||||
brcktCnt--;
|
||||
if (this.pos >= this.input.length - 1) {
|
||||
throw "Unterminated value:" + this.input.substring(start);
|
||||
throw TypeError("Unterminated value: value_comment", + this.input.substring(start));
|
||||
};
|
||||
this.pos++;
|
||||
};
|
||||
@@ -151,7 +154,7 @@
|
||||
this.match('"', false);
|
||||
return this.input.substring(start, end);
|
||||
} else if (this.pos >= this.input.length - 1) {
|
||||
throw "Unterminated value:" + this.input.substring(start);
|
||||
throw TypeError("Unterminated value: value_quotes", this.input.substring(start));
|
||||
};
|
||||
}
|
||||
if (this.input[this.pos] == '\\' && escaped == false)
|
||||
@@ -175,8 +178,8 @@
|
||||
else if (this.months.indexOf(k.toLowerCase()) >= 0)
|
||||
return k.toLowerCase();
|
||||
else
|
||||
throw "Value expected:" + this.input.substring(start) + ' for key: ' + k;
|
||||
|
||||
throw "Value expected: single_value" + this.input.substring(start) + ' for key: ' + k;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -194,7 +197,7 @@
|
||||
var start = this.pos;
|
||||
while (true) {
|
||||
if (this.pos >= this.input.length) {
|
||||
throw "Runaway key";
|
||||
throw TypeError("Runaway key: key");
|
||||
};
|
||||
// а-яА-Я is Cyrillic
|
||||
//console.log(this.input[this.pos]);
|
||||
@@ -206,7 +209,7 @@
|
||||
return this.input.substring(start, this.pos);
|
||||
} else {
|
||||
this.pos++;
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -216,10 +219,11 @@
|
||||
if (this.tryMatch("=")) {
|
||||
this.match("=");
|
||||
var val = this.value();
|
||||
key = key.trim()
|
||||
return [ key, val ];
|
||||
} else {
|
||||
throw "... = value expected, equals sign missing:"
|
||||
+ this.input.substring(this.pos);
|
||||
throw TypeError("Value expected, equals sign missing: key_equals_value",
|
||||
this.input.substring(this.pos));
|
||||
};
|
||||
};
|
||||
|
||||
@@ -243,7 +247,7 @@
|
||||
this.currentEntry = {};
|
||||
this.currentEntry['citationKey'] = this.key(true);
|
||||
this.currentEntry['entryType'] = d.substring(1);
|
||||
if (this.currentEntry['citationKey'] != null) {
|
||||
if (this.currentEntry['citationKey'] != null) {
|
||||
this.match(",");
|
||||
}
|
||||
this.key_value_list();
|
||||
@@ -289,11 +293,11 @@
|
||||
while (this.matchAt()) {
|
||||
var d = this.directive();
|
||||
this.match("{");
|
||||
if (d == "@STRING") {
|
||||
if (d.toUpperCase() == "@STRING") {
|
||||
this.string();
|
||||
} else if (d == "@PREAMBLE") {
|
||||
} else if (d.toUpperCase() == "@PREAMBLE") {
|
||||
this.preamble();
|
||||
} else if (d == "@COMMENT") {
|
||||
} else if (d.toUpperCase() == "@COMMENT") {
|
||||
this.comment();
|
||||
} else {
|
||||
this.entry(d);
|
||||
@@ -304,7 +308,7 @@
|
||||
this.alernativeCitationKey();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
exports.toJSON = function(bibtex) {
|
||||
var b = new BibtexParser();
|
||||
b.setInput(bibtex);
|
||||
@@ -313,28 +317,40 @@
|
||||
};
|
||||
|
||||
/* added during hackathon don't hate on me */
|
||||
exports.toBibtex = function(json) {
|
||||
/* Increased the amount of white-space to make entries
|
||||
* more attractive to humans. Pass compact as false
|
||||
* to enable */
|
||||
exports.toBibtex = function(json, compact) {
|
||||
if (compact === undefined) compact = true;
|
||||
var out = '';
|
||||
|
||||
var entrysep = ',';
|
||||
var indent = '';
|
||||
if (!compact) {
|
||||
entrysep = ',\n';
|
||||
indent = ' ';
|
||||
}
|
||||
for ( var i in json) {
|
||||
out += "@" + json[i].entryType;
|
||||
out += '{';
|
||||
if (json[i].citationKey)
|
||||
out += json[i].citationKey + ', ';
|
||||
out += json[i].citationKey + entrysep;
|
||||
if (json[i].entry)
|
||||
out += json[i].entry ;
|
||||
if (json[i].entryTags) {
|
||||
var tags = '';
|
||||
var tags = indent;
|
||||
for (var jdx in json[i].entryTags) {
|
||||
if (tags.length != 0)
|
||||
tags += ', ';
|
||||
tags += jdx + '= {' + json[i].entryTags[jdx] + '}';
|
||||
if (tags.trim().length != 0)
|
||||
tags += entrysep + indent;
|
||||
tags += jdx + (compact ? '={' : ' = {') +
|
||||
json[i].entryTags[jdx] + '}';
|
||||
}
|
||||
out += tags;
|
||||
}
|
||||
out += '}\n\n';
|
||||
out += compact ? '}\n' : '\n}\n\n';
|
||||
}
|
||||
return out;
|
||||
|
||||
|
||||
};
|
||||
|
||||
})(typeof exports === 'undefined' ? this['bibtexParse'] = {} : exports);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}})});
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(y){"use strict";var b=/[\w$]+/;y.registerHelper("hint","anyword",function(e,r){for(var t=r&&r.word||b,o=r&&r.range||500,i=e.getCursor(),n=e.getLine(i.line),f=i.ch,s=f;s&&t.test(n.charAt(s-1));)--s;for(var a=s!=f&&n.slice(s,f),c=r&&r.list||[],l={},d=new RegExp(t.source,"g"),u=-1;u<=1;u+=2)for(var p=i.line,g=Math.min(Math.max(p+u*o,e.firstLine()),e.lastLine())+u;p!=g;p+=u)for(var h,m=e.getLine(p);h=d.exec(m);)p==i.line&&h[0]===a||a&&0!=h[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(l,h[0])||(l[h[0]]=!0,c.push(h[0]));return{list:c,from:y.Pos(i.line,s),to:y.Pos(i.line,f)}})});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user