mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Merge branch 'master' into add-utils-console-error-function
This commit is contained in:
commit
8851ab0b23
@ -1,8 +0,0 @@
|
|||||||
# Ignore "third party" code whose style we will not change.
|
|
||||||
/boot/sjcl.js
|
|
||||||
/core/modules/utils/base64-utf8/base64-utf8.module.js
|
|
||||||
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
|
|
||||||
/core/modules/utils/diff-match-patch/diff_match_patch.js
|
|
||||||
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
|
|
||||||
/core/modules/utils/dom/csscolorparser.js
|
|
||||||
/plugins/tiddlywiki/*/files/
|
|
283
.eslintrc.yml
283
.eslintrc.yml
@ -1,283 +0,0 @@
|
|||||||
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:
|
|
||||||
- error
|
|
||||||
- before: true
|
|
||||||
after: false
|
|
||||||
overrides:
|
|
||||||
'case':
|
|
||||||
after: true
|
|
||||||
'do':
|
|
||||||
'after': true
|
|
||||||
'else':
|
|
||||||
after: true
|
|
||||||
'return':
|
|
||||||
after: true
|
|
||||||
'throw':
|
|
||||||
after: true
|
|
||||||
'try':
|
|
||||||
after: true
|
|
||||||
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"
|
|
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -21,7 +21,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: To Reproduce
|
label: To Reproduce
|
||||||
description: "Steps to reproduce the behavior:"
|
description: "Steps to reproduce the behavior:"
|
||||||
value: |
|
placeholder: |
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. Scroll down to '....'
|
3. Scroll down to '....'
|
||||||
@ -41,7 +41,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: TiddlyWiki Configuration
|
label: TiddlyWiki Configuration
|
||||||
description: please complete the following information
|
description: please complete the following information
|
||||||
value: |
|
placeholder: |
|
||||||
- Version [e.g. v5.1.24]
|
- Version [e.g. v5.1.24]
|
||||||
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
||||||
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
||||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Discuss feature request
|
- name: Discuss feature request
|
||||||
url: https://github.com/Jermolene/TiddlyWiki5/discussions
|
url: https://github.com/TiddlyWiki/TiddlyWiki5/discussions
|
||||||
about: Open new discussion about new feature
|
about: Open new discussion about new feature
|
||||||
- name: Talk.Tiddlywiki Forum
|
- name: Talk.Tiddlywiki Forum
|
||||||
url: https://talk.tiddlywiki.org
|
url: https://talk.tiddlywiki.org
|
||||||
|
30
.github/workflows/cla-check.yml
vendored
Normal file
30
.github/workflows/cla-check.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Check CLA Signature
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
paths-ignore:
|
||||||
|
- 'licenses/cla-individual.md'
|
||||||
|
jobs:
|
||||||
|
check_cla:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -io "@$USER,"; then
|
||||||
|
echo "CLA not signed"
|
||||||
|
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
|
||||||
|
|
||||||
|
With apologies for the bureaucracy, please could you prepare a separate PR to the 'tiddlywiki-com' branch with your signature for the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))."
|
||||||
|
else
|
||||||
|
echo "CLA already signed"
|
||||||
|
gh pr comment "$NUMBER" -b "Confirmed: **$USER** has already signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
USER: ${{ github.actor }}
|
70
.github/workflows/cla-signed.yml
vendored
Normal file
70
.github/workflows/cla-signed.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
name: CLA Signed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- closed
|
||||||
|
paths:
|
||||||
|
- 'licenses/cla-individual.md'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# check if PRs updating the CLA are targetting the tiddlywiki-com branch
|
||||||
|
check-signature-branch:
|
||||||
|
if: (github.event.pull_request.merged != true) && (github.event.pull_request.user.login != github.repository_owner)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
if [[ "$BRANCH" != "tiddlywiki-com" ]]; then
|
||||||
|
echo "This CLA signature targets the wrong branch: $BRANCH"
|
||||||
|
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||||
|
|
||||||
|
# leave a comment on each open PR by a given author when their signature is added to the CLA
|
||||||
|
cla-signed:
|
||||||
|
if: (github.event.pull_request.merged == true) && (github.event.pull_request.user.login != github.repository_owner)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: List open PRs by user
|
||||||
|
id: list-prs
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
result-encoding: string
|
||||||
|
script: |
|
||||||
|
const owner = context.repo.owner,
|
||||||
|
repo = context.repo.repo,
|
||||||
|
author = context.payload.pull_request.user.login;
|
||||||
|
|
||||||
|
const { data: pullRequests } = await github.rest.pulls.list({
|
||||||
|
owner: owner,
|
||||||
|
repo: repo,
|
||||||
|
state: 'open',
|
||||||
|
sort: 'created',
|
||||||
|
direction: 'desc',
|
||||||
|
per_page: 100
|
||||||
|
});
|
||||||
|
const userPullRequests = pullRequests.filter(pr => pr.user.login === author),
|
||||||
|
prNumbers = userPullRequests.map(pr => pr.number).join(',');
|
||||||
|
console.log(`Open pull requests by ${author}:${prNumbers}`);
|
||||||
|
return prNumbers;
|
||||||
|
|
||||||
|
- name: Comment open PRs by the same author
|
||||||
|
run: |
|
||||||
|
prs=($(echo ${{ steps.list-prs.outputs.result }} | tr "," "\n"))
|
||||||
|
|
||||||
|
for number in "${prs[@]}"
|
||||||
|
do
|
||||||
|
gh pr comment "$number" -b "**$AUTHOR** has signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
|
||||||
|
done
|
@ -5,7 +5,7 @@
|
|||||||
# Default to the current version number for building the plugin library
|
# Default to the current version number for building the plugin library
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||||
TW5_BUILD_VERSION=v5.3.3
|
TW5_BUILD_VERSION=v5.3.6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
@ -164,20 +164,6 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
--rendertiddler $:/core/save/all tour.html text/plain \
|
--rendertiddler $:/core/save/all tour.html text/plain \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
# /dev/index.html Developer docs
|
|
||||||
# /dev/favicon.ico Favicon for dev site
|
|
||||||
# /dev/static.html Static rendering of default tiddlers
|
|
||||||
# /dev/alltiddlers.html Static rendering of all tiddlers
|
|
||||||
# /dev/static/* Static single tiddlers
|
|
||||||
# /dev/static/static.css Static stylesheet
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
|
||||||
./editions/dev \
|
|
||||||
--verbose \
|
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
|
||||||
--output $TW5_BUILD_OUTPUT/dev \
|
|
||||||
--build index favicon static \
|
|
||||||
|| exit 1
|
|
||||||
|
|
||||||
# /share.html Custom edition for sharing via the URL
|
# /share.html Custom edition for sharing via the URL
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/share \
|
./editions/share \
|
||||||
|
@ -7,4 +7,4 @@ npm --force install tiddlywiki || exit 1
|
|||||||
|
|
||||||
# Pull existing GitHub pages content
|
# Pull existing GitHub pages content
|
||||||
|
|
||||||
git clone --depth=1 --branch=master "https://github.com/Jermolene/jermolene.github.io.git" output
|
git clone --depth=1 --branch=master "https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" output
|
||||||
|
@ -10,6 +10,6 @@ git config --global user.email "actions@github.com"
|
|||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
git add -A .
|
git add -A .
|
||||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
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 remote add deploy "https://$GH_TOKEN@github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" &>/dev/null
|
||||||
git push deploy master &>/dev/null
|
git push deploy master &>/dev/null
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
--output . \
|
--output . \
|
||||||
--build readmes \
|
--build readmes \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
|
# tw.org readmes
|
||||||
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
|
editions/tw.org \
|
||||||
|
--verbose \
|
||||||
|
--output . \
|
||||||
|
--build readmes \
|
||||||
|
|| exit 1
|
||||||
|
@ -21,7 +21,7 @@ $tw.boot = $tw.boot || Object.create(null);
|
|||||||
|
|
||||||
// Detect platforms
|
// Detect platforms
|
||||||
if(!("browser" in $tw)) {
|
if(!("browser" in $tw)) {
|
||||||
$tw.browser = typeof(window) !== "undefined" ? {} : null;
|
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;
|
||||||
}
|
}
|
||||||
if(!("node" in $tw)) {
|
if(!("node" in $tw)) {
|
||||||
$tw.node = typeof(process) === "object" ? {} : null;
|
$tw.node = typeof(process) === "object" ? {} : null;
|
||||||
|
1
code-of-conduct.md
Normal file
1
code-of-conduct.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>This community exists because TiddlyWiki is more useful when people share and work together.</p><p>This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.</p><p>We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.</p><p>These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.</p><ul><li>We are optimistic and hopeful</li><li>We aim to foster a learning environment that is collaborative and safe for everyone</li><li>We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and <strong>thank the people who enrich the community by sharing what they have created</strong></li><li>While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and <strong>avoid unnecessarily mixing contentious topics like religion and politics</strong></li><li>We treat each other with respect, and start with the assumption that <strong>others are acting in good faith</strong></li><li>We avoid discriminatory language</li><li>We try to use our strength as a community to help others</li><li>We avoid responding when angry or upset because we try to de-escalate conflict</li><li>We make sure we critique ideas, not people</li><li>When we disagree with others we do so graciously, and treat others with dignity and respoect</li><li>We do not tolerate intolerance towards others</li><li>We seek first to understand others, and then to be understood</li><li>We have fun</li></ul><p>Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.</p><p>It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.</p><p>As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.</p>
|
File diff suppressed because one or more lines are too long
5
core/images/discord.tid
Normal file
5
core/images/discord.tid
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
title: $:/core/images/discord
|
||||||
|
tags: $:/tags/Image
|
||||||
|
|
||||||
|
\parameters (size:"22pt")
|
||||||
|
<svg width=<<size>> height=<<size>> class="tc-image-discord tc-image-button" viewBox="0 -28.5 256 256"><path d="M216.856 16.597A208.502 208.502 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046-19.692-2.961-39.203-2.961-58.533 0-1.832-4.4-4.55-9.933-6.846-14.046a207.809 207.809 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161.094 161.094 0 0 0 79.735 175.3a136.413 136.413 0 0 1-21.846-10.632 108.636 108.636 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a131.66 131.66 0 0 0 5.355 4.237 136.07 136.07 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848 21.142-6.58 42.646-16.637 64.815-33.213 5.316-56.288-9.08-105.09-38.056-148.36ZM85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2c12.867 0 23.236 11.804 23.015 26.2.02 14.375-10.148 26.18-23.015 26.18Zm85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2 0 14.375-10.148 26.18-23.015 26.18Z"/></svg>
|
5
core/images/input-button.tid
Normal file
5
core/images/input-button.tid
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
title: $:/core/images/input-button
|
||||||
|
tags: $:/tags/Image
|
||||||
|
|
||||||
|
\parameters (size:"22pt")
|
||||||
|
<svg width=<<size>> height=<<size>> class="tc-image-input-button tc-image-button" viewBox="0 0 22 22"><path d="M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z"/><path d="m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z"/></svg>
|
@ -80,6 +80,7 @@ NewMarkdown/Caption: new Markdown tiddler
|
|||||||
NewMarkdown/Hint: Create a new Markdown tiddler
|
NewMarkdown/Hint: Create a new Markdown tiddler
|
||||||
NewTiddler/Caption: new tiddler
|
NewTiddler/Caption: new tiddler
|
||||||
NewTiddler/Hint: Create a new tiddler
|
NewTiddler/Hint: Create a new tiddler
|
||||||
|
OpenControlPanel/Hint: Open control panel
|
||||||
OpenWindow/Caption: open in new window
|
OpenWindow/Caption: open in new window
|
||||||
OpenWindow/Hint: Open tiddler in new window
|
OpenWindow/Hint: Open tiddler in new window
|
||||||
Palette/Caption: palette
|
Palette/Caption: palette
|
||||||
@ -104,6 +105,8 @@ ShowSideBar/Caption: show sidebar
|
|||||||
ShowSideBar/Hint: Show sidebar
|
ShowSideBar/Hint: Show sidebar
|
||||||
TagManager/Caption: tag manager
|
TagManager/Caption: tag manager
|
||||||
TagManager/Hint: Open tag manager
|
TagManager/Hint: Open tag manager
|
||||||
|
TestCaseImport/Caption: import tiddlers
|
||||||
|
TestCaseImport/Hint: Import tiddlers
|
||||||
Timestamp/Caption: timestamps
|
Timestamp/Caption: timestamps
|
||||||
Timestamp/Hint: Choose whether modifications update timestamps
|
Timestamp/Hint: Choose whether modifications update timestamps
|
||||||
Timestamp/On/Caption: timestamps are on
|
Timestamp/On/Caption: timestamps are on
|
||||||
@ -130,6 +133,7 @@ Excise/Caption/Replace/Link: link
|
|||||||
Excise/Caption/Replace/Transclusion: transclusion
|
Excise/Caption/Replace/Transclusion: transclusion
|
||||||
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
|
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
|
||||||
Excise/Caption/TiddlerExists: Warning: tiddler already exists
|
Excise/Caption/TiddlerExists: Warning: tiddler already exists
|
||||||
|
Excise/DefaultTitle: New Excision
|
||||||
Excise/Hint: Excise the selected text into a new tiddler
|
Excise/Hint: Excise the selected text into a new tiddler
|
||||||
Heading1/Caption: heading 1
|
Heading1/Caption: heading 1
|
||||||
Heading1/Hint: Apply heading level 1 formatting to lines containing selection
|
Heading1/Hint: Apply heading level 1 formatting to lines containing selection
|
||||||
|
@ -96,6 +96,10 @@ Plugins/PluginWillRequireReload: (requires reload)
|
|||||||
Plugins/Plugins/Caption: Plugins
|
Plugins/Plugins/Caption: Plugins
|
||||||
Plugins/Plugins/Hint: Plugins
|
Plugins/Plugins/Hint: Plugins
|
||||||
Plugins/Reinstall/Caption: reinstall
|
Plugins/Reinstall/Caption: reinstall
|
||||||
|
Plugins/Stability/Deprecated: DEPRECATED
|
||||||
|
Plugins/Stability/Experimental: EXPERIMENTAL
|
||||||
|
Plugins/Stability/Legacy: LEGACY
|
||||||
|
Plugins/Stability/Stable: STABLE
|
||||||
Plugins/Themes/Caption: Themes
|
Plugins/Themes/Caption: Themes
|
||||||
Plugins/Themes/Hint: Theme plugins
|
Plugins/Themes/Hint: Theme plugins
|
||||||
Plugins/Update/Caption: update
|
Plugins/Update/Caption: update
|
||||||
@ -171,6 +175,8 @@ Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Update addres
|
|||||||
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
|
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
|
||||||
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
|
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
|
||||||
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
|
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
|
||||||
|
Settings/RecentLimit/Caption: Recent Tab Limit
|
||||||
|
Settings/RecentLimit/Hint: Maximum number of tiddlers to be displayed under the sidebar "Recent" tab
|
||||||
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
|
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
|
||||||
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
|
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
|
||||||
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
|
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
|
||||||
@ -198,6 +204,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
|
|||||||
Settings/MissingLinks/Caption: Wiki Links
|
Settings/MissingLinks/Caption: Wiki Links
|
||||||
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
|
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
|
||||||
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
||||||
|
SocialCard/Caption: Social Media Card
|
||||||
|
SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
|
||||||
|
SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online
|
||||||
|
SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki
|
||||||
|
SocialCard/PreviewUrl/Preview: Preview image:
|
||||||
|
SocialCard/Url/Prompt: Full URL of this TiddlyWiki
|
||||||
StoryTiddler/Caption: Story Tiddler
|
StoryTiddler/Caption: Story Tiddler
|
||||||
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
||||||
StoryView/Caption: Story View
|
StoryView/Caption: Story View
|
||||||
@ -235,3 +247,7 @@ ViewTemplateBody/Caption: View Template Body
|
|||||||
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
||||||
ViewTemplateTitle/Caption: View Template Title
|
ViewTemplateTitle/Caption: View Template Title
|
||||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||||
|
ViewTemplateSubtitle/Caption: View Template Subtitle
|
||||||
|
ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler.
|
||||||
|
ViewTemplateTags/Caption: View Template Tags
|
||||||
|
ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler.
|
||||||
|
@ -26,6 +26,8 @@ Tags/ClearInput/Caption: clear input
|
|||||||
Tags/ClearInput/Hint: Clear tag input
|
Tags/ClearInput/Hint: Clear tag input
|
||||||
Tags/Dropdown/Caption: tag list
|
Tags/Dropdown/Caption: tag list
|
||||||
Tags/Dropdown/Hint: Show tag list
|
Tags/Dropdown/Hint: Show tag list
|
||||||
|
Tags/EmptyMessage: No tags found
|
||||||
|
Tags/EmptyMessage/System: No system tags found
|
||||||
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
|
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
|
||||||
Title/Exists/Prompt: Target tiddler already exists
|
Title/Exists/Prompt: Target tiddler already exists
|
||||||
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers
|
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers
|
||||||
|
@ -6,6 +6,8 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt
|
|||||||
Filter/Matches: //<small><<resultCount>> matches</small>//
|
Filter/Matches: //<small><<resultCount>> matches</small>//
|
||||||
Matches: //<small><<resultCount>> matches</small>//
|
Matches: //<small><<resultCount>> matches</small>//
|
||||||
Matches/All: All matches:
|
Matches/All: All matches:
|
||||||
|
Matches/NoMatch: //No match//
|
||||||
|
Matches/NoResult: //No search result//
|
||||||
Matches/Title: Title matches:
|
Matches/Title: Title matches:
|
||||||
Search: Search
|
Search: Search
|
||||||
Search/TooShort: Search text too short
|
Search/TooShort: Search text too short
|
||||||
|
7
core/language/en-GB/Snippets/FunctionDefinition.tid
Normal file
7
core/language/en-GB/Snippets/FunctionDefinition.tid
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/language/Snippets/FunctionDefinition
|
||||||
|
tags: $:/tags/TextEditor/Snippet
|
||||||
|
caption: Function definition
|
||||||
|
|
||||||
|
\function f.name(param1,param2:"default value") [<param1>!is[blank]else<param2>]
|
||||||
|
|
||||||
|
<<f.name>>
|
7
core/language/en-GB/Snippets/ProcedureDefinition.tid
Normal file
7
core/language/en-GB/Snippets/ProcedureDefinition.tid
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/language/Snippets/ProcedureDefinition
|
||||||
|
tags: $:/tags/TextEditor/Snippet
|
||||||
|
caption: Procedure definition
|
||||||
|
|
||||||
|
\procedure procName(param1:"default value",param2)
|
||||||
|
Your text comes here.
|
||||||
|
\end
|
@ -1,5 +0,0 @@
|
|||||||
title: $:/language/Docs/Types/image/x-icon
|
|
||||||
description: ICO icon
|
|
||||||
name: image/x-icon
|
|
||||||
group: Image
|
|
||||||
group-sort: 1
|
|
@ -0,0 +1,5 @@
|
|||||||
|
title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple
|
||||||
|
description: Compound tiddler
|
||||||
|
name: text/vnd.tiddlywiki-multiple
|
||||||
|
group: Developer
|
||||||
|
group-sort: 2
|
@ -24,7 +24,7 @@ var Command = function(params,commander) {
|
|||||||
|
|
||||||
Command.prototype.execute = function() {
|
Command.prototype.execute = function() {
|
||||||
// Get the build targets defined in the wiki
|
// Get the build targets defined in the wiki
|
||||||
var buildTargets = $tw.boot.wikiInfo.build;
|
var buildTargets = $tw.boot.wikiInfo && $tw.boot.wikiInfo.build;
|
||||||
if(!buildTargets) {
|
if(!buildTargets) {
|
||||||
return "No build targets defined";
|
return "No build targets defined";
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,9 @@ Render individual tiddlers and save the results to the specified files
|
|||||||
variableList = variableList.slice(2);
|
variableList = variableList.slice(2);
|
||||||
}
|
}
|
||||||
$tw.utils.each(tiddlers,function(title) {
|
$tw.utils.each(tiddlers,function(title) {
|
||||||
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
|
var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]));
|
||||||
|
if(filenameResults.length > 0) {
|
||||||
|
var filepath = path.resolve(self.commander.outputPath,filenameResults[0]);
|
||||||
if(self.commander.verbose) {
|
if(self.commander.verbose) {
|
||||||
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
|
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
|
||||||
}
|
}
|
||||||
@ -56,6 +58,9 @@ Render individual tiddlers and save the results to the specified files
|
|||||||
var text = type === "text/html" ? container.innerHTML : container.textContent;
|
var text = type === "text/html" ? container.innerHTML : container.textContent;
|
||||||
$tw.utils.createFileDirectories(filepath);
|
$tw.utils.createFileDirectories(filepath);
|
||||||
fs.writeFileSync(filepath,text,"utf8");
|
fs.writeFileSync(filepath,text,"utf8");
|
||||||
|
} else {
|
||||||
|
console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
|
|||||||
exports.textPrimitives.upperLetter +
|
exports.textPrimitives.upperLetter +
|
||||||
exports.textPrimitives.anyLetter + "*";
|
exports.textPrimitives.anyLetter + "*";
|
||||||
|
|
||||||
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, nobreak:8288, NoBreak:8288, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||||
|
|
||||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||||
|
|
||||||
|
@ -12,20 +12,27 @@ Text editor operation to excise the selection to a new tiddler
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
function isMarkdown(mediaType) {
|
||||||
|
return mediaType === 'text/markdown' || mediaType === 'text/x-markdown';
|
||||||
|
}
|
||||||
|
|
||||||
exports["excise"] = function(event,operation) {
|
exports["excise"] = function(event,operation) {
|
||||||
var editTiddler = this.wiki.getTiddler(this.editTitle),
|
var editTiddler = this.wiki.getTiddler(this.editTitle),
|
||||||
editTiddlerTitle = this.editTitle;
|
editTiddlerTitle = this.editTitle,
|
||||||
|
wikiLinks = !isMarkdown(editTiddler.fields.type),
|
||||||
|
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
|
||||||
if(editTiddler && editTiddler.fields["draft.of"]) {
|
if(editTiddler && editTiddler.fields["draft.of"]) {
|
||||||
editTiddlerTitle = editTiddler.fields["draft.of"];
|
editTiddlerTitle = editTiddler.fields["draft.of"];
|
||||||
}
|
}
|
||||||
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision");
|
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(excisionBaseTitle);
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(
|
this.wiki.addTiddler(new $tw.Tiddler(
|
||||||
this.wiki.getCreationFields(),
|
this.wiki.getCreationFields(),
|
||||||
this.wiki.getModificationFields(),
|
this.wiki.getModificationFields(),
|
||||||
{
|
{
|
||||||
title: excisionTitle,
|
title: excisionTitle,
|
||||||
text: operation.selection,
|
text: operation.selection,
|
||||||
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : []
|
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [],
|
||||||
|
type: editTiddler.fields.type
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
operation.replacement = excisionTitle;
|
operation.replacement = excisionTitle;
|
||||||
@ -34,7 +41,8 @@ exports["excise"] = function(event,operation) {
|
|||||||
operation.replacement = "{{" + operation.replacement+ "}}";
|
operation.replacement = "{{" + operation.replacement+ "}}";
|
||||||
break;
|
break;
|
||||||
case "link":
|
case "link":
|
||||||
operation.replacement = "[[" + operation.replacement+ "]]";
|
operation.replacement = wikiLinks ? "[[" + operation.replacement+ "]]"
|
||||||
|
: ("[" + operation.replacement + "](<#" + operation.replacement + ">)");
|
||||||
break;
|
break;
|
||||||
case "macro":
|
case "macro":
|
||||||
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";
|
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";
|
||||||
|
@ -13,37 +13,125 @@ Text editor operation to wrap the selection with the specified prefix and suffix
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["wrap-selection"] = function(event,operation) {
|
exports["wrap-selection"] = function(event,operation) {
|
||||||
if(operation.selStart === operation.selEnd) {
|
var o = operation,
|
||||||
// No selection; check if we're within the prefix/suffix
|
prefix = event.paramObject.prefix,
|
||||||
if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) {
|
suffix = event.paramObject.suffix,
|
||||||
|
trimSelection = event.paramObject.trimSelection || "no",
|
||||||
|
selLength = o.selEnd - o.selStart;
|
||||||
|
|
||||||
|
// This function detects, if trailing spaces are part of the selection __and__ if the user wants to handle them
|
||||||
|
// Returns "yes", "start", "end", "no" (default)
|
||||||
|
// yes .. there are trailing spaces at both ends
|
||||||
|
// start .. there are trailing spaces at the start
|
||||||
|
// end .. there are trailing spaces at the end
|
||||||
|
// no .. no trailing spaces are taken into account
|
||||||
|
var trailingSpaceAt = function(sel) {
|
||||||
|
var _start,
|
||||||
|
_end,
|
||||||
|
result;
|
||||||
|
// trimSelection is a user parameter, which this evaluations takes into account
|
||||||
|
switch(trimSelection) {
|
||||||
|
case "end":
|
||||||
|
result = (sel.trimEnd().length !== selLength) ? "end" : "no";
|
||||||
|
break;
|
||||||
|
case "yes":
|
||||||
|
_start = sel.trimStart().length !== selLength;
|
||||||
|
_end = sel.trimEnd().length !== selLength;
|
||||||
|
result = (_start && _end) ? "yes" : (_start) ? "start" : (_end) ? "end" : "no";
|
||||||
|
break;
|
||||||
|
case "start":
|
||||||
|
result = (sel.trimStart().length !== selLength) ? "start" : "no";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = "no";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function togglePrefixSuffix() {
|
||||||
|
if(o.text.substring(o.selStart - prefix.length, o.selStart + suffix.length) === prefix + suffix) {
|
||||||
// Remove the prefix and suffix
|
// Remove the prefix and suffix
|
||||||
operation.cutStart = operation.selStart - event.paramObject.prefix.length;
|
o.cutStart = o.selStart - prefix.length;
|
||||||
operation.cutEnd = operation.selEnd + event.paramObject.suffix.length;
|
o.cutEnd = o.selEnd + suffix.length;
|
||||||
operation.replacement = "";
|
o.replacement = "";
|
||||||
operation.newSelStart = operation.cutStart;
|
o.newSelStart = o.cutStart;
|
||||||
operation.newSelEnd = operation.newSelStart;
|
o.newSelEnd = o.newSelStart;
|
||||||
} else {
|
} else {
|
||||||
// Wrap the cursor instead
|
// Wrap the cursor instead
|
||||||
operation.cutStart = operation.selStart;
|
o.cutStart = o.selStart;
|
||||||
operation.cutEnd = operation.selEnd;
|
o.cutEnd = o.selEnd;
|
||||||
operation.replacement = event.paramObject.prefix + event.paramObject.suffix;
|
o.replacement = prefix + suffix;
|
||||||
operation.newSelStart = operation.selStart + event.paramObject.prefix.length;
|
o.newSelStart = o.selStart + prefix.length;
|
||||||
operation.newSelEnd = operation.newSelStart;
|
o.newSelEnd = o.newSelStart;
|
||||||
}
|
}
|
||||||
} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) {
|
}
|
||||||
|
|
||||||
|
// options: lenPrefix, lenSuffix
|
||||||
|
function removePrefixSuffix(options) {
|
||||||
|
options = options || {};
|
||||||
|
var _lenPrefix = options.lenPrefix || 0;
|
||||||
|
var _lenSuffix = options.lenSuffix || 0;
|
||||||
|
|
||||||
|
o.cutStart = o.selStart - _lenPrefix;
|
||||||
|
o.cutEnd = o.selEnd + _lenSuffix;
|
||||||
|
o.replacement = (_lenPrefix || _lenSuffix) ? o.selection : o.selection.substring(prefix.length, o.selection.length - suffix.length);
|
||||||
|
o.newSelStart = o.cutStart;
|
||||||
|
o.newSelEnd = o.cutStart + o.replacement.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addPrefixSuffix() {
|
||||||
|
// remove trailing space if requested
|
||||||
|
switch(trailingSpaceAt(o.selection)) {
|
||||||
|
case "no":
|
||||||
|
// has no trailing spaces
|
||||||
|
o.cutStart = o.selStart;
|
||||||
|
o.cutEnd = o.selEnd;
|
||||||
|
o.replacement = prefix + o.selection + suffix;
|
||||||
|
o.newSelStart = o.selStart;
|
||||||
|
o.newSelEnd = o.selStart + o.replacement.length;
|
||||||
|
break;
|
||||||
|
case "yes":
|
||||||
|
// handle both ends
|
||||||
|
o.cutStart = o.selEnd - (o.selection.trimStart().length);
|
||||||
|
o.cutEnd = o.selection.trimEnd().length + o.selStart;
|
||||||
|
o.replacement = prefix + o.selection.trim() + suffix;
|
||||||
|
o.newSelStart = o.cutStart;
|
||||||
|
o.newSelEnd = o.cutStart + o.replacement.length;
|
||||||
|
break;
|
||||||
|
case "start":
|
||||||
|
// handle leading
|
||||||
|
o.cutStart = o.selEnd - (o.selection.trimStart().length);
|
||||||
|
o.cutEnd = o.selEnd;
|
||||||
|
o.replacement = prefix + o.selection.trimStart() + suffix;
|
||||||
|
o.newSelStart = o.cutStart;
|
||||||
|
o.newSelEnd = o.cutStart + o.replacement.length;
|
||||||
|
break;
|
||||||
|
case "end":
|
||||||
|
// handle trailing
|
||||||
|
o.cutStart = o.selStart;
|
||||||
|
o.cutEnd = o.selection.trimEnd().length + o.selStart;
|
||||||
|
o.replacement = prefix + o.selection.trimEnd() + suffix;
|
||||||
|
o.newSelStart = o.selStart;
|
||||||
|
o.newSelEnd = o.selStart + o.replacement.length;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(o.selStart === o.selEnd) {
|
||||||
|
// No selection; Create prefix and suffix. Set cursor in between them: ""|""
|
||||||
|
togglePrefixSuffix();
|
||||||
|
} else if(o.text.substring(o.selStart, o.selStart + prefix.length) === prefix &&
|
||||||
|
o.text.substring(o.selEnd - suffix.length,o.selEnd) === suffix) {
|
||||||
// Prefix and suffix are already present, so remove them
|
// Prefix and suffix are already present, so remove them
|
||||||
operation.cutStart = operation.selStart;
|
removePrefixSuffix();
|
||||||
operation.cutEnd = operation.selEnd;
|
} else if(o.text.substring(o.selStart - prefix.length, o.selStart) === prefix &&
|
||||||
operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length);
|
o.text.substring(o.selEnd, o.selEnd + suffix.length) === suffix) {
|
||||||
operation.newSelStart = operation.selStart;
|
// Prefix and suffix are present BUT not selected -> remove them
|
||||||
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
removePrefixSuffix({"lenPrefix": prefix.length, "lenSuffix": suffix.length});
|
||||||
} else {
|
} else {
|
||||||
// Add the prefix and suffix
|
// Add the prefix and suffix
|
||||||
operation.cutStart = operation.selStart;
|
addPrefixSuffix();
|
||||||
operation.cutEnd = operation.selEnd;
|
|
||||||
operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;
|
|
||||||
operation.newSelStart = operation.selStart;
|
|
||||||
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ Export our filter functions
|
|||||||
|
|
||||||
exports.decodebase64 = function(source,operator,options) {
|
exports.decodebase64 = function(source,operator,options) {
|
||||||
var results = [];
|
var results = [];
|
||||||
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
|
||||||
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.push($tw.utils.base64Decode(title,binary,urlsafe));
|
results.push($tw.utils.base64Decode(title,binary,urlsafe));
|
||||||
});
|
});
|
||||||
@ -28,8 +28,8 @@ exports.decodebase64 = function(source,operator,options) {
|
|||||||
|
|
||||||
exports.encodebase64 = function(source,operator,options) {
|
exports.encodebase64 = function(source,operator,options) {
|
||||||
var results = [];
|
var results = [];
|
||||||
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
|
||||||
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.push($tw.utils.base64Encode(title,binary,urlsafe));
|
results.push($tw.utils.base64Encode(title,binary,urlsafe));
|
||||||
});
|
});
|
||||||
|
@ -16,20 +16,22 @@ exports.name = "unusedtitle";
|
|||||||
exports.params = [
|
exports.params = [
|
||||||
{name: "baseName"},
|
{name: "baseName"},
|
||||||
{name: "separator"},
|
{name: "separator"},
|
||||||
{name: "template"}
|
{name: "template"},
|
||||||
|
{name: "startCount"}
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Run the macro
|
Run the macro
|
||||||
*/
|
*/
|
||||||
exports.run = function(baseName,separator,template) {
|
exports.run = function(baseName,separator,template,startCount) {
|
||||||
separator = separator || " ";
|
separator = separator || " ";
|
||||||
|
startCount = startCount || 0;
|
||||||
if(!baseName) {
|
if(!baseName) {
|
||||||
baseName = $tw.language.getString("DefaultNewTiddlerTitle");
|
baseName = $tw.language.getString("DefaultNewTiddlerTitle");
|
||||||
}
|
}
|
||||||
// $tw.wiki.generateNewTitle = function(baseTitle,options)
|
// $tw.wiki.generateNewTitle = function(baseTitle,options)
|
||||||
// options.prefix must be a string!
|
// options.prefix must be a string!
|
||||||
return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template});
|
return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template, "startCount": startCount});
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -93,11 +93,12 @@ var processRow = function(prevColumns) {
|
|||||||
}
|
}
|
||||||
// Check whether this is a heading cell
|
// Check whether this is a heading cell
|
||||||
var cell;
|
var cell;
|
||||||
|
var start = this.parser.pos;
|
||||||
if(chr === "!") {
|
if(chr === "!") {
|
||||||
this.parser.pos++;
|
this.parser.pos++;
|
||||||
cell = {type: "element", tag: "th", children: []};
|
cell = {type: "element", tag: "th", start: start, children: []};
|
||||||
} else {
|
} else {
|
||||||
cell = {type: "element", tag: "td", children: []};
|
cell = {type: "element", tag: "td", start: start, children: []};
|
||||||
}
|
}
|
||||||
tree.push(cell);
|
tree.push(cell);
|
||||||
// Record information about this cell
|
// Record information about this cell
|
||||||
@ -121,6 +122,7 @@ var processRow = function(prevColumns) {
|
|||||||
}
|
}
|
||||||
// Move back to the closing `|`
|
// Move back to the closing `|`
|
||||||
this.parser.pos--;
|
this.parser.pos--;
|
||||||
|
cell.end = this.parser.pos;
|
||||||
}
|
}
|
||||||
col++;
|
col++;
|
||||||
cellRegExp.lastIndex = this.parser.pos;
|
cellRegExp.lastIndex = this.parser.pos;
|
||||||
@ -169,12 +171,13 @@ exports.parse = function() {
|
|||||||
rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});
|
rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});
|
||||||
} else {
|
} else {
|
||||||
// Create the row
|
// Create the row
|
||||||
var theRow = {type: "element", tag: "tr", children: []};
|
var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index};
|
||||||
$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow");
|
$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow");
|
||||||
rowContainer.children.push(theRow);
|
rowContainer.children.push(theRow);
|
||||||
// Process the row
|
// Process the row
|
||||||
theRow.children = processRow.call(this,prevColumns);
|
theRow.children = processRow.call(this,prevColumns);
|
||||||
this.parser.pos = rowMatch.index + rowMatch[0].length;
|
this.parser.pos = rowMatch.index + rowMatch[0].length;
|
||||||
|
theRow.end = this.parser.pos;
|
||||||
// Increment the row count
|
// Increment the row count
|
||||||
rowCount++;
|
rowCount++;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ function SaverHandler(options) {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
|
wiki: event.widget.wiki,
|
||||||
template: event.param,
|
template: event.param,
|
||||||
downloadType: "text/plain",
|
downloadType: "text/plain",
|
||||||
variables: event.paramObject
|
variables: event.paramObject
|
||||||
@ -102,6 +103,7 @@ function SaverHandler(options) {
|
|||||||
});
|
});
|
||||||
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
|
wiki: event.widget.wiki,
|
||||||
method: "download",
|
method: "download",
|
||||||
template: event.param,
|
template: event.param,
|
||||||
downloadType: "text/plain",
|
downloadType: "text/plain",
|
||||||
@ -147,20 +149,22 @@ Save the wiki contents. Options are:
|
|||||||
method: "save", "autosave" or "download"
|
method: "save", "autosave" or "download"
|
||||||
template: the tiddler containing the template to save
|
template: the tiddler containing the template to save
|
||||||
downloadType: the content type for the saved file
|
downloadType: the content type for the saved file
|
||||||
|
wiki: optional wiki, overriding the default wiki specified in the constructor
|
||||||
*/
|
*/
|
||||||
SaverHandler.prototype.saveWiki = function(options) {
|
SaverHandler.prototype.saveWiki = function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var self = this,
|
var self = this,
|
||||||
|
wiki = options.wiki || this.wiki,
|
||||||
method = options.method || "save";
|
method = options.method || "save";
|
||||||
// Ignore autosave if disabled
|
// Ignore autosave if disabled
|
||||||
if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
if(method === "autosave" && ($tw.config.disableAutoSave || wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var variables = options.variables || {},
|
var variables = options.variables || {},
|
||||||
template = (options.template ||
|
template = (options.template ||
|
||||||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
||||||
downloadType = options.downloadType || "text/plain",
|
downloadType = options.downloadType || "text/plain",
|
||||||
text = this.wiki.renderTiddler(downloadType,template,options),
|
text = wiki.renderTiddler(downloadType,template,options),
|
||||||
callback = function(err) {
|
callback = function(err) {
|
||||||
if(err) {
|
if(err) {
|
||||||
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
|
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
|
||||||
|
@ -20,7 +20,7 @@ Retrieve ETag if available
|
|||||||
*/
|
*/
|
||||||
var retrieveETag = function(self) {
|
var retrieveETag = function(self) {
|
||||||
var headers = {
|
var headers = {
|
||||||
Accept: "*/*;charset=UTF-8"
|
Accept: "*/*"
|
||||||
};
|
};
|
||||||
$tw.utils.httpRequest({
|
$tw.utils.httpRequest({
|
||||||
url: self.uri(),
|
url: self.uri(),
|
||||||
@ -48,14 +48,14 @@ var PutSaver = function(wiki) {
|
|||||||
var self = this;
|
var self = this;
|
||||||
var uri = this.uri();
|
var uri = this.uri();
|
||||||
// Async server probe. Until probe finishes, save will fail fast
|
// Async server probe. Until probe finishes, save will fail fast
|
||||||
// See also https://github.com/Jermolene/TiddlyWiki5/issues/2276
|
// See also https://github.com/TiddlyWiki/TiddlyWiki5/issues/2276
|
||||||
$tw.utils.httpRequest({
|
$tw.utils.httpRequest({
|
||||||
url: uri,
|
url: uri,
|
||||||
type: "OPTIONS",
|
type: "OPTIONS",
|
||||||
callback: function(err,data,xhr) {
|
callback: function(err,data,xhr) {
|
||||||
// Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1
|
// Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1
|
||||||
if(!err) {
|
if(!err) {
|
||||||
self.serverAcceptsPuts = xhr.status === 200 && !!xhr.getResponseHeader("dav");
|
self.serverAcceptsPuts = xhr.status >= 200 && xhr.status < 300 && !!xhr.getResponseHeader("dav");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -61,7 +61,7 @@ exports.startup = function() {
|
|||||||
// Collect the shadow tiddlers of any modified plugins
|
// Collect the shadow tiddlers of any modified plugins
|
||||||
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
|
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
|
||||||
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
|
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
|
||||||
if(pluginInfo) {
|
if(pluginInfo && pluginInfo.tiddlers) {
|
||||||
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
|
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
|
||||||
changedShadowTiddlers[title] = false;
|
changedShadowTiddlers[title] = false;
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,9 @@ exports.startup = function() {
|
|||||||
basicAuthUsername: params["basic-auth-username"],
|
basicAuthUsername: params["basic-auth-username"],
|
||||||
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
|
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
|
||||||
basicAuthPassword: params["basic-auth-password"],
|
basicAuthPassword: params["basic-auth-password"],
|
||||||
basicAuthPasswordFromStore: params["basic-auth-password-from-store"]
|
basicAuthPasswordFromStore: params["basic-auth-password-from-store"],
|
||||||
|
bearerAuthToken: params["bearer-auth-token"],
|
||||||
|
bearerAuthTokenFromStore: params["bearer-auth-token-from-store"]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {
|
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {
|
||||||
|
@ -30,12 +30,8 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) {
|
|||||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(duration) {
|
|
||||||
// Scroll the node into view
|
// Scroll the node into view
|
||||||
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
|
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
|
||||||
} else {
|
|
||||||
targetElement.scrollIntoView();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ClassicStoryView.prototype.insert = function(widget) {
|
ClassicStoryView.prototype.insert = function(widget) {
|
||||||
@ -82,6 +78,10 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||||||
removeElement = function() {
|
removeElement = function() {
|
||||||
widget.removeChildDomNodes();
|
widget.removeChildDomNodes();
|
||||||
};
|
};
|
||||||
|
// Blur the focus if it is within the descendents of the node we are removing
|
||||||
|
if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) {
|
||||||
|
targetElement.ownerDocument.activeElement.blur();
|
||||||
|
}
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
|
@ -12,7 +12,7 @@ Upgrader module that suppresses certain system tiddlers that shouldn't be import
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DONT_IMPORT_LIST = ["$:/Import"],
|
var DONT_IMPORT_LIST = ["$:/Import", "$:/build"],
|
||||||
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
|
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
|
||||||
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];
|
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ Copy plain text to the clipboard on browsers that support it
|
|||||||
*/
|
*/
|
||||||
exports.copyToClipboard = function(text,options) {
|
exports.copyToClipboard = function(text,options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
text = text || "";
|
||||||
var textArea = document.createElement("textarea");
|
var textArea = document.createElement("textarea");
|
||||||
textArea.style.position = "fixed";
|
textArea.style.position = "fixed";
|
||||||
textArea.style.top = 0;
|
textArea.style.top = 0;
|
||||||
|
@ -104,6 +104,8 @@ basicAuthUsername: plain username for basic authentication
|
|||||||
basicAuthUsernameFromStore: name of password store entry containing username
|
basicAuthUsernameFromStore: name of password store entry containing username
|
||||||
basicAuthPassword: plain password for basic authentication
|
basicAuthPassword: plain password for basic authentication
|
||||||
basicAuthPasswordFromStore: name of password store entry containing password
|
basicAuthPasswordFromStore: name of password store entry containing password
|
||||||
|
bearerAuthToken: plain text token for bearer authentication
|
||||||
|
bearerAuthTokenFromStore: name of password store entry contain bear authorization token
|
||||||
*/
|
*/
|
||||||
function HttpClientRequest(options) {
|
function HttpClientRequest(options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -135,8 +137,11 @@ function HttpClientRequest(options) {
|
|||||||
});
|
});
|
||||||
this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || "";
|
this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || "";
|
||||||
this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || "";
|
this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || "";
|
||||||
|
this.bearerAuthToken = options.bearerAuthToken || (options.bearerAuthTokenFromStore && $tw.utils.getPassword(options.bearerAuthTokenFromStore)) || "";
|
||||||
if(this.basicAuthUsername && this.basicAuthPassword) {
|
if(this.basicAuthUsername && this.basicAuthPassword) {
|
||||||
this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword);
|
this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword);
|
||||||
|
} else if(this.bearerAuthToken) {
|
||||||
|
this.requestHeaders.Authorization = "Bearer " + this.bearerAuthToken;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,8 +29,11 @@ exports.getEditionInfo = function() {
|
|||||||
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
|
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
|
||||||
var entry = entries[entryIndex];
|
var entry = entries[entryIndex];
|
||||||
// Check if directories have a valid tiddlywiki.info
|
// Check if directories have a valid tiddlywiki.info
|
||||||
if(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
|
// Check if the entry is a hidden directory
|
||||||
var info = $tw.utils.parseJSONSafe(fs.readFileSync(path.resolve(editionPath,entry,"tiddlywiki.info"),"utf8"),null);
|
if((entry.charAt(0) !== ".") && !editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
|
||||||
|
var file=path.resolve(editionPath,entry,"tiddlywiki.info");
|
||||||
|
if(fs.existsSync(file)) {
|
||||||
|
var info = $tw.utils.parseJSONSafe(fs.readFileSync(file,"utf8"),null);
|
||||||
if(info) {
|
if(info) {
|
||||||
editionInfo[entry] = info;
|
editionInfo[entry] = info;
|
||||||
}
|
}
|
||||||
@ -38,6 +41,7 @@ exports.getEditionInfo = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return editionInfo;
|
return editionInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,23 +56,14 @@ Object.defineProperty(TW_TextNode.prototype, "formattedTextContent", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var TW_Element = function(tag,namespace) {
|
var TW_Style = function(el) {
|
||||||
bumpSequenceNumber(this);
|
// Define the internal style object
|
||||||
this.isTiddlyWikiFakeDom = true;
|
var styleObject = {
|
||||||
this.tag = tag;
|
// Method to get the entire style object
|
||||||
this.attributes = {};
|
|
||||||
this.isRaw = false;
|
|
||||||
this.children = [];
|
|
||||||
this._style = {};
|
|
||||||
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
|
|
||||||
};
|
|
||||||
|
|
||||||
Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype);
|
|
||||||
|
|
||||||
Object.defineProperty(TW_Element.prototype, "style", {
|
|
||||||
get: function() {
|
get: function() {
|
||||||
return this._style;
|
return el._style;
|
||||||
},
|
},
|
||||||
|
// Method to set styles using a string (e.g. "color:red; background-color:blue;")
|
||||||
set: function(str) {
|
set: function(str) {
|
||||||
var self = this;
|
var self = this;
|
||||||
str = str || "";
|
str = str || "";
|
||||||
@ -81,11 +72,48 @@ Object.defineProperty(TW_Element.prototype, "style", {
|
|||||||
name = $tw.utils.trim(parts[0]),
|
name = $tw.utils.trim(parts[0]),
|
||||||
value = $tw.utils.trim(parts[1]);
|
value = $tw.utils.trim(parts[1]);
|
||||||
if(name && value) {
|
if(name && value) {
|
||||||
self._style[$tw.utils.convertStyleNameToPropertyName(name)] = value;
|
el._style[$tw.utils.convertStyleNameToPropertyName(name)] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// Method to set a specific property without transforming the property name, such as a custom property
|
||||||
|
setProperty: function(name, value) {
|
||||||
|
el._style[name] = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Return a Proxy to handle direct access to individual style properties
|
||||||
|
return new Proxy(styleObject, {
|
||||||
|
get: function(target, property) {
|
||||||
|
// If the property exists on styleObject, return it (get, set, setProperty methods)
|
||||||
|
if (property in target) {
|
||||||
|
return target[property];
|
||||||
|
}
|
||||||
|
// Otherwise, return the corresponding property from _style
|
||||||
|
return el._style[$tw.utils.convertStyleNameToPropertyName(property)] || "";
|
||||||
|
},
|
||||||
|
set: function(target, property, value) {
|
||||||
|
// Set the property in _style
|
||||||
|
el._style[$tw.utils.convertStyleNameToPropertyName(property)] = value;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var TW_Element = function(tag, namespace) {
|
||||||
|
bumpSequenceNumber(this);
|
||||||
|
this.isTiddlyWikiFakeDom = true;
|
||||||
|
this.tag = tag;
|
||||||
|
this.attributes = {};
|
||||||
|
this.isRaw = false;
|
||||||
|
this.children = [];
|
||||||
|
this._style = {}; // Internal style object
|
||||||
|
this.style = new TW_Style(this); // Proxy for style management
|
||||||
|
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype);
|
||||||
|
|
||||||
Object.defineProperty(TW_Element.prototype, "nodeType", {
|
Object.defineProperty(TW_Element.prototype, "nodeType", {
|
||||||
get: function() {
|
get: function() {
|
||||||
@ -105,7 +133,7 @@ TW_Element.prototype.setAttribute = function(name,value) {
|
|||||||
throw "Cannot setAttribute on a raw TW_Element";
|
throw "Cannot setAttribute on a raw TW_Element";
|
||||||
}
|
}
|
||||||
if(name === "style") {
|
if(name === "style") {
|
||||||
this.style = value;
|
this.style.set(value);
|
||||||
} else {
|
} else {
|
||||||
this.attributes[name] = value + "";
|
this.attributes[name] = value + "";
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
|||||||
} else {
|
} else {
|
||||||
// Save as a .tid or a text/binary file plus a .meta file
|
// Save as a .tid or a text/binary file plus a .meta file
|
||||||
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||||
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
|
if(tiddlerType === "text/vnd.tiddlywiki" || tiddlerType === "text/vnd.tiddlywiki-multiple" || tiddler.hasField("_canonical_uri")) {
|
||||||
// Save as a .tid file
|
// Save as a .tid file
|
||||||
fileInfo.type = "application/x-tiddler";
|
fileInfo.type = "application/x-tiddler";
|
||||||
fileInfo.hasMetaFile = false;
|
fileInfo.hasMetaFile = false;
|
||||||
|
@ -924,7 +924,7 @@ exports.transliterate = function(str) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.transliterateToSafeASCII = function(str) {
|
exports.transliterateToSafeASCII = function(str) {
|
||||||
return str.replace(/[^\x00-\x7F]/g,function(ch) {
|
return str.replace(/[^\x20-\x7F]/g,function(ch) {
|
||||||
return exports.transliterationPairs[ch] || ""
|
return exports.transliterationPairs[ch] || ""
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -330,16 +330,18 @@ exports.formatTitleString = function(template,options) {
|
|||||||
}]
|
}]
|
||||||
];
|
];
|
||||||
while(t.length){
|
while(t.length){
|
||||||
var matchString = "";
|
var matchString = "",
|
||||||
|
found = false;
|
||||||
$tw.utils.each(matches, function(m) {
|
$tw.utils.each(matches, function(m) {
|
||||||
var match = m[0].exec(t);
|
var match = m[0].exec(t);
|
||||||
if(match) {
|
if(match) {
|
||||||
|
found = true;
|
||||||
matchString = m[1].call(null,match);
|
matchString = m[1].call(null,match);
|
||||||
t = t.substr(match[0].length);
|
t = t.substr(match[0].length);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(matchString) {
|
if(found) {
|
||||||
result += matchString;
|
result += matchString;
|
||||||
} else {
|
} else {
|
||||||
result += t.charAt(0);
|
result += t.charAt(0);
|
||||||
|
@ -75,7 +75,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
||||||
var tiddlers = [],title;
|
var tiddlers = [],
|
||||||
|
compoundTiddlers,
|
||||||
|
title;
|
||||||
if(this.hasAttribute("$tiddler")) {
|
if(this.hasAttribute("$tiddler")) {
|
||||||
title = this.getAttribute("$tiddler");
|
title = this.getAttribute("$tiddler");
|
||||||
if(title) {
|
if(title) {
|
||||||
@ -91,7 +93,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
var titles = this.wiki.filterTiddlers(filter);
|
var titles = this.wiki.filterTiddlers(filter);
|
||||||
$tw.utils.each(titles,function(title) {
|
$tw.utils.each(titles,function(title) {
|
||||||
var tiddler = self.wiki.getTiddler(title);
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
tiddlers.push(tiddler);
|
tiddlers.push(tiddler);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,8 +105,17 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.hasAttribute("$compound-filter")) {
|
||||||
|
filter = this.getAttribute("$compound-filter");
|
||||||
|
if(filter) {
|
||||||
|
compoundTiddlers = this.wiki.filterTiddlers(filter);
|
||||||
|
$tw.utils.each(compoundTiddlers, function(title){
|
||||||
|
tiddlers.push.apply(tiddlers,self.extractCompoundTiddler(title));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
// Return the literal item if none of the special attributes were used
|
// Return the literal item if none of the special attributes were used
|
||||||
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler")) {
|
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler") && !this.hasAttribute("$compound-filter")) {
|
||||||
if(Object.keys(item).length > 0 && !!item.title) {
|
if(Object.keys(item).length > 0 && !!item.title) {
|
||||||
return [new $tw.Tiddler(item)];
|
return [new $tw.Tiddler(item)];
|
||||||
} else {
|
} else {
|
||||||
@ -110,7 +123,6 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Apply the item fields to each of the tiddlers
|
// Apply the item fields to each of the tiddlers
|
||||||
delete item.title; // Do not overwrite the title
|
|
||||||
if(Object.keys(item).length > 0) {
|
if(Object.keys(item).length > 0) {
|
||||||
$tw.utils.each(tiddlers,function(tiddler,index) {
|
$tw.utils.each(tiddlers,function(tiddler,index) {
|
||||||
tiddlers[index] = new $tw.Tiddler(tiddler,item);
|
tiddlers[index] = new $tw.Tiddler(tiddler,item);
|
||||||
|
@ -125,11 +125,23 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
|
|||||||
// Remove highlighting
|
// Remove highlighting
|
||||||
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
|
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
|
||||||
// Try to import the various data types we understand
|
// Try to import the various data types we understand
|
||||||
|
if(this.droppableActions) {
|
||||||
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
|
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
|
||||||
fieldsArray.forEach(function(fields) {
|
fieldsArray.forEach(function(fields) {
|
||||||
self.performActions(fields.title || fields.text,event);
|
self.performActions(fields.title || fields.text,event);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
// Send a TitleList to performListActions
|
||||||
|
if(this.droppableListActions) {
|
||||||
|
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
|
||||||
|
var titleList = [];
|
||||||
|
fieldsArray.forEach(function(fields) {
|
||||||
|
titleList.push(fields.title || fields.text);
|
||||||
|
});
|
||||||
|
self.performListActions($tw.utils.stringifyList(titleList),event);
|
||||||
|
});
|
||||||
|
}
|
||||||
// Tell the browser that we handled the drop
|
// Tell the browser that we handled the drop
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// Stop the drop ripple up to any parent handlers
|
// Stop the drop ripple up to any parent handlers
|
||||||
@ -137,6 +149,13 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DroppableWidget.prototype.performListActions = function(titleList,event) {
|
||||||
|
if(this.droppableListActions) {
|
||||||
|
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
|
||||||
|
this.invokeActionString(this.droppableListActions,this,event,{actionTiddlerList: titleList, modifier: modifierKey});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
DroppableWidget.prototype.performActions = function(title,event) {
|
DroppableWidget.prototype.performActions = function(title,event) {
|
||||||
if(this.droppableActions) {
|
if(this.droppableActions) {
|
||||||
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
|
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
|
||||||
@ -149,6 +168,7 @@ Compute the internal state of the widget
|
|||||||
*/
|
*/
|
||||||
DroppableWidget.prototype.execute = function() {
|
DroppableWidget.prototype.execute = function() {
|
||||||
this.droppableActions = this.getAttribute("actions");
|
this.droppableActions = this.getAttribute("actions");
|
||||||
|
this.droppableListActions = this.getAttribute("listActions");
|
||||||
this.droppableEffect = this.getAttribute("effect","copy");
|
this.droppableEffect = this.getAttribute("effect","copy");
|
||||||
this.droppableTag = this.getAttribute("tag");
|
this.droppableTag = this.getAttribute("tag");
|
||||||
this.droppableEnable = (this.getAttribute("enable") || "yes") === "yes";
|
this.droppableEnable = (this.getAttribute("enable") || "yes") === "yes";
|
||||||
@ -168,7 +188,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
DroppableWidget.prototype.refresh = function(changedTiddlers) {
|
DroppableWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || changedAttributes.actions || changedAttributes.effect) {
|
if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass ||
|
||||||
|
changedAttributes.actions|| changedAttributes.listActions || changedAttributes.effect) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -65,6 +65,16 @@ GenesisWidget.prototype.execute = function() {
|
|||||||
children: this.parseTreeNode.children || [],
|
children: this.parseTreeNode.children || [],
|
||||||
isNotRemappable: !this.genesisRemappable
|
isNotRemappable: !this.genesisRemappable
|
||||||
}];
|
}];
|
||||||
|
// Apply attributes in $names/$values
|
||||||
|
this.attributeNames = [];
|
||||||
|
this.attributeValues = [];
|
||||||
|
if(this.genesisNames && this.genesisValues) {
|
||||||
|
this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this);
|
||||||
|
this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this);
|
||||||
|
$tw.utils.each(this.attributeNames,function(varname,index) {
|
||||||
|
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || "");
|
||||||
|
});
|
||||||
|
}
|
||||||
// Apply explicit attributes
|
// Apply explicit attributes
|
||||||
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
|
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
|
||||||
var name = attribute.name;
|
var name = attribute.name;
|
||||||
@ -79,16 +89,6 @@ GenesisWidget.prototype.execute = function() {
|
|||||||
}
|
}
|
||||||
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],$tw.utils.extend({},attribute,{name: name}));
|
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],$tw.utils.extend({},attribute,{name: name}));
|
||||||
});
|
});
|
||||||
// Apply attributes in $names/$values
|
|
||||||
this.attributeNames = [];
|
|
||||||
this.attributeValues = [];
|
|
||||||
if(this.genesisNames && this.genesisValues) {
|
|
||||||
this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this);
|
|
||||||
this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this);
|
|
||||||
$tw.utils.each(this.attributeNames,function(varname,index) {
|
|
||||||
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || "");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Construct the child widgets
|
// Construct the child widgets
|
||||||
this.makeChildWidgets(parseTreeNodes);
|
this.makeChildWidgets(parseTreeNodes);
|
||||||
};
|
};
|
||||||
|
@ -96,6 +96,7 @@ KeyboardWidget.prototype.execute = function() {
|
|||||||
this.param = this.getAttribute("param","");
|
this.param = this.getAttribute("param","");
|
||||||
this.key = this.getAttribute("key","");
|
this.key = this.getAttribute("key","");
|
||||||
this.tag = this.getAttribute("tag","");
|
this.tag = this.getAttribute("tag","");
|
||||||
|
if($tw.keyboardManager) {
|
||||||
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
|
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
|
||||||
if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") {
|
if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") {
|
||||||
this.shortcutTiddlers = [];
|
this.shortcutTiddlers = [];
|
||||||
@ -104,6 +105,7 @@ KeyboardWidget.prototype.execute = function() {
|
|||||||
self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name);
|
self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Make child widgets
|
// Make child widgets
|
||||||
this.makeChildWidgets();
|
this.makeChildWidgets();
|
||||||
};
|
};
|
||||||
@ -126,7 +128,7 @@ KeyboardWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
this.assignDomNodeClasses();
|
this.assignDomNodeClasses();
|
||||||
}
|
}
|
||||||
// Update the keyInfoArray if one of its shortcut-config-tiddlers has changed
|
// Update the keyInfoArray if one of its shortcut-config-tiddlers has changed
|
||||||
if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers)) {
|
if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers) && $tw.keyboardManager) {
|
||||||
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
|
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
|
||||||
}
|
}
|
||||||
return this.refreshChildren(changedTiddlers);
|
return this.refreshChildren(changedTiddlers);
|
||||||
|
@ -412,7 +412,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
|||||||
event = $tw.hooks.invokeHook("th-new-tiddler", event);
|
event = $tw.hooks.invokeHook("th-new-tiddler", event);
|
||||||
// Get the story details
|
// Get the story details
|
||||||
var storyList = this.getStoryList(),
|
var storyList = this.getStoryList(),
|
||||||
templateTiddler, additionalFields, title, draftTitle, existingTiddler;
|
templateTiddler, additionalFields, title, draftTitle, existingTiddler,
|
||||||
|
templateHasTags = false;
|
||||||
// Get the template tiddler (if any)
|
// Get the template tiddler (if any)
|
||||||
if(typeof event.param === "string") {
|
if(typeof event.param === "string") {
|
||||||
// Get the template tiddler
|
// Get the template tiddler
|
||||||
@ -457,8 +458,10 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
|||||||
// Merge tags
|
// Merge tags
|
||||||
mergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));
|
mergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));
|
||||||
}
|
}
|
||||||
|
var additionalFieldsHasTags = !!(additionalFields && (additionalFields.tags === ""));
|
||||||
if(templateTiddler && templateTiddler.fields.tags) {
|
if(templateTiddler && templateTiddler.fields.tags) {
|
||||||
// Merge tags
|
// Merge tags
|
||||||
|
templateHasTags = true;
|
||||||
mergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);
|
mergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);
|
||||||
}
|
}
|
||||||
// Save the draft tiddler
|
// Save the draft tiddler
|
||||||
@ -474,7 +477,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
|||||||
{
|
{
|
||||||
title: draftTitle,
|
title: draftTitle,
|
||||||
"draft.of": title,
|
"draft.of": title,
|
||||||
tags: mergedTags
|
// If template or additionalFields have "tags" even if empty a tags field will be created.
|
||||||
|
tags: ((mergedTags.length > 0) || templateHasTags || additionalFieldsHasTags) ? mergedTags : undefined
|
||||||
},this.wiki.getModificationFields());
|
},this.wiki.getModificationFields());
|
||||||
this.wiki.addTiddler(draftTiddler);
|
this.wiki.addTiddler(draftTiddler);
|
||||||
// Update the story to insert the new draft at the top and remove any existing tiddler
|
// Update the story to insert the new draft at the top and remove any existing tiddler
|
||||||
|
@ -335,7 +335,7 @@ Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
opts.variables = $tw.utils.extend(variables,opts.variables);
|
opts.variables = $tw.utils.extend({},variables,opts.variables);
|
||||||
return self.getVariableInfo(name,opts);
|
return self.getVariableInfo(name,opts);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -428,6 +428,11 @@ Widget.prototype.assignAttributes = function(domNode,options) {
|
|||||||
destPrefix = options.destPrefix || "",
|
destPrefix = options.destPrefix || "",
|
||||||
EVENT_ATTRIBUTE_PREFIX = "on";
|
EVENT_ATTRIBUTE_PREFIX = "on";
|
||||||
var assignAttribute = function(name,value) {
|
var assignAttribute = function(name,value) {
|
||||||
|
// Process any CSS custom properties
|
||||||
|
if(name.substr(0,2) === "--" && name.length > 2) {
|
||||||
|
domNode.style.setProperty(name,value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Process any style attributes before considering sourcePrefix and destPrefix
|
// Process any style attributes before considering sourcePrefix and destPrefix
|
||||||
if(name.substr(0,6) === "style." && name.length > 6) {
|
if(name.substr(0,6) === "style." && name.length > 6) {
|
||||||
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;
|
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;
|
||||||
|
@ -194,18 +194,24 @@ options.prefix must be a string
|
|||||||
*/
|
*/
|
||||||
exports.generateNewTitle = function(baseTitle,options) {
|
exports.generateNewTitle = function(baseTitle,options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var c = 0,
|
var title = baseTitle,
|
||||||
title = baseTitle,
|
template = options.template || "",
|
||||||
template = options.template,
|
// test if .startCount is a positive integer. If not set to 0
|
||||||
|
c = (parseInt(options.startCount,10) > 0) ? parseInt(options.startCount,10) : 0,
|
||||||
prefix = (typeof(options.prefix) === "string") ? options.prefix : " ";
|
prefix = (typeof(options.prefix) === "string") ? options.prefix : " ";
|
||||||
|
|
||||||
if (template) {
|
if (template) {
|
||||||
// "count" is important to avoid an endless loop in while(...)!!
|
// "count" is important to avoid an endless loop in while(...)!!
|
||||||
template = (/\$count:?(\d+)?\$/i.test(template)) ? template : template + "$count$";
|
template = (/\$count:?(\d+)?\$/i.test(template)) ? template : template + "$count$";
|
||||||
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c});
|
// .formatTitleString() expects strings as input
|
||||||
|
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c+""});
|
||||||
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
|
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
|
||||||
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)});
|
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)+""});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (c > 0) {
|
||||||
|
title = baseTitle + prefix + c;
|
||||||
|
}
|
||||||
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
|
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
|
||||||
title = baseTitle + prefix + (++c);
|
title = baseTitle + prefix + (++c);
|
||||||
}
|
}
|
||||||
@ -560,7 +566,8 @@ exports.extractTranscludes = function(parseTreeRoot, title) {
|
|||||||
for(var t=0; t<parseTree.length; t++) {
|
for(var t=0; t<parseTree.length; t++) {
|
||||||
var parseTreeNode = parseTree[t];
|
var parseTreeNode = parseTree[t];
|
||||||
if(parseTreeNode.type === "transclude") {
|
if(parseTreeNode.type === "transclude") {
|
||||||
if(parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
|
if(parseTreeNode.attributes.$tiddler) {
|
||||||
|
if(parseTreeNode.attributes.$tiddler.type === "string") {
|
||||||
var value;
|
var value;
|
||||||
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
||||||
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
||||||
@ -569,9 +576,12 @@ exports.extractTranscludes = function(parseTreeRoot, title) {
|
|||||||
} else {
|
} else {
|
||||||
value = parseTreeNode.attributes.$tiddler.value;
|
value = parseTreeNode.attributes.$tiddler.value;
|
||||||
}
|
}
|
||||||
} else if(parseTreeNode.attributes.tiddler && parseTreeNode.attributes.tiddler.type === "string") {
|
}
|
||||||
|
} else if(parseTreeNode.attributes.tiddler) {
|
||||||
|
if (parseTreeNode.attributes.tiddler.type === "string") {
|
||||||
// Old transclude widget usage
|
// Old transclude widget usage
|
||||||
value = parseTreeNode.attributes.tiddler.value;
|
value = parseTreeNode.attributes.tiddler.value;
|
||||||
|
}
|
||||||
} else if(parseTreeNode.attributes.$field && parseTreeNode.attributes.$field.type === "string") {
|
} else if(parseTreeNode.attributes.$field && parseTreeNode.attributes.$field.type === "string") {
|
||||||
// Empty value (like `<$transclude $field='created'/>`) means self-referential transclusion.
|
// Empty value (like `<$transclude $field='created'/>`) means self-referential transclusion.
|
||||||
value = title;
|
value = title;
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333333
|
foreground: #333333
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333353
|
foreground: #333353
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333333
|
foreground: #333333
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
title: $:/palettes/ContrastLight
|
title: $:/palettes/ContrastDark
|
||||||
name: Contrast (Light)
|
name: Contrast (Dark)
|
||||||
color-scheme: light
|
color-scheme: dark
|
||||||
description: High contrast and unambiguous (light version)
|
description: High contrast and unambiguous (dark version)
|
||||||
tags: $:/tags/Palette
|
tags: $:/tags/Palette
|
||||||
type: application/x-tiddler-dictionary
|
type: application/x-tiddler-dictionary
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ alert-background: #f00
|
|||||||
alert-border: <<colour background>>
|
alert-border: <<colour background>>
|
||||||
alert-highlight: <<colour foreground>>
|
alert-highlight: <<colour foreground>>
|
||||||
alert-muted-foreground: #800
|
alert-muted-foreground: #800
|
||||||
background: #fff
|
background: #000
|
||||||
blockquote-bar: <<colour muted-foreground>>
|
blockquote-bar: <<colour muted-foreground>>
|
||||||
button-background: <<colour background>>
|
button-background: <<colour background>>
|
||||||
button-foreground: <<colour foreground>>
|
button-foreground: <<colour foreground>>
|
||||||
@ -33,7 +33,8 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #00a
|
external-link-foreground-visited: #00a
|
||||||
external-link-foreground: #00e
|
external-link-foreground: #00e
|
||||||
foreground: #000
|
footnote-target-background: #4c4c4c
|
||||||
|
foreground: #fff
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
message-background: <<colour foreground>>
|
message-background: <<colour foreground>>
|
||||||
@ -82,8 +83,8 @@ tab-foreground: <<colour background>>
|
|||||||
table-border: #dddddd
|
table-border: #dddddd
|
||||||
table-footer-background: #a8a8a8
|
table-footer-background: #a8a8a8
|
||||||
table-header-background: #f0f0f0
|
table-header-background: #f0f0f0
|
||||||
tag-background: #000
|
tag-background: #fff
|
||||||
tag-foreground: #fff
|
tag-foreground: #000
|
||||||
tiddler-background: <<colour background>>
|
tiddler-background: <<colour background>>
|
||||||
tiddler-border: <<colour foreground>>
|
tiddler-border: <<colour foreground>>
|
||||||
tiddler-controls-foreground-hover: #ddd
|
tiddler-controls-foreground-hover: #ddd
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
title: $:/palettes/ContrastDark
|
title: $:/palettes/ContrastLight
|
||||||
name: Contrast (Dark)
|
name: Contrast (Light)
|
||||||
color-scheme: dark
|
color-scheme: light
|
||||||
description: High contrast and unambiguous (dark version)
|
description: High contrast and unambiguous (light version)
|
||||||
tags: $:/tags/Palette
|
tags: $:/tags/Palette
|
||||||
type: application/x-tiddler-dictionary
|
type: application/x-tiddler-dictionary
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ alert-background: #f00
|
|||||||
alert-border: <<colour background>>
|
alert-border: <<colour background>>
|
||||||
alert-highlight: <<colour foreground>>
|
alert-highlight: <<colour foreground>>
|
||||||
alert-muted-foreground: #800
|
alert-muted-foreground: #800
|
||||||
background: #000
|
background: #fff
|
||||||
blockquote-bar: <<colour muted-foreground>>
|
blockquote-bar: <<colour muted-foreground>>
|
||||||
button-background: <<colour background>>
|
button-background: <<colour background>>
|
||||||
button-foreground: <<colour foreground>>
|
button-foreground: <<colour foreground>>
|
||||||
@ -33,7 +33,8 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #00a
|
external-link-foreground-visited: #00a
|
||||||
external-link-foreground: #00e
|
external-link-foreground: #00e
|
||||||
foreground: #fff
|
footnote-target-background: #e5e5e5
|
||||||
|
foreground: #000
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
message-background: <<colour foreground>>
|
message-background: <<colour foreground>>
|
||||||
@ -82,8 +83,8 @@ tab-foreground: <<colour background>>
|
|||||||
table-border: #dddddd
|
table-border: #dddddd
|
||||||
table-footer-background: #a8a8a8
|
table-footer-background: #a8a8a8
|
||||||
table-header-background: #f0f0f0
|
table-header-background: #f0f0f0
|
||||||
tag-background: #fff
|
tag-background: #000
|
||||||
tag-foreground: #000
|
tag-foreground: #fff
|
||||||
tiddler-background: <<colour background>>
|
tiddler-background: <<colour background>>
|
||||||
tiddler-border: <<colour foreground>>
|
tiddler-border: <<colour foreground>>
|
||||||
tiddler-controls-foreground-hover: #ddd
|
tiddler-controls-foreground-hover: #ddd
|
||||||
|
@ -31,6 +31,7 @@ external-link-background: transparent
|
|||||||
external-link-foreground-hover:
|
external-link-foreground-hover:
|
||||||
external-link-foreground-visited: #BF5AF2
|
external-link-foreground-visited: #BF5AF2
|
||||||
external-link-foreground: #32D74B
|
external-link-foreground: #32D74B
|
||||||
|
footnote-target-background: #747474
|
||||||
foreground: #FFFFFF
|
foreground: #FFFFFF
|
||||||
highlight-background: #ffff78
|
highlight-background: #ffff78
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -35,6 +35,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333333
|
foreground: #333333
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -39,6 +39,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #313163
|
external-link-foreground-visited: #313163
|
||||||
external-link-foreground: #555592
|
external-link-foreground: #555592
|
||||||
|
footnote-target-background: #fff7d9
|
||||||
foreground: #2D2A23
|
foreground: #2D2A23
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -40,6 +40,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #d3869b
|
external-link-foreground-visited: #d3869b
|
||||||
external-link-foreground: #8ec07c
|
external-link-foreground: #8ec07c
|
||||||
|
footnote-target-background: #665c54
|
||||||
foreground: #fbf1c7
|
foreground: #fbf1c7
|
||||||
highlight-background: #ffff79
|
highlight-background: #ffff79
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
@ -82,6 +83,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
|||||||
sidebar-tiddler-link-foreground-hover: #458588
|
sidebar-tiddler-link-foreground-hover: #458588
|
||||||
sidebar-tiddler-link-foreground: #98971a
|
sidebar-tiddler-link-foreground: #98971a
|
||||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||||
|
stability-deprecated: #cc241d
|
||||||
|
stability-experimental: #d79921
|
||||||
|
stability-legacy: #458588
|
||||||
|
stability-stable: #98971a
|
||||||
static-alert-foreground: #B48EAD
|
static-alert-foreground: #B48EAD
|
||||||
tab-background-selected: #ebdbb2
|
tab-background-selected: #ebdbb2
|
||||||
tab-background: #665c54
|
tab-background: #665c54
|
||||||
|
@ -40,6 +40,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #5E81AC
|
external-link-foreground-visited: #5E81AC
|
||||||
external-link-foreground: #8FBCBB
|
external-link-foreground: #8FBCBB
|
||||||
|
footnote-target-background: #2E3440
|
||||||
foreground: #d8dee9
|
foreground: #d8dee9
|
||||||
highlight-background: #ffff78
|
highlight-background: #ffff78
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
@ -82,6 +83,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
|||||||
sidebar-tiddler-link-foreground-hover: #A3BE8C
|
sidebar-tiddler-link-foreground-hover: #A3BE8C
|
||||||
sidebar-tiddler-link-foreground: #81A1C1
|
sidebar-tiddler-link-foreground: #81A1C1
|
||||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||||
|
stability-deprecated: #bf616a
|
||||||
|
stability-experimental: #d08770
|
||||||
|
stability-legacy: #88c0d0
|
||||||
|
stability-stable: #a3be8c
|
||||||
static-alert-foreground: #B48EAD
|
static-alert-foreground: #B48EAD
|
||||||
tab-background-selected: #ECEFF4
|
tab-background-selected: #ECEFF4
|
||||||
tab-background: #4C566A
|
tab-background: #4C566A
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333333
|
foreground: #333333
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -131,6 +131,7 @@ external-link-background-hover: inherit
|
|||||||
external-link-background-visited: inherit
|
external-link-background-visited: inherit
|
||||||
external-link-background: inherit
|
external-link-background: inherit
|
||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
|
footnote-target-background: #ded8c5
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
message-border: #cfd6e6
|
message-border: #cfd6e6
|
||||||
@ -141,6 +142,10 @@ sidebar-controls-foreground-hover:
|
|||||||
sidebar-muted-foreground-hover:
|
sidebar-muted-foreground-hover:
|
||||||
sidebar-tab-background: #ded8c5
|
sidebar-tab-background: #ded8c5
|
||||||
sidebar-tiddler-link-foreground-hover:
|
sidebar-tiddler-link-foreground-hover:
|
||||||
|
stability-deprecated: <<colour red>>
|
||||||
|
stability-experimental: <<colour yellow>>
|
||||||
|
stability-legacy: <<colour blue>>
|
||||||
|
stability-stable: <<colour green>>
|
||||||
static-alert-foreground: #aaaaaa
|
static-alert-foreground: #aaaaaa
|
||||||
tab-border: #cccccc
|
tab-border: #cccccc
|
||||||
modal-footer-border: <<colour tab-border>>
|
modal-footer-border: <<colour tab-border>>
|
||||||
|
@ -18,7 +18,7 @@ button-foreground: #93a1a1
|
|||||||
code-background: #073642
|
code-background: #073642
|
||||||
code-border: #586e75
|
code-border: #586e75
|
||||||
code-foreground: #93a1a1
|
code-foreground: #93a1a1
|
||||||
dirty-indicator: inherit
|
dirty-indicator: #dc322f
|
||||||
download-background: #859900
|
download-background: #859900
|
||||||
download-foreground: #073642
|
download-foreground: #073642
|
||||||
dragger-background: #073642
|
dragger-background: #073642
|
||||||
@ -34,6 +34,7 @@ external-link-background-visited: inherit
|
|||||||
external-link-foreground: #268bd2
|
external-link-foreground: #268bd2
|
||||||
external-link-foreground-hover:
|
external-link-foreground-hover:
|
||||||
external-link-foreground-visited: #268bd2
|
external-link-foreground-visited: #268bd2
|
||||||
|
footnote-target-background: #073642
|
||||||
foreground: #839496
|
foreground: #839496
|
||||||
highlight-background: #ffff78
|
highlight-background: #ffff78
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
@ -72,6 +73,10 @@ sidebar-tab-foreground-selected: #93a1a1
|
|||||||
sidebar-tiddler-link-foreground: #2aa198
|
sidebar-tiddler-link-foreground: #2aa198
|
||||||
sidebar-tiddler-link-foreground-hover: #eee8d5
|
sidebar-tiddler-link-foreground-hover: #eee8d5
|
||||||
site-title-foreground: #d33682
|
site-title-foreground: #d33682
|
||||||
|
stability-deprecated: #dc322f
|
||||||
|
stability-experimental: #b58900
|
||||||
|
stability-legacy: #268bd2
|
||||||
|
stability-stable: #859900
|
||||||
static-alert-foreground: #93a1a1
|
static-alert-foreground: #93a1a1
|
||||||
tab-background: #073642
|
tab-background: #073642
|
||||||
tab-background-selected: #002b36
|
tab-background-selected: #002b36
|
||||||
|
@ -18,7 +18,7 @@ button-foreground: #586e75
|
|||||||
code-background: #eee8d5
|
code-background: #eee8d5
|
||||||
code-border: #93a1a1
|
code-border: #93a1a1
|
||||||
code-foreground: #586e75
|
code-foreground: #586e75
|
||||||
dirty-indicator: inherit
|
dirty-indicator: #dc322f
|
||||||
download-background: #859900
|
download-background: #859900
|
||||||
download-foreground: #eee8d5
|
download-foreground: #eee8d5
|
||||||
dragger-background: #eee8d5
|
dragger-background: #eee8d5
|
||||||
@ -34,6 +34,7 @@ external-link-background-visited: inherit
|
|||||||
external-link-foreground: #268bd2
|
external-link-foreground: #268bd2
|
||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #268bd2
|
external-link-foreground-visited: #268bd2
|
||||||
|
footnote-target-background: #eee8d5
|
||||||
foreground: #657b83
|
foreground: #657b83
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
@ -72,6 +73,10 @@ sidebar-tab-foreground-selected: #586e75
|
|||||||
sidebar-tiddler-link-foreground: #2aa198
|
sidebar-tiddler-link-foreground: #2aa198
|
||||||
sidebar-tiddler-link-foreground-hover: #002b36
|
sidebar-tiddler-link-foreground-hover: #002b36
|
||||||
site-title-foreground: #d33682
|
site-title-foreground: #d33682
|
||||||
|
stability-deprecated: #dc322f
|
||||||
|
stability-experimental: #b58900
|
||||||
|
stability-legacy: #268bd2
|
||||||
|
stability-stable: #859900
|
||||||
static-alert-foreground: #586e75
|
static-alert-foreground: #586e75
|
||||||
tab-background: #eee8d5
|
tab-background: #eee8d5
|
||||||
tab-background-selected: #fdf6e3
|
tab-background-selected: #fdf6e3
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: transparent
|
|||||||
external-link-foreground-hover:
|
external-link-foreground-hover:
|
||||||
external-link-foreground-visited:
|
external-link-foreground-visited:
|
||||||
external-link-foreground:
|
external-link-foreground:
|
||||||
|
footnote-target-background: #ececec
|
||||||
foreground: rgba(0, 0, 0, 0.87)
|
foreground: rgba(0, 0, 0, 0.87)
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -33,6 +33,7 @@ external-link-background: transparent
|
|||||||
external-link-foreground-hover:
|
external-link-foreground-hover:
|
||||||
external-link-foreground-visited: #7c318c
|
external-link-foreground-visited: #7c318c
|
||||||
external-link-foreground: #9e3eb3
|
external-link-foreground: #9e3eb3
|
||||||
|
footnote-target-background: #494949
|
||||||
foreground: rgba(255, 255, 255, 0.7)
|
foreground: rgba(255, 255, 255, 0.7)
|
||||||
highlight-background: #ffff78
|
highlight-background: #ffff78
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -42,6 +42,7 @@ external-link-background-visited: inherit
|
|||||||
external-link-foreground: rgb(179, 179, 255)
|
external-link-foreground: rgb(179, 179, 255)
|
||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: rgb(153, 153, 255)
|
external-link-foreground-visited: rgb(153, 153, 255)
|
||||||
|
footnote-target-background: <<colour tag-foreground>>
|
||||||
foreground: rgb(179, 179, 179)
|
foreground: rgb(179, 179, 179)
|
||||||
highlight-background: #ffff78
|
highlight-background: #ffff78
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
|
@ -32,7 +32,7 @@ dragger-background: <<colour foreground>>
|
|||||||
dragger-foreground: <<colour background>>
|
dragger-foreground: <<colour background>>
|
||||||
dropdown-background: <<colour background>>
|
dropdown-background: <<colour background>>
|
||||||
dropdown-border: <<colour muted-foreground>>
|
dropdown-border: <<colour muted-foreground>>
|
||||||
dropdown-tab-background-selected: #fff
|
dropdown-tab-background-selected: #ffffff
|
||||||
dropdown-tab-background: #ececec
|
dropdown-tab-background: #ececec
|
||||||
dropzone-background: rgba(0,200,0,0.7)
|
dropzone-background: rgba(0,200,0,0.7)
|
||||||
external-link-background-hover: inherit
|
external-link-background-hover: inherit
|
||||||
@ -41,6 +41,7 @@ external-link-background: inherit
|
|||||||
external-link-foreground-hover: inherit
|
external-link-foreground-hover: inherit
|
||||||
external-link-foreground-visited: #0000aa
|
external-link-foreground-visited: #0000aa
|
||||||
external-link-foreground: #0000ee
|
external-link-foreground: #0000ee
|
||||||
|
footnote-target-background: #ecf2ff
|
||||||
foreground: #333333
|
foreground: #333333
|
||||||
highlight-background: #ffff00
|
highlight-background: #ffff00
|
||||||
highlight-foreground: #000000
|
highlight-foreground: #000000
|
||||||
@ -53,7 +54,7 @@ modal-border: #999999
|
|||||||
modal-footer-background: #f5f5f5
|
modal-footer-background: #f5f5f5
|
||||||
modal-footer-border: #dddddd
|
modal-footer-border: #dddddd
|
||||||
modal-header-border: #eeeeee
|
modal-header-border: #eeeeee
|
||||||
muted-foreground: #bbb
|
muted-foreground: #bbbbbb
|
||||||
network-activity-foreground: #448844
|
network-activity-foreground: #448844
|
||||||
notification-background: #ffffdd
|
notification-background: #ffffdd
|
||||||
notification-border: #999999
|
notification-border: #999999
|
||||||
@ -97,9 +98,9 @@ tab-foreground: #666666
|
|||||||
table-border: #dddddd
|
table-border: #dddddd
|
||||||
table-footer-background: #a8a8a8
|
table-footer-background: #a8a8a8
|
||||||
table-header-background: #f0f0f0
|
table-header-background: #f0f0f0
|
||||||
tag-background: #ec6
|
tag-background: #eecc66
|
||||||
tag-foreground: #ffffff
|
tag-foreground: #ffffff
|
||||||
testcase-accent-level-1: #84C5E6
|
testcase-accent-level-1: #c1eaff
|
||||||
testcase-accent-level-2: #E3B740
|
testcase-accent-level-2: #E3B740
|
||||||
testcase-accent-level-3: #5FD564
|
testcase-accent-level-3: #5FD564
|
||||||
tiddler-background: <<colour background>>
|
tiddler-background: <<colour background>>
|
||||||
@ -131,11 +132,11 @@ toolbar-done-button:
|
|||||||
untagged-background: #999999
|
untagged-background: #999999
|
||||||
very-muted-foreground: #888888
|
very-muted-foreground: #888888
|
||||||
wikilist-background: #e5e5e5
|
wikilist-background: #e5e5e5
|
||||||
wikilist-item: #fff
|
wikilist-item: #ffffff
|
||||||
wikilist-info: #000
|
wikilist-info: #000000
|
||||||
wikilist-title: #666
|
wikilist-title: #666666
|
||||||
wikilist-title-svg: <<colour wikilist-title>>
|
wikilist-title-svg: <<colour wikilist-title>>
|
||||||
wikilist-url: #aaa
|
wikilist-url: #aaaaaa
|
||||||
wikilist-button-open: #4fb82b
|
wikilist-button-open: #4fb82b
|
||||||
wikilist-button-open-hover: green
|
wikilist-button-open-hover: green
|
||||||
wikilist-button-reveal: #5778d8
|
wikilist-button-reveal: #5778d8
|
||||||
@ -143,7 +144,7 @@ wikilist-button-reveal-hover: blue
|
|||||||
wikilist-button-remove: #d85778
|
wikilist-button-remove: #d85778
|
||||||
wikilist-button-remove-hover: red
|
wikilist-button-remove-hover: red
|
||||||
wikilist-toolbar-background: #d3d3d3
|
wikilist-toolbar-background: #d3d3d3
|
||||||
wikilist-toolbar-foreground: #888
|
wikilist-toolbar-foreground: #888888
|
||||||
wikilist-droplink-dragover: rgba(255,192,192,0.5)
|
wikilist-droplink-dragover: rgba(255,192,192,0.5)
|
||||||
wikilist-button-background: #acacac
|
wikilist-button-background: #acacac
|
||||||
wikilist-button-foreground: #000
|
wikilist-button-foreground: #000000
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
title: $:/core/templates/server/static.tiddler.wikitext
|
title: $:/core/templates/server/static.tiddler.wikitext
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<div class="tc-tiddler-title">
|
<div class="tc-tiddler-title tc-clearfix">
|
||||||
<div class="tc-titlebar">
|
<div class="tc-titlebar">
|
||||||
<h2><$text text=<<currentTiddler>>/></h2>
|
<h2><$text text=<<currentTiddler>>/></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-subtitle">
|
<div class="tc-subtitle tc-clearfix">
|
||||||
<$link to={{!!modifier}}>
|
<$link to={{!!modifier}}>
|
||||||
<$view field="modifier"/>
|
<$view field="modifier"/>
|
||||||
</$link> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
|
</$link> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-tags-wrapper">
|
<div class="tc-tags-wrapper" tc-clearfix>
|
||||||
<$list filter="[all[current]tags[]sort[title]]">
|
<$list filter="[all[current]tags[]sort[title]]">
|
||||||
<a href={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
<a href={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
||||||
<$macrocall $name="tag-pill" tag=<<currentTiddler>>/>
|
<$macrocall $name="tag-pill" tag=<<currentTiddler>>/>
|
||||||
</a>
|
</a>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-tiddler-body">
|
<div class="tc-tiddler-body tc-clearfix">
|
||||||
<$transclude mode="block"/>
|
<$transclude mode="block"/>
|
||||||
</div>
|
</div>
|
||||||
|
38
core/templates/social-metadata.tid
Normal file
38
core/templates/social-metadata.tid
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
title: $:/core/templates/social-metadata
|
||||||
|
tags: $:/tags/RawMarkupWikified
|
||||||
|
|
||||||
|
\procedure meta-plain(name,source,name-attribute:"name")
|
||||||
|
\whitespace trim
|
||||||
|
<%if [<source>has[text]] %>
|
||||||
|
<meta <$text text=<<name-attribute>>/>="<$text text=<<name>>/>" content="<$text text={{{ [<source>get[text]encodehtml[]] }}}/>">
|
||||||
|
<$text text={{{ [charcode[10]] }}}/>
|
||||||
|
<%endif%>
|
||||||
|
\end meta-plain
|
||||||
|
|
||||||
|
\procedure meta-wikified(name,source,name-attribute:"name")
|
||||||
|
\whitespace trim
|
||||||
|
<%if [<source>has[text]] %>
|
||||||
|
<$wikify name="html" text={{{ [<source>get[text]] }}} output="text">
|
||||||
|
<meta <$text text=<<name-attribute>>/>="<$text text=<<name>>/>" content="<$text text={{{ [<html>encodehtml[]] }}}/>">
|
||||||
|
<$text text={{{ [charcode[10]] }}}/>
|
||||||
|
</$wikify>
|
||||||
|
<%endif%>
|
||||||
|
\end meta-wikified
|
||||||
|
|
||||||
|
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock conditional commentinline commentblock
|
||||||
|
<<meta-wikified "description" "$:/SiteSubtitle">>
|
||||||
|
|
||||||
|
<!-- Facebook Meta Tags -->
|
||||||
|
<<meta-plain "og:url" "$:/SiteUrl" "property">>
|
||||||
|
<<meta-plain "og:type" "website" "property">>
|
||||||
|
<<meta-wikified "og:title" "$:/SiteTitle" "property">>
|
||||||
|
<<meta-wikified "og:description" "$:/SiteSubtitle" "property">>
|
||||||
|
<<meta-plain "og:image" "$:/SitePreviewUrl" "property">>
|
||||||
|
|
||||||
|
<!-- Twitter Meta Tags -->
|
||||||
|
<<meta-plain "twitter:card" "summary_large_image">>
|
||||||
|
<<meta-plain "twitter:domain" "$:/SiteDomain" "property">>
|
||||||
|
<<meta-plain "twitter:url" "$:/SiteUrl" "property">>
|
||||||
|
<<meta-wikified "twitter:title" "$:/SiteTitle">>
|
||||||
|
<<meta-wikified "twitter:description" "$:/SiteSubtitle">>
|
||||||
|
<<meta-plain "twitter:image" "$:/SitePreviewUrl">>
|
@ -57,3 +57,4 @@ title: $:/core/templates/tiddlywiki5.html
|
|||||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}`
|
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}`
|
||||||
</body>
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
|
</$set>
|
||||||
|
@ -2,10 +2,10 @@ title: $:/core/ui/Actions/new-journal
|
|||||||
tags: $:/tags/Actions
|
tags: $:/tags/Actions
|
||||||
description: create a new journal tiddler
|
description: create a new journal tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
|
||||||
<$wikify name="journalTitle" text="<$macrocall $name='now' format=<<journalTitleTemplate>>/>">
|
<$let journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
||||||
|
<$wikify name="journalTitle" text="<$transclude $variable='now' format=<<journalTitleTemplate>>/>">
|
||||||
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
||||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
@ -13,4 +13,4 @@ description: create a new journal tiddler
|
|||||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>>/>
|
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>>/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$wikify>
|
</$wikify>
|
||||||
</$vars>
|
</$let>
|
||||||
|
@ -2,8 +2,8 @@ title: $:/core/ui/Actions/new-tiddler
|
|||||||
tags: $:/tags/Actions
|
tags: $:/tags/Actions
|
||||||
description: create a new empty tiddler
|
description: create a new empty tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
|
||||||
|
<$let textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
||||||
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
|
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
|
||||||
</$vars>
|
</$let>
|
||||||
|
@ -2,50 +2,74 @@ title: $:/core/ui/AdvancedSearch/Filter
|
|||||||
tags: $:/tags/AdvancedSearch
|
tags: $:/tags/AdvancedSearch
|
||||||
caption: {{$:/language/Search/Filter/Caption}}
|
caption: {{$:/language/Search/Filter/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\procedure lingo-base() $:/language/Search/
|
||||||
\define set-next-input-tab(beforeafter:"after")
|
\procedure set-next-input-tab()
|
||||||
<$macrocall $name="change-input-tab"
|
<$transclude $variable="change-input-tab"
|
||||||
stateTitle="$:/state/tab--1498284803"
|
stateTitle="$:/state/tab--1498284803"
|
||||||
tag="$:/tags/AdvancedSearch"
|
tag="$:/tags/AdvancedSearch"
|
||||||
beforeafter="$beforeafter$"
|
beforeafter="after"
|
||||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"
|
||||||
|
/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions()
|
\procedure set-previous-input-tab()
|
||||||
|
<$transclude $variable="change-input-tab"
|
||||||
|
stateTitle="$:/state/tab--1498284803"
|
||||||
|
tag="$:/tags/AdvancedSearch"
|
||||||
|
beforeafter="before"
|
||||||
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"
|
||||||
|
/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\procedure cancel-search-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]">
|
||||||
filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]"
|
<$list-empty>
|
||||||
emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />">
|
<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]"/>
|
||||||
|
</$list-empty>
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-actions()
|
\procedure input-accept-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]">
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
<$list-empty>
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
<$list filter="[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]">
|
||||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-navigate $to={{{ [<tiddler>get[text]] }}}/>
|
||||||
|
</$list>
|
||||||
|
<$/list-empty>
|
||||||
|
<$action-navigate $to={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-variant-actions()
|
\procedure input-accept-variant-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]">
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
<$list-empty>
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
<$list filter="[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]">
|
||||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
||||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list></$list>
|
</$list>
|
||||||
|
</$list>
|
||||||
|
</$list-empty>
|
||||||
|
<$list filter="[<tiddler>get[text]minlength[1]]">
|
||||||
|
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<tiddler>get[text]] }}}/>
|
||||||
|
</$list>
|
||||||
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo Filter/Hint>>
|
<<lingo Filter/Hint>>
|
||||||
|
|
||||||
<div class="tc-search tc-advanced-search">
|
<div class="tc-search tc-advanced-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>> class="tc-small-gap-right">
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-previous-input-tab>>>
|
||||||
<$macrocall $name="keyboard-driven-input"
|
<$transclude $variable="keyboard-driven-input"
|
||||||
tiddler="$:/temp/advancedsearch/input"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
storeTitle="$:/temp/advancedsearch"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
@ -57,21 +81,22 @@ caption: {{$:/language/Search/Filter/Caption}}
|
|||||||
firstSearchFilterField="text"
|
firstSearchFilterField="text"
|
||||||
inputAcceptActions=<<input-accept-actions>>
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
inputCancelActions=<<cancel-search-actions>>/>
|
inputCancelActions=<<cancel-search-actions>>
|
||||||
|
/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
 
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
<$transclude/>
|
||||||
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
|
||||||
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="" tag="div" class="tc-search-results">
|
||||||
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
||||||
<div class="tc-search-results">
|
|
||||||
<p><<lingo Filter/Matches>></p>
|
<p><<lingo Filter/Matches>></p>
|
||||||
<$list filter={{$:/temp/advancedsearch}}>
|
<$list filter={{$:/temp/advancedsearch}}>
|
||||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] :and[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
</span>
|
</span>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
|
||||||
</$set>
|
</$set>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
@ -3,18 +3,27 @@ tags: $:/tags/AdvancedSearch
|
|||||||
caption: {{$:/language/Search/Shadows/Caption}}
|
caption: {{$:/language/Search/Shadows/Caption}}
|
||||||
first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]
|
first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\procedure lingo-base() $:/language/Search/
|
||||||
|
|
||||||
\define set-next-input-tab(beforeafter:"after")
|
\procedure set-next-input-tab()
|
||||||
<$macrocall $name="change-input-tab"
|
<$transclude $variable="change-input-tab"
|
||||||
stateTitle="$:/state/tab--1498284803"
|
stateTitle="$:/state/tab--1498284803"
|
||||||
tag="$:/tags/AdvancedSearch"
|
tag="$:/tags/AdvancedSearch"
|
||||||
beforeafter="$beforeafter$"
|
beforeafter="after"
|
||||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions()
|
\procedure set-previous-input-tab()
|
||||||
|
<$transclude $variable="change-input-tab"
|
||||||
|
stateTitle="$:/state/tab--1498284803"
|
||||||
|
tag="$:/tags/AdvancedSearch"
|
||||||
|
beforeafter="before"
|
||||||
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\procedure cancel-search-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
||||||
@ -25,22 +34,22 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-actions()
|
\procedure input-accept-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$action-navigate $to={{{ [<tiddler>get[text]] }}}/></$list>">
|
||||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-navigate $to={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-variant-actions()
|
\procedure input-accept-variant-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$list filter='[<tiddler>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<tiddler>get[text]] }}}/></$list></$list>">
|
||||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
<$list filter="[<tiddler>get[text]minlength[1]]">
|
||||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list></$list>
|
</$list></$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
@ -50,8 +59,8 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
|
|
||||||
<div class="tc-search">
|
<div class="tc-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-previous-input-tab>>>
|
||||||
<$macrocall $name="keyboard-driven-input"
|
<$transclude $variable="keyboard-driven-input"
|
||||||
tiddler="$:/temp/advancedsearch/input"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
storeTitle="$:/temp/advancedsearch"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
@ -79,14 +88,18 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
|
|
||||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
<$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]] -[[$:/temp/advancedsearch/input]]'/>">
|
<$set name="resultCount" value={{{ [all[shadows]search{$:/temp/advancedsearch}] :except[[$:/temp/advancedsearch]] :except[[$:/temp/advancedsearch/input]] :and[count[]]}}}>
|
||||||
|
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
|
|
||||||
|
<%if [<resultCount>match[0]] %>
|
||||||
|
{{$:/language/Search/Matches/NoMatch}}
|
||||||
|
<%else%>
|
||||||
<<lingo Shadows/Matches>>
|
<<lingo Shadows/Matches>>
|
||||||
|
<%endif%>
|
||||||
|
|
||||||
<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]">
|
<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] :else[[$:/temp/advancedsearch]] :else[[$:/temp/advancedsearch/input]]">
|
||||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] :else[[$:/temp/advancedsearch/selected-item]get[text]] :and[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
</span>
|
</span>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -2,16 +2,20 @@ title: $:/core/ui/AdvancedSearch/Standard
|
|||||||
tags: $:/tags/AdvancedSearch
|
tags: $:/tags/AdvancedSearch
|
||||||
caption: {{$:/language/Search/Standard/Caption}}
|
caption: {{$:/language/Search/Standard/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\procedure lingo-base() $:/language/Search/
|
||||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
\procedure set-next-input-tab() <$transclude $variable="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="after" 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>>/>"/>
|
\procedure set-previous-input-tab() <$transclude $variable="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="before" 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"/>
|
\procedure next-search-tab() <$transclude $variable="change-input-tab" stateTitle="$:/state/tab/search-results/advancedsearch" tag="$:/tags/SearchResults" beforeafter="after" defaultState={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
|
||||||
\define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>
|
\procedure previous-search-tab() <$transclude $variable="change-input-tab" stateTitle="$:/state/tab/search-results/advancedsearch" tag="$:/tags/SearchResults" beforeafter="before" defaultState={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
|
||||||
\define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>
|
\procedure 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"/>
|
||||||
|
|
||||||
|
\procedure input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$action-navigate $to={{{ [<tiddler>get[text]] }}}/></$list>"><$action-navigate $to={{{ [<tiddler>get[text]] }}}/></$list>
|
||||||
|
|
||||||
|
\procedure input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$list filter='[<tiddler>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<tiddler>get[text]] }}}/></$list></$list>"><$list filter="[<tiddler>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<tiddler>get[text]] }}}/></$list></$list>
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
@ -19,10 +23,10 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
|
|
||||||
<div class="tc-search">
|
<div class="tc-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-previous-input-tab>>>
|
||||||
<$keyboard key="shift-alt-Right" actions=<<next-search-tab>>>
|
<$keyboard key="shift-alt-Right" actions=<<next-search-tab>>>
|
||||||
<$keyboard key="shift-alt-Left" actions=<<next-search-tab "before">>>
|
<$keyboard key="shift-alt-Left" actions=<<previous-search-tab>>>
|
||||||
<$macrocall $name="keyboard-driven-input"
|
<$transclude $variable="keyboard-driven-input"
|
||||||
tiddler="$:/temp/advancedsearch/input"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
storeTitle="$:/temp/advancedsearch"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
@ -33,12 +37,13 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
inputCancelActions=<<cancel-search-actions>>
|
inputCancelActions=<<cancel-search-actions>>
|
||||||
inputAcceptActions=<<input-accept-actions>>
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}]"
|
||||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<<cancel-search-actions>>
|
<<cancel-search-actions>>
|
||||||
@ -54,18 +59,18 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
variable="listItem">
|
variable="listItem">
|
||||||
<$vars
|
<$vars
|
||||||
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
||||||
configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
|
configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}] }}}
|
||||||
searchListState="$:/temp/advancedsearch/selected-item">
|
searchListState="$:/temp/advancedsearch/selected-item">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]">
|
||||||
<$macrocall $name="tabs"
|
<$list-empty>
|
||||||
|
<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude mode="block"/></$list>
|
||||||
|
</$list-empty>
|
||||||
|
<$transclude $variable="tabs"
|
||||||
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
||||||
default={{$:/config/SearchResults/Default}}
|
default={{$:/config/SearchResults/Default}}
|
||||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
||||||
explicitState="$:/state/tab/search-results/advancedsearch" />
|
explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||||
</$list>
|
</$list>
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]] :else[[]]">
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"><$transclude mode="block"/></$list>
|
|
||||||
</$list>
|
|
||||||
</$vars>
|
</$vars>
|
||||||
</$list>
|
</$list>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/System
|
title: $:/core/ui/AdvancedSearch/System
|
||||||
tags: $:/tags/AdvancedSearch
|
tags: $:/tags/AdvancedSearch
|
||||||
caption: {{$:/language/Search/System/Caption}}
|
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]]
|
first-search-filter: [is[system]search<userInput>sort[title]limit[250]] :except[[$:/temp/advancedsearch]] :except[[$:/temp/advancedsearch/input]] :except[[$:/temp/advancedsearch/selected-item]]
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\procedure lingo-base() $:/language/Search/
|
||||||
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler)
|
\procedure set-next-input-tab()
|
||||||
<$macrocall $name="change-input-tab"
|
<$transclude $variable="change-input-tab"
|
||||||
stateTitle="$:/state/tab--1498284803"
|
stateTitle="$:/state/tab--1498284803"
|
||||||
tag="$:/tags/AdvancedSearch"
|
tag="$:/tags/AdvancedSearch"
|
||||||
beforeafter="$beforeafter$"
|
beforeafter="after"
|
||||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions()
|
\procedure set-previous-input-tab()
|
||||||
|
<$transclude $variable="change-input-tab"
|
||||||
|
stateTitle="$:/state/tab--1498284803"
|
||||||
|
tag="$:/tags/AdvancedSearch"
|
||||||
|
beforeafter="before"
|
||||||
|
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||||
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\procedure cancel-search-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
||||||
@ -24,22 +33,22 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
|
|||||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-actions()
|
\procedure input-accept-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$action-navigate $to={{{ [<tiddler>get[text]] }}}/></$list>">
|
||||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-navigate $to={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define input-accept-variant-actions()
|
\procedure input-accept-variant-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
emptyMessage="<$list filter='[<tiddler>get[text]!is[missing]] :else[<tiddler>get[text]is[shadow]]'><$list filter='[<tiddler>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<tiddler>get[text]] }}}/></$list></$list>">
|
||||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
<$list filter="[<tiddler>get[text]minlength[1]]">
|
||||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<tiddler>get[text]] }}}/>
|
||||||
</$list></$list>
|
</$list></$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
@ -49,8 +58,8 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
|
|||||||
|
|
||||||
<div class="tc-search">
|
<div class="tc-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-previous-input-tab>>>
|
||||||
<$macrocall $name="keyboard-driven-input"
|
<$transclude $variable="keyboard-driven-input"
|
||||||
tiddler="$:/temp/advancedsearch/input"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
storeTitle="$:/temp/advancedsearch"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
@ -78,14 +87,18 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
|
|||||||
|
|
||||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
<$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]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]'/>">
|
<$set name="resultCount" value={{{ [is[system]search{$:/temp/advancedsearch}] :except[[$:/temp/advancedsearch]] :except[[$:/temp/advancedsearch/input]] :except[[$:/temp/advancedsearch/selected-item]] +[count[]] }}}>
|
||||||
|
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
|
|
||||||
|
<%if [<resultCount>match[0]] %>
|
||||||
|
{{$:/language/Search/Matches/NoMatch}}
|
||||||
|
<%else%>
|
||||||
<<lingo System/Matches>>
|
<<lingo System/Matches>>
|
||||||
|
<%endif%>
|
||||||
|
|
||||||
<$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]">
|
<$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] :except[[$:/temp/advancedsearch]] :except[[$:/temp/advancedsearch/input]] :except[[$:/temp/advancedsearch/selected-item]]">
|
||||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] :except[[$:/temp/advancedsearch/selected-item]get[text]] :and[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
</span>
|
</span>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -47,13 +47,13 @@ $:/config/Plugins/Disabled/$(currentTiddler)$
|
|||||||
<h2>
|
<h2>
|
||||||
<div>
|
<div>
|
||||||
<%if [<currentTiddler>get[stability]match[STABILITY_0_DEPRECATED]] %>
|
<%if [<currentTiddler>get[stability]match[STABILITY_0_DEPRECATED]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-deprecated">DEPRECATED</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-deprecated"><<lingo "Stability/Deprecated">></span>
|
||||||
<%elseif [<currentTiddler>get[stability]match[STABILITY_1_EXPERIMENTAL]] %>
|
<%elseif [<currentTiddler>get[stability]match[STABILITY_1_EXPERIMENTAL]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-experimental">EXPERIMENTAL</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-experimental"><<lingo "Stability/Experimental">></span>
|
||||||
<%elseif [<currentTiddler>get[stability]match[STABILITY_2_STABLE]] %>
|
<%elseif [<currentTiddler>get[stability]match[STABILITY_2_STABLE]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-stable">STABLE</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-stable"><<lingo "Stability/Stable">></span>
|
||||||
<%elseif [<currentTiddler>get[stability]match[STABILITY_3_LEGACY]] %>
|
<%elseif [<currentTiddler>get[stability]match[STABILITY_3_LEGACY]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-legacy">LEGACY</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-legacy"><<lingo "Stability/Legacy">></span>
|
||||||
<%endif%>
|
<%endif%>
|
||||||
<em><$view field="version"/></em></div>
|
<em><$view field="version"/></em></div>
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -2,22 +2,7 @@ title: $:/core/ui/ControlPanel/Basics
|
|||||||
tags: $:/tags/ControlPanel/Info
|
tags: $:/tags/ControlPanel/Info
|
||||||
caption: {{$:/language/ControlPanel/Basics/Caption}}
|
caption: {{$:/language/ControlPanel/Basics/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Basics/
|
\procedure lingo-base() $:/language/ControlPanel/Basics/
|
||||||
|
|
||||||
\define show-filter-count(filter)
|
|
||||||
\whitespace trim
|
|
||||||
<$button class="tc-btn-invisible">
|
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
|
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/>
|
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
|
||||||
<$action-setfield $tiddler="$:/state/tab--1498284803" $value="$:/core/ui/AdvancedSearch/Filter"/>
|
|
||||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
|
||||||
''<$count filter="""$filter$"""/>''
|
|
||||||
 
|
|
||||||
{{$:/core/images/advanced-search-button}}
|
|
||||||
</$button>
|
|
||||||
\end
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
|tc-max-width tc-edit-max-width|k
|
|tc-max-width tc-edit-max-width|k
|
||||||
@ -25,7 +10,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
|||||||
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||||
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||||
|<$link to="$:/status/UserName"><<lingo Username/Prompt>></$link> |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
|<$link to="$:/status/UserName"><<lingo Username/Prompt>></$link> |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||||
|<$link to="$:/config/AnimationDuration"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
|<$link to="$:/config/AnimationDuration"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input" type="number"/> |
|
||||||
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit class="tc-edit-texteditor" tiddler="$:/DefaultTiddlers" autoHeight="yes"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit class="tc-edit-texteditor" tiddler="$:/DefaultTiddlers" autoHeight="yes"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|
||||||
|<$link to="$:/language/DefaultNewTiddlerTitle"><<lingo NewTiddler/Title/Prompt>></$link> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> |
|
|<$link to="$:/language/DefaultNewTiddlerTitle"><<lingo NewTiddler/Title/Prompt>></$link> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> |
|
||||||
|<$link to="$:/config/NewJournal/Title"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> |
|
|<$link to="$:/config/NewJournal/Title"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> |
|
||||||
|
9
core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/ViewTemplateSubtitle
|
||||||
|
tags: $:/tags/ControlPanel/Cascades
|
||||||
|
caption: {{$:/language/ControlPanel/ViewTemplateSubtitle/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/ViewTemplateSubtitle/
|
||||||
|
|
||||||
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
{{$:/tags/ViewTemplateSubtitleFilter||$:/snippets/ListTaggedCascade}}
|
9
core/ui/ControlPanel/Cascades/ViewTemplateTags.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateTags.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/ViewTemplateTags
|
||||||
|
tags: $:/tags/ControlPanel/Cascades
|
||||||
|
caption: {{$:/language/ControlPanel/ViewTemplateTags/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/ViewTemplateTags/
|
||||||
|
|
||||||
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
{{$:/tags/ViewTemplateTagsFilter||$:/snippets/ListTaggedCascade}}
|
@ -75,13 +75,13 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
||||||
<div>
|
<div>
|
||||||
<%if [<assetInfo>get[stability]match[STABILITY_0_DEPRECATED]] %>
|
<%if [<assetInfo>get[stability]match[STABILITY_0_DEPRECATED]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-deprecated">DEPRECATED</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-deprecated">{{$:/language/ControlPanel/Plugins/Stability/Deprecated}}</span>
|
||||||
<%elseif [<assetInfo>get[stability]match[STABILITY_1_EXPERIMENTAL]] %>
|
<%elseif [<assetInfo>get[stability]match[STABILITY_1_EXPERIMENTAL]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-experimental">EXPERIMENTAL</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-experimental">{{$:/language/ControlPanel/Plugins/Stability/Experimental}}</span>
|
||||||
<%elseif [<assetInfo>get[stability]match[STABILITY_2_STABLE]] %>
|
<%elseif [<assetInfo>get[stability]match[STABILITY_2_STABLE]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-stable">STABLE</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-stable">{{$:/language/ControlPanel/Plugins/Stability/Stable}}</span>
|
||||||
<%elseif [<assetInfo>get[stability]match[STABILITY_3_LEGACY]] %>
|
<%elseif [<assetInfo>get[stability]match[STABILITY_3_LEGACY]] %>
|
||||||
<span class="tc-plugin-info-stability tc-plugin-info-stability-legacy">LEGACY</span>
|
<span class="tc-plugin-info-stability tc-plugin-info-stability-legacy">{{$:/language/ControlPanel/Plugins/Stability/Legacy}}</span>
|
||||||
<%endif%>
|
<%endif%>
|
||||||
<em><$view tiddler=<<assetInfo>> field="version"/></em></div>
|
<em><$view tiddler=<<assetInfo>> field="version"/></em></div>
|
||||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion"><div><em>{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}</em></div></$list>
|
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion"><div><em>{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}</em></div></$list>
|
||||||
|
@ -13,4 +13,4 @@ caption: {{$:/language/ControlPanel/Saving/GitService/GitHub/Caption}}
|
|||||||
|<<lingo Branch>> |<$edit-text tiddler="$:/GitHub/Branch" default="main" tag="input"/> |
|
|<<lingo Branch>> |<$edit-text tiddler="$:/GitHub/Branch" default="main" tag="input"/> |
|
||||||
|<<lingo Path>> |<$edit-text tiddler="$:/GitHub/Path" default="" tag="input"/> |
|
|<<lingo Path>> |<$edit-text tiddler="$:/GitHub/Path" default="" tag="input"/> |
|
||||||
|<<lingo Filename>> |<$edit-text tiddler="$:/GitHub/Filename" default="" tag="input"/> |
|
|<<lingo Filename>> |<$edit-text tiddler="$:/GitHub/Filename" default="" tag="input"/> |
|
||||||
|<<lingo ServerURL>> |<$edit-text tiddler="$:/GitHub/ServerURL" default="https://api.github.com" tag="input"/> |
|
|<<lingo ServerURL>> |<$edit-text tiddler="$:/GitHub/ServerURL" default="https://api.github.com" tag="input" type="url"/> |
|
@ -13,4 +13,4 @@ caption: {{$:/language/ControlPanel/Saving/GitService/GitLab/Caption}}
|
|||||||
|<<lingo Branch>> |<$edit-text tiddler="$:/GitLab/Branch" default="master" tag="input"/> |
|
|<<lingo Branch>> |<$edit-text tiddler="$:/GitLab/Branch" default="master" tag="input"/> |
|
||||||
|<<lingo Path>> |<$edit-text tiddler="$:/GitLab/Path" default="" tag="input"/> |
|
|<<lingo Path>> |<$edit-text tiddler="$:/GitLab/Path" default="" tag="input"/> |
|
||||||
|<<lingo Filename>> |<$edit-text tiddler="$:/GitLab/Filename" default="" tag="input"/> |
|
|<<lingo Filename>> |<$edit-text tiddler="$:/GitLab/Filename" default="" tag="input"/> |
|
||||||
|<<lingo ServerURL>> |<$edit-text tiddler="$:/GitLab/ServerURL" default="https://gitlab.com/api/v4" tag="input"/> |
|
|<<lingo ServerURL>> |<$edit-text tiddler="$:/GitLab/ServerURL" default="https://gitlab.com/api/v4" tag="input" type="url"/> |
|
@ -34,7 +34,7 @@ http://$(userName)$.tiddlyspot.com/$path$/
|
|||||||
|
|
||||||
''<<lingo Advanced/Heading>>''
|
''<<lingo Advanced/Heading>>''
|
||||||
|
|
||||||
|<<lingo ServerURL>> |<$edit-text tiddler="$:/UploadURL" default="" tag="input"/> |
|
|<<lingo ServerURL>> |<$edit-text tiddler="$:/UploadURL" default="" tag="input" type="url"/> |
|
||||||
|<<lingo Filename>> |<$edit-text tiddler="$:/UploadFilename" default="index.html" tag="input"/> |
|
|<<lingo Filename>> |<$edit-text tiddler="$:/UploadFilename" default="index.html" tag="input"/> |
|
||||||
|<<lingo UploadDir>> |<$edit-text tiddler="$:/UploadDir" default="." tag="input"/> |
|
|<<lingo UploadDir>> |<$edit-text tiddler="$:/UploadDir" default="." tag="input"/> |
|
||||||
|<<lingo BackupDir>> |<$edit-text tiddler="$:/UploadBackupDir" default="." tag="input"/> |
|
|<<lingo BackupDir>> |<$edit-text tiddler="$:/UploadBackupDir" default="." tag="input"/> |
|
||||||
|
@ -13,4 +13,4 @@ caption: {{$:/language/ControlPanel/Saving/GitService/Gitea/Caption}}
|
|||||||
|<<lingo Branch>> |<$edit-text tiddler="$:/Gitea/Branch" default="master" tag="input"/> |
|
|<<lingo Branch>> |<$edit-text tiddler="$:/Gitea/Branch" default="master" tag="input"/> |
|
||||||
|<<lingo Path>> |<$edit-text tiddler="$:/Gitea/Path" default="" tag="input"/> |
|
|<<lingo Path>> |<$edit-text tiddler="$:/Gitea/Path" default="" tag="input"/> |
|
||||||
|<<lingo Filename>> |<$edit-text tiddler="$:/Gitea/Filename" default="" tag="input"/> |
|
|<<lingo Filename>> |<$edit-text tiddler="$:/Gitea/Filename" default="" tag="input"/> |
|
||||||
|<<lingo ServerURL>> |<$edit-text tiddler="$:/Gitea/ServerURL" default="https://gitea/api/v1" tag="input"/> |
|
|<<lingo ServerURL>> |<$edit-text tiddler="$:/Gitea/ServerURL" default="https://gitea/api/v1" tag="input" type="url"/> |
|
||||||
|
10
core/ui/ControlPanel/Settings/RecentLimit.tid
Normal file
10
core/ui/ControlPanel/Settings/RecentLimit.tid
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/RecentLimit
|
||||||
|
tags: $:/tags/ControlPanel/Settings
|
||||||
|
caption: {{$:/language/ControlPanel/Settings/RecentLimit/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\procedure lingo-base() $:/language/ControlPanel/Settings/RecentLimit/
|
||||||
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
|tc-table-no-border|k
|
||||||
|
|<$link to="$:/config/RecentLimit"><<lingo Caption>></$link> |<$edit-text tiddler="$:/config/RecentLimit" tag="input" type="number"/> |
|
22
core/ui/ControlPanel/SocialCard.tid
Normal file
22
core/ui/ControlPanel/SocialCard.tid
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/SocialCard
|
||||||
|
tags: $:/tags/ControlPanel/Advanced
|
||||||
|
caption: {{$:/language/ControlPanel/SocialCard/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/
|
||||||
|
|
||||||
|
<<lingo SocialCard/Hint>>
|
||||||
|
|
||||||
|
|<$link to="$:/SiteTitle"><<lingo Basics/Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SiteSubtitle"><<lingo Basics/Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SiteDomain"><<lingo SocialCard/Domain/Prompt>></$link> |<$edit-text tiddler="$:/SiteDomain" default="" tag="input" type="url"/> |
|
||||||
|
|<$link to="$:/SiteUrl"><<lingo SocialCard/Url/Prompt>></$link> |<$edit-text tiddler="$:/SiteUrl" default="" tag="input" type="url"/> |
|
||||||
|
|<$link to="$:/SitePreviewUrl"><<lingo SocialCard/PreviewUrl/Prompt>></$link> |<$edit-text tiddler="$:/SitePreviewUrl" default="" tag="input" type="url"/> |
|
||||||
|
|
||||||
|
<%if [[$:/SitePreviewUrl]get[text]else[]!is[blank]] %>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<<lingo SocialCard/PreviewUrl/Preview>>
|
||||||
|
</div>
|
||||||
|
<img src={{$:/SitePreviewUrl}}/>
|
||||||
|
</div>
|
||||||
|
<%endif%>
|
@ -9,7 +9,7 @@ second-search-filter: [!is[system]search<userInput>sort[title]limit[250]]
|
|||||||
//<small>{{$:/language/Search/Matches/Title}}</small>//
|
//<small>{{$:/language/Search/Matches/Title}}</small>//
|
||||||
|
|
||||||
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||||
<$list filter={{{ [<configTiddler>get[first-search-filter]] }}}>
|
<$list filter={{{ [<configTiddler>get[first-search-filter]] }}} emptyMessage={{$:/language/Search/Matches/NoResult}}>
|
||||||
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
</span>
|
</span>
|
||||||
@ -19,7 +19,7 @@ second-search-filter: [!is[system]search<userInput>sort[title]limit[250]]
|
|||||||
//<small>{{$:/language/Search/Matches/All}}</small>//
|
//<small>{{$:/language/Search/Matches/All}}</small>//
|
||||||
|
|
||||||
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||||
<$list filter={{{ [<configTiddler>get[second-search-filter]] }}}>
|
<$list filter={{{ [<configTiddler>get[second-search-filter]] }}} emptyMessage={{$:/language/Search/Matches/NoResult}}>
|
||||||
<span class={{{[<currentTiddler>addsuffix[-secondaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
<span class={{{[<currentTiddler>addsuffix[-secondaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
</span>
|
</span>
|
||||||
|
@ -3,7 +3,7 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$
|
\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
<div class="tc-tiddler-title tc-tiddler-edit-title tc-clearfix">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
<span class="tc-tiddler-controls tc-titlebar">
|
<span class="tc-tiddler-controls tc-titlebar">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem">
|
||||||
@ -14,5 +14,4 @@ tags: $:/tags/EditTemplate
|
|||||||
</$let>
|
</$let>
|
||||||
</$list>
|
</$list>
|
||||||
</span>
|
</span>
|
||||||
<div style="clear: both;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,35 +1,32 @@
|
|||||||
title: $:/core/ui/EditTemplate/fields
|
title: $:/core/ui/EditTemplate/fields
|
||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/
|
\procedure lingo-base() $:/language/EditTemplate/
|
||||||
\define config-title()
|
\function tf.config-title() [[$:/config/EditTemplateFields/Visibility/]addsuffix[$(currentField)$]substitute[]get[text]]
|
||||||
$:/config/EditTemplateFields/Visibility/$(currentField)$
|
|
||||||
\end
|
|
||||||
|
|
||||||
\define config-filter()
|
\function tf.config-filter() [[hide]] :except[title<tf.config-title>]
|
||||||
[[hide]] -[title{$(config-title)$}]
|
|
||||||
\end
|
|
||||||
|
|
||||||
<!-- Beware this is duplicated from EditTemplate.tid. For details see bug #7054 -->
|
<!-- Beware this is duplicated from EditTemplate.tid. For details see bug #7054 -->
|
||||||
\define get-field-value-tiddler-filter() [subfilter<get-field-editor-filter>sha256[16]addprefix[/]addprefix<newFieldValueTiddlerPrefix>]
|
\procedure get-field-value-tiddler-filter() [subfilter<get-field-editor-filter>sha256[16]addprefix[/]addprefix<newFieldValueTiddlerPrefix>]
|
||||||
\define get-field-editor-filter() [<newFieldNameTiddler>get[text]else[]] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}]
|
\procedure get-field-editor-filter() [<newFieldNameTiddler>get[text]else[]] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}]
|
||||||
|
|
||||||
\define current-tiddler-new-field-selector()
|
\procedure prefix.bracket() [
|
||||||
[data-tiddler-title="$(currentTiddlerCSSescaped)$"] .tc-edit-field-add-name-wrapper input
|
\procedure suffix.bracket() ]
|
||||||
\end
|
|
||||||
|
|
||||||
\define new-field-actions()
|
\function tf.current-tiddler-new-field-selector() [[data-tiddler-title=]addprefix[$(prefix.bracket)$]substitute[]addsuffix<currentTiddlerCSSescaped>addsuffix[$(suffix.bracket)$]substitute[]] .tc-edit-field-add-name-wrapper input :and[join[ ]]
|
||||||
|
|
||||||
|
\procedure new-field-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldNameTiddler>get[text]] :map[subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldNameTiddler>get[text]] :map[subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
||||||
<$set name="safeNewFieldValueTiddlerPrefix" value=<<newFieldValueTiddlerPrefix>> emptyValue=<<qualify "$:/temp/NewFieldValue">> >
|
<$set name="safeNewFieldValueTiddlerPrefix" value=<<newFieldValueTiddlerPrefix>> emptyValue=<<qualify "$:/temp/NewFieldValue">> >
|
||||||
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [prefix[$:/temp/NewFieldValue]prefix<safeNewFieldValueTiddlerPrefix>] [<storeTitle>] [<searchListState>]"/>
|
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [prefix[$:/temp/NewFieldValue]prefix<safeNewFieldValueTiddlerPrefix>] [<storeTitle>] [<searchListState>]"/>
|
||||||
</$set>
|
</$set>
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
<$action-sendmessage $message="tm-focus-selector" $param=<<tf.current-tiddler-new-field-selector>>/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
\procedure delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
|
|
||||||
\define cancel-search-actions-inner()
|
\procedure cancel-search-actions-inner()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list
|
<$list
|
||||||
filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]"
|
filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]"
|
||||||
@ -39,7 +36,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
|||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions()
|
\procedure cancel-search-actions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||||
<$list
|
<$list
|
||||||
@ -50,7 +47,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
|||||||
</$set>
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define new-field()
|
\procedure new-field()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||||
<$reveal type="nomatch" text="" default=<<name>>>
|
<$reveal type="nomatch" text="" default=<<name>>>
|
||||||
@ -75,15 +72,15 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
|||||||
|
|
||||||
<$set name="newFieldValueTiddlerPrefix" value=<<newFieldValueTiddlerPrefix>> emptyValue=<<qualify "$:/temp/NewFieldValue">> >
|
<$set name="newFieldValueTiddlerPrefix" value=<<newFieldValueTiddlerPrefix>> emptyValue=<<qualify "$:/temp/NewFieldValue">> >
|
||||||
<div class="tc-edit-fields">
|
<div class="tc-edit-fields">
|
||||||
<table class={{{ [all[current]fields[]] :filter[lookup[$:/config/EditTemplateFields/Visibility/]!match[hide]] +[count[]!match[0]] +[then[tc-edit-fields]] ~[[tc-edit-fields tc-edit-fields-small]] }}}>
|
<table class={{{ [all[current]fields[]] :filter[lookup[$:/config/EditTemplateFields/Visibility/]!match[hide]] :and[count[]!match[0]] :and[then[tc-edit-fields]] :else[[tc-edit-fields tc-edit-fields-small]] }}}>
|
||||||
<tbody>
|
<tbody>
|
||||||
<$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField" storyview="pop">
|
<$list filter="[all[current]fields[]] :and[sort[title]]" variable="currentField" storyview="pop">
|
||||||
<$list filter=<<config-filter>> variable="temp">
|
<$list filter=<<tf.config-filter>> variable="temp">
|
||||||
<tr class="tc-edit-field">
|
<tr class="tc-edit-field">
|
||||||
<td class="tc-edit-field-name">
|
<td class="tc-edit-field-name">
|
||||||
<$text text=<<currentField>>/>:</td>
|
<$text text=<<currentField>>/>:</td>
|
||||||
<td class="tc-edit-field-value">
|
<td class="tc-edit-field-value">
|
||||||
<$keyboard key="((delete-field))" actions="""<$action-deletefield $field=<<currentField>>/><$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/></$set>""">
|
<$keyboard key="((delete-field))" actions="""<$action-deletefield $field=<<currentField>>/><$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<tf.current-tiddler-new-field-selector>>/></$set>""">
|
||||||
<$transclude tiddler={{{ [<currentField>] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}] }}} />
|
<$transclude tiddler={{{ [<currentField>] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}] }}} />
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</td>
|
</td>
|
||||||
@ -107,10 +104,10 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
|||||||
</em>
|
</em>
|
||||||
<$vars refreshTitle=<<qualify "$:/temp/fieldname/refresh">> storeTitle=<<newFieldNameInputTiddler>> searchListState=<<newFieldNameSelectionTiddler>>>
|
<$vars refreshTitle=<<qualify "$:/temp/fieldname/refresh">> storeTitle=<<newFieldNameInputTiddler>> searchListState=<<newFieldNameSelectionTiddler>>>
|
||||||
<div class="tc-edit-field-add-name-wrapper">
|
<div class="tc-edit-field-add-name-wrapper">
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler=<<newFieldNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
<$transclude $variable="keyboard-driven-input" tiddler=<<newFieldNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
||||||
selectionStateTitle=<<searchListState>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}}
|
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}}
|
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"
|
focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] :else[[false]] }}} cancelPopups="yes"
|
||||||
configTiddlerFilter="[[$:/config/EditMode/fieldname-filter]]" inputCancelActions=<<cancel-search-actions>> />
|
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>
|
<$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="">
|
<$reveal state=<<qualify "$:/state/popup/field-dropdown">> type="nomatch" text="" default="">
|
||||||
@ -121,8 +118,8 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
|||||||
<<lingo Fields/Add/Dropdown/User>>
|
<<lingo Fields/Add/Dropdown/User>>
|
||||||
</div>
|
</div>
|
||||||
<$set name="newFieldName" value={{{ [<storeTitle>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="[!is[shadow]!is[system]fields[]search:title<newFieldName>sort[]] :except[[created]] :except[[creator]] :except[[draft.of]] :except[[draft.title]] :except[[modified]] :except[[modifier]] :except[[tags]] :except[[text]] :except[[title]] :except[[type]]" variable="currentField">
|
||||||
<$list filter="[<currentField>addsuffix[-primaryList]] -[<searchListState>get[text]]" emptyMessage="""<$link to=<<currentField>> class="tc-list-item-selected"><$text text=<<currentField>>/></$link>""">
|
<$list filter="[<currentField>addsuffix[-primaryList]] :except[<searchListState>get[text]]" emptyMessage="""<$link to=<<currentField>> class="tc-list-item-selected"><$text text=<<currentField>>/></$link>""">
|
||||||
<$link to=<<currentField>>>
|
<$link to=<<currentField>>>
|
||||||
<$text text=<<currentField>>/>
|
<$text text=<<currentField>>/>
|
||||||
</$link>
|
</$link>
|
||||||
@ -131,8 +128,8 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
|||||||
<div class="tc-dropdown-item">
|
<div class="tc-dropdown-item">
|
||||||
<<lingo Fields/Add/Dropdown/System>>
|
<<lingo Fields/Add/Dropdown/System>>
|
||||||
</div>
|
</div>
|
||||||
<$list filter="[fields[]search:title<newFieldName>sort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField">
|
<$list filter="[fields[]search:title<newFieldName>sort[]] :except[!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>""">
|
<$list filter="[<currentField>addsuffix[-secondaryList]] :except[<searchListState>get[text]]" emptyMessage="""<$link to=<<currentField>> class="tc-list-item-selected"><$text text=<<currentField>>/></$link>""">
|
||||||
<$link to=<<currentField>>>
|
<$link to=<<currentField>>>
|
||||||
<$text text=<<currentField>>/>
|
<$text text=<<currentField>>/>
|
||||||
</$link>
|
</$link>
|
||||||
@ -151,7 +148,7 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
|||||||
</$keyboard>
|
</$keyboard>
|
||||||
</span>
|
</span>
|
||||||
<span class="tc-edit-field-add-button">
|
<span class="tc-edit-field-add-button">
|
||||||
<$macrocall $name="new-field"/>
|
<$transclude $variable="new-field"/>
|
||||||
</span>
|
</span>
|
||||||
</$let>
|
</$let>
|
||||||
</$vars>
|
</$vars>
|
||||||
|
@ -2,15 +2,15 @@ title: $:/core/ui/EditTemplate/type
|
|||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[description]sort[group-sort]removeprefix[$:/language/Docs/Types/]search<userInput>]
|
first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[description]sort[group-sort]removeprefix[$:/language/Docs/Types/]search<userInput>]
|
||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/
|
\procedure lingo-base() $:/language/EditTemplate/
|
||||||
\define input-cancel-actions() <$list filter="[<storeTitle>get[text]] [<currentTiddler>get[type]] +[limit[1]]" emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>"""><$action-sendmessage $message="tm-remove-field" $param="type"/><$action-deletetiddler $filter="[<typeInputTiddler>] [<refreshTitle>] [<typeSelectionTiddler>]"/></$list>
|
\procedure input-cancel-actions() <$list filter="[<storeTitle>get[text]] [<currentTiddler>get[type]] :and[limit[1]]" emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>"""><$action-sendmessage $message="tm-remove-field" $param="type"/><$action-deletetiddler $filter="[<typeInputTiddler>] [<refreshTitle>] [<typeSelectionTiddler>]"/></$list>
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$set name="refreshTitle" value=<<qualify "$:/temp/type-search/refresh">>>
|
<$set name="refreshTitle" value=<<qualify "$:/temp/type-search/refresh">>>
|
||||||
<div class="tc-edit-type-selector-wrapper">
|
<div class="tc-edit-type-selector-wrapper">
|
||||||
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
||||||
<div class="tc-type-selector-dropdown-wrapper">
|
<div class="tc-type-selector-dropdown-wrapper">
|
||||||
<div class="tc-type-selector"><$fieldmangler>
|
<div class="tc-type-selector"><$fieldmangler>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> 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" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$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}}<$action-deletetiddler $filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
|
<$transclude $variable="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> 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]] :else[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$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}}<$action-deletetiddler $filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
|
||||||
</$fieldmangler></div>
|
</$fieldmangler></div>
|
||||||
|
|
||||||
<div class="tc-block-dropdown-wrapper">
|
<div class="tc-block-dropdown-wrapper">
|
||||||
@ -23,7 +23,7 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
|
|||||||
<$text text={{!!group}}/>
|
<$text text={{!!group}}/>
|
||||||
</div>
|
</div>
|
||||||
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
||||||
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"><span class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}><$link to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}><$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="description"/><$text text=" "/>(<$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="name"/>)</$link></span>
|
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] :and[sort[description]] :and[removeprefix[$:/language/Docs/Types/]] :and[search<userInput>]"><span class={{{ [<currentTiddler>addsuffix[-primaryList]] :except[<typeSelectionTiddler>get[text]] :and[then[]else[tc-list-item-selected]] }}}><$link to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}><$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="description"/><$text text=" "/>(<$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="name"/>)</$link></span>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -4,11 +4,15 @@ caption: {{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}}
|
|||||||
description: {{$:/language/Buttons/Cancel/Hint}}
|
description: {{$:/language/Buttons/Cancel/Hint}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$button actions=<<cancel-delete-tiddler-actions "cancel">> tooltip={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<<tv-config-toolbar-class>>>
|
<$button actions=<<cancel-delete-tiddler-actions "cancel">>
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
tooltip={{$:/language/Buttons/Cancel/Hint}}
|
||||||
|
aria-label={{$:/language/Buttons/Cancel/Hint}}
|
||||||
|
class=<<tv-config-toolbar-class>>
|
||||||
|
>
|
||||||
|
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
||||||
{{$:/core/images/cancel-button}}
|
{{$:/core/images/cancel-button}}
|
||||||
</$list>
|
<%endif%>
|
||||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
<%if [<tv-config-toolbar-text>match[yes]] %>
|
||||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>
|
||||||
</$list>
|
<%endif%>
|
||||||
</$button>
|
</$button>
|
||||||
|
@ -4,11 +4,15 @@ caption: {{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}}
|
|||||||
description: {{$:/language/Buttons/Delete/Hint}}
|
description: {{$:/language/Buttons/Delete/Hint}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$button actions=<<cancel-delete-tiddler-actions "delete">> tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<<tv-config-toolbar-class>>>
|
<$button actions=<<cancel-delete-tiddler-actions "delete">>
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
tooltip={{$:/language/Buttons/Delete/Hint}}
|
||||||
|
aria-label={{$:/language/Buttons/Delete/Hint}}
|
||||||
|
class=<<tv-config-toolbar-class>>
|
||||||
|
>
|
||||||
|
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
||||||
{{$:/core/images/delete-button}}
|
{{$:/core/images/delete-button}}
|
||||||
</$list>
|
<%endif%>
|
||||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
<%if [<tv-config-toolbar-text>match[yes]] %>
|
||||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>
|
||||||
</$list>
|
<%endif%>
|
||||||
</$button>
|
</$button>
|
||||||
|
@ -4,21 +4,20 @@ caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}
|
|||||||
description: {{$:/language/Buttons/Save/Hint}}
|
description: {{$:/language/Buttons/Save/Hint}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define save-tiddler-button()
|
\procedure save-tiddler-button()
|
||||||
\whitespace trim
|
|
||||||
<$fieldmangler>
|
<$fieldmangler>
|
||||||
<$button
|
<$button
|
||||||
tooltip={{$:/language/Buttons/Save/Hint}}
|
tooltip={{$:/language/Buttons/Save/Hint}}
|
||||||
aria-label={{$:/language/Buttons/Save/Caption}}
|
aria-label={{$:/language/Buttons/Save/Hint}}
|
||||||
class=<<tv-config-toolbar-class>>
|
class=<<tv-config-toolbar-class>>
|
||||||
>
|
>
|
||||||
<<save-tiddler-actions>>
|
<<save-tiddler-actions>>
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
||||||
{{$:/core/images/done-button}}
|
{{$:/core/images/done-button}}
|
||||||
</$list>
|
<%endif%>
|
||||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
<%if [<tv-config-toolbar-text>match[yes]] %>
|
||||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
|
||||||
</$list>
|
<%endif%>
|
||||||
</$button>
|
</$button>
|
||||||
</$fieldmangler>
|
</$fieldmangler>
|
||||||
\end
|
\end
|
||||||
|
@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/bold
|
icon: $:/core/images/bold
|
||||||
caption: {{$:/language/Buttons/Bold/Caption}}
|
caption: {{$:/language/Buttons/Bold/Caption}}
|
||||||
description: {{$:/language/Buttons/Bold/Hint}}
|
description: {{$:/language/Buttons/Bold/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((bold))
|
shortcuts: ((bold))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
@ -11,4 +11,5 @@ shortcuts: ((bold))
|
|||||||
$param="wrap-selection"
|
$param="wrap-selection"
|
||||||
prefix="''"
|
prefix="''"
|
||||||
suffix="''"
|
suffix="''"
|
||||||
|
trimSelection="yes"
|
||||||
/>
|
/>
|
||||||
|
@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/excise
|
icon: $:/core/images/excise
|
||||||
caption: {{$:/language/Buttons/Excise/Caption}}
|
caption: {{$:/language/Buttons/Excise/Caption}}
|
||||||
description: {{$:/language/Buttons/Excise/Hint}}
|
description: {{$:/language/Buttons/Excise/Hint}}
|
||||||
condition: [<targetTiddler>type[]] [<targetTiddler>type[text/vnd.tiddlywiki]] +[first[]]
|
condition: [<targetTiddler>type[]] [<targetTiddler>type[text/vnd.tiddlywiki]] [<targetTiddler>type[text/markdown]] [<targetTiddler>type[text/x-markdown]] +[first[]]
|
||||||
shortcuts: ((excise))
|
shortcuts: ((excise))
|
||||||
dropdown: $:/core/ui/EditorToolbar/excise-dropdown
|
dropdown: $:/core/ui/EditorToolbar/excise-dropdown
|
||||||
|
|
||||||
|
@ -1,20 +1,30 @@
|
|||||||
title: $:/core/ui/EditorToolbar/file-import
|
title: $:/core/ui/EditorToolbar/file-import
|
||||||
tags: $:/tags/EditorTools
|
tags: $:/tags/EditorTools
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>filter{$:/config/Editor/EnableImportFilter}]
|
||||||
|
|
||||||
\define lingo-base() $:/language/Import/
|
\procedure lingo-base() $:/language/Import/
|
||||||
|
|
||||||
\define closePopupActions()
|
\procedure closePopupActions()
|
||||||
<$action-deletetiddler $filter="[title<importState>] [title<importTitle>]"/>
|
<$action-deletetiddler $filter="[title<importState>] [title<importTitle>]"/>
|
||||||
\end
|
\end closePopupActions
|
||||||
|
|
||||||
\define replacement-text-image() [img[$title$]]
|
\procedure tw5-ImageTemplate() [img[$(currentTiddler)$]]
|
||||||
|
\procedure tw5-FileTemplate() [[$(currentTiddler)$]]
|
||||||
|
|
||||||
\define replacement-text-file() [[$title$]]
|
<!-- The following characters must be escaped in markdown: <>()\ -->
|
||||||
|
\function escape.title() [search-replace:g:regexp[\(|\)|<|>|\\],[\$&]]
|
||||||
|
\procedure markdown-ImageTemplate() ![](<#${ [<currentTiddler>escape.title[]] }$>)
|
||||||
|
\procedure markdown-FileTemplate() [](<#${ [<currentTiddler>escape.title[]] }$>)
|
||||||
|
|
||||||
\define postImportActions()
|
\function is.markdown.tiddler() [all[]type[text/x-markdown]] [all[]type[text/markdown]]
|
||||||
|
\function is.image() [get[type]prefix[image]]
|
||||||
|
\function get.markdown.link() [is.image[]then<markdown-ImageTemplate>else<markdown-FileTemplate>]
|
||||||
|
\function get.tw5.link() [is.image[]then<tw5-ImageTemplate>else<tw5-FileTemplate>]
|
||||||
|
\function get.link.template() [<storyTiddler>is.markdown.tiddler[]then<get.markdown.link>else<get.tw5.link>]
|
||||||
|
|
||||||
|
\procedure postImportActions()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$list filter="[<importTitle>links[]] :reduce[get[type]prefix[image]then<replacement-text-image>else<replacement-text-file>search-replace[$title$],<currentTiddler>addprefix<accumulator>]" variable="imageTitle">
|
<$list filter="[<importTitle>links[]] :reduce[get.link.template[]substitute[]addprefix<accumulator>]" variable="imageTitle">
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
$message="tm-edit-text-operation"
|
$message="tm-edit-text-operation"
|
||||||
$param="insert-text"
|
$param="insert-text"
|
||||||
@ -22,14 +32,14 @@ condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]
|
|||||||
/>
|
/>
|
||||||
</$list>
|
</$list>
|
||||||
<<closePopupActions>>
|
<<closePopupActions>>
|
||||||
\end
|
\end postImportActions
|
||||||
|
|
||||||
\define buttons()
|
\procedure buttons()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$button class="tc-btn-invisible" actions=<<closePopupActions>> ><<lingo Listing/Cancel/Caption>></$button>
|
<$button class="tc-btn-invisible" actions=<<closePopupActions>> ><<lingo Listing/Cancel/Caption>></$button>
|
||||||
 
|
 
|
||||||
<$button class="tc-btn-invisible" message="tm-perform-import" param=<<importTitle>> actions=<<postImportActions>> ><<lingo Listing/Import/Caption>></$button>
|
<$button class="tc-btn-invisible" message="tm-perform-import" param=<<importTitle>> actions=<<postImportActions>> ><<lingo Listing/Import/Caption>></$button>
|
||||||
\end
|
\end buttons
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$reveal type="popup" state=<<importState>> tag="div" class="tc-editor-importpopup">
|
<$reveal type="popup" state=<<importState>> tag="div" class="tc-editor-importpopup">
|
||||||
|
@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-1
|
icon: $:/core/images/heading-1
|
||||||
caption: {{$:/language/Buttons/Heading1/Caption}}
|
caption: {{$:/language/Buttons/Heading1/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading1/Hint}}
|
description: {{$:/language/Buttons/Heading1/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
button-classes: tc-text-editor-toolbar-item-start-group
|
button-classes: tc-text-editor-toolbar-item-start-group
|
||||||
shortcuts: ((heading-1))
|
shortcuts: ((heading-1))
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user