mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-03-03 06:19:50 +00:00
Compare commits
132 Commits
dynannotat
...
json-ops
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
162e4be9f2 | ||
|
|
1ef9d11ca3 | ||
|
|
c808764254 | ||
|
|
a9b0c5d7ff | ||
|
|
9e3c233686 | ||
|
|
8fabcabebb | ||
|
|
96cb66a27e | ||
|
|
6eb4fbeead | ||
|
|
7cbe1e1d83 | ||
|
|
5ea315fb98 | ||
|
|
855b6719d6 | ||
|
|
91cfb217d8 | ||
|
|
1a377a485b | ||
|
|
71ee271eac | ||
|
|
95e0fac655 | ||
|
|
084a5cb0f0 | ||
|
|
e9405ac810 | ||
|
|
775c7f0074 | ||
|
|
34f9cd952c | ||
|
|
e37f36f387 | ||
|
|
7a7d3571cc | ||
|
|
bc8c011eb3 | ||
|
|
b4deb7cc45 | ||
|
|
4b8594c4a8 | ||
|
|
9b9e443c73 | ||
|
|
f3bf5b6e85 | ||
|
|
5d55850c73 | ||
|
|
873ce4823f | ||
|
|
28f1d587b6 | ||
|
|
096b30f43b | ||
|
|
1d4418a777 | ||
|
|
03910fce66 | ||
|
|
0bffae2108 | ||
|
|
bdd99edfe8 | ||
|
|
9bcbb9131e | ||
|
|
1410488a23 | ||
|
|
e2ef5c933b | ||
|
|
3cf078faeb | ||
|
|
9bad66f02e | ||
|
|
ed4ccc4290 | ||
|
|
6e3f4c8772 | ||
|
|
400936920a | ||
|
|
c78bff5bb2 | ||
|
|
8b309ecb42 | ||
|
|
e2869e6ede | ||
|
|
8e25f693c6 | ||
|
|
42bf203758 | ||
|
|
f0416964fa | ||
|
|
8dec674121 | ||
|
|
16f56af873 | ||
|
|
e9fa861418 | ||
|
|
5ab2148807 | ||
|
|
396e7e6921 | ||
|
|
3d2663c900 | ||
|
|
d31839d1e8 | ||
|
|
7d404e4ec5 | ||
|
|
5356345f19 | ||
|
|
f3ee7f429c | ||
|
|
59417f0896 | ||
|
|
2ab0f762e0 | ||
|
|
deeef27cff | ||
|
|
7459ccfed5 | ||
|
|
8d5c94e028 | ||
|
|
6d2d3396ac | ||
|
|
dc2c4635c1 | ||
|
|
fd0b985ac5 | ||
|
|
eb0b2a8d8e | ||
|
|
7d6923f3d6 | ||
|
|
05375e093c | ||
|
|
cc25e1f5b4 | ||
|
|
b3b3020d99 | ||
|
|
383c8b5e49 | ||
|
|
2fd17e864c | ||
|
|
030155ec27 | ||
|
|
58dd47d128 | ||
|
|
8a9d48e055 | ||
|
|
6c505ebc49 | ||
|
|
ae9a183a53 | ||
|
|
b9fec0c669 | ||
|
|
093cda65fb | ||
|
|
73138b79aa | ||
|
|
6624ce3716 | ||
|
|
c5ea6628f5 | ||
|
|
ad512be04e | ||
|
|
39e4e69ae7 | ||
|
|
8990423374 | ||
|
|
e28af8d594 | ||
|
|
2ab4e965b2 | ||
|
|
4b100503da | ||
|
|
1f14969ab8 | ||
|
|
0b6a345208 | ||
|
|
f97b25676e | ||
|
|
b5ad5c3421 | ||
|
|
2391675e9c | ||
|
|
def8e6d354 | ||
|
|
6701683ddf | ||
|
|
4a9cf67a25 | ||
|
|
5e38f1b0b8 | ||
|
|
73a9625b81 | ||
|
|
bc242cf83a | ||
|
|
051b29c5b3 | ||
|
|
e4b2698380 | ||
|
|
6e89ecd13a | ||
|
|
55eb37222a | ||
|
|
ff42a9e4d4 | ||
|
|
778581b4ff | ||
|
|
dafb3f1c4f | ||
|
|
adcef4f803 | ||
|
|
321f417d58 | ||
|
|
08d9c90dc5 | ||
|
|
6dbb3ee36e | ||
|
|
c920960942 | ||
|
|
ad490017f8 | ||
|
|
e84acf97de | ||
|
|
6a5d73dae6 | ||
|
|
98a509dbf3 | ||
|
|
5d69fe7bef | ||
|
|
b9ae6607c0 | ||
|
|
758d590837 | ||
|
|
1c16f12d6f | ||
|
|
9922701304 | ||
|
|
76236f5ebe | ||
|
|
aec2ad2d12 | ||
|
|
bd6ea2d6a9 | ||
|
|
74d63c7003 | ||
|
|
e26a4d8cb5 | ||
|
|
d1bc079138 | ||
|
|
ffd3599369 | ||
|
|
bfa5882175 | ||
|
|
258f4acb10 | ||
|
|
7e85ec35d3 | ||
|
|
5f4dc2a5fe |
43
.github/ISSUE_TEMPLATE/bug_report.md
vendored
43
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,43 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve TiddlyWiki 5
|
|
||||||
title: "[BUG]"
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**TiddlyWiki Configuration (please complete the following information):**
|
|
||||||
- Version [e.g. v5.1.24]
|
|
||||||
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
|
||||||
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Browser [e.g. chrome, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
|
||||||
- Device: [e.g. iPhone6]
|
|
||||||
- OS: [e.g. iOS8.1]
|
|
||||||
- Browser [e.g. stock browser, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
67
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
67
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: Create a report to help us improve TiddlyWiki 5
|
||||||
|
title: "[BUG] "
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: Describe
|
||||||
|
attributes:
|
||||||
|
label: Describe the bug
|
||||||
|
description: A clear and concise description of what the bug is.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: Expected
|
||||||
|
attributes:
|
||||||
|
label: Expected behavior
|
||||||
|
description: A clear and concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: Reproduce
|
||||||
|
attributes:
|
||||||
|
label: To Reproduce
|
||||||
|
description: "Steps to reproduce the behavior:"
|
||||||
|
value: |
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: Screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem.
|
||||||
|
placeholder: Drag image here to upload screenshot!
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: Configuration
|
||||||
|
attributes:
|
||||||
|
label: TiddlyWiki Configuration
|
||||||
|
description: please complete the following information
|
||||||
|
value: |
|
||||||
|
- Version [e.g. v5.1.24]
|
||||||
|
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
||||||
|
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
||||||
|
|
||||||
|
### Desktop (please complete the following information):
|
||||||
|
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
### Smartphone (please complete the following information):
|
||||||
|
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: Context
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Discuss feature request
|
||||||
|
url: https://github.com/Jermolene/TiddlyWiki5/discussions
|
||||||
|
about: Open new discussion about new feature
|
||||||
|
- name: Talk.Tiddlywiki Forum
|
||||||
|
url: https://talk.tiddlywiki.org
|
||||||
|
about: Join the Forum
|
||||||
@@ -20,3 +20,11 @@ A clear and concise description of any alternative solutions or features you've
|
|||||||
Add any other context or screenshots about the feature request here.
|
Add any other context or screenshots about the feature request here.
|
||||||
|
|
||||||
If you link to discussions elsewhere then please copy and paste the important text, and don't expect readers to scan the entire discussion to find the relevant part.
|
If you link to discussions elsewhere then please copy and paste the important text, and don't expect readers to scan the entire discussion to find the relevant part.
|
||||||
|
|
||||||
|
## Checklist before requesting a review
|
||||||
|
|
||||||
|
- [ ] Illustrate any visual changes (however minor) with before/after screenshots
|
||||||
|
- [ ] Self-review of code
|
||||||
|
- [ ] Documentation updates (for user-visible changes)
|
||||||
|
- [ ] Tests (for core code changes)
|
||||||
|
- [ ] Complies with coding style guidelines (for JavaScript code)
|
||||||
|
|||||||
@@ -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.2.2
|
TW5_BUILD_VERSION=v5.2.3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
|
|||||||
@@ -2596,7 +2596,7 @@ $tw.boot.isStartupTaskEligible = function(taskModule) {
|
|||||||
for(t=0; t<remaining.length; t++) {
|
for(t=0; t<remaining.length; t++) {
|
||||||
var task = remaining[t];
|
var task = remaining[t];
|
||||||
if(task.before && task.before.indexOf(name) !== -1) {
|
if(task.before && task.before.indexOf(name) !== -1) {
|
||||||
if($tw.boot.doesTaskMatchPlatform(task) || (task.name && $tw.boot.disabledStartupModules.indexOf(name) !== -1)) {
|
if($tw.boot.doesTaskMatchPlatform(task) && (!task.name || $tw.boot.disabledStartupModules.indexOf(task.name) === -1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,6 +3,7 @@ title: $:/language/Help/default
|
|||||||
\define commandTitle()
|
\define commandTitle()
|
||||||
$:/language/Help/$(command)$
|
$:/language/Help/$(command)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
```
|
```
|
||||||
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
|
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
|
||||||
```
|
```
|
||||||
@@ -11,7 +12,9 @@ Available commands:
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<$list filter="[commands[]sort[title]]" variable="command">
|
<$list filter="[commands[]sort[title]]" variable="command">
|
||||||
<li><$link to=<<commandTitle>>><$macrocall $name="command" $type="text/plain" $output="text/plain"/></$link>: <$transclude tiddler=<<commandTitle>> field="description"/></li>
|
<li><$link to=<<commandTitle>>><$macrocall $name="command" $type="text/plain" $output="text/plain"/></$link>:
|
||||||
|
 
|
||||||
|
<$transclude tiddler=<<commandTitle>> field="description"/></li>
|
||||||
</$list>
|
</$list>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -8,46 +8,60 @@ Saves individual tiddlers in their raw text or binary format to the specified fi
|
|||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
|
|
||||||
/*jslint node: true, browser: true */
|
/*jslint node: true, browser: true */
|
||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
name: "save",
|
name: "save",
|
||||||
synchronous: true
|
synchronous: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var Command = function(params,commander,callback) {
|
var Command = function(params,commander,callback) {
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.commander = commander;
|
this.commander = commander;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
Command.prototype.execute = function() {
|
Command.prototype.execute = function() {
|
||||||
if(this.params.length < 1) {
|
if(this.params.length < 1) {
|
||||||
return "Missing filename filter";
|
return "Missing filename filter";
|
||||||
}
|
|
||||||
var self = this,
|
|
||||||
fs = require("fs"),
|
|
||||||
path = require("path"),
|
|
||||||
wiki = this.commander.wiki,
|
|
||||||
tiddlerFilter = this.params[0],
|
|
||||||
filenameFilter = this.params[1] || "[is[tiddler]]",
|
|
||||||
tiddlers = wiki.filterTiddlers(tiddlerFilter);
|
|
||||||
$tw.utils.each(tiddlers,function(title) {
|
|
||||||
var tiddler = self.commander.wiki.getTiddler(title),
|
|
||||||
type = tiddler.fields.type || "text/vnd.tiddlywiki",
|
|
||||||
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
|
|
||||||
filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
|
|
||||||
if(self.commander.verbose) {
|
|
||||||
console.log("Saving \"" + title + "\" to \"" + filepath + "\"");
|
|
||||||
}
|
}
|
||||||
$tw.utils.createFileDirectories(filepath);
|
var self = this,
|
||||||
fs.writeFileSync(filepath,tiddler.fields.text,contentTypeInfo.encoding);
|
fs = require("fs"),
|
||||||
});
|
path = require("path"),
|
||||||
return null;
|
result = null,
|
||||||
};
|
wiki = this.commander.wiki,
|
||||||
|
tiddlerFilter = this.params[0],
|
||||||
exports.Command = Command;
|
filenameFilter = this.params[1] || "[is[tiddler]]",
|
||||||
|
tiddlers = wiki.filterTiddlers(tiddlerFilter);
|
||||||
})();
|
$tw.utils.each(tiddlers,function(title) {
|
||||||
|
if(!result) {
|
||||||
|
var tiddler = self.commander.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
|
var fileInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
|
||||||
|
directory: path.resolve(self.commander.outputPath),
|
||||||
|
pathFilters: [filenameFilter],
|
||||||
|
wiki: wiki,
|
||||||
|
fileInfo: {}
|
||||||
|
});
|
||||||
|
if(self.commander.verbose) {
|
||||||
|
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
$tw.utils.saveTiddlerToFileSync(tiddler,fileInfo);
|
||||||
|
} catch (err) {
|
||||||
|
result = "Error saving tiddler \"" + title + "\", to file: \"" + fileInfo.filepath + "\"";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = "Tiddler '" + title + "' not found";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
@@ -34,8 +34,10 @@ function FramedEngine(options) {
|
|||||||
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
|
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
|
||||||
this.iframeDoc = this.iframeNode.contentWindow.document;
|
this.iframeDoc = this.iframeNode.contentWindow.document;
|
||||||
// (Firefox requires us to put some empty content in the iframe)
|
// (Firefox requires us to put some empty content in the iframe)
|
||||||
|
var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette");
|
||||||
|
var colorScheme = this.widget.wiki.getTiddler(paletteTitle).fields["color-scheme"] || "light";
|
||||||
this.iframeDoc.open();
|
this.iframeDoc.open();
|
||||||
this.iframeDoc.write("");
|
this.iframeDoc.write("<meta name='color-scheme' content='" + colorScheme + "'>");
|
||||||
this.iframeDoc.close();
|
this.iframeDoc.close();
|
||||||
// Style the iframe
|
// Style the iframe
|
||||||
this.iframeNode.className = this.dummyTextArea.className;
|
this.iframeNode.className = this.dummyTextArea.className;
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ exports["prefix-lines"] = function(event,operation) {
|
|||||||
$tw.utils.each(lines,function(line,index) {
|
$tw.utils.each(lines,function(line,index) {
|
||||||
// Remove and count any existing prefix characters
|
// Remove and count any existing prefix characters
|
||||||
var count = 0;
|
var count = 0;
|
||||||
while(line.charAt(0) === event.paramObject.character) {
|
while($tw.utils.startsWith(line,event.paramObject.character)) {
|
||||||
line = line.substring(1);
|
line = line.substring(event.paramObject.character.length);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
// Remove any whitespace
|
// Remove any whitespace
|
||||||
|
|||||||
@@ -15,16 +15,33 @@ Text editor operation to wrap the selected lines with a prefix and suffix
|
|||||||
exports["wrap-lines"] = function(event,operation) {
|
exports["wrap-lines"] = function(event,operation) {
|
||||||
var prefix = event.paramObject.prefix || "",
|
var prefix = event.paramObject.prefix || "",
|
||||||
suffix = event.paramObject.suffix || "";
|
suffix = event.paramObject.suffix || "";
|
||||||
// Cut just past the preceding line break, or the start of the text
|
if($tw.utils.endsWith(operation.text.substring(0,operation.selStart), prefix + "\n") &&
|
||||||
operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);
|
$tw.utils.startsWith(operation.text.substring(operation.selEnd), "\n" + suffix)) {
|
||||||
// Cut to just past the following line break, or to the end of the text
|
// Selected text is already surrounded by prefix and suffix: Remove them
|
||||||
operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);
|
// Cut selected text plus prefix and suffix
|
||||||
// Add the prefix and suffix
|
operation.cutStart = operation.selStart - (prefix.length + 1);
|
||||||
operation.replacement = prefix + "\n" +
|
operation.cutEnd = operation.selEnd + suffix.length + 1;
|
||||||
operation.text.substring(operation.cutStart,operation.cutEnd) + "\n" +
|
// Also cut the following newline (if there is any)
|
||||||
suffix + "\n";
|
if (operation.text[operation.cutEnd] === "\n") {
|
||||||
operation.newSelStart = operation.cutStart + prefix.length + 1;
|
operation.cutEnd++;
|
||||||
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
|
}
|
||||||
|
// Replace with selection
|
||||||
|
operation.replacement = operation.text.substring(operation.selStart,operation.selEnd);
|
||||||
|
// Select text that was in between prefix and suffix
|
||||||
|
operation.newSelStart = operation.cutStart;
|
||||||
|
operation.newSelEnd = operation.selEnd - (prefix.length + 1);
|
||||||
|
} else {
|
||||||
|
// Cut just past the preceding line break, or the start of the text
|
||||||
|
operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);
|
||||||
|
// Cut to just past the following line break, or to the end of the text
|
||||||
|
operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);
|
||||||
|
// Add the prefix and suffix
|
||||||
|
operation.replacement = prefix + "\n" +
|
||||||
|
operation.text.substring(operation.cutStart,operation.cutEnd) + "\n" +
|
||||||
|
suffix + "\n";
|
||||||
|
operation.newSelStart = operation.cutStart + prefix.length + 1;
|
||||||
|
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
167
core/modules/filters/json-ops.js
Normal file
167
core/modules/filters/json-ops.js
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/filters/json-ops.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: filteroperator
|
||||||
|
|
||||||
|
Filter operators for JSON operations
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
exports["jsonget"] = function(source,operator,options) {
|
||||||
|
var results = [];
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
var data = options.wiki.getTiddlerDataCached(title);
|
||||||
|
if(data) {
|
||||||
|
var item = getDataItemValueAsStrings(data,operator.operands);
|
||||||
|
if(item !== undefined) {
|
||||||
|
results.push.apply(results,item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["jsonindexes"] = function(source,operator,options) {
|
||||||
|
var results = [];
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
var data = options.wiki.getTiddlerDataCached(title);
|
||||||
|
if(data) {
|
||||||
|
var item = getDataItemKeysAsStrings(data,operator.operands);
|
||||||
|
if(item !== undefined) {
|
||||||
|
results.push.apply(results,item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["jsontype"] = function(source,operator,options) {
|
||||||
|
var results = [];
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
var data = options.wiki.getTiddlerDataCached(title);
|
||||||
|
if(data) {
|
||||||
|
var item = getDataItemType(data,operator.operands);
|
||||||
|
if(item !== undefined) {
|
||||||
|
results.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Given a JSON data structure and an array of index strings, return an array of the string representation of the values at the end of the index chain, or "undefined" if any of the index strings are invalid
|
||||||
|
*/
|
||||||
|
function getDataItemValueAsStrings(data,indexes) {
|
||||||
|
// Get the item
|
||||||
|
var item = getDataItem(data,indexes);
|
||||||
|
// Return the item as a string
|
||||||
|
return convertDataItemValueToStrings(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Given a JSON data structure and an array of index strings, return an array of the string representation of the keys of the item at the end of the index chain, or "undefined" if any of the index strings are invalid
|
||||||
|
*/
|
||||||
|
function getDataItemKeysAsStrings(data,indexes) {
|
||||||
|
// Get the item
|
||||||
|
var item = getDataItem(data,indexes);
|
||||||
|
// Return the item keys as a string
|
||||||
|
return convertDataItemKeysToStrings(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Return an array of the string representation of the values of a data item, or "undefined" if the item is undefined
|
||||||
|
*/
|
||||||
|
function convertDataItemValueToStrings(item) {
|
||||||
|
// Return the item as a string
|
||||||
|
if(item === undefined) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
if(typeof item === "object") {
|
||||||
|
if(item === null) {
|
||||||
|
return ["null"];
|
||||||
|
}
|
||||||
|
var results = [];
|
||||||
|
if($tw.utils.isArray(item)) {
|
||||||
|
$tw.utils.each(item,function(value) {
|
||||||
|
results.push.apply(results,convertDataItemValueToStrings(value));
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
} else {
|
||||||
|
$tw.utils.each(Object.keys(item).sort(),function(key) {
|
||||||
|
results.push.apply(results,convertDataItemValueToStrings(item[key]));
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [item.toString()];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Return an array of the string representation of the keys of a data item, or "undefined" if the item is undefined
|
||||||
|
*/
|
||||||
|
function convertDataItemKeysToStrings(item) {
|
||||||
|
// Return the item as a string
|
||||||
|
if(item === undefined) {
|
||||||
|
return item;
|
||||||
|
} else if(typeof item === "object") {
|
||||||
|
if(item === null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
var results = [];
|
||||||
|
if($tw.utils.isArray(item)) {
|
||||||
|
for(var i=0; i<item.length; i++) {
|
||||||
|
results.push(i.toString());
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
} else {
|
||||||
|
$tw.utils.each(Object.keys(item).sort(),function(key) {
|
||||||
|
results.push(key);
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDataItemType(data,indexes) {
|
||||||
|
// Get the item
|
||||||
|
var item = getDataItem(data,indexes);
|
||||||
|
// Return the item type
|
||||||
|
if(item === undefined) {
|
||||||
|
return item;
|
||||||
|
} else if(item === null) {
|
||||||
|
return "null";
|
||||||
|
} else if($tw.utils.isArray(item)) {
|
||||||
|
return "array";
|
||||||
|
} else if(typeof item === "object") {
|
||||||
|
return "object";
|
||||||
|
} else {
|
||||||
|
return typeof item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Given a JSON data structure and an array of index strings, return the value at the end of the index chain, or "undefined" if any of the index strings are invalid
|
||||||
|
*/
|
||||||
|
function getDataItem(data,indexes) {
|
||||||
|
if(indexes.length === 0 || (indexes.length === 1 && indexes[0] === "")) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
// Get the item
|
||||||
|
var item = data;
|
||||||
|
for(var i=0; i<indexes.length; i++) {
|
||||||
|
if(item !== undefined) {
|
||||||
|
item = item[indexes[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
@@ -80,6 +80,7 @@ PutSaver.prototype.save = function(text,method,callback) {
|
|||||||
if(this.etag) {
|
if(this.etag) {
|
||||||
headers["If-Match"] = this.etag;
|
headers["If-Match"] = this.etag;
|
||||||
}
|
}
|
||||||
|
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
||||||
$tw.utils.httpRequest({
|
$tw.utils.httpRequest({
|
||||||
url: this.uri(),
|
url: this.uri(),
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
@@ -87,17 +88,20 @@ PutSaver.prototype.save = function(text,method,callback) {
|
|||||||
data: text,
|
data: text,
|
||||||
callback: function(err,data,xhr) {
|
callback: function(err,data,xhr) {
|
||||||
if(err) {
|
if(err) {
|
||||||
// response is textual: "XMLHttpRequest error code: 412"
|
var status = xhr.status,
|
||||||
var status = Number(err.substring(err.indexOf(':') + 2, err.length))
|
errorMsg = err;
|
||||||
if(status === 412) { // file changed on server
|
if(status === 412) { // file changed on server
|
||||||
callback($tw.language.getString("Error/PutEditConflict"));
|
errorMsg = $tw.language.getString("Error/PutEditConflict");
|
||||||
} else if(status === 401) { // authentication required
|
} else if(status === 401) { // authentication required
|
||||||
callback($tw.language.getString("Error/PutUnauthorized"));
|
errorMsg = $tw.language.getString("Error/PutUnauthorized");
|
||||||
} else if(status === 403) { // permission denied
|
} else if(status === 403) { // permission denied
|
||||||
callback($tw.language.getString("Error/PutForbidden"));
|
errorMsg = $tw.language.getString("Error/PutForbidden");
|
||||||
} else {
|
|
||||||
callback(err); // fail
|
|
||||||
}
|
}
|
||||||
|
if (xhr.responseText) {
|
||||||
|
// treat any server response like a plain text error explanation
|
||||||
|
errorMsg = errorMsg + "\n\n" + xhr.responseText;
|
||||||
|
}
|
||||||
|
callback(errorMsg); // fail
|
||||||
} else {
|
} else {
|
||||||
self.etag = xhr.getResponseHeader("ETag");
|
self.etag = xhr.getResponseHeader("ETag");
|
||||||
if(self.etag == null) {
|
if(self.etag == null) {
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ UploadSaver.prototype.save = function(text,method,callback) {
|
|||||||
var tail = "\r\n--" + boundary + "--\r\n",
|
var tail = "\r\n--" + boundary + "--\r\n",
|
||||||
data = head.join("\r\n") + text + tail;
|
data = head.join("\r\n") + text + tail;
|
||||||
// Do the HTTP post
|
// Do the HTTP post
|
||||||
|
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
||||||
var http = new XMLHttpRequest();
|
var http = new XMLHttpRequest();
|
||||||
http.open("POST",url,true,username,password);
|
http.open("POST",url,true,username,password);
|
||||||
http.setRequestHeader("Content-Type","multipart/form-data; charset=UTF-8; boundary=" + boundary);
|
http.setRequestHeader("Content-Type","multipart/form-data; charset=UTF-8; boundary=" + boundary);
|
||||||
@@ -81,7 +82,6 @@ UploadSaver.prototype.save = function(text,method,callback) {
|
|||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
return callback($tw.language.getString("Error/Caption") + ":" + ex);
|
return callback($tw.language.getString("Error/Caption") + ":" + ex);
|
||||||
}
|
}
|
||||||
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -281,5 +281,56 @@ exports.getLocationPath = function() {
|
|||||||
return window.location.toString().split("#")[0];
|
return window.location.toString().split("#")[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Collect DOM variables
|
||||||
|
*/
|
||||||
|
exports.collectDOMVariables = function(selectedNode,domNode,event) {
|
||||||
|
var variables = {},
|
||||||
|
selectedNodeRect,
|
||||||
|
domNodeRect;
|
||||||
|
if(selectedNode) {
|
||||||
|
$tw.utils.each(selectedNode.attributes,function(attribute) {
|
||||||
|
variables["dom-" + attribute.name] = attribute.value.toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
if(selectedNode.offsetLeft) {
|
||||||
|
// Add a variable with a popup coordinate string for the selected node
|
||||||
|
variables["tv-popup-coords"] = "(" + selectedNode.offsetLeft + "," + selectedNode.offsetTop +"," + selectedNode.offsetWidth + "," + selectedNode.offsetHeight + ")";
|
||||||
|
|
||||||
|
// Add variables for offset of selected node
|
||||||
|
variables["tv-selectednode-posx"] = selectedNode.offsetLeft.toString();
|
||||||
|
variables["tv-selectednode-posy"] = selectedNode.offsetTop.toString();
|
||||||
|
variables["tv-selectednode-width"] = selectedNode.offsetWidth.toString();
|
||||||
|
variables["tv-selectednode-height"] = selectedNode.offsetHeight.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(domNode && domNode.offsetWidth) {
|
||||||
|
variables["tv-widgetnode-width"] = domNode.offsetWidth.toString();
|
||||||
|
variables["tv-widgetnode-height"] = domNode.offsetHeight.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event && event.clientX && event.clientY) {
|
||||||
|
if(selectedNode) {
|
||||||
|
// Add variables for event X and Y position relative to selected node
|
||||||
|
selectedNodeRect = selectedNode.getBoundingClientRect();
|
||||||
|
variables["event-fromselected-posx"] = (event.clientX - selectedNodeRect.left).toString();
|
||||||
|
variables["event-fromselected-posy"] = (event.clientY - selectedNodeRect.top).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(domNode) {
|
||||||
|
// Add variables for event X and Y position relative to event catcher node
|
||||||
|
domNodeRect = domNode.getBoundingClientRect();
|
||||||
|
variables["event-fromcatcher-posx"] = (event.clientX - domNodeRect.left).toString();
|
||||||
|
variables["event-fromcatcher-posy"] = (event.clientY - domNodeRect.top).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add variables for event X and Y position relative to the viewport
|
||||||
|
variables["event-fromviewport-posx"] = event.clientX.toString();
|
||||||
|
variables["event-fromviewport-posy"] = event.clientY.toString();
|
||||||
|
}
|
||||||
|
return variables;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ exports.makeDraggable = function(options) {
|
|||||||
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
|
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
|
||||||
dragFilter = options.dragFilterFn && options.dragFilterFn(),
|
dragFilter = options.dragFilterFn && options.dragFilterFn(),
|
||||||
titles = dragTiddler ? [dragTiddler] : [],
|
titles = dragTiddler ? [dragTiddler] : [],
|
||||||
startActions = options.startActions;
|
startActions = options.startActions,
|
||||||
|
variables,
|
||||||
|
domNodeRect;
|
||||||
if(dragFilter) {
|
if(dragFilter) {
|
||||||
titles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));
|
titles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));
|
||||||
}
|
}
|
||||||
@@ -54,7 +56,11 @@ exports.makeDraggable = function(options) {
|
|||||||
$tw.utils.addClass(event.target,"tc-dragging");
|
$tw.utils.addClass(event.target,"tc-dragging");
|
||||||
// Invoke drag-start actions if given
|
// Invoke drag-start actions if given
|
||||||
if(startActions !== undefined) {
|
if(startActions !== undefined) {
|
||||||
options.widget.invokeActionString(startActions,options.widget,event,{actionTiddler: titleString});
|
// Collect our variables
|
||||||
|
variables = $tw.utils.collectDOMVariables(domNode,null,event);
|
||||||
|
variables.modifier = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
|
||||||
|
variables["actionTiddler"] = titleString;
|
||||||
|
options.widget.invokeActionString(startActions,options.widget,event,variables);
|
||||||
}
|
}
|
||||||
// Create the drag image elements
|
// Create the drag image elements
|
||||||
dragImage = options.widget.document.createElement("div");
|
dragImage = options.widget.document.createElement("div");
|
||||||
@@ -114,7 +120,8 @@ exports.makeDraggable = function(options) {
|
|||||||
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
|
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
|
||||||
dragFilter = options.dragFilterFn && options.dragFilterFn(),
|
dragFilter = options.dragFilterFn && options.dragFilterFn(),
|
||||||
titles = dragTiddler ? [dragTiddler] : [],
|
titles = dragTiddler ? [dragTiddler] : [],
|
||||||
endActions = options.endActions;
|
endActions = options.endActions,
|
||||||
|
variables;
|
||||||
if(dragFilter) {
|
if(dragFilter) {
|
||||||
titles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));
|
titles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));
|
||||||
}
|
}
|
||||||
@@ -122,7 +129,10 @@ exports.makeDraggable = function(options) {
|
|||||||
$tw.dragInProgress = null;
|
$tw.dragInProgress = null;
|
||||||
// Invoke drag-end actions if given
|
// Invoke drag-end actions if given
|
||||||
if(endActions !== undefined) {
|
if(endActions !== undefined) {
|
||||||
options.widget.invokeActionString(endActions,options.widget,event,{actionTiddler: titleString});
|
variables = $tw.utils.collectDOMVariables(domNode,null,event);
|
||||||
|
variables.modifier = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
|
||||||
|
variables["actionTiddler"] = titleString;
|
||||||
|
options.widget.invokeActionString(endActions,options.widget,event,variables);
|
||||||
}
|
}
|
||||||
// Remove the dragging class on the element being dragged
|
// Remove the dragging class on the element being dragged
|
||||||
$tw.utils.removeClass(event.target,"tc-dragging");
|
$tw.utils.removeClass(event.target,"tc-dragging");
|
||||||
|
|||||||
@@ -13,8 +13,26 @@ Parse tree utility functions.
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.addAttributeToParseTreeNode = function(node,name,value) {
|
exports.addAttributeToParseTreeNode = function(node,name,value) {
|
||||||
|
var attribute = {name: name, type: "string", value: value};
|
||||||
node.attributes = node.attributes || {};
|
node.attributes = node.attributes || {};
|
||||||
node.attributes[name] = {type: "string", value: value};
|
node.attributes[name] = attribute;
|
||||||
|
if(node.orderedAttributes) {
|
||||||
|
node.orderedAttributes.push(attribute);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.getOrderedAttributesFromParseTreeNode = function(node) {
|
||||||
|
if(node.orderedAttributes) {
|
||||||
|
return node.orderedAttributes;
|
||||||
|
} else {
|
||||||
|
var attributes = [];
|
||||||
|
$tw.utils.each(node.attributes,function(attribute) {
|
||||||
|
attributes.push(attribute);
|
||||||
|
});
|
||||||
|
return attributes.sort(function(a,b) {
|
||||||
|
return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
||||||
@@ -25,26 +43,45 @@ exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.addClassToParseTreeNode = function(node,classString) {
|
exports.addClassToParseTreeNode = function(node,classString) {
|
||||||
var classes = [];
|
var classes = [],
|
||||||
|
attribute;
|
||||||
node.attributes = node.attributes || {};
|
node.attributes = node.attributes || {};
|
||||||
node.attributes["class"] = node.attributes["class"] || {type: "string", value: ""};
|
attribute = node.attributes["class"];
|
||||||
if(node.attributes["class"].type === "string") {
|
if(!attribute) {
|
||||||
if(node.attributes["class"].value !== "") {
|
// If the class attribute does not exist, we must create it first.
|
||||||
classes = node.attributes["class"].value.split(" ");
|
attribute = {name: "class", type: "string", value: ""};
|
||||||
|
node.attributes["class"] = attribute;
|
||||||
|
if(node.orderedAttributes) {
|
||||||
|
// If there are orderedAttributes, we've got to add them there too.
|
||||||
|
node.orderedAttributes.push(attribute);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(attribute.type === "string") {
|
||||||
|
if(attribute.value !== "") {
|
||||||
|
classes = attribute.value.split(" ");
|
||||||
}
|
}
|
||||||
if(classString !== "") {
|
if(classString !== "") {
|
||||||
$tw.utils.pushTop(classes,classString.split(" "));
|
$tw.utils.pushTop(classes,classString.split(" "));
|
||||||
}
|
}
|
||||||
node.attributes["class"].value = classes.join(" ");
|
attribute.value = classes.join(" ");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.addStyleToParseTreeNode = function(node,name,value) {
|
exports.addStyleToParseTreeNode = function(node,name,value) {
|
||||||
node.attributes = node.attributes || {};
|
var attribute;
|
||||||
node.attributes.style = node.attributes.style || {type: "string", value: ""};
|
node.attributes = node.attributes || {};
|
||||||
if(node.attributes.style.type === "string") {
|
attribute = node.attributes.style;
|
||||||
node.attributes.style.value += name + ":" + value + ";";
|
if(!attribute) {
|
||||||
|
attribute = {name: "style", type: "string", value: ""};
|
||||||
|
node.attributes.style = attribute;
|
||||||
|
if(node.orderedAttributes) {
|
||||||
|
// If there are orderedAttributes, we've got to add them there too.
|
||||||
|
node.orderedAttributes.push(attribute);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(attribute.type === "string") {
|
||||||
|
attribute.value += name + ":" + value + ";";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.findParseTreeNode = function(nodeArray,search) {
|
exports.findParseTreeNode = function(nodeArray,search) {
|
||||||
|
|||||||
@@ -95,6 +95,20 @@ exports.repeat = function(str,count) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check if a string starts with another string
|
||||||
|
*/
|
||||||
|
exports.startsWith = function(str,search) {
|
||||||
|
return str.substring(0, search.length) === search;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check if a string ends with another string
|
||||||
|
*/
|
||||||
|
exports.endsWith = function(str,search) {
|
||||||
|
return str.substring(str.length - search.length) === search;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Trim whitespace from the start and end of a string
|
Trim whitespace from the start and end of a string
|
||||||
Thanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript
|
Thanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript
|
||||||
@@ -448,7 +462,7 @@ exports.formatDateString = function(date,template) {
|
|||||||
// 'return raw UTC (tiddlywiki style) date string.'
|
// 'return raw UTC (tiddlywiki style) date string.'
|
||||||
if(t.indexOf("[UTC]") == 0 ) {
|
if(t.indexOf("[UTC]") == 0 ) {
|
||||||
if(t == "[UTC]YYYY0MM0DD0hh0mm0ssXXX")
|
if(t == "[UTC]YYYY0MM0DD0hh0mm0ssXXX")
|
||||||
return $tw.utils.stringifyDate(new Date());
|
return $tw.utils.stringifyDate(date || new Date());
|
||||||
var offset = date.getTimezoneOffset() ; // in minutes
|
var offset = date.getTimezoneOffset() ; // in minutes
|
||||||
date = new Date(date.getTime()+offset*60*1000) ;
|
date = new Date(date.getTime()+offset*60*1000) ;
|
||||||
t = t.substr(5) ;
|
t = t.substr(5) ;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ SetFieldWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
Compute the internal state of the widget
|
Compute the internal state of the widget
|
||||||
*/
|
*/
|
||||||
SetFieldWidget.prototype.execute = function() {
|
SetFieldWidget.prototype.execute = function() {
|
||||||
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
this.actionTiddler = this.getAttribute("$tiddler") || (!this.hasParseTreeNodeAttribute("$tiddler") && this.getVariable("currentTiddler"));
|
||||||
this.actionField = this.getAttribute("$field");
|
this.actionField = this.getAttribute("$field");
|
||||||
this.actionIndex = this.getAttribute("$index");
|
this.actionIndex = this.getAttribute("$index");
|
||||||
this.actionValue = this.getAttribute("$value");
|
this.actionValue = this.getAttribute("$value");
|
||||||
@@ -46,11 +46,7 @@ SetFieldWidget.prototype.execute = function() {
|
|||||||
Refresh the widget by ensuring our attributes are up to date
|
Refresh the widget by ensuring our attributes are up to date
|
||||||
*/
|
*/
|
||||||
SetFieldWidget.prototype.refresh = function(changedTiddlers) {
|
SetFieldWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
// Nothing to refresh
|
||||||
if(changedAttributes["$tiddler"] || changedAttributes["$field"] || changedAttributes["$index"] || changedAttributes["$value"]) {
|
|
||||||
this.refreshSelf();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return this.refreshChildren(changedTiddlers);
|
return this.refreshChildren(changedTiddlers);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,15 +56,17 @@ Invoke the action associated with this widget
|
|||||||
SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||||
var self = this,
|
var self = this,
|
||||||
options = {};
|
options = {};
|
||||||
options.suppressTimestamp = !this.actionTimestamp;
|
if(this.actionTiddler) {
|
||||||
if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) {
|
options.suppressTimestamp = !this.actionTimestamp;
|
||||||
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);
|
if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) {
|
||||||
}
|
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);
|
||||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
|
||||||
if(name.charAt(0) !== "$") {
|
|
||||||
self.wiki.setText(self.actionTiddler,name,undefined,attribute,options);
|
|
||||||
}
|
}
|
||||||
});
|
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||||
|
if(name.charAt(0) !== "$") {
|
||||||
|
self.wiki.setText(self.actionTiddler,name,undefined,attribute,options);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return true; // Action was invoked
|
return true; // Action was invoked
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ CheckboxWidget.prototype = new Widget();
|
|||||||
Render this widget into the DOM
|
Render this widget into the DOM
|
||||||
*/
|
*/
|
||||||
CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
||||||
|
var isChecked;
|
||||||
// Save the parent dom node
|
// Save the parent dom node
|
||||||
this.parentDomNode = parent;
|
this.parentDomNode = parent;
|
||||||
// Compute our attributes
|
// Compute our attributes
|
||||||
@@ -35,11 +36,16 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.execute();
|
this.execute();
|
||||||
// Create our elements
|
// Create our elements
|
||||||
this.labelDomNode = this.document.createElement("label");
|
this.labelDomNode = this.document.createElement("label");
|
||||||
this.labelDomNode.setAttribute("class",this.checkboxClass);
|
this.labelDomNode.setAttribute("class","tc-checkbox " + this.checkboxClass);
|
||||||
this.inputDomNode = this.document.createElement("input");
|
this.inputDomNode = this.document.createElement("input");
|
||||||
this.inputDomNode.setAttribute("type","checkbox");
|
this.inputDomNode.setAttribute("type","checkbox");
|
||||||
if(this.getValue()) {
|
isChecked = this.getValue();
|
||||||
|
if(isChecked) {
|
||||||
this.inputDomNode.setAttribute("checked","true");
|
this.inputDomNode.setAttribute("checked","true");
|
||||||
|
$tw.utils.addClass(this.labelDomNode,"tc-checkbox-checked");
|
||||||
|
}
|
||||||
|
if(isChecked === undefined && this.checkboxIndeterminate === "yes") {
|
||||||
|
this.inputDomNode.indeterminate = true;
|
||||||
}
|
}
|
||||||
if(this.isDisabled === "yes") {
|
if(this.isDisabled === "yes") {
|
||||||
this.inputDomNode.setAttribute("disabled",true);
|
this.inputDomNode.setAttribute("disabled",true);
|
||||||
@@ -59,20 +65,25 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
|
|
||||||
CheckboxWidget.prototype.getValue = function() {
|
CheckboxWidget.prototype.getValue = function() {
|
||||||
var tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
var tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
||||||
if(tiddler) {
|
if(tiddler || this.checkboxFilter) {
|
||||||
if(this.checkboxTag) {
|
if(this.checkboxTag) {
|
||||||
if(this.checkboxInvertTag) {
|
if(this.checkboxInvertTag === "yes") {
|
||||||
return !tiddler.hasTag(this.checkboxTag);
|
return !tiddler.hasTag(this.checkboxTag);
|
||||||
} else {
|
} else {
|
||||||
return tiddler.hasTag(this.checkboxTag);
|
return tiddler.hasTag(this.checkboxTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.checkboxField) {
|
if(this.checkboxField || this.checkboxIndex) {
|
||||||
|
// Same logic applies to fields and indexes
|
||||||
var value;
|
var value;
|
||||||
if($tw.utils.hop(tiddler.fields,this.checkboxField)) {
|
if(this.checkboxField) {
|
||||||
value = tiddler.fields[this.checkboxField] || "";
|
if($tw.utils.hop(tiddler.fields,this.checkboxField)) {
|
||||||
|
value = tiddler.fields[this.checkboxField] || "";
|
||||||
|
} else {
|
||||||
|
value = this.checkboxDefault || "";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
value = this.checkboxDefault || "";
|
value = this.wiki.extractTiddlerDataItem(tiddler,this.checkboxIndex,this.checkboxDefault || "");
|
||||||
}
|
}
|
||||||
if(value === this.checkboxChecked) {
|
if(value === this.checkboxChecked) {
|
||||||
return true;
|
return true;
|
||||||
@@ -80,15 +91,59 @@ CheckboxWidget.prototype.getValue = function() {
|
|||||||
if(value === this.checkboxUnchecked) {
|
if(value === this.checkboxUnchecked) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Neither value found: were both specified?
|
||||||
|
if(this.checkboxChecked && !this.checkboxUnchecked) {
|
||||||
|
return false; // Absence of checked value
|
||||||
|
}
|
||||||
|
if(this.checkboxUnchecked && !this.checkboxChecked) {
|
||||||
|
return true; // Absence of unchecked value
|
||||||
|
}
|
||||||
|
if(this.checkboxChecked && this.checkboxUnchecked) {
|
||||||
|
// Both specified but neither found: indeterminate or false, depending
|
||||||
|
if(this.checkboxIndeterminate === "yes") {
|
||||||
|
return undefined;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.checkboxIndex) {
|
if(this.checkboxListField || this.checkboxListIndex || this.checkboxFilter) {
|
||||||
var value = this.wiki.extractTiddlerDataItem(tiddler,this.checkboxIndex,this.checkboxDefault || "");
|
// Same logic applies to lists and filters
|
||||||
if(value === this.checkboxChecked) {
|
var list;
|
||||||
|
if(this.checkboxListField) {
|
||||||
|
if($tw.utils.hop(tiddler.fields,this.checkboxListField)) {
|
||||||
|
list = tiddler.getFieldList(this.checkboxListField);
|
||||||
|
} else {
|
||||||
|
list = $tw.utils.parseStringArray(this.checkboxDefault || "") || [];
|
||||||
|
}
|
||||||
|
} else if (this.checkboxListIndex) {
|
||||||
|
list = $tw.utils.parseStringArray(this.wiki.extractTiddlerDataItem(tiddler,this.checkboxListIndex,this.checkboxDefault || "")) || [];
|
||||||
|
} else {
|
||||||
|
list = this.wiki.filterTiddlers(this.checkboxFilter,this) || [];
|
||||||
|
}
|
||||||
|
if(list.indexOf(this.checkboxChecked) !== -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(value === this.checkboxUnchecked) {
|
if(list.indexOf(this.checkboxUnchecked) !== -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Neither one present
|
||||||
|
if(this.checkboxChecked && !this.checkboxUnchecked) {
|
||||||
|
return false; // Absence of checked value
|
||||||
|
}
|
||||||
|
if(this.checkboxUnchecked && !this.checkboxChecked) {
|
||||||
|
return true; // Absence of unchecked value
|
||||||
|
}
|
||||||
|
if(this.checkboxChecked && this.checkboxUnchecked) {
|
||||||
|
// Both specified but neither found: indeterminate or false, depending
|
||||||
|
if(this.checkboxIndeterminate === "yes") {
|
||||||
|
return undefined;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Neither specified, so empty list is false, non-empty is true
|
||||||
|
return !!list.length;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(this.checkboxTag) {
|
if(this.checkboxTag) {
|
||||||
@@ -114,7 +169,8 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
|||||||
hasChanged = false,
|
hasChanged = false,
|
||||||
tagCheck = false,
|
tagCheck = false,
|
||||||
hasTag = tiddler && tiddler.hasTag(this.checkboxTag),
|
hasTag = tiddler && tiddler.hasTag(this.checkboxTag),
|
||||||
value = checked ? this.checkboxChecked : this.checkboxUnchecked;
|
value = checked ? this.checkboxChecked : this.checkboxUnchecked,
|
||||||
|
notValue = checked ? this.checkboxUnchecked : this.checkboxChecked;
|
||||||
if(this.checkboxTag && this.checkboxInvertTag === "yes") {
|
if(this.checkboxTag && this.checkboxInvertTag === "yes") {
|
||||||
tagCheck = hasTag === checked;
|
tagCheck = hasTag === checked;
|
||||||
} else {
|
} else {
|
||||||
@@ -148,9 +204,51 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
|||||||
hasChanged = true;
|
hasChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Set the list field (or index) if specified
|
||||||
|
if(this.checkboxListField || this.checkboxListIndex) {
|
||||||
|
var listContents, oldPos, newPos;
|
||||||
|
if(this.checkboxListField) {
|
||||||
|
listContents = tiddler.getFieldList(this.checkboxListField);
|
||||||
|
} else {
|
||||||
|
listContents = $tw.utils.parseStringArray(this.wiki.extractTiddlerDataItem(this.checkboxTitle,this.checkboxListIndex) || "") || [];
|
||||||
|
}
|
||||||
|
oldPos = notValue ? listContents.indexOf(notValue) : -1;
|
||||||
|
newPos = value ? listContents.indexOf(value) : -1;
|
||||||
|
if(oldPos === -1 && newPos !== -1) {
|
||||||
|
// old value absent, new value present: no change needed
|
||||||
|
} else if(oldPos === -1) {
|
||||||
|
// neither one was present
|
||||||
|
if(value) {
|
||||||
|
listContents.push(value);
|
||||||
|
hasChanged = true;
|
||||||
|
} else {
|
||||||
|
// value unspecified? then leave list unchanged
|
||||||
|
}
|
||||||
|
} else if(newPos === -1) {
|
||||||
|
// old value present, new value absent
|
||||||
|
if(value) {
|
||||||
|
listContents[oldPos] = value;
|
||||||
|
hasChanged = true;
|
||||||
|
} else {
|
||||||
|
listContents.splice(oldPos, 1)
|
||||||
|
hasChanged = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// both were present: just remove the old one, leave new alone
|
||||||
|
listContents.splice(oldPos, 1)
|
||||||
|
hasChanged = true;
|
||||||
|
}
|
||||||
|
if(this.checkboxListField) {
|
||||||
|
newFields[this.checkboxListField] = $tw.utils.stringifyList(listContents);
|
||||||
|
}
|
||||||
|
// The listIndex case will be handled in the if(hasChanged) block below
|
||||||
|
}
|
||||||
if(hasChanged) {
|
if(hasChanged) {
|
||||||
if(this.checkboxIndex) {
|
if(this.checkboxIndex) {
|
||||||
this.wiki.setText(this.checkboxTitle,"",this.checkboxIndex,value);
|
this.wiki.setText(this.checkboxTitle,"",this.checkboxIndex,value);
|
||||||
|
} else if(this.checkboxListIndex) {
|
||||||
|
var listIndexValue = (listContents && listContents.length) ? $tw.utils.stringifyList(listContents) : undefined;
|
||||||
|
this.wiki.setText(this.checkboxTitle,"",this.checkboxListIndex,listIndexValue);
|
||||||
} else {
|
} else {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
|
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
|
||||||
}
|
}
|
||||||
@@ -179,9 +277,13 @@ CheckboxWidget.prototype.execute = function() {
|
|||||||
this.checkboxTag = this.getAttribute("tag");
|
this.checkboxTag = this.getAttribute("tag");
|
||||||
this.checkboxField = this.getAttribute("field");
|
this.checkboxField = this.getAttribute("field");
|
||||||
this.checkboxIndex = this.getAttribute("index");
|
this.checkboxIndex = this.getAttribute("index");
|
||||||
|
this.checkboxListField = this.getAttribute("listField");
|
||||||
|
this.checkboxListIndex = this.getAttribute("listIndex");
|
||||||
|
this.checkboxFilter = this.getAttribute("filter");
|
||||||
this.checkboxChecked = this.getAttribute("checked");
|
this.checkboxChecked = this.getAttribute("checked");
|
||||||
this.checkboxUnchecked = this.getAttribute("unchecked");
|
this.checkboxUnchecked = this.getAttribute("unchecked");
|
||||||
this.checkboxDefault = this.getAttribute("default");
|
this.checkboxDefault = this.getAttribute("default");
|
||||||
|
this.checkboxIndeterminate = this.getAttribute("indeterminate","no");
|
||||||
this.checkboxClass = this.getAttribute("class","");
|
this.checkboxClass = this.getAttribute("class","");
|
||||||
this.checkboxInvertTag = this.getAttribute("invertTag","");
|
this.checkboxInvertTag = this.getAttribute("invertTag","");
|
||||||
this.isDisabled = this.getAttribute("disabled","no");
|
this.isDisabled = this.getAttribute("disabled","no");
|
||||||
@@ -194,14 +296,21 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.index || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.disabled) {
|
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.index || changedAttributes.listField || changedAttributes.listIndex || changedAttributes.filter || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes.indeterminate || changedAttributes["class"] || changedAttributes.disabled) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
var refreshed = false;
|
var refreshed = false;
|
||||||
if(changedTiddlers[this.checkboxTitle]) {
|
if(changedTiddlers[this.checkboxTitle]) {
|
||||||
this.inputDomNode.checked = this.getValue();
|
var isChecked = this.getValue();
|
||||||
|
this.inputDomNode.checked = !!isChecked;
|
||||||
|
this.inputDomNode.indeterminate = (isChecked === undefined);
|
||||||
refreshed = true;
|
refreshed = true;
|
||||||
|
if(isChecked) {
|
||||||
|
$tw.utils.addClass(this.labelDomNode,"tc-checkbox-checked");
|
||||||
|
} else {
|
||||||
|
$tw.utils.removeClass(this.labelDomNode,"tc-checkbox-checked");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this.refreshChildren(changedTiddlers) || refreshed;
|
return this.refreshChildren(changedTiddlers) || refreshed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ DraggableWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
if(this.draggableClasses) {
|
if(this.draggableClasses) {
|
||||||
classes.push(this.draggableClasses);
|
classes.push(this.draggableClasses);
|
||||||
}
|
}
|
||||||
if(!this.dragHandleSelector) {
|
if(!this.dragHandleSelector && this.dragEnable) {
|
||||||
classes.push("tc-draggable");
|
classes.push("tc-draggable");
|
||||||
}
|
}
|
||||||
domNode.setAttribute("class",classes.join(" "));
|
domNode.setAttribute("class",classes.join(" "));
|
||||||
@@ -56,16 +56,18 @@ DraggableWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
parent.insertBefore(domNode,nextSibling);
|
parent.insertBefore(domNode,nextSibling);
|
||||||
this.renderChildren(domNode,null);
|
this.renderChildren(domNode,null);
|
||||||
// Add event handlers
|
// Add event handlers
|
||||||
$tw.utils.makeDraggable({
|
if(this.dragEnable) {
|
||||||
domNode: domNode,
|
$tw.utils.makeDraggable({
|
||||||
dragTiddlerFn: function() {return self.getAttribute("tiddler");},
|
domNode: domNode,
|
||||||
dragFilterFn: function() {return self.getAttribute("filter");},
|
dragTiddlerFn: function() {return self.getAttribute("tiddler");},
|
||||||
startActions: self.startActions,
|
dragFilterFn: function() {return self.getAttribute("filter");},
|
||||||
endActions: self.endActions,
|
startActions: self.startActions,
|
||||||
dragImageType: self.dragImageType,
|
endActions: self.endActions,
|
||||||
widget: this,
|
dragImageType: self.dragImageType,
|
||||||
selector: self.dragHandleSelector
|
widget: this,
|
||||||
});
|
selector: self.dragHandleSelector
|
||||||
|
});
|
||||||
|
}
|
||||||
this.domNodes.push(domNode);
|
this.domNodes.push(domNode);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,6 +82,7 @@ DraggableWidget.prototype.execute = function() {
|
|||||||
this.endActions = this.getAttribute("endactions");
|
this.endActions = this.getAttribute("endactions");
|
||||||
this.dragImageType = this.getAttribute("dragimagetype");
|
this.dragImageType = this.getAttribute("dragimagetype");
|
||||||
this.dragHandleSelector = this.getAttribute("selector");
|
this.dragHandleSelector = this.getAttribute("selector");
|
||||||
|
this.dragEnable = this.getAttribute("enable","yes") === "yes";
|
||||||
// Make the child widgets
|
// Make the child widgets
|
||||||
this.makeChildWidgets();
|
this.makeChildWidgets();
|
||||||
};
|
};
|
||||||
@@ -89,7 +92,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
DraggableWidget.prototype.refresh = function(changedTiddlers) {
|
DraggableWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
if(changedAttributes.tag || changedAttributes["class"]) {
|
if($tw.utils.count(changedAttributes) > 0) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,33 +72,7 @@ EventWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
}
|
}
|
||||||
// Only set up variables if we have actions to invoke
|
// Only set up variables if we have actions to invoke
|
||||||
if(actions) {
|
if(actions) {
|
||||||
$tw.utils.each(selectedNode.attributes,function(attribute) {
|
variables = $tw.utils.collectDOMVariables(selectedNode,self.domNode,event);
|
||||||
variables["dom-" + attribute.name] = attribute.value.toString();
|
|
||||||
});
|
|
||||||
//Add a variable with a popup coordinate string for the selected node
|
|
||||||
variables["tv-popup-coords"] = "(" + selectedNode.offsetLeft + "," + selectedNode.offsetTop +"," + selectedNode.offsetWidth + "," + selectedNode.offsetHeight + ")";
|
|
||||||
|
|
||||||
//Add variables for offset of selected node
|
|
||||||
variables["tv-selectednode-posx"] = selectedNode.offsetLeft.toString();
|
|
||||||
variables["tv-selectednode-posy"] = selectedNode.offsetTop.toString();
|
|
||||||
variables["tv-selectednode-width"] = selectedNode.offsetWidth.toString();
|
|
||||||
variables["tv-selectednode-height"] = selectedNode.offsetHeight.toString();
|
|
||||||
|
|
||||||
if(event.clientX && event.clientY) {
|
|
||||||
//Add variables for event X and Y position relative to selected node
|
|
||||||
selectedNodeRect = selectedNode.getBoundingClientRect();
|
|
||||||
variables["event-fromselected-posx"] = (event.clientX - selectedNodeRect.left).toString();
|
|
||||||
variables["event-fromselected-posy"] = (event.clientY - selectedNodeRect.top).toString();
|
|
||||||
|
|
||||||
//Add variables for event X and Y position relative to event catcher node
|
|
||||||
catcherNodeRect = self.domNode.getBoundingClientRect();
|
|
||||||
variables["event-fromcatcher-posx"] = (event.clientX - catcherNodeRect.left).toString();
|
|
||||||
variables["event-fromcatcher-posy"] = (event.clientY - catcherNodeRect.top).toString();
|
|
||||||
|
|
||||||
//Add variables for event X and Y position relative to the viewport
|
|
||||||
variables["event-fromviewport-posx"] = event.clientX.toString();
|
|
||||||
variables["event-fromviewport-posy"] = event.clientY.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Execute our actions with the variables
|
// Execute our actions with the variables
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ LetWidget.prototype.computeAttributes = function() {
|
|||||||
var changedAttributes = {},
|
var changedAttributes = {},
|
||||||
self = this;
|
self = this;
|
||||||
this.currentValueFor = Object.create(null);
|
this.currentValueFor = Object.create(null);
|
||||||
$tw.utils.each(this.parseTreeNode.orderedAttributes,function(attribute,index) {
|
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
|
||||||
var value = self.computeAttribute(attribute),
|
var value = self.computeAttribute(attribute),
|
||||||
name = attribute.name;
|
name = attribute.name;
|
||||||
if(name.charAt(0) !== "$") {
|
if(name.charAt(0) !== "$") {
|
||||||
|
|||||||
@@ -159,6 +159,8 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
// Create elements
|
// Create elements
|
||||||
this.outerDomNode = this.document.createElement("div");
|
this.outerDomNode = this.document.createElement("div");
|
||||||
$tw.utils.setStyle(this.outerDomNode,[
|
$tw.utils.setStyle(this.outerDomNode,[
|
||||||
|
{overflowY: "auto"},
|
||||||
|
{overflowX: "auto"},
|
||||||
{webkitOverflowScrolling: "touch"}
|
{webkitOverflowScrolling: "touch"}
|
||||||
]);
|
]);
|
||||||
this.innerDomNode = this.document.createElement("div");
|
this.innerDomNode = this.document.createElement("div");
|
||||||
|
|||||||
@@ -289,12 +289,19 @@ Widget.prototype.computeAttribute = function(attribute) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check for the presence of an attribute
|
Check for the presence of an evaluated attribute on the widget. Note that attributes set to a missing variable (ie attr=<<missing>>) will be treated as missing
|
||||||
*/
|
*/
|
||||||
Widget.prototype.hasAttribute = function(name) {
|
Widget.prototype.hasAttribute = function(name) {
|
||||||
return $tw.utils.hop(this.attributes,name);
|
return $tw.utils.hop(this.attributes,name);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check for the presence of a raw attribute on the widget parse tree node. Note that attributes set to a missing variable (ie attr=<<missing>>) will NOT be treated as missing
|
||||||
|
*/
|
||||||
|
Widget.prototype.hasParseTreeNodeAttribute = function(name) {
|
||||||
|
return $tw.utils.hop(this.parseTreeNode.attributes,name);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Get the value of an attribute
|
Get the value of an attribute
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ alert-highlight: #FFD60A
|
|||||||
alert-muted-foreground: <<colour muted-foreground>>
|
alert-muted-foreground: <<colour muted-foreground>>
|
||||||
background: #282828
|
background: #282828
|
||||||
blockquote-bar: <<colour page-background>>
|
blockquote-bar: <<colour page-background>>
|
||||||
button-foreground: <<colour background>>
|
button-foreground: <<colour foreground>>
|
||||||
code-background: <<colour pre-background>>
|
code-background: <<colour pre-background>>
|
||||||
code-border: <<colour pre-border>>
|
code-border: <<colour pre-border>>
|
||||||
code-foreground: rgba(255, 255, 255, 0.54)
|
code-foreground: rgba(255, 255, 255, 0.54)
|
||||||
@@ -52,7 +52,7 @@ pre-border: transparent
|
|||||||
primary: #0A84FF
|
primary: #0A84FF
|
||||||
select-tag-background: <<colour background>>
|
select-tag-background: <<colour background>>
|
||||||
select-tag-foreground: <<colour foreground>>
|
select-tag-foreground: <<colour foreground>>
|
||||||
sidebar-button-foreground: <<colour background>>
|
sidebar-button-foreground: <<colour foreground>>
|
||||||
sidebar-controls-foreground-hover: #FF9F0A
|
sidebar-controls-foreground-hover: #FF9F0A
|
||||||
sidebar-controls-foreground: #8E8E93
|
sidebar-controls-foreground: #8E8E93
|
||||||
sidebar-foreground-shadow: transparent
|
sidebar-foreground-shadow: transparent
|
||||||
@@ -87,7 +87,7 @@ tiddler-border: transparent
|
|||||||
tiddler-controls-foreground-hover: <<colour sidebar-controls-foreground-hover>>
|
tiddler-controls-foreground-hover: <<colour sidebar-controls-foreground-hover>>
|
||||||
tiddler-controls-foreground-selected: <<colour sidebar-controls-foreground-hover>>
|
tiddler-controls-foreground-selected: <<colour sidebar-controls-foreground-hover>>
|
||||||
tiddler-controls-foreground: #48484A
|
tiddler-controls-foreground: #48484A
|
||||||
tiddler-editor-background: transparent
|
tiddler-editor-background: <<colour background>>
|
||||||
tiddler-editor-border-image:
|
tiddler-editor-border-image:
|
||||||
tiddler-editor-border: rgba(255, 255, 255, 0.08)
|
tiddler-editor-border: rgba(255, 255, 255, 0.08)
|
||||||
tiddler-editor-fields-even: rgba(255, 255, 255, 0.1)
|
tiddler-editor-fields-even: rgba(255, 255, 255, 0.1)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ alert-highlight: #d79921
|
|||||||
alert-muted-foreground: #504945
|
alert-muted-foreground: #504945
|
||||||
background: #3c3836
|
background: #3c3836
|
||||||
blockquote-bar: <<colour muted-foreground>>
|
blockquote-bar: <<colour muted-foreground>>
|
||||||
button-foreground: <<colour page-background>>
|
button-foreground: <<colour foreground>>
|
||||||
code-background: #504945
|
code-background: #504945
|
||||||
code-border: #504945
|
code-border: #504945
|
||||||
code-foreground: #fb4934
|
code-foreground: #fb4934
|
||||||
@@ -63,7 +63,7 @@ select-tag-background: #665c54
|
|||||||
select-tag-foreground: <<colour foreground>>
|
select-tag-foreground: <<colour foreground>>
|
||||||
selection-background: #458588
|
selection-background: #458588
|
||||||
selection-foreground: <<colour foreground>>
|
selection-foreground: <<colour foreground>>
|
||||||
sidebar-button-foreground: <<colour page-background>>
|
sidebar-button-foreground: <<colour foreground>>
|
||||||
sidebar-controls-foreground-hover: #7c6f64
|
sidebar-controls-foreground-hover: #7c6f64
|
||||||
sidebar-controls-foreground: #504945
|
sidebar-controls-foreground: #504945
|
||||||
sidebar-foreground-shadow: transparent
|
sidebar-foreground-shadow: transparent
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ alert-highlight: #B48EAD
|
|||||||
alert-muted-foreground: #4C566A
|
alert-muted-foreground: #4C566A
|
||||||
background: #3b4252
|
background: #3b4252
|
||||||
blockquote-bar: <<colour muted-foreground>>
|
blockquote-bar: <<colour muted-foreground>>
|
||||||
button-foreground: <<colour page-background>>
|
button-foreground: <<colour foreground>>
|
||||||
code-background: #2E3440
|
code-background: #2E3440
|
||||||
code-border: #2E3440
|
code-border: #2E3440
|
||||||
code-foreground: #BF616A
|
code-foreground: #BF616A
|
||||||
@@ -63,7 +63,7 @@ select-tag-background: #3b4252
|
|||||||
select-tag-foreground: <<colour foreground>>
|
select-tag-foreground: <<colour foreground>>
|
||||||
selection-background: #5E81AC
|
selection-background: #5E81AC
|
||||||
selection-foreground: <<colour foreground>>
|
selection-foreground: <<colour foreground>>
|
||||||
sidebar-button-foreground: <<colour page-background>>
|
sidebar-button-foreground: <<colour foreground>>
|
||||||
sidebar-controls-foreground-hover: #D8DEE9
|
sidebar-controls-foreground-hover: #D8DEE9
|
||||||
sidebar-controls-foreground: #4C566A
|
sidebar-controls-foreground: #4C566A
|
||||||
sidebar-foreground-shadow: transparent
|
sidebar-foreground-shadow: transparent
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
title: $:/core/save/lazy-all
|
title: $:/core/save/lazy-all
|
||||||
|
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
|
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] +[sort[title]]
|
||||||
\end
|
\end
|
||||||
\define skinnySaveTiddlerFilter()
|
\define skinnySaveTiddlerFilter()
|
||||||
[!is[system]]
|
[!is[system]] -[type[application/javascript]]
|
||||||
\end
|
\end
|
||||||
{{$:/core/templates/tiddlywiki5.html}}
|
{{$:/core/templates/tiddlywiki5.html}}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ description: create a new image tiddler
|
|||||||
image/$(imageType)$
|
image/$(imageType)$
|
||||||
\end
|
\end
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||||
|
\whitespace trim
|
||||||
<$vars imageType={{$:/config/NewImageType}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}>
|
<$vars imageType={{$:/config/NewImageType}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}>
|
||||||
<$action-sendmessage $message="tm-new-tiddler" type=<<get-type>> tags=<<get-tags>>/>
|
<$action-sendmessage $message="tm-new-tiddler" type=<<get-type>> tags=<<get-tags>>/>
|
||||||
</$vars>
|
</$vars>
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ tags: $:/tags/Actions
|
|||||||
description: create a new journal tiddler
|
description: create a new journal tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||||
|
\whitespace trim
|
||||||
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
||||||
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
|
<$wikify name="journalTitle" text="<$macrocall $name='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>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/Actions
|
|||||||
description: create a new empty tiddler
|
description: create a new empty tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||||
|
\whitespace trim
|
||||||
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
<$vars 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>
|
</$vars>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/AdvancedSearch
|
|||||||
icon: $:/core/images/advanced-search-button
|
icon: $:/core/images/advanced-search-button
|
||||||
color: #bbb
|
color: #bbb
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-advanced-search">
|
<div class="tc-advanced-search">
|
||||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" default="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab--1498284803"/>
|
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" default="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab--1498284803"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,31 +3,71 @@ tags: $:/tags/AdvancedSearch
|
|||||||
caption: {{$:/language/Search/Filter/Caption}}
|
caption: {{$:/language/Search/Filter/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\define 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>>/>"""/>
|
\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>>/>"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list>
|
\define cancel-search-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$list
|
||||||
|
filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]"
|
||||||
|
emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />">
|
||||||
|
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
||||||
|
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
||||||
|
</$list>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-variant-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<<lingo Filter/Hint>>
|
<<lingo Filter/Hint>>
|
||||||
|
|
||||||
<div class="tc-search tc-advanced-search">
|
<div class="tc-search tc-advanced-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/temp/advancedsearch]]" firstSearchFilterField="text"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputCancelActions=<<cancel-search-actions>>/>
|
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||||
|
type="search"
|
||||||
|
tag="input"
|
||||||
|
focus={{$:/config/Search/AutoFocus}}
|
||||||
|
configTiddlerFilter="[[$:/temp/advancedsearch]]"
|
||||||
|
firstSearchFilterField="text"
|
||||||
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
|
inputCancelActions=<<cancel-search-actions>>/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
|
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
<<lingo Filter/Matches>>
|
<<lingo Filter/Matches>>
|
||||||
<$list filter={{$:/temp/advancedsearch}}>
|
<$list filter={{$:/temp/advancedsearch}}>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$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>>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/delete
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/delete
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$button popup=<<qualify "$:/state/filterDeleteDropdown">> class="tc-btn-invisible">
|
<$button popup=<<qualify "$:/state/filterDeleteDropdown">> class="tc-btn-invisible">
|
||||||
{{$:/core/images/delete-button}}
|
{{$:/core/images/delete-button}}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<span class="tc-popup-keep">
|
<span class="tc-popup-keep">
|
||||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||||
{{$:/core/images/down-arrow}}
|
{{$:/core/images/down-arrow}}
|
||||||
@@ -9,10 +11,11 @@ tags: $:/tags/AdvancedSearch/FilterButton
|
|||||||
|
|
||||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
||||||
<$set name="tv-show-missing-links" value="yes">
|
<$set name="tv-show-missing-links" value="yes">
|
||||||
<$linkcatcher actions="""<$action-setfield $tiddler="$:/temp/advancedsearch" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/input" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/><$action-sendmessage $message="tm-focus-selector" $param='.tc-advanced-search input' />""">
|
<$linkcatcher actions="<$action-setfield $tiddler='$:/temp/advancedsearch' text=<<navigateTo>>/><$action-setfield $tiddler='$:/temp/advancedsearch/input' text=<<navigateTo>>/><$action-setfield $tiddler='$:/temp/advancedsearch/refresh' text='yes'/><$action-sendmessage $message='tm-focus-selector' $param='.tc-advanced-search input' />">
|
||||||
<div class="tc-block-dropdown-wrapper">
|
<div class="tc-block-dropdown-wrapper">
|
||||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]">
|
||||||
|
<$link to={{!!filter}}><$transclude field="description"/></$link>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|||||||
@@ -5,26 +5,68 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\define 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>>/>"""/>
|
\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>>/>"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
\define cancel-search-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-variant-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo Shadows/Hint>>
|
<<lingo Shadows/Hint>>
|
||||||
|
|
||||||
<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-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||||
|
type="search"
|
||||||
|
tag="input"
|
||||||
|
focus={{$:/config/Search/AutoFocus}}
|
||||||
|
configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
||||||
|
inputCancelActions=<<cancel-search-actions>>
|
||||||
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
|
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$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>>
|
||||||
@@ -35,9 +77,9 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
|
|
||||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
<$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="<$count filter='[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]'/>">
|
||||||
|
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,17 @@ tags: $:/tags/AdvancedSearch
|
|||||||
caption: {{$:/language/Search/Standard/Caption}}
|
caption: {{$:/language/Search/Standard/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\define 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>>/>"""/>
|
\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>>/>"/>
|
||||||
|
|
||||||
\define next-search-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/advancedsearch" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/advancedsearch/standard/currentTab" text=<<nextTab>>/>"""/>
|
\define next-search-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/advancedsearch" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />"><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||||
|
|
||||||
\define input-accept-actions() <$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>
|
\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>
|
||||||
|
|
||||||
\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>
|
\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>
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo Standard/Hint>>
|
<<lingo Standard/Hint>>
|
||||||
|
|
||||||
@@ -20,12 +22,19 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
<$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=<<next-search-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
tag="input" focus={{$:/config/Search/AutoFocus}} inputCancelActions=<<cancel-search-actions>>
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
type="search"
|
||||||
|
tag="input"
|
||||||
|
focus={{$:/config/Search/AutoFocus}}
|
||||||
|
inputCancelActions=<<cancel-search-actions>>
|
||||||
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
|
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
||||||
|
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
@@ -39,14 +48,22 @@ caption: {{$:/language/Search/Standard/Caption}}
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
<$list
|
||||||
<$vars userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} searchListState="$:/temp/advancedsearch/selected-item">
|
filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]"
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]" emptyMessage="""
|
emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>"
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]">
|
variable="listItem">
|
||||||
<$transclude/>
|
<$vars
|
||||||
</$list>
|
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
||||||
""">
|
configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
|
||||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/advancedsearch/standard/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/search-results/advancedsearch" />
|
searchListState="$:/temp/advancedsearch/selected-item">
|
||||||
|
<$list
|
||||||
|
filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"
|
||||||
|
emptyMessage="<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude/></$list>">
|
||||||
|
<$macrocall $name="tabs"
|
||||||
|
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
||||||
|
default={{$:/config/SearchResults/Default}}
|
||||||
|
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
||||||
|
explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||||
</$list>
|
</$list>
|
||||||
</$vars>
|
</$vars>
|
||||||
</$list>
|
</$list>
|
||||||
|
|||||||
@@ -4,26 +4,68 @@ 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]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\define lingo-base() $:/language/Search/
|
||||||
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler) <$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>>/>"""/>
|
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler)
|
||||||
|
<$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>>/>"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
\define cancel-search-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
\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>
|
\define input-accept-variant-actions()
|
||||||
|
\whitespace trim
|
||||||
|
<$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>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo System/Hint>>
|
<<lingo System/Hint>>
|
||||||
|
|
||||||
<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-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
type="search" tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/System]]"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||||
|
type="search"
|
||||||
|
tag="input"
|
||||||
|
focus={{$:/config/Search/AutoFocus}}
|
||||||
|
configTiddlerFilter="[[$:/core/ui/AdvancedSearch/System]]"
|
||||||
|
inputCancelActions=<<cancel-search-actions>>
|
||||||
|
inputAcceptActions=<<input-accept-actions>>
|
||||||
|
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||||
|
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$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>>
|
||||||
@@ -34,9 +76,9 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
|
|||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
|
|
||||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
<$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="<$count filter='[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]'/>">
|
||||||
|
|
||||||
<div class="tc-search-results">
|
<div class="tc-search-results">
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,21 @@
|
|||||||
title: $:/core/ui/AlertTemplate
|
title: $:/core/ui/AlertTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-alert">
|
<div class="tc-alert">
|
||||||
<div class="tc-alert-toolbar">
|
<div class="tc-alert-toolbar">
|
||||||
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
|
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-alert-subtitle">
|
<div class="tc-alert-subtitle">
|
||||||
<$wikify name="format" text=<<lingo Tiddler/DateFormat>>>
|
<$wikify name="format" text=<<lingo Tiddler/DateFormat>>>
|
||||||
<$view field="component"/> - <$view field="modified" format="date" template=<<format>>/> <$reveal type="nomatch" state="!!count" text=""><span class="tc-alert-highlight">({{$:/language/Count}}: <$view field="count"/>)</span></$reveal>
|
<$view field="component"/>
|
||||||
|
 - 
|
||||||
|
<$view field="modified" format="date" template=<<format>>/>
|
||||||
|
 
|
||||||
|
<$reveal type="nomatch" state="!!count" text="">
|
||||||
|
<span class="tc-alert-highlight">
|
||||||
|
({{$:/language/Count}}: <$view field="count"/>)
|
||||||
|
</span>
|
||||||
|
</$reveal>
|
||||||
</$wikify>
|
</$wikify>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-alert-body">
|
<div class="tc-alert-body">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
title: $:/core/ui/Components/tag-link
|
title: $:/core/ui/Components/tag-link
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$link>
|
<$link>
|
||||||
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
||||||
<span style=<<tag-styles>> class="tc-tag-label">
|
<span style=<<tag-styles>> class="tc-tag-label">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/ControlPanel
|
|||||||
icon: $:/core/images/options-button
|
icon: $:/core/images/options-button
|
||||||
color: #bbb
|
color: #bbb
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]" default="$:/core/ui/ControlPanel/Info" explicitState="$:/state/tab-1749438307"/>
|
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]" default="$:/core/ui/ControlPanel/Info" explicitState="$:/state/tab-1749438307"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Advanced
|
|||||||
tags: $:/tags/ControlPanel/Info
|
tags: $:/tags/ControlPanel/Info
|
||||||
caption: {{$:/language/ControlPanel/Advanced/Caption}}
|
caption: {{$:/language/ControlPanel/Advanced/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Advanced/Hint}}
|
{{$:/language/ControlPanel/Advanced/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Appearance
|
|||||||
tags: $:/tags/ControlPanel
|
tags: $:/tags/ControlPanel
|
||||||
caption: {{$:/language/ControlPanel/Appearance/Caption}}
|
caption: {{$:/language/ControlPanel/Appearance/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Appearance/Hint}}
|
{{$:/language/ControlPanel/Appearance/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
|||||||
\define lingo-base() $:/language/ControlPanel/Basics/
|
\define lingo-base() $:/language/ControlPanel/Basics/
|
||||||
|
|
||||||
\define show-filter-count(filter)
|
\define show-filter-count(filter)
|
||||||
|
\whitespace trim
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
|
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
|
||||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/>
|
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/>
|
||||||
@@ -13,9 +14,11 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
|||||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||||
''<$count filter="""$filter$"""/>''
|
''<$count filter="""$filter$"""/>''
|
||||||
|
 
|
||||||
{{$:/core/images/advanced-search-button}}
|
{{$:/core/images/advanced-search-button}}
|
||||||
</$button>
|
</$button>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
|<<lingo Version/Prompt>> |''<<version>>'' |
|
|<<lingo Version/Prompt>> |''<<version>>'' |
|
||||||
|<$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"/> |
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Cascades
|
|||||||
tags: $:/tags/ControlPanel/Advanced
|
tags: $:/tags/ControlPanel/Advanced
|
||||||
caption: {{$:/language/ControlPanel/Cascades/Caption}}
|
caption: {{$:/language/ControlPanel/Cascades/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Cascades/Hint}}
|
{{$:/language/ControlPanel/Cascades/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Advanced
|
|||||||
caption: {{$:/language/ControlPanel/EditorTypes/Caption}}
|
caption: {{$:/language/ControlPanel/EditorTypes/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/EditorTypes/
|
\define lingo-base() $:/language/ControlPanel/EditorTypes/
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Info
|
|||||||
tags: $:/tags/ControlPanel
|
tags: $:/tags/ControlPanel
|
||||||
caption: {{$:/language/ControlPanel/Info/Caption}}
|
caption: {{$:/language/ControlPanel/Info/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Info/Hint}}
|
{{$:/language/ControlPanel/Info/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -5,8 +5,11 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/
|
\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/
|
||||||
|
|
||||||
\define new-shortcut(title)
|
\define new-shortcut(title)
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-dropdown-item-plain">
|
<div class="tc-dropdown-item-plain">
|
||||||
<$edit-shortcut tiddler="$title$" placeholder={{$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt}} focus="true" style="width:auto;"/> <$button>
|
<$edit-shortcut tiddler="$title$" placeholder={{$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt}} focus="true" style="width:auto;"/>
|
||||||
|
 
|
||||||
|
<$button>
|
||||||
<<lingo Add/Caption>>
|
<<lingo Add/Caption>>
|
||||||
<$action-listops
|
<$action-listops
|
||||||
$tiddler="$(shortcutTitle)$"
|
$tiddler="$(shortcutTitle)$"
|
||||||
@@ -21,6 +24,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define shortcut-list-item(caption)
|
\define shortcut-list-item(caption)
|
||||||
|
\whitespace trim
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right;font-size:0.7em;">
|
<td style="text-align:right;font-size:0.7em;">
|
||||||
@@ -31,16 +35,16 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
<$button popup=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> class="tc-btn-invisible">
|
<$button popup=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> class="tc-btn-invisible">
|
||||||
{{$:/core/images/edit-button}}
|
{{$:/core/images/edit-button}}
|
||||||
</$button>
|
</$button>
|
||||||
|
 
|
||||||
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutTitle)$}} prefix="<kbd>" separator="</kbd> <kbd>" suffix="</kbd>"/>
|
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutTitle)$}} prefix="<kbd>" separator="</kbd> <kbd>" suffix="</kbd>"/>
|
||||||
|
|
||||||
<$reveal state=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> type="popup" position="below" animate="yes">
|
<$reveal state=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> type="popup" position="below" animate="yes">
|
||||||
<div class="tc-block-dropdown-wrapper">
|
<div class="tc-block-dropdown-wrapper">
|
||||||
<div class="tc-block-dropdown tc-edit-type-dropdown tc-popup-keep">
|
<div class="tc-block-dropdown tc-edit-type-dropdown tc-popup-keep">
|
||||||
<$list filter="[list[$(shortcutTitle)$!!text]sort[title]]" variable="shortcut" emptyMessage="""
|
<$list
|
||||||
<div class="tc-dropdown-item-plain">
|
filter="[list[$(shortcutTitle)$!!text]sort[title]]"
|
||||||
//<<lingo NoShortcuts/Caption>>//
|
variable="shortcut"
|
||||||
</div>
|
emptyMessage="<div class='tc-dropdown-item-plain'>//<<lingo NoShortcuts/Caption>>//</div>">
|
||||||
""">
|
|
||||||
<div class="tc-dropdown-item-plain">
|
<div class="tc-dropdown-item-plain">
|
||||||
<$button class="tc-btn-invisible" tooltip={{$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint}}>
|
<$button class="tc-btn-invisible" tooltip={{$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint}}>
|
||||||
<$action-listops
|
<$action-listops
|
||||||
@@ -50,6 +54,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
/>
|
/>
|
||||||
<small>{{$:/core/images/close-button}}</small>
|
<small>{{$:/core/images/close-button}}</small>
|
||||||
</$button>
|
</$button>
|
||||||
|
 
|
||||||
<kbd>
|
<kbd>
|
||||||
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts=<<shortcut>>/>
|
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts=<<shortcut>>/>
|
||||||
</kbd>
|
</kbd>
|
||||||
@@ -65,6 +70,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define shortcut-list(caption,prefix)
|
\define shortcut-list(caption,prefix)
|
||||||
|
\whitespace trim
|
||||||
<tr>
|
<tr>
|
||||||
<$list filter="[[$prefix$$(shortcutName)$]]" variable="shortcutTitle">
|
<$list filter="[[$prefix$$(shortcutName)$]]" variable="shortcutTitle">
|
||||||
<<shortcut-list-item "$caption$">>
|
<<shortcut-list-item "$caption$">>
|
||||||
@@ -73,7 +79,8 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define shortcut-editor()
|
\define shortcut-editor()
|
||||||
<<shortcut-list "All" "$:/config/shortcuts/">>
|
\whitespace trim
|
||||||
|
<<shortcut-list "All" "$:/config/shortcuts/">>
|
||||||
<<shortcut-list "Mac" "$:/config/shortcuts-mac/">>
|
<<shortcut-list "Mac" "$:/config/shortcuts-mac/">>
|
||||||
<<shortcut-list "NonMac" "$:/config/shortcuts-not-mac/">>
|
<<shortcut-list "NonMac" "$:/config/shortcuts-not-mac/">>
|
||||||
<<shortcut-list "Linux" "$:/config/shortcuts-linux/">>
|
<<shortcut-list "Linux" "$:/config/shortcuts-linux/">>
|
||||||
@@ -87,6 +94,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define shortcut-item-inner()
|
\define shortcut-item-inner()
|
||||||
|
\whitespace trim
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<$reveal type="nomatch" state=<<dropdownStateTitle>> text="open">
|
<$reveal type="nomatch" state=<<dropdownStateTitle>> text="open">
|
||||||
@@ -107,6 +115,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
{{$:/core/images/down-arrow}}
|
{{$:/core/images/down-arrow}}
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
 
|
||||||
''<$text text=<<shortcutName>>/>''
|
''<$text text=<<shortcutName>>/>''
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -126,10 +135,12 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define shortcut-item()
|
\define shortcut-item()
|
||||||
|
\whitespace trim
|
||||||
<$set name="dropdownStateTitle" value=<<qualify "$:/state/dropdown/keyboardshortcut/$(shortcutName)$">>>
|
<$set name="dropdownStateTitle" value=<<qualify "$:/state/dropdown/keyboardshortcut/$(shortcutName)$">>>
|
||||||
<<shortcut-item-inner>>
|
<<shortcut-item-inner>>
|
||||||
</$set>
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Modals/AddPlugins
|
|||||||
subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}
|
subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}
|
||||||
|
|
||||||
\define install-plugin-actions()
|
\define install-plugin-actions()
|
||||||
|
\whitespace trim
|
||||||
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
|
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
|
||||||
<$set name="url" value={{!!url}}>
|
<$set name="url" value={{!!url}}>
|
||||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||||
@@ -13,18 +14,21 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define install-plugin-button()
|
\define install-plugin-button()
|
||||||
|
\whitespace trim
|
||||||
<div>
|
<div>
|
||||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||||
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
||||||
<$set name="reinstall-type" value={{{ [<libraryVersion>compare:version:eq<installedVersion>then[tc-reinstall]] [<libraryVersion>compare:version:gt<installedVersion>then[tc-reinstall-upgrade]] [<libraryVersion>compare:version:lt<installedVersion>then[tc-reinstall-downgrade]] }}}>
|
<$set name="reinstall-type" value={{{ [<libraryVersion>compare:version:eq<installedVersion>then[tc-reinstall]] [<libraryVersion>compare:version:gt<installedVersion>then[tc-reinstall-upgrade]] [<libraryVersion>compare:version:lt<installedVersion>then[tc-reinstall-downgrade]] }}}>
|
||||||
<$button actions=<<install-plugin-actions>> class={{{ [<assetInfo>get[original-title]has[version]then<reinstall-type>] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
<$button actions=<<install-plugin-actions>> class={{{ [<assetInfo>get[original-title]has[version]then<reinstall-type>] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
||||||
{{$:/core/images/download-button}}
|
{{$:/core/images/download-button}}
|
||||||
|
 
|
||||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}">
|
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}">
|
||||||
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="""
|
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="
|
||||||
<$list filter="[<libraryVersion>compare:version:lt<installedVersion>]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}">
|
\whitespace trim
|
||||||
|
<$list filter='[<libraryVersion>compare:version:lt<installedVersion>]' variable='ignore' emptyMessage='{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}'>
|
||||||
{{$:/language/ControlPanel/Plugins/Downgrade/Caption}}
|
{{$:/language/ControlPanel/Plugins/Downgrade/Caption}}
|
||||||
</$list>
|
</$list>
|
||||||
""">
|
">
|
||||||
{{$:/language/ControlPanel/Plugins/Update/Caption}}
|
{{$:/language/ControlPanel/Plugins/Update/Caption}}
|
||||||
</$list>
|
</$list>
|
||||||
</$list>
|
</$list>
|
||||||
@@ -43,6 +47,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define display-plugin-info(type)
|
\define display-plugin-info(type)
|
||||||
|
\whitespace trim
|
||||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||||
<div class="tc-plugin-info">
|
<div class="tc-plugin-info">
|
||||||
<div class="tc-plugin-info-chunk tc-plugin-info-toggle">
|
<div class="tc-plugin-info-chunk tc-plugin-info-toggle">
|
||||||
@@ -63,7 +68,9 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-plugin-info-chunk tc-plugin-info-description">
|
<div class="tc-plugin-info-chunk tc-plugin-info-description">
|
||||||
<h1><strong><$text text={{{ [<assetInfo>get[name]] ~[<assetInfo>get[original-title]split[/]last[1]] }}}/></strong>: <$view tiddler=<<assetInfo>> field="description"/></h1>
|
<h1><strong><$text text={{{ [<assetInfo>get[name]] ~[<assetInfo>get[original-title]split[/]last[1]] }}}/></strong>:
|
||||||
|
 
|
||||||
|
<$view tiddler=<<assetInfo>> field="description"/></h1>
|
||||||
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
||||||
<div><em><$view tiddler=<<assetInfo>> field="version"/></em></div>
|
<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>
|
||||||
@@ -83,9 +90,9 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||||
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]]" variable="ignore">
|
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]]" variable="ignore">
|
||||||
<div>
|
<div>
|
||||||
{{$:/language/ControlPanel/Plugins/AlsoRequires}}
|
{{$:/language/ControlPanel/Plugins/AlsoRequires}} 
|
||||||
<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[name]]" variable="dependency">
|
<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[name]]" variable="dependency">
|
||||||
<$text text=<<dependency>>/>
|
<$text text=<<dependency>>/> 
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
</$list>
|
</$list>
|
||||||
@@ -118,16 +125,21 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define load-plugin-library-button()
|
\define load-plugin-library-button()
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[<currentTiddler>get[enabled]else[yes]match[yes]]" variable="ignore">
|
<$list filter="[<currentTiddler>get[enabled]else[yes]match[yes]]" variable="ignore">
|
||||||
<$button class="tc-btn-big-green">
|
<$button class="tc-btn-big-green">
|
||||||
<$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/>
|
<$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/>
|
||||||
{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}
|
{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}
|
||||||
</$button>
|
</$button>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define display-server-assets(type)
|
\define display-server-assets(type)
|
||||||
{{$:/language/Search/Search}}: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/>
|
\whitespace trim
|
||||||
|
{{$:/language/Search/Search}}:
|
||||||
|
 
|
||||||
|
<$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/>
|
||||||
|
 
|
||||||
<$reveal state="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" type="nomatch" text="">
|
<$reveal state="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" type="nomatch" text="">
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/>
|
<$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/>
|
||||||
@@ -144,6 +156,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define display-server-connection()
|
\define display-server-connection()
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
||||||
|
|
||||||
<$set name="transclusion" value=<<connectionTiddler>>>
|
<$set name="transclusion" value=<<connectionTiddler>>>
|
||||||
@@ -156,16 +169,18 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define close-library-button()
|
\define close-library-button()
|
||||||
|
\whitespace trim
|
||||||
<$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''>
|
<$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''>
|
||||||
<$button class='tc-btn-big-green'>
|
<$button class='tc-btn-big-green'>
|
||||||
<$action-sendmessage $message="tm-unload-plugin-library" url={{!!url}}/>
|
<$action-sendmessage $message="tm-unload-plugin-library" url={{!!url}}/>
|
||||||
{{$:/core/images/chevron-left}} {{$:/language/ControlPanel/Plugins/ClosePluginLibrary}}
|
{{$:/core/images/chevron-left}} {{$:/language/ControlPanel/Plugins/ClosePluginLibrary}}
|
||||||
<$action-deletetiddler $filter="[prefix[$:/temp/ServerConnection/$(PluginLibraryURL)$]][prefix[$:/temp/RemoteAssetInfo/$(PluginLibraryURL)$]]"/>
|
<$action-deletetiddler $filter="[prefix[$:/temp/ServerConnection/$(PluginLibraryURL)$]][prefix[$:/temp/RemoteAssetInfo/$(PluginLibraryURL)$]]"/>
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define plugin-library-listing()
|
\define plugin-library-listing()
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-tab-set">
|
<div class="tc-tab-set">
|
||||||
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
|
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
|
||||||
<div class="tc-tab-buttons">
|
<div class="tc-tab-buttons">
|
||||||
@@ -187,6 +202,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
<$set name=PluginLibraryURL value={{!!url}}>
|
<$set name=PluginLibraryURL value={{!!url}}>
|
||||||
<<close-library-button>>
|
<<close-library-button>>
|
||||||
</$set>
|
</$set>
|
||||||
|
 
|
||||||
<<display-server-connection>>
|
<<display-server-connection>>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$list>
|
</$list>
|
||||||
@@ -196,6 +212,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<<plugin-library-listing>>
|
<<plugin-library-listing>>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Parsing/Caption}}
|
|||||||
\define lingo-base() $:/language/ControlPanel/Parsing/
|
\define lingo-base() $:/language/ControlPanel/Parsing/
|
||||||
|
|
||||||
\define toggle(Type)
|
\define toggle(Type)
|
||||||
|
\whitespace trim
|
||||||
<$checkbox
|
<$checkbox
|
||||||
tiddler="""$:/config/WikiParserRules/$Type$/$(rule)$"""
|
tiddler="""$:/config/WikiParserRules/$Type$/$(rule)$"""
|
||||||
field="text"
|
field="text"
|
||||||
@@ -16,10 +17,12 @@ default="enable">
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define rules(type,Type)
|
\define rules(type,Type)
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[wikiparserrules[$type$]]" variable="rule">
|
<$list filter="[wikiparserrules[$type$]]" variable="rule">
|
||||||
<dd><<toggle $Type$>></dd>
|
<dd><<toggle $Type$>></dd>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<<lingo Hint>>
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
|||||||
\define lingo-base() $:/language/ControlPanel/Plugins/
|
\define lingo-base() $:/language/ControlPanel/Plugins/
|
||||||
|
|
||||||
\define plugin-table(type)
|
\define plugin-table(type)
|
||||||
|
\whitespace trim
|
||||||
<$set name="plugin-type" value="""$type$""">
|
<$set name="plugin-type" value="""$type$""">
|
||||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[name]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
|
<$list filter="[!has[draft.of]plugin-type[$type$]sort[name]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Plugins/Add/Updates
|
|||||||
caption: <$importvariables filter="$:/core/ui/ControlPanel/Plugins/Add/Updates">{{$:/language/ControlPanel/Plugins/Updates/Caption}} (<<update-count>>)</$importvariables>
|
caption: <$importvariables filter="$:/core/ui/ControlPanel/Plugins/Add/Updates">{{$:/language/ControlPanel/Plugins/Updates/Caption}} (<<update-count>>)</$importvariables>
|
||||||
|
|
||||||
\define each-updateable-plugin(body)
|
\define each-updateable-plugin(body)
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo">
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo">
|
||||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||||
<$list filter="[<assetInfo>get[original-title]has[version]!version<libraryVersion>]" variable="ignore">
|
<$list filter="[<assetInfo>get[original-title]has[version]!version<libraryVersion>]" variable="ignore">
|
||||||
@@ -25,8 +26,11 @@ $body$
|
|||||||
<$wikify name="count-filter" text=<<each-updateable-plugin "[[<$text text=<<assetInfo>>/>]]">>><$count filter=<<count-filter>>/></$wikify>
|
<$wikify name="count-filter" text=<<each-updateable-plugin "[[<$text text=<<assetInfo>>/>]]">>><$count filter=<<count-filter>>/></$wikify>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$button actions=<<update-all-actions>> class="tc-btn-invisible tc-install-plugin tc-reinstall-upgrade">
|
<$button actions=<<update-all-actions>> class="tc-btn-invisible tc-install-plugin tc-reinstall-upgrade">
|
||||||
{{$:/core/images/download-button}} {{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}}
|
{{$:/core/images/download-button}}
|
||||||
|
 
|
||||||
|
{{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}}
|
||||||
</$button>
|
</$button>
|
||||||
|
|
||||||
<div class="tc-plugin-library-listing">
|
<div class="tc-plugin-library-listing">
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
title: $:/core/ui/ControlPanel/Plugins/AddPlugins
|
title: $:/core/ui/ControlPanel/Plugins/AddPlugins
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Plugins/
|
\define lingo-base() $:/language/ControlPanel/Plugins/
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$button message="tm-modal" param="$:/core/ui/ControlPanel/Modals/AddPlugins" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class="tc-btn-big-green tc-primary-btn">
|
<$button message="tm-modal" param="$:/core/ui/ControlPanel/Modals/AddPlugins" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class="tc-btn-big-green tc-primary-btn">
|
||||||
{{$:/core/images/download-button}} <<lingo Add/Caption>>
|
{{$:/core/images/download-button}}
|
||||||
|
 
|
||||||
|
<<lingo Add/Caption>>
|
||||||
</$button>
|
</$button>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Saving
|
|||||||
tags: $:/tags/ControlPanel
|
tags: $:/tags/ControlPanel
|
||||||
caption: {{$:/language/ControlPanel/Saving/Caption}}
|
caption: {{$:/language/ControlPanel/Saving/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Saving/Hint}}
|
{{$:/language/ControlPanel/Saving/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -8,13 +8,14 @@ caption: {{$:/language/ControlPanel/Saving/TiddlySpot/Caption}}
|
|||||||
http://$(userName)$.tiddlyspot.com/$path$/
|
http://$(userName)$.tiddlyspot.com/$path$/
|
||||||
\end
|
\end
|
||||||
\define siteLink(path)
|
\define siteLink(path)
|
||||||
|
\whitespace trim
|
||||||
<$reveal type="nomatch" state="$:/UploadName" text="">
|
<$reveal type="nomatch" state="$:/UploadName" text="">
|
||||||
<$set name="userName" value={{$:/UploadName}}>
|
<$set name="userName" value={{$:/UploadName}}>
|
||||||
<$reveal type="match" state="$:/UploadURL" text="">
|
<$reveal type="match" state="$:/UploadURL" text="">
|
||||||
<<siteURL $path$>>
|
<<siteURL $path$>>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal type="nomatch" state="$:/UploadURL" text="">
|
<$reveal type="nomatch" state="$:/UploadURL" text="">
|
||||||
<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}>>
|
<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$set>
|
</$set>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
|||||||
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
|
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
|
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link>
|
<$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
|||||||
title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab
|
title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
|
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link>
|
<$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
|||||||
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
|
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link>
|
<$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
|||||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
||||||
|
\whitespace trim
|
||||||
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
|
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
|
||||||
|
|
||||||
<$select tiddler="$:/config/Toolbar/ButtonClass">
|
<$select tiddler="$:/config/Toolbar/ButtonClass">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Toolbars
|
|||||||
tags: $:/tags/ControlPanel/Appearance
|
tags: $:/tags/ControlPanel/Appearance
|
||||||
caption: {{$:/language/ControlPanel/Toolbars/Caption}}
|
caption: {{$:/language/ControlPanel/Toolbars/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{$:/language/ControlPanel/Toolbars/Hint}}
|
{{$:/language/ControlPanel/Toolbars/Hint}}
|
||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|||||||
@@ -3,7 +3,14 @@ title: $:/core/ui/ControlPanel/Toolbars/EditorItemTemplate
|
|||||||
\define config-title()
|
\define config-title()
|
||||||
$(config-base)$$(currentTiddler)$
|
$(config-base)$$(currentTiddler)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$draggable tiddler=<<currentTiddler>>>
|
<$draggable tiddler=<<currentTiddler>>>
|
||||||
<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"/> <span class="tc-icon-wrapper"><$transclude tiddler={{!!icon}}/></span> <$transclude field="caption"/> -- <i class="tc-muted"><$transclude field="description"/></i>
|
<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"/>
|
||||||
|
 
|
||||||
|
<span class="tc-icon-wrapper"><$transclude tiddler={{!!icon}}/></span>
|
||||||
|
 
|
||||||
|
<$transclude field="caption"/>
|
||||||
|
 -- 
|
||||||
|
<i class="tc-muted"><$transclude field="description"/></i>
|
||||||
</$draggable>
|
</$draggable>
|
||||||
|
|||||||
@@ -3,7 +3,17 @@ title: $:/core/ui/ControlPanel/Toolbars/ItemTemplate
|
|||||||
\define config-title()
|
\define config-title()
|
||||||
$(config-base)$$(currentTiddler)$
|
$(config-base)$$(currentTiddler)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$draggable tiddler=<<currentTiddler>>>
|
<$draggable tiddler=<<currentTiddler>>>
|
||||||
<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"/> <span class="tc-icon-wrapper"> <$transclude field="caption"/> <i class="tc-muted">-- <$transclude field="description"/></i></span>
|
<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"/>
|
||||||
|
 
|
||||||
|
<span class="tc-icon-wrapper">
|
||||||
|
 
|
||||||
|
<$transclude field="caption"/>
|
||||||
|
 
|
||||||
|
<i class="tc-muted">
|
||||||
|
-- 
|
||||||
|
<$transclude field="description"/>
|
||||||
|
</i></span>
|
||||||
</$draggable>
|
</$draggable>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ first-search-filter: [!is[system]search:title<userInput>sort[title]limit[250]]
|
|||||||
second-search-filter: [!is[system]search<userInput>sort[title]limit[250]]
|
second-search-filter: [!is[system]search<userInput>sort[title]limit[250]]
|
||||||
|
|
||||||
\define searchResultList()
|
\define searchResultList()
|
||||||
|
\whitespace trim
|
||||||
//<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">
|
||||||
|
|||||||
@@ -1,19 +1,41 @@
|
|||||||
title: $:/core/ui/EditTemplate
|
title: $:/core/ui/EditTemplate
|
||||||
|
|
||||||
\define delete-edittemplate-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<newFieldNameInputTiddler>] [<newFieldNameSelectionTiddler>] [<newTagNameTiddler>] [<newTagNameInputTiddler>] [<newTagNameSelectionTiddler>] [<typeInputTiddler>] [<typeSelectionTiddler>]"/>
|
\define delete-edittemplate-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [prefix<newFieldValueTiddlerPrefix>] [<newFieldNameInputTiddler>] [<newFieldNameSelectionTiddler>] [<newTagNameTiddler>] [<newTagNameInputTiddler>] [<newTagNameSelectionTiddler>] [<typeInputTiddler>] [<typeSelectionTiddler>]"/>
|
||||||
|
|
||||||
|
\define 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}]
|
||||||
|
|
||||||
\define save-tiddler-actions()
|
\define save-tiddler-actions()
|
||||||
|
\whitespace trim
|
||||||
<$action-sendmessage $message="tm-add-tag" $param={{{ [<newTagNameTiddler>get[text]] }}}/>
|
<$action-sendmessage $message="tm-add-tag" $param={{{ [<newTagNameTiddler>get[text]] }}}/>
|
||||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldValueTiddler>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]] }}}/>
|
||||||
<<delete-edittemplate-state-tiddlers>>
|
<<delete-edittemplate-state-tiddlers>>
|
||||||
<$action-sendmessage $message="tm-save-tiddler"/>
|
<$action-sendmessage $message="tm-save-tiddler"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-delete-tiddler-actions(message)
|
\define cancel-delete-tiddler-actions(message)
|
||||||
|
\whitespace trim
|
||||||
<<delete-edittemplate-state-tiddlers>>
|
<<delete-edittemplate-state-tiddlers>>
|
||||||
<$action-sendmessage $message="tm-$message$-tiddler"/>
|
<$action-sendmessage $message="tm-$message$-tiddler"/>
|
||||||
\end
|
\end
|
||||||
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ tc-tiddler-frame tc-tiddler-edit-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}>
|
|
||||||
|
\whitespace trim
|
||||||
|
<div
|
||||||
|
data-tiddler-title=<<currentTiddler>>
|
||||||
|
data-tags={{!!tags}}
|
||||||
|
class={{{ tc-tiddler-frame tc-tiddler-edit-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}>
|
||||||
<$fieldmangler>
|
<$fieldmangler>
|
||||||
<$vars storyTiddler=<<currentTiddler>> newTagNameTiddler=<<qualify "$:/temp/NewTagName">> newFieldNameTiddler=<<qualify "$:/temp/NewFieldName">> newFieldValueTiddler=<<qualify "$:/temp/NewFieldValue">> newFieldNameInputTiddler=<<qualify "$:/temp/NewFieldName/input">> newFieldNameSelectionTiddler=<<qualify "$:/temp/NewFieldName/selected-item">> newTagNameInputTiddler=<<qualify "$:/temp/NewTagName/input">> newTagNameSelectionTiddler=<<qualify "$:/temp/NewTagName/selected-item">> typeInputTiddler=<<qualify "$:/temp/Type/input">> typeSelectionTiddler=<<qualify "$:/temp/Type/selected-item">>>
|
<$vars
|
||||||
|
storyTiddler=<<currentTiddler>>
|
||||||
|
newTagNameTiddler=<<qualify "$:/temp/NewTagName">>
|
||||||
|
newFieldNameTiddler=<<qualify "$:/temp/NewFieldName">>
|
||||||
|
newFieldValueTiddlerPrefix=<<qualify "$:/temp/NewFieldValue">>
|
||||||
|
newFieldNameInputTiddler=<<qualify "$:/temp/NewFieldName/input">>
|
||||||
|
newFieldNameSelectionTiddler=<<qualify "$:/temp/NewFieldName/selected-item">>
|
||||||
|
newTagNameInputTiddler=<<qualify "$:/temp/NewTagName/input">>
|
||||||
|
newTagNameSelectionTiddler=<<qualify "$:/temp/NewTagName/selected-item">>
|
||||||
|
typeInputTiddler=<<qualify "$:/temp/Type/input">>
|
||||||
|
typeSelectionTiddler=<<qualify "$:/temp/Type/selected-item">>>
|
||||||
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">> tag="div">
|
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">> tag="div">
|
||||||
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>> tag="div">
|
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>> tag="div">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ title: $:/core/ui/EditTemplate/body/preview/output
|
|||||||
tags: $:/tags/EditPreview
|
tags: $:/tags/EditPreview
|
||||||
caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}}
|
caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}}
|
||||||
|
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]] [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!has[draft.of]]
|
||||||
<$set name="tv-tiddler-preview" value="yes">
|
<$set name="tv-tiddler-preview" value="yes">
|
||||||
|
|
||||||
<$transclude />
|
<$transclude />
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
title: $:/core/ui/EditTemplate/body/editor
|
title: $:/core/ui/EditTemplate/body/editor
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$edit
|
<$edit
|
||||||
|
|
||||||
field="text"
|
field="text"
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|||||||
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
\whitespace trim
|
||||||
<$vars importTitle=<<qualify $:/ImportImage>> importState=<<qualify $:/state/ImportImage>> >
|
<$let
|
||||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> ><$reveal stateTitle=<<edit-preview-state>> type="match" text="yes" tag="div">
|
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
||||||
|
importTitle=<<qualify $:/ImportImage>>
|
||||||
|
importState=<<qualify $:/state/ImportImage>> >
|
||||||
|
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
|
||||||
|
<$reveal stateTitle=<<edit-preview-state>> type="match" text="yes" tag="div">
|
||||||
<div class="tc-tiddler-preview">
|
<div class="tc-tiddler-preview">
|
||||||
|
|
||||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||||
@@ -34,5 +38,4 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|||||||
|
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$dropzone>
|
</$dropzone>
|
||||||
</$vars>
|
</$let>
|
||||||
</$set>
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ tags: $:/tags/EditTemplate
|
|||||||
\define config-title()
|
\define config-title()
|
||||||
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
title: $:/core/ui/EditTemplate/fieldEditor/default
|
title: $:/core/ui/EditTemplate/fieldEditor/default
|
||||||
|
|
||||||
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> default="" class="tc-edit-texteditor" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> tag="input" default="" class="tc-edit-texteditor tc-edit-fieldeditor" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||||
@@ -15,35 +15,44 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define new-field-actions()
|
\define new-field-actions()
|
||||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldNameTiddler>get[text]] :map[<newFieldValueTiddler>get<currentTiddler>] }}}/>
|
\whitespace trim
|
||||||
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldNameTiddler>get[text]] :map[subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
||||||
|
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [prefix<newFieldValueTiddlerPrefix>] [<storeTitle>] [<searchListState>]"/>
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
\define delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
|
|
||||||
\define cancel-search-actions-inner()
|
\define cancel-search-actions-inner()
|
||||||
<$list filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]" variable="ignore" emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>""">
|
\whitespace trim
|
||||||
|
<$list
|
||||||
|
filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]"
|
||||||
|
variable="ignore"
|
||||||
|
emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>">
|
||||||
<<delete-state-tiddlers>>
|
<<delete-state-tiddlers>>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions()
|
\define cancel-search-actions()
|
||||||
|
\whitespace trim
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||||
<$list filter="[<newFieldNameTiddler>get[text]!match<userInput>]" emptyMessage="""<<cancel-search-actions-inner>>""">
|
<$list
|
||||||
|
filter="[<newFieldNameTiddler>get[text]!match<userInput>]"
|
||||||
|
emptyMessage="<<cancel-search-actions-inner>>">
|
||||||
<$action-setfield $tiddler=<<newFieldNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
<$action-setfield $tiddler=<<newFieldNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define new-field()
|
\define new-field()
|
||||||
|
\whitespace trim
|
||||||
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||||
<$reveal type="nomatch" text="" default=<<name>>>
|
<$reveal type="nomatch" text="" default=<<name>>>
|
||||||
<$button tooltip=<<lingo Fields/Add/Button/Hint>>>
|
<$button tooltip=<<lingo Fields/Add/Button/Hint>>>
|
||||||
<$action-sendmessage $message="tm-add-field"
|
<$action-sendmessage $message="tm-add-field"
|
||||||
$name=<<name>>
|
$name=<<name>>
|
||||||
$value={{{ [<newFieldValueTiddler>get<name>] }}}/>
|
$value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
|
||||||
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [prefix<newFieldValueTiddlerPrefix>] [<storeTitle>] [<searchListState>]"/>
|
||||||
<<lingo Fields/Add/Button>>
|
<<lingo Fields/Add/Button>>
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
@@ -126,13 +135,11 @@ $value={{{ [<newFieldValueTiddler>get<name>] }}}/>
|
|||||||
</div>
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</div>
|
</div>
|
||||||
<$let currentTiddler=<<newFieldValueTiddler>> currentField={{{ [<newFieldNameTiddler>get[text]] }}}>
|
<$let currentTiddlerCSSescaped={{{ [<currentTiddler>escapecss[]] }}} currentTiddler={{{ [subfilter<get-field-value-tiddler-filter>] }}} currentField="text" currentFieldName={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||||
<span class="tc-edit-field-add-value tc-small-gap-right">
|
<span class="tc-edit-field-add-value tc-small-gap-right">
|
||||||
<$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
|
||||||
<$keyboard key="((add-field))" actions=<<new-field-actions>>>
|
<$keyboard key="((add-field))" actions=<<new-field-actions>>>
|
||||||
<$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={{{ [subfilter<get-field-editor-filter>] }}} />
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$set>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="tc-edit-field-add-button">
|
<span class="tc-edit-field-add-button">
|
||||||
<$macrocall $name="new-field"/>
|
<$macrocall $name="new-field"/>
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/Shadow/
|
\define lingo-base() $:/language/EditTemplate/Shadow/
|
||||||
\define pluginLinkBody()
|
\define pluginLinkBody()
|
||||||
|
\whitespace trim
|
||||||
<$link to="""$(pluginTitle)$""">
|
<$link to="""$(pluginTitle)$""">
|
||||||
<$text text="""$(pluginTitle)$"""/>
|
<$text text="""$(pluginTitle)$"""/>
|
||||||
</$link>
|
</$link>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
|
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
|
||||||
|
|
||||||
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
|
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/EditTemplate/title
|
title: $:/core/ui/EditTemplate/title
|
||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||||
|
|
||||||
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
|
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
|
||||||
@@ -9,7 +10,7 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<div class="tc-message-box">
|
<div class="tc-message-box">
|
||||||
|
|
||||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<div class="tc-message-box">
|
<div class="tc-message-box">
|
||||||
|
|
||||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}: <$link to={{!!draft.title}} />
|
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}: <$link to={{!!draft.title}} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -33,18 +34,22 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>
|
<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>
|
<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>
|
||||||
|
|
||||||
<$list filter="[title<fromTitle>backlinks[]limit[1]]" variable="listItem">
|
<$list filter="[title<fromTitle>backlinks[]limit[1]]" variable="listItem">
|
||||||
|
|
||||||
<$vars stateTiddler=<<qualify "$:/state/edit/references">> >
|
<$vars stateTiddler=<<qualify "$:/state/edit/references">> >
|
||||||
|
|
||||||
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
|
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
|
||||||
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}
|
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">
|
||||||
|
{{$:/core/images/right-arrow}}
|
||||||
|
 
|
||||||
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal type="match" state=<<stateTiddler>> text="show">
|
<$reveal type="match" state=<<stateTiddler>> text="show">
|
||||||
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}
|
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">
|
||||||
|
{{$:/core/images/down-arrow}}
|
||||||
|
 
|
||||||
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ description: {{$:/language/Buttons/EditorHeight/Hint}}
|
|||||||
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/]] [<targetTiddler>get[type]match[application/javascript]] [<targetTiddler>get[type]match[application/json]] [<targetTiddler>get[type]match[application/x-tiddler-dictionary]] [<targetTiddler>get[type]match[image/svg+xml]] +[first[]]
|
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/]] [<targetTiddler>get[type]match[application/javascript]] [<targetTiddler>get[type]match[application/json]] [<targetTiddler>get[type]match[application/x-tiddler-dictionary]] [<targetTiddler>get[type]match[image/svg+xml]] +[first[]]
|
||||||
dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown
|
dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed">
|
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed">
|
||||||
{{$:/core/images/fixed-height}}
|
{{$:/core/images/fixed-height}}
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ title: $:/core/ui/EditorToolbar/excise-dropdown
|
|||||||
\define lingo-base() $:/language/Buttons/Excise/
|
\define lingo-base() $:/language/Buttons/Excise/
|
||||||
|
|
||||||
\define body(config-title)
|
\define body(config-title)
|
||||||
|
\whitespace trim
|
||||||
''<<lingo Hint>>''
|
''<<lingo Hint>>''
|
||||||
|
|
||||||
<<lingo Caption/NewTitle>> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/>
|
<<lingo Caption/NewTitle>> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/>
|
||||||
|
|
||||||
<$set name="new-title" value={{$config-title$/new-title}}>
|
<$set name="new-title" value={{$config-title$/new-title}}>
|
||||||
<$list filter="""[<new-title>is[tiddler]]""">
|
<$list filter="""[<new-title>is[tiddler]]""">
|
||||||
@@ -15,16 +16,16 @@ title: $:/core/ui/EditorToolbar/excise-dropdown
|
|||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$set>
|
||||||
|
|
||||||
<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <<lingo Caption/Tag>></$checkbox>
|
<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <<lingo Caption/Tag>></$checkbox>
|
||||||
|
|
||||||
<<lingo Caption/Replace>> <$select tiddler="""$config-title$/type""" default="transclude">
|
<<lingo Caption/Replace>> <$select tiddler="""$config-title$/type""" default="transclude">
|
||||||
<option value="link"><<lingo Caption/Replace/Link>></option>
|
<option value="link"><<lingo Caption/Replace/Link>></option>
|
||||||
<option value="transclude"><<lingo Caption/Replace/Transclusion>></option>
|
<option value="transclude"><<lingo Caption/Replace/Transclusion>></option>
|
||||||
<option value="macro"><<lingo Caption/Replace/Macro>></option>
|
<option value="macro"><<lingo Caption/Replace/Macro>></option>
|
||||||
</$select>
|
</$select>
|
||||||
|
|
||||||
<$reveal state="""$config-title$/type""" type="match" text="macro">
|
<$reveal state="""$config-title$/type""" type="match" text="macro">
|
||||||
<<lingo Caption/MacroName>> <$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/>
|
<<lingo Caption/MacroName>> <$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|
||||||
<$button>
|
<$button>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]
|
|||||||
\define replacement-text-file() [[$title$]]
|
\define replacement-text-file() [[$title$]]
|
||||||
|
|
||||||
\define postImportActions()
|
\define postImportActions()
|
||||||
|
\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[type]prefix[image]then<replacement-text-image>else<replacement-text-file>search-replace[$title$],<currentTiddler>addprefix<accumulator>]" variable="imageTitle">
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
$message="tm-edit-text-operation"
|
$message="tm-edit-text-operation"
|
||||||
@@ -24,10 +25,13 @@ condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define buttons()
|
\define buttons()
|
||||||
|
\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
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal type="popup" state=<<importState>> tag="div" class="tc-editor-importpopup">
|
<$reveal type="popup" state=<<importState>> tag="div" class="tc-editor-importpopup">
|
||||||
<div class="tc-editor-import">
|
<div class="tc-editor-import">
|
||||||
<$list filter="[<importTitle>field:plugin-type[import]]">
|
<$list filter="[<importTitle>field:plugin-type[import]]">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
\define lingo-base() $:/language/Buttons/Link/
|
\define lingo-base() $:/language/Buttons/Link/
|
||||||
|
|
||||||
\define add-link-actions()
|
\define add-link-actions()
|
||||||
|
\whitespace trim
|
||||||
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
||||||
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
\end
|
\end
|
||||||
@@ -10,20 +11,22 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
\define get-focus-selector() [data-tiddler-title="$(cssEscapedTitle)$"] .tc-create-wikitext-link input
|
\define get-focus-selector() [data-tiddler-title="$(cssEscapedTitle)$"] .tc-create-wikitext-link input
|
||||||
|
|
||||||
\define cancel-search-actions-inner()
|
\define cancel-search-actions-inner()
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="""<$action-deletetiddler $filter="[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>"""><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
|
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="<$action-deletetiddler $filter='[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]'/>"><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[<storeTitle>!has[text]] +[<searchTiddler>!has[text]]" emptyMessage="""<<cancel-search-actions-inner>>"""><$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/></$list>
|
\define cancel-search-actions() <$list filter="[<storeTitle>!has[text]] +[<searchTiddler>!has[text]]" emptyMessage="<<cancel-search-actions-inner>>"><$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/></$list>
|
||||||
|
|
||||||
\define external-link()
|
\define external-link()
|
||||||
|
\whitespace trim
|
||||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
||||||
{{$:/core/images/chevron-right}}
|
{{$:/core/images/chevron-right}}
|
||||||
</$button>
|
</$button>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<nextTab>>/>"""/>
|
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/search/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
|
||||||
\define body(config-title)
|
\define body(config-title)
|
||||||
|
\whitespace trim
|
||||||
''<<lingo Hint>>''
|
''<<lingo Hint>>''
|
||||||
|
|
||||||
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
|
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
|
||||||
@@ -33,13 +36,15 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">> class="tc-create-wikitext-link">
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">> class="tc-create-wikitext-link">
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
||||||
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
||||||
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
||||||
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
||||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
||||||
<<external-link>>
|
<<external-link>>
|
||||||
|
 
|
||||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
||||||
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
||||||
{{$:/core/images/close-button}}
|
{{$:/core/images/close-button}}
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ $:/config/EditorToolbarButtons/Visibility/$(toolbarItem)$
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define conditional-button()
|
\define conditional-button()
|
||||||
|
\whitespace trim
|
||||||
<$list filter={{$(toolbarItem)$!!condition}} variable="condition">
|
<$list filter={{$(toolbarItem)$!!condition}} variable="condition">
|
||||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/> <$transclude tiddler=<<toolbarItem>> field="description"/>
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/>
|
||||||
|
 
|
||||||
|
<$transclude tiddler=<<toolbarItem>> field="description"/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<div class="tc-text-editor-toolbar-more">
|
<div class="tc-text-editor-toolbar-more">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]] -[[$:/core/ui/EditorToolbar/more]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]] -[[$:/core/ui/EditorToolbar/more]]">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ dropdown: $:/core/ui/EditorToolbar/paint-dropdown
|
|||||||
\define toolbar-paint()
|
\define toolbar-paint()
|
||||||
<div style="display: inline-block; vertical-align: middle; background-color: $(colour-picker-value)$; width: 1em; height: 1em; border-radius: 50%;"/>
|
<div style="display: inline-block; vertical-align: middle; background-color: $(colour-picker-value)$; width: 1em; height: 1em; border-radius: 50%;"/>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<$set name="colour-picker-value" value={{$:/config/BitmapEditor/Colour}}>
|
<$set name="colour-picker-value" value={{$:/config/BitmapEditor/Colour}}>
|
||||||
<<toolbar-paint>>
|
<<toolbar-paint>>
|
||||||
</$set>
|
</$set>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ condition: [<targetTiddler>]
|
|||||||
button-classes: tc-text-editor-toolbar-item-start-group
|
button-classes: tc-text-editor-toolbar-item-start-group
|
||||||
shortcuts: ((preview))
|
shortcuts: ((preview))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
||||||
{{$:/core/images/preview-open}}
|
{{$:/core/images/preview-open}}
|
||||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
||||||
|
|||||||
@@ -33,9 +33,14 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define toolbar-button-size(config-title)
|
\define toolbar-button-size(config-title)
|
||||||
|
\whitespace trim
|
||||||
''{{$:/language/Buttons/Size/Hint}}''
|
''{{$:/language/Buttons/Size/Hint}}''
|
||||||
|
|
||||||
<<lingo Caption/Width>> <$edit-text tag="input" tiddler="""$config-title$/new-width""" default=<<tv-bitmap-editor-width>> focus="true" size="8"/> <<lingo Caption/Height>> <$edit-text tag="input" tiddler="""$config-title$/new-height""" default=<<tv-bitmap-editor-height>> size="8"/> <$button popup="""$config-title$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected">
|
<<lingo Caption/Width>> <$edit-text tag="input" tiddler="""$config-title$/new-width""" default=<<tv-bitmap-editor-width>> focus="true" size="8"/>
|
||||||
|
 
|
||||||
|
<<lingo Caption/Height>> <$edit-text tag="input" tiddler="""$config-title$/new-height""" default=<<tv-bitmap-editor-height>> size="8"/>
|
||||||
|
 
|
||||||
|
<$button popup="""$config-title$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected">
|
||||||
{{$:/core/images/down-arrow}}
|
{{$:/core/images/down-arrow}}
|
||||||
</$button>
|
</$button>
|
||||||
|
|
||||||
|
|||||||
@@ -3,20 +3,30 @@ title: $:/core/ui/ExportTiddlyWikiCore
|
|||||||
\define jsFileName() tiddlywikicore-$(version)$.js
|
\define jsFileName() tiddlywikicore-$(version)$.js
|
||||||
\define noExportMsg()
|
\define noExportMsg()
|
||||||
It appears that you have a wiki with an external ~TiddlyWiki core. The export action cannot be performed.
|
It appears that you have a wiki with an external ~TiddlyWiki core. The export action cannot be performed.
|
||||||
<p>You will need to view the page source in your browser. Then go to the very bottom the the source, find the last `<script>`
|
<p>You will need to view the page source in your browser. Then go to the very bottom the the source, find the last `<script>`
|
||||||
element, and right-click its `src` URI. Save the link as ''$(jsFileName)$''</p>
|
element, and right-click its `src` URI. Save the link as ''$(jsFileName)$''</p>
|
||||||
\end
|
\end
|
||||||
|
\rules except wikilink
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
''For advanced users''
|
''For advanced users''
|
||||||
|
|
||||||
Export the ~TiddlyWiki core ~JavaScript code for running with external ~JavaScript:
|
Export the TiddlyWiki core JavaScript code for running with external JavaScript:
|
||||||
|
|
||||||
<$button tooltip="Export the ~TiddlyWiki core code for running with external ~JavaScript" aria-label="export TiddlyWiki core" class="tc-btn-big-green">
|
<$button
|
||||||
<$list filter="[[$:/boot/boot.js]is[missing]]" variable="ignore" emptyMessage="""<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/tiddlywiki5.js" filename=<<jsFileName>>/>""" >
|
tooltip="Export the TiddlyWiki core code for running with external JavaScript"
|
||||||
|
aria-label="export TiddlyWiki core"
|
||||||
|
class="tc-btn-big-green">
|
||||||
|
<$list
|
||||||
|
filter="[[$:/boot/boot.js]is[missing]]"
|
||||||
|
variable="ignore"
|
||||||
|
emptyMessage="<$action-sendmessage $message='tm-download-file' $param='$:/core/templates/tiddlywiki5.js' filename=<<jsFileName>>/>" >
|
||||||
<$action-setfield $tiddler=<<qualify "$:/temp/alert">> text=<<noExportMsg>> subtitle="Export ~TiddllyWiki Core"/>
|
<$action-setfield $tiddler=<<qualify "$:/temp/alert">> text=<<noExportMsg>> subtitle="Export ~TiddllyWiki Core"/>
|
||||||
<$action-sendmessage $message="tm-modal" $param=<<qualify "$:/temp/alert">>/>
|
<$action-sendmessage $message="tm-modal" $param=<<qualify "$:/temp/alert">>/>
|
||||||
</$list>
|
</$list>
|
||||||
{{$:/core/images/download-button}} Download ~TiddlyWiki core
|
{{$:/core/images/download-button}}
|
||||||
|
 
|
||||||
|
Download TiddlyWiki core
|
||||||
</$button>
|
</$button>
|
||||||
|
|
||||||
[[Further information|https://tiddlywiki.com/#Using%20the%20external%20JavaScript%20template]]
|
[[Further information|https://tiddlywiki.com/#Using%20the%20external%20JavaScript%20template]]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ title: $:/core/ui/ImportListing
|
|||||||
\define payloadTitleFilter() [<currentTiddler>get<renameField>minlength[1]else<payloadTiddler>]
|
\define payloadTitleFilter() [<currentTiddler>get<renameField>minlength[1]else<payloadTiddler>]
|
||||||
|
|
||||||
\define overWriteWarning()
|
\define overWriteWarning()
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[<currentTiddler>!has<suppressedField>]">
|
<$list filter="[<currentTiddler>!has<suppressedField>]">
|
||||||
<$text text={{{[subfilter<payloadTitleFilter>!is[tiddler]then[]] ~[<lingo-base>addsuffix[Listing/Rename/OverwriteWarning]get[text]]}}}/>
|
<$text text={{{[subfilter<payloadTitleFilter>!is[tiddler]then[]] ~[<lingo-base>addsuffix[Listing/Rename/OverwriteWarning]get[text]]}}}/>
|
||||||
</$list>
|
</$list>
|
||||||
@@ -43,16 +44,19 @@ title: $:/core/ui/ImportListing
|
|||||||
\define renameFieldState() $(currentTiddler)$!!state-rename-$(payloadTiddler)$
|
\define renameFieldState() $(currentTiddler)$!!state-rename-$(payloadTiddler)$
|
||||||
|
|
||||||
\define select-all-actions()
|
\define select-all-actions()
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
|
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
|
||||||
<$action-setfield $field={{{ [<payloadTiddler>addprefix[selection-]] }}} $value={{$:/state/import/select-all}}/>
|
<$action-setfield $field={{{ [<payloadTiddler>addprefix[selection-]] }}} $value={{$:/state/import/select-all}}/>
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<table class="tc-import-table">
|
<table class="tc-import-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left">
|
<th align="left">
|
||||||
<$checkbox tiddler="$:/state/import/select-all" field="text" checked="checked" unchecked="unchecked" default="checked" actions=<<select-all-actions>>>
|
<$checkbox tiddler="$:/state/import/select-all" field="text" checked="checked" unchecked="unchecked" default="checked" actions=<<select-all-actions>>>
|
||||||
|
 
|
||||||
<<lingo Listing/Select/Caption>>
|
<<lingo Listing/Select/Caption>>
|
||||||
</$checkbox>
|
</$checkbox>
|
||||||
</th>
|
</th>
|
||||||
@@ -88,16 +92,30 @@ title: $:/core/ui/ImportListing
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<<selectionInfo>>
|
<<selectionInfo>>
|
||||||
|
 
|
||||||
<<libraryInfo>>
|
<<libraryInfo>>
|
||||||
|
 
|
||||||
<<overWriteWarning>>
|
<<overWriteWarning>>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<$reveal type="match" state=<<renameFieldState>> text="yes" tag="tr">
|
<$reveal type="match" state=<<renameFieldState>> text="yes" tag="tr">
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<div class="tc-flex">
|
<div class="tc-flex">
|
||||||
<$edit-text tiddler=<<newImportTitleTiddler>> default={{{[subfilter<payloadTitleFilter>]}}} tag="input" class="tc-import-rename tc-flex-grow-1"/><span class="tc-small-gap-left"><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/CancelRename]get[text]]}}}>{{$:/core/images/close-button}}<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button><span class="tc-small-gap-right"/></span><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/ConfirmRename]get[text]]}}}>{{$:/core/images/done-button}}<$action-setfield $field=<<renameField>> $value={{{[<newImportTitleTiddler>get[text]minlength[1]else<payloadTiddler>]}}} /><$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button>
|
<$edit-text tiddler=<<newImportTitleTiddler>> default={{{[subfilter<payloadTitleFilter>]}}} tag="input" class="tc-import-rename tc-flex-grow-1"/>
|
||||||
</div>
|
<span class="tc-small-gap-left">
|
||||||
</td>
|
<$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/CancelRename]get[text]]}}}>
|
||||||
|
{{$:/core/images/close-button}}
|
||||||
|
<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/>
|
||||||
|
</$button>
|
||||||
|
<span class="tc-small-gap-right"/>
|
||||||
|
</span>
|
||||||
|
<$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/ConfirmRename]get[text]]}}}>
|
||||||
|
{{$:/core/images/done-button}}
|
||||||
|
<$action-setfield $field=<<renameField>> $value={{{[<newImportTitleTiddler>get[text]minlength[1]else<payloadTiddler>]}}} />
|
||||||
|
<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/>
|
||||||
|
</$button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ImportPreviews/Fields
|
|||||||
tags: $:/tags/ImportPreview
|
tags: $:/tags/ImportPreview
|
||||||
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<table class="tc-view-field-table">
|
<table class="tc-view-field-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/advanced-search
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((advanced-search))
|
key: ((advanced-search))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input""" preventScroll="true"/>
|
<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input""" preventScroll="true"/>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ title: $:/core/ui/KeyboardShortcuts/change-sidebar-layout
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((change-sidebar-layout))
|
key: ((change-sidebar-layout))
|
||||||
|
|
||||||
<$list filter="[{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]]"
|
\whitespace trim
|
||||||
emptyMessage="""<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fixed-fluid"/>""">
|
<$list
|
||||||
|
filter="[{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]]"
|
||||||
|
emptyMessage="<$action-setfield $tiddler='$:/themes/tiddlywiki/vanilla/options/sidebarlayout' text='fixed-fluid'/>">
|
||||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fluid-fixed"/>
|
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fluid-fixed"/>
|
||||||
</$list>
|
</$list>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-image
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((new-image))
|
key: ((new-image))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
{{$:/core/ui/Actions/new-image}}
|
{{$:/core/ui/Actions/new-image}}
|
||||||
</$navigator>
|
</$navigator>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-journal
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((new-journal))
|
key: ((new-journal))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
{{$:/core/ui/Actions/new-journal}}
|
{{$:/core/ui/Actions/new-journal}}
|
||||||
</$navigator>
|
</$navigator>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-tiddler
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((new-tiddler))
|
key: ((new-tiddler))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
{{$:/core/ui/Actions/new-tiddler}}
|
{{$:/core/ui/Actions/new-tiddler}}
|
||||||
</$navigator>
|
</$navigator>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/save-wiki
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((save-wiki))
|
key: ((save-wiki))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||||
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
||||||
</$wikify>
|
</$wikify>
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ title: $:/core/ui/KeyboardShortcuts/toggle-sidebar
|
|||||||
tags: $:/tags/KeyboardShortcut
|
tags: $:/tags/KeyboardShortcut
|
||||||
key: ((toggle-sidebar))
|
key: ((toggle-sidebar))
|
||||||
|
|
||||||
<$list filter="[[$:/state/sidebar]is[missing]] [{$:/state/sidebar}removeprefix[yes]]" emptyMessage="""
|
\whitespace trim
|
||||||
<$action-setfield $tiddler="$:/state/sidebar" text="yes"/>
|
<$list
|
||||||
""">
|
filter="[[$:/state/sidebar]is[missing]] [{$:/state/sidebar}removeprefix[yes]]"
|
||||||
|
emptyMessage="<$action-setfield $tiddler='$:/state/sidebar' text='yes'/>">
|
||||||
<$action-setfield $tiddler="$:/state/sidebar" text="no"/>
|
<$action-setfield $tiddler="$:/state/sidebar" text="no"/>
|
||||||
</$list>
|
</$list>
|
||||||
|
|||||||
@@ -2,14 +2,26 @@ title: $:/snippets/LayoutSwitcher
|
|||||||
tags: $:/tags/ControlPanel/Appearance
|
tags: $:/tags/ControlPanel/Appearance
|
||||||
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$linkcatcher to="$:/layout">
|
<$linkcatcher to="$:/layout">
|
||||||
<div class="tc-chooser">
|
<div class="tc-chooser">
|
||||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
||||||
<$list filter="[{$:/layout}!has[text]]" variable="ignore" emptyMessage="""
|
<$list
|
||||||
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$transclude field="name"/>'' - <$transclude field="description"/></$link></div>
|
filter="[{$:/layout}!has[text]]"
|
||||||
</$set>
|
variable="ignore"
|
||||||
|
emptyMessage="""\whitespace trim
|
||||||
|
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>>
|
||||||
|
<$link to={{!!title}}>
|
||||||
|
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||||
|
</$link></div></$set>
|
||||||
""">
|
""">
|
||||||
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$transclude field="name"/>'' - <$transclude field="description"/></$link></div>
|
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>>
|
||||||
|
<$link to={{!!title}}>
|
||||||
|
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||||
|
</$link>
|
||||||
|
</div>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
</$list>
|
</$list>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
title: $:/core/ui/ListItemTemplate
|
title: $:/core/ui/ListItemTemplate
|
||||||
|
|
||||||
<div class="tc-menu-list-item">
|
<div class="tc-menu-list-item"><$link /></div>
|
||||||
<$link />
|
|
||||||
</div>
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
title: $:/snippets/ListTaggedCascade
|
title: $:/snippets/ListTaggedCascade
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
|||||||
@@ -5,16 +5,17 @@ color: #bbb
|
|||||||
\define lingo-base() $:/language/Manager/
|
\define lingo-base() $:/language/Manager/
|
||||||
|
|
||||||
\define list-item-content-item()
|
\define list-item-content-item()
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-manager-list-item-content-item">
|
<div class="tc-manager-list-item-content-item">
|
||||||
<$vars state-title="""$:/state/popup/manager/item/$(listItem)$""">
|
<$vars state-title="""$:/state/popup/manager/item/$(listItem)$""">
|
||||||
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div">
|
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div">
|
||||||
<$button set=<<state-title>> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
<$button set=<<state-title>> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
||||||
{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal state=<<state-title>> type="nomatch" text="show" default="show" tag="div">
|
<$reveal state=<<state-title>> type="nomatch" text="show" default="show" tag="div">
|
||||||
<$button set=<<state-title>> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
<$button set=<<state-title>> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
||||||
{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body">
|
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body">
|
||||||
@@ -24,19 +25,20 @@ color: #bbb
|
|||||||
</div>
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-manager-wrapper">
|
<div class="tc-manager-wrapper">
|
||||||
<div class="tc-manager-controls">
|
<div class="tc-manager-controls">
|
||||||
<div class="tc-manager-control">
|
<div class="tc-manager-control">
|
||||||
<<lingo Controls/Show/Prompt>> <$select tiddler="$:/config/Manager/Show" default="tiddlers">
|
<<lingo Controls/Show/Prompt>> <$select tiddler="$:/config/Manager/Show" default="tiddlers">
|
||||||
<option value="tiddlers"><<lingo Controls/Show/Option/Tiddlers>></option>
|
<option value="tiddlers"><<lingo Controls/Show/Option/Tiddlers>></option>
|
||||||
<option value="tags"><<lingo Controls/Show/Option/Tags>></option>
|
<option value="tags"><<lingo Controls/Show/Option/Tags>></option>
|
||||||
</$select>
|
</$select>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-manager-control">
|
<div class="tc-manager-control">
|
||||||
<<lingo Controls/Search/Prompt>> <$edit-text tiddler="$:/config/Manager/Filter" tag="input" default="" placeholder={{$:/language/Manager/Controls/Search/Placeholder}}/>
|
<<lingo Controls/Search/Prompt>> <$edit-text tiddler="$:/config/Manager/Filter" tag="input" default="" placeholder={{$:/language/Manager/Controls/Search/Placeholder}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-manager-control">
|
<div class="tc-manager-control">
|
||||||
<<lingo Controls/FilterByTag/Prompt>> <$select tiddler="$:/config/Manager/Tag" default="">
|
<<lingo Controls/FilterByTag/Prompt>> <$select tiddler="$:/config/Manager/Tag" default="">
|
||||||
<option value=""><<lingo Controls/FilterByTag/None>></option>
|
<option value=""><<lingo Controls/FilterByTag/None>></option>
|
||||||
<$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag">
|
<$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag">
|
||||||
<option value=<<tag>>><$text text=<<tag>>/></option>
|
<option value=<<tag>>><$text text=<<tag>>/></option>
|
||||||
@@ -44,7 +46,7 @@ color: #bbb
|
|||||||
</$select>
|
</$select>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-manager-control">
|
<div class="tc-manager-control">
|
||||||
<<lingo Controls/Sort/Prompt>> <$select tiddler="$:/config/Manager/Sort" default="title">
|
<<lingo Controls/Sort/Prompt>> <$select tiddler="$:/config/Manager/Sort" default="title">
|
||||||
<optgroup label="Common">
|
<optgroup label="Common">
|
||||||
<$list filter="title modified modifier created creator created" variable="field">
|
<$list filter="title modified modifier created creator created" variable="field">
|
||||||
<option value=<<field>>><$text text=<<field>>/></option>
|
<option value=<<field>>><$text text=<<field>>/></option>
|
||||||
@@ -56,12 +58,15 @@ color: #bbb
|
|||||||
</$list>
|
</$list>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</$select>
|
</$select>
|
||||||
|
 
|
||||||
<$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
<$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
||||||
|
 
|
||||||
<<lingo Controls/Order/Prompt>>
|
<<lingo Controls/Order/Prompt>>
|
||||||
</$checkbox>
|
</$checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-manager-control">
|
<div class="tc-manager-control">
|
||||||
<$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system">
|
<$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system">
|
||||||
|
 
|
||||||
{{$:/language/SystemTiddlers/Include/Prompt}}
|
{{$:/language/SystemTiddlers/Include/Prompt}}
|
||||||
</$checkbox>
|
</$checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/Manager/ItemMain/Fields
|
|||||||
tags: $:/tags/Manager/ItemMain
|
tags: $:/tags/Manager/ItemMain
|
||||||
caption: {{$:/language/Manager/Item/Fields}}
|
caption: {{$:/language/Manager/Item/Fields}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||||
|
|||||||
@@ -7,9 +7,12 @@ height: 1em;
|
|||||||
background-color: $(colour)$
|
background-color: $(colour)$
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$vars colour={{!!color}}>
|
<$vars colour={{!!color}}>
|
||||||
<p style=<<swatch-styles>>/>
|
<p style=<<swatch-styles>>/>
|
||||||
</$vars>
|
</$vars>
|
||||||
<p>
|
<p>
|
||||||
<$edit-text field="color" tag="input" type="color"/> / <$edit-text field="color" tag="input" type="text" size="9"/>
|
<$edit-text field="color" tag="input" type="color"/>
|
||||||
|
 / 
|
||||||
|
<$edit-text field="color" tag="input" type="text" size="9"/>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user