mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-26 12:53:42 +00:00
Merge branch 'master' into json-ops
This commit is contained in:
@@ -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.
|
||||
|
||||
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)
|
||||
|
||||
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -72,3 +72,6 @@ jobs:
|
||||
- run: "./bin/ci-push.sh"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUBPUSHTOKEN }}
|
||||
- run: "./bin/build-tw-org.sh"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUBPUSHTOKEN }}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.2.2
|
||||
TW5_BUILD_VERSION=v5.2.3
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
97
bin/build-tw-org.sh
Executable file
97
bin/build-tw-org.sh
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Build tiddlywiki.org assets.
|
||||
|
||||
# Default to the version of TiddlyWiki installed in this repo
|
||||
|
||||
if [ -z "$TWORG_BUILD_TIDDLYWIKI" ]; then
|
||||
TWORG_BUILD_TIDDLYWIKI=./tiddlywiki.js
|
||||
fi
|
||||
|
||||
echo "Using TWORG_BUILD_TIDDLYWIKI as [$TWORG_BUILD_TIDDLYWIKI]"
|
||||
|
||||
# Set up the build details
|
||||
|
||||
if [ -z "$TWORG_BUILD_DETAILS" ]; then
|
||||
TWORG_BUILD_DETAILS="$(git symbolic-ref --short HEAD)-$(git rev-parse HEAD) from $(git remote get-url origin)"
|
||||
fi
|
||||
|
||||
echo "Using TWORG_BUILD_DETAILS as [$TWORG_BUILD_DETAILS]"
|
||||
|
||||
if [ -z "$TWORG_BUILD_COMMIT" ]; then
|
||||
TWORG_BUILD_COMMIT="$(git rev-parse HEAD)"
|
||||
fi
|
||||
|
||||
echo "Using TWORG_BUILD_COMMIT as [$TWORG_BUILD_COMMIT]"
|
||||
|
||||
# Set up the build output directory
|
||||
|
||||
if [ -z "$TWORG_BUILD_OUTPUT" ]; then
|
||||
TWORG_BUILD_OUTPUT=$(mktemp -d)
|
||||
fi
|
||||
|
||||
mkdir -p $TWORG_BUILD_OUTPUT
|
||||
|
||||
if [ ! -d "$TWORG_BUILD_OUTPUT" ]; then
|
||||
echo 'A valid TWORG_BUILD_OUTPUT environment variable must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using TWORG_BUILD_OUTPUT as [$TWORG_BUILD_OUTPUT]"
|
||||
|
||||
# Pull existing GitHub pages content
|
||||
|
||||
git clone --depth=1 --branch=main "https://github.com/TiddlyWiki/tiddlywiki.org-gh-pages.git" $TWORG_BUILD_OUTPUT
|
||||
|
||||
# Make the CNAME file that GitHub Pages requires
|
||||
|
||||
echo "tiddlywiki.org" > $TWORG_BUILD_OUTPUT/CNAME
|
||||
|
||||
# Delete any existing static content
|
||||
|
||||
mkdir -p $TWORG_BUILD_OUTPUT/static
|
||||
rm $TWORG_BUILD_OUTPUT/static/*
|
||||
|
||||
# Put the build details into a .tid file so that it can be included in each build (deleted at the end of this script)
|
||||
|
||||
echo -e -n "title: $:/build\ncommit: $TWORG_BUILD_COMMIT\n\n$TWORG_BUILD_DETAILS\n" > $TWORG_BUILD_OUTPUT/build.tid
|
||||
|
||||
######################################################
|
||||
#
|
||||
# tiddlywiki.org distribution
|
||||
#
|
||||
######################################################
|
||||
|
||||
# /index.html Main site
|
||||
# /favicon.ico Favicon for main site
|
||||
# /static.html Static rendering of default tiddlers
|
||||
# /alltiddlers.html Static rendering of all tiddlers
|
||||
# /static/* Static single tiddlers
|
||||
# /static/static.css Static stylesheet
|
||||
# /static/favicon.ico Favicon for static pages
|
||||
node $TWORG_BUILD_TIDDLYWIKI \
|
||||
editions/tw.org \
|
||||
--verbose \
|
||||
--version \
|
||||
--load $TWORG_BUILD_OUTPUT/build.tid \
|
||||
--output $TWORG_BUILD_OUTPUT \
|
||||
--build favicon static index \
|
||||
|| exit 1
|
||||
|
||||
# Delete the temporary build tiddler
|
||||
|
||||
rm $TWORG_BUILD_OUTPUT/build.tid || exit 1
|
||||
|
||||
# Push output back to GitHub
|
||||
|
||||
# Exit script immediately if any command fails
|
||||
set -e
|
||||
|
||||
pushd $TWORG_BUILD_OUTPUT
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git add -A .
|
||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
||||
git remote add deploy "https://$GH_TOKEN@github.com/TiddlyWiki/tiddlywiki.org-gh-pages.git" &>/dev/null
|
||||
git push deploy main &>/dev/null
|
||||
popd
|
||||
@@ -2596,7 +2596,7 @@ $tw.boot.isStartupTaskEligible = function(taskModule) {
|
||||
for(t=0; t<remaining.length; t++) {
|
||||
var task = remaining[t];
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -36,6 +36,8 @@ EditorTypes/Hint: These tiddlers determine which editor is used to edit specific
|
||||
EditorTypes/Type/Caption: Type
|
||||
EditTemplateBody/Caption: Edit Template Body
|
||||
EditTemplateBody/Hint: This rule cascade is used by the default edit template to dynamically choose the template for editing the body of a tiddler.
|
||||
FieldEditor/Caption: Field Editor
|
||||
FieldEditor/Hint: This rules cascade is used to dynamically choose the template for rendering a tiddler field based on its name. It is used within the Edit Template.
|
||||
Info/Caption: Info
|
||||
Info/Hint: Information about this TiddlyWiki
|
||||
KeyboardShortcuts/Add/Prompt: Type shortcut here
|
||||
@@ -226,4 +228,4 @@ Tools/Download/Full/Caption: Download full wiki
|
||||
ViewTemplateBody/Caption: View Template Body
|
||||
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
||||
ViewTemplateTitle/Caption: View Template Title
|
||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||
|
||||
@@ -3,6 +3,7 @@ title: $:/language/Help/default
|
||||
\define commandTitle()
|
||||
$:/language/Help/$(command)$
|
||||
\end
|
||||
\whitespace trim
|
||||
```
|
||||
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
|
||||
```
|
||||
@@ -11,7 +12,9 @@ Available commands:
|
||||
|
||||
<ul>
|
||||
<$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>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -8,46 +8,54 @@ Saves individual tiddlers in their raw text or binary format to the specified fi
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "save",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander,callback) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
if(this.params.length < 1) {
|
||||
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 + "\"");
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "save",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander,callback) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
if(this.params.length < 1) {
|
||||
return "Missing filename filter";
|
||||
}
|
||||
$tw.utils.createFileDirectories(filepath);
|
||||
fs.writeFileSync(filepath,tiddler.fields.text,contentTypeInfo.encoding);
|
||||
});
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
var self = this,
|
||||
fs = require("fs"),
|
||||
path = require("path"),
|
||||
result = null,
|
||||
wiki = this.commander.wiki,
|
||||
tiddlerFilter = this.params[0],
|
||||
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 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);
|
||||
fs.writeFileSync(filepath,tiddler.fields.text,contentTypeInfo.encoding);
|
||||
} else {
|
||||
result = "Tiddler '" + title + "' not found";
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
|
||||
@@ -87,7 +87,8 @@ exports.butlast = function(source,operator,options) {
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(0,-count);
|
||||
var index = count === 0 ? results.length : -count;
|
||||
return results.slice(0,index);
|
||||
};
|
||||
exports.bl = exports.butlast;
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ PutSaver.prototype.save = function(text,method,callback) {
|
||||
if(this.etag) {
|
||||
headers["If-Match"] = this.etag;
|
||||
}
|
||||
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
||||
$tw.utils.httpRequest({
|
||||
url: this.uri(),
|
||||
type: "PUT",
|
||||
@@ -87,17 +88,20 @@ PutSaver.prototype.save = function(text,method,callback) {
|
||||
data: text,
|
||||
callback: function(err,data,xhr) {
|
||||
if(err) {
|
||||
// response is textual: "XMLHttpRequest error code: 412"
|
||||
var status = Number(err.substring(err.indexOf(':') + 2, err.length))
|
||||
var status = xhr.status,
|
||||
errorMsg = err;
|
||||
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
|
||||
callback($tw.language.getString("Error/PutUnauthorized"));
|
||||
errorMsg = $tw.language.getString("Error/PutUnauthorized");
|
||||
} else if(status === 403) { // permission denied
|
||||
callback($tw.language.getString("Error/PutForbidden"));
|
||||
} else {
|
||||
callback(err); // fail
|
||||
errorMsg = $tw.language.getString("Error/PutForbidden");
|
||||
}
|
||||
if (xhr.responseText) {
|
||||
// treat any server response like a plain text error explanation
|
||||
errorMsg = errorMsg + "\n\n" + xhr.responseText;
|
||||
}
|
||||
callback(errorMsg); // fail
|
||||
} else {
|
||||
self.etag = xhr.getResponseHeader("ETag");
|
||||
if(self.etag == null) {
|
||||
|
||||
@@ -64,6 +64,7 @@ UploadSaver.prototype.save = function(text,method,callback) {
|
||||
var tail = "\r\n--" + boundary + "--\r\n",
|
||||
data = head.join("\r\n") + text + tail;
|
||||
// Do the HTTP post
|
||||
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
||||
var http = new XMLHttpRequest();
|
||||
http.open("POST",url,true,username,password);
|
||||
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) {
|
||||
return callback($tw.language.getString("Error/Caption") + ":" + ex);
|
||||
}
|
||||
$tw.notifier.display("$:/language/Notifications/Save/Starting");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,12 +42,17 @@ exports.startup = function() {
|
||||
$tw.styleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_STYLESHEET_TITLE,{document: $tw.fakeDocument});
|
||||
$tw.styleContainer = $tw.fakeDocument.createElement("style");
|
||||
$tw.styleWidgetNode.render($tw.styleContainer,null);
|
||||
$tw.styleWidgetNode.assignedStyles = $tw.styleContainer.textContent;
|
||||
$tw.styleElement = document.createElement("style");
|
||||
$tw.styleElement.innerHTML = $tw.styleContainer.textContent;
|
||||
$tw.styleElement.innerHTML = $tw.styleWidgetNode.assignedStyles;
|
||||
document.head.insertBefore($tw.styleElement,document.head.firstChild);
|
||||
$tw.wiki.addEventListener("change",$tw.perf.report("styleRefresh",function(changes) {
|
||||
if($tw.styleWidgetNode.refresh(changes,$tw.styleContainer,null)) {
|
||||
$tw.styleElement.innerHTML = $tw.styleContainer.textContent;
|
||||
var newStyles = $tw.styleContainer.textContent;
|
||||
if(newStyles !== $tw.styleWidgetNode.assignedStyles) {
|
||||
$tw.styleWidgetNode.assignedStyles = newStyles;
|
||||
$tw.styleElement.innerHTML = $tw.styleWidgetNode.assignedStyles;
|
||||
}
|
||||
}
|
||||
}));
|
||||
// Display the $:/core/ui/PageTemplate tiddler to kick off the display
|
||||
|
||||
@@ -20,6 +20,8 @@ exports.synchronous = true;
|
||||
|
||||
// Global to keep track of open windows (hashmap by title)
|
||||
$tw.windows = {};
|
||||
// Default template to use for new windows
|
||||
var DEFAULT_WINDOW_TEMPLATE = "$:/core/templates/single.tiddler.window";
|
||||
|
||||
exports.startup = function() {
|
||||
// Handle open window message
|
||||
@@ -29,24 +31,25 @@ exports.startup = function() {
|
||||
title = event.param || event.tiddlerTitle,
|
||||
paramObject = event.paramObject || {},
|
||||
windowTitle = paramObject.windowTitle || title,
|
||||
template = paramObject.template || "$:/core/templates/single.tiddler.window",
|
||||
windowID = paramObject.windowID || title,
|
||||
template = paramObject.template || DEFAULT_WINDOW_TEMPLATE,
|
||||
width = paramObject.width || "700",
|
||||
height = paramObject.height || "600",
|
||||
top = paramObject.top,
|
||||
left = paramObject.left,
|
||||
variables = $tw.utils.extend({},paramObject,{currentTiddler: title});
|
||||
variables = $tw.utils.extend({},paramObject,{currentTiddler: title, "tv-window-id": windowID});
|
||||
// Open the window
|
||||
var srcWindow,
|
||||
srcDocument;
|
||||
// In case that popup blockers deny opening a new window
|
||||
try {
|
||||
srcWindow = window.open("","external-" + title,"scrollbars,width=" + width + ",height=" + height + (top ? ",top=" + top : "" ) + (left ? ",left=" + left : "" )),
|
||||
srcWindow = window.open("","external-" + windowID,"scrollbars,width=" + width + ",height=" + height + (top ? ",top=" + top : "" ) + (left ? ",left=" + left : "" )),
|
||||
srcDocument = srcWindow.document;
|
||||
}
|
||||
catch(e) {
|
||||
return;
|
||||
}
|
||||
$tw.windows[title] = srcWindow;
|
||||
$tw.windows[windowID] = srcWindow;
|
||||
// Check for reopening the same window
|
||||
if(srcWindow.haveInitialisedWindow) {
|
||||
return;
|
||||
@@ -56,7 +59,7 @@ exports.startup = function() {
|
||||
srcDocument.close();
|
||||
srcDocument.title = windowTitle;
|
||||
srcWindow.addEventListener("beforeunload",function(event) {
|
||||
delete $tw.windows[title];
|
||||
delete $tw.windows[windowID];
|
||||
$tw.wiki.removeEventListener("change",refreshHandler);
|
||||
},false);
|
||||
// Set up the styles
|
||||
@@ -90,13 +93,21 @@ exports.startup = function() {
|
||||
srcWindow.document.documentElement.addEventListener("click",$tw.popup,true);
|
||||
srcWindow.haveInitialisedWindow = true;
|
||||
});
|
||||
// Close open windows when unloading main window
|
||||
$tw.addUnloadTask(function() {
|
||||
$tw.rootWidget.addEventListener("tm-close-window",function(event) {
|
||||
var windowID = event.param,
|
||||
win = $tw.windows[windowID];
|
||||
if(win) {
|
||||
win.close();
|
||||
}
|
||||
});
|
||||
var closeAllWindows = function() {
|
||||
$tw.utils.each($tw.windows,function(win) {
|
||||
win.close();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
$tw.rootWidget.addEventListener("tm-close-all-windows",closeAllWindows);
|
||||
// Close open windows when unloading main window
|
||||
$tw.addUnloadTask(closeAllWindows);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -13,8 +13,12 @@ Parse tree utility functions.
|
||||
"use strict";
|
||||
|
||||
exports.addAttributeToParseTreeNode = function(node,name,value) {
|
||||
var attribute = {name: name, type: "string", value: value};
|
||||
node.attributes = node.attributes || {};
|
||||
node.attributes[name] = {type: "string", value: value};
|
||||
node.attributes[name] = attribute;
|
||||
if(node.orderedAttributes) {
|
||||
node.orderedAttributes.push(attribute);
|
||||
}
|
||||
};
|
||||
|
||||
exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
||||
@@ -25,26 +29,45 @@ exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
||||
};
|
||||
|
||||
exports.addClassToParseTreeNode = function(node,classString) {
|
||||
var classes = [];
|
||||
var classes = [],
|
||||
attribute;
|
||||
node.attributes = node.attributes || {};
|
||||
node.attributes["class"] = node.attributes["class"] || {type: "string", value: ""};
|
||||
if(node.attributes["class"].type === "string") {
|
||||
if(node.attributes["class"].value !== "") {
|
||||
classes = node.attributes["class"].value.split(" ");
|
||||
attribute = node.attributes["class"];
|
||||
if(!attribute) {
|
||||
// If the class attribute does not exist, we must create it first.
|
||||
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 !== "") {
|
||||
$tw.utils.pushTop(classes,classString.split(" "));
|
||||
}
|
||||
node.attributes["class"].value = classes.join(" ");
|
||||
attribute.value = classes.join(" ");
|
||||
}
|
||||
};
|
||||
|
||||
exports.addStyleToParseTreeNode = function(node,name,value) {
|
||||
node.attributes = node.attributes || {};
|
||||
node.attributes.style = node.attributes.style || {type: "string", value: ""};
|
||||
if(node.attributes.style.type === "string") {
|
||||
node.attributes.style.value += name + ":" + value + ";";
|
||||
var attribute;
|
||||
node.attributes = node.attributes || {};
|
||||
attribute = node.attributes.style;
|
||||
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) {
|
||||
|
||||
@@ -71,8 +71,8 @@ ActionListopsWidget.prototype.invokeAction = function(triggeringWidget,
|
||||
}
|
||||
if(this.subfilter) {
|
||||
var inputList = this.wiki.getTiddlerList(this.target,field,index),
|
||||
subfilter = $tw.utils.stringifyList(inputList) + " " + this.subfilter;
|
||||
this.wiki.setText(this.target, field, index, $tw.utils.stringifyList(this.wiki.filterTiddlers(subfilter,this)));
|
||||
subfilter = "[all[]] " + this.subfilter;
|
||||
this.wiki.setText(this.target, field, index, $tw.utils.stringifyList(this.wiki.filterTiddlers(subfilter,this,this.wiki.makeTiddlerIterator(inputList))));
|
||||
}
|
||||
if(this.filtertags) {
|
||||
var tiddler = this.wiki.getTiddler(this.target),
|
||||
|
||||
@@ -247,7 +247,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled) {
|
||||
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedAttributes["class"]) {
|
||||
|
||||
@@ -35,11 +35,12 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
// Create our elements
|
||||
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.setAttribute("type","checkbox");
|
||||
if(this.getValue()) {
|
||||
this.inputDomNode.setAttribute("checked","true");
|
||||
$tw.utils.addClass(this.labelDomNode,"tc-checkbox-checked");
|
||||
}
|
||||
if(this.isDisabled === "yes") {
|
||||
this.inputDomNode.setAttribute("disabled",true);
|
||||
@@ -59,7 +60,7 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
||||
|
||||
CheckboxWidget.prototype.getValue = function() {
|
||||
var tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
||||
if(tiddler) {
|
||||
if(tiddler || this.checkboxFilter) {
|
||||
if(this.checkboxTag) {
|
||||
if(this.checkboxInvertTag) {
|
||||
return !tiddler.hasTag(this.checkboxTag);
|
||||
@@ -67,12 +68,17 @@ CheckboxWidget.prototype.getValue = function() {
|
||||
return tiddler.hasTag(this.checkboxTag);
|
||||
}
|
||||
}
|
||||
if(this.checkboxField) {
|
||||
if(this.checkboxField || this.checkboxIndex) {
|
||||
// Same logic applies to fields and indexes
|
||||
var value;
|
||||
if($tw.utils.hop(tiddler.fields,this.checkboxField)) {
|
||||
value = tiddler.fields[this.checkboxField] || "";
|
||||
if(this.checkboxField) {
|
||||
if($tw.utils.hop(tiddler.fields,this.checkboxField)) {
|
||||
value = tiddler.fields[this.checkboxField] || "";
|
||||
} else {
|
||||
value = this.checkboxDefault || "";
|
||||
}
|
||||
} else {
|
||||
value = this.checkboxDefault || "";
|
||||
value = this.wiki.extractTiddlerDataItem(tiddler,this.checkboxIndex,this.checkboxDefault || "");
|
||||
}
|
||||
if(value === this.checkboxChecked) {
|
||||
return true;
|
||||
@@ -80,15 +86,46 @@ CheckboxWidget.prototype.getValue = function() {
|
||||
if(value === this.checkboxUnchecked) {
|
||||
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.checkboxIndex) {
|
||||
var value = this.wiki.extractTiddlerDataItem(tiddler,this.checkboxIndex,this.checkboxDefault || "");
|
||||
if(value === this.checkboxChecked) {
|
||||
if(this.checkboxListField || this.checkboxListIndex || this.checkboxFilter) {
|
||||
// Same logic applies to lists and filters
|
||||
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;
|
||||
}
|
||||
if(value === this.checkboxUnchecked) {
|
||||
if(list.indexOf(this.checkboxUnchecked) !== -1) {
|
||||
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) {
|
||||
return false; // Both specified but neither found: default to false
|
||||
}
|
||||
// Neither specified, so empty list is false, non-empty is true
|
||||
return !!list.length;
|
||||
}
|
||||
} else {
|
||||
if(this.checkboxTag) {
|
||||
@@ -114,7 +151,8 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
hasChanged = false,
|
||||
tagCheck = false,
|
||||
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") {
|
||||
tagCheck = hasTag === checked;
|
||||
} else {
|
||||
@@ -148,9 +186,51 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
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(this.checkboxIndex) {
|
||||
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 {
|
||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
|
||||
}
|
||||
@@ -179,6 +259,9 @@ CheckboxWidget.prototype.execute = function() {
|
||||
this.checkboxTag = this.getAttribute("tag");
|
||||
this.checkboxField = this.getAttribute("field");
|
||||
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.checkboxUnchecked = this.getAttribute("unchecked");
|
||||
this.checkboxDefault = this.getAttribute("default");
|
||||
@@ -194,14 +277,20 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||
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.filter || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.disabled) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
var refreshed = false;
|
||||
if(changedTiddlers[this.checkboxTitle]) {
|
||||
this.inputDomNode.checked = this.getValue();
|
||||
var isChecked = this.getValue();
|
||||
this.inputDomNode.checked = isChecked;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ EventWidget.prototype.render = function(parent,nextSibling) {
|
||||
$tw.utils.each(this.types,function(type) {
|
||||
domNode.addEventListener(type,function(event) {
|
||||
var selector = self.getAttribute("selector"),
|
||||
matchSelector = self.getAttribute("matchSelector"),
|
||||
actions = self.getAttribute("$"+type) || self.getAttribute("actions-"+type),
|
||||
stopPropagation = self.getAttribute("stopPropagation","onaction"),
|
||||
selectedNode = event.target,
|
||||
@@ -56,46 +57,49 @@ EventWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(selectedNode.nodeType === 3) {
|
||||
selectedNode = selectedNode.parentNode;
|
||||
}
|
||||
// Check that the selected node matches any matchSelector
|
||||
if(matchSelector && !$tw.utils.domMatchesSelector(selectedNode,matchSelector)) {
|
||||
return false;
|
||||
}
|
||||
if(selector) {
|
||||
// Search ancestors for a node that matches the selector
|
||||
while(!$tw.utils.domMatchesSelector(selectedNode,selector) && selectedNode !== domNode) {
|
||||
selectedNode = selectedNode.parentNode;
|
||||
}
|
||||
// If we found one, copy the attributes as variables, otherwise exit
|
||||
if($tw.utils.domMatchesSelector(selectedNode,selector)) {
|
||||
// Only set up variables if we have actions to invoke
|
||||
if(actions) {
|
||||
$tw.utils.each(selectedNode.attributes,function(attribute) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Exit if we didn't find one
|
||||
if(selectedNode === domNode) {
|
||||
return false;
|
||||
}
|
||||
// Only set up variables if we have actions to invoke
|
||||
if(actions) {
|
||||
$tw.utils.each(selectedNode.attributes,function(attribute) {
|
||||
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
|
||||
if(actions) {
|
||||
|
||||
@@ -159,6 +159,8 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Create elements
|
||||
this.outerDomNode = this.document.createElement("div");
|
||||
$tw.utils.setStyle(this.outerDomNode,[
|
||||
{overflowY: "auto"},
|
||||
{overflowX: "auto"},
|
||||
{webkitOverflowScrolling: "touch"}
|
||||
]);
|
||||
this.innerDomNode = this.document.createElement("div");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/delete
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
\whitespace trim
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button popup=<<qualify "$:/state/filterDeleteDropdown">> class="tc-btn-invisible">
|
||||
{{$:/core/images/delete-button}}
|
||||
|
||||
@@ -3,15 +3,17 @@ tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Standard/Caption}}
|
||||
|
||||
\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>>
|
||||
|
||||
@@ -20,12 +22,19 @@ caption: {{$:/language/Search/Standard/Caption}}
|
||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||
<$keyboard key="shift-alt-Right" actions=<<next-search-tab>>>
|
||||
<$keyboard key="shift-alt-Left" actions=<<next-search-tab "before">>>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
<$macrocall $name="keyboard-driven-input"
|
||||
tiddler="$:/temp/advancedsearch/input"
|
||||
storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||
type="search"
|
||||
tag="input"
|
||||
focus={{$:/config/Search/AutoFocus}}
|
||||
inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
@@ -39,14 +48,22 @@ caption: {{$:/language/Search/Standard/Caption}}
|
||||
</div>
|
||||
|
||||
<$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">
|
||||
<$vars userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} searchListState="$:/temp/advancedsearch/selected-item">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]" emptyMessage="""
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]">
|
||||
<$transclude/>
|
||||
</$list>
|
||||
""">
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/advancedsearch/standard/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||
<$list
|
||||
filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]"
|
||||
emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>"
|
||||
variable="listItem">
|
||||
<$vars
|
||||
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
|
||||
configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
|
||||
searchListState="$:/temp/advancedsearch/selected-item">
|
||||
<$list
|
||||
filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"
|
||||
emptyMessage="<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude/></$list>">
|
||||
<$macrocall $name="tabs"
|
||||
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
||||
default={{$:/config/SearchResults/Default}}
|
||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
|
||||
explicitState="$:/state/tab/search-results/advancedsearch" />
|
||||
</$list>
|
||||
</$vars>
|
||||
</$list>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Advanced
|
||||
tags: $:/tags/ControlPanel/Info
|
||||
caption: {{$:/language/ControlPanel/Advanced/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Advanced/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Appearance
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: {{$:/language/ControlPanel/Appearance/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Appearance/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
||||
\define lingo-base() $:/language/ControlPanel/Basics/
|
||||
|
||||
\define show-filter-count(filter)
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/>
|
||||
@@ -13,9 +14,11 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||
''<$count filter="""$filter$"""/>''
|
||||
 
|
||||
{{$:/core/images/advanced-search-button}}
|
||||
</$button>
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
|<<lingo Version/Prompt>> |''<<version>>'' |
|
||||
|<$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
|
||||
caption: {{$:/language/ControlPanel/Cascades/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Cascades/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
9
core/ui/ControlPanel/Cascades/FieldEditor.tid
Normal file
9
core/ui/ControlPanel/Cascades/FieldEditor.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/FieldEditor
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/FieldEditor/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/FieldEditor/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/FieldEditorFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Advanced
|
||||
caption: {{$:/language/ControlPanel/EditorTypes/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/EditorTypes/
|
||||
\whitespace trim
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Info
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: {{$:/language/ControlPanel/Info/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Info/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
@@ -5,8 +5,11 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/
|
||||
|
||||
\define new-shortcut(title)
|
||||
\whitespace trim
|
||||
<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>>
|
||||
<$action-listops
|
||||
$tiddler="$(shortcutTitle)$"
|
||||
@@ -21,6 +24,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\end
|
||||
|
||||
\define shortcut-list-item(caption)
|
||||
\whitespace trim
|
||||
<td>
|
||||
</td>
|
||||
<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">
|
||||
{{$:/core/images/edit-button}}
|
||||
</$button>
|
||||
 
|
||||
<$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">
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown tc-popup-keep">
|
||||
<$list filter="[list[$(shortcutTitle)$!!text]sort[title]]" variable="shortcut" emptyMessage="""
|
||||
<div class="tc-dropdown-item-plain">
|
||||
//<<lingo NoShortcuts/Caption>>//
|
||||
</div>
|
||||
""">
|
||||
<$list
|
||||
filter="[list[$(shortcutTitle)$!!text]sort[title]]"
|
||||
variable="shortcut"
|
||||
emptyMessage="<div class='tc-dropdown-item-plain'>//<<lingo NoShortcuts/Caption>>//</div>">
|
||||
<div class="tc-dropdown-item-plain">
|
||||
<$button class="tc-btn-invisible" tooltip={{$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint}}>
|
||||
<$action-listops
|
||||
@@ -50,6 +54,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
/>
|
||||
<small>{{$:/core/images/close-button}}</small>
|
||||
</$button>
|
||||
 
|
||||
<kbd>
|
||||
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts=<<shortcut>>/>
|
||||
</kbd>
|
||||
@@ -65,6 +70,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\end
|
||||
|
||||
\define shortcut-list(caption,prefix)
|
||||
\whitespace trim
|
||||
<tr>
|
||||
<$list filter="[[$prefix$$(shortcutName)$]]" variable="shortcutTitle">
|
||||
<<shortcut-list-item "$caption$">>
|
||||
@@ -73,7 +79,8 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\end
|
||||
|
||||
\define shortcut-editor()
|
||||
<<shortcut-list "All" "$:/config/shortcuts/">>
|
||||
\whitespace trim
|
||||
<<shortcut-list "All" "$:/config/shortcuts/">>
|
||||
<<shortcut-list "Mac" "$:/config/shortcuts-mac/">>
|
||||
<<shortcut-list "NonMac" "$:/config/shortcuts-not-mac/">>
|
||||
<<shortcut-list "Linux" "$:/config/shortcuts-linux/">>
|
||||
@@ -87,6 +94,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\end
|
||||
|
||||
\define shortcut-item-inner()
|
||||
\whitespace trim
|
||||
<tr>
|
||||
<td>
|
||||
<$reveal type="nomatch" state=<<dropdownStateTitle>> text="open">
|
||||
@@ -107,6 +115,7 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
 
|
||||
''<$text text=<<shortcutName>>/>''
|
||||
</td>
|
||||
<td>
|
||||
@@ -126,10 +135,12 @@ caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
|
||||
\end
|
||||
|
||||
\define shortcut-item()
|
||||
\whitespace trim
|
||||
<$set name="dropdownStateTitle" value=<<qualify "$:/state/dropdown/keyboardshortcut/$(shortcutName)$">>>
|
||||
<<shortcut-item-inner>>
|
||||
</$set>
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Modals/AddPlugins
|
||||
subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}
|
||||
|
||||
\define install-plugin-actions()
|
||||
\whitespace trim
|
||||
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
|
||||
<$set name="url" value={{!!url}}>
|
||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||
@@ -13,18 +14,21 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
|
||||
\end
|
||||
|
||||
\define install-plugin-button()
|
||||
\whitespace trim
|
||||
<div>
|
||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
||||
<$set name="reinstall-type" value={{{ [<libraryVersion>compare:version:eq<installedVersion>then[tc-reinstall]] [<libraryVersion>compare:version:gt<installedVersion>then[tc-reinstall-upgrade]] [<libraryVersion>compare:version:lt<installedVersion>then[tc-reinstall-downgrade]] }}}>
|
||||
<$button actions=<<install-plugin-actions>> class={{{ [<assetInfo>get[original-title]has[version]then<reinstall-type>] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
||||
{{$:/core/images/download-button}}
|
||||
 
|
||||
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}">
|
||||
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="""
|
||||
<$list filter="[<libraryVersion>compare:version:lt<installedVersion>]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}">
|
||||
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="
|
||||
\whitespace trim
|
||||
<$list filter='[<libraryVersion>compare:version:lt<installedVersion>]' variable='ignore' emptyMessage='{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}'>
|
||||
{{$:/language/ControlPanel/Plugins/Downgrade/Caption}}
|
||||
</$list>
|
||||
""">
|
||||
">
|
||||
{{$:/language/ControlPanel/Plugins/Update/Caption}}
|
||||
</$list>
|
||||
</$list>
|
||||
@@ -43,6 +47,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\define display-plugin-info(type)
|
||||
\whitespace trim
|
||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||
<div class="tc-plugin-info">
|
||||
<div class="tc-plugin-info-chunk tc-plugin-info-toggle">
|
||||
@@ -63,7 +68,9 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
</$list>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
@@ -83,9 +90,9 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
<$set name="currentTiddler" value=<<assetInfo>>>
|
||||
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]]" variable="ignore">
|
||||
<div>
|
||||
{{$:/language/ControlPanel/Plugins/AlsoRequires}}
|
||||
{{$:/language/ControlPanel/Plugins/AlsoRequires}} 
|
||||
<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[name]]" variable="dependency">
|
||||
<$text text=<<dependency>>/>
|
||||
<$text text=<<dependency>>/> 
|
||||
</$list>
|
||||
</div>
|
||||
</$list>
|
||||
@@ -118,16 +125,21 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\define load-plugin-library-button()
|
||||
\whitespace trim
|
||||
<$list filter="[<currentTiddler>get[enabled]else[yes]match[yes]]" variable="ignore">
|
||||
<$button class="tc-btn-big-green">
|
||||
<$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>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\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="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/>
|
||||
@@ -144,6 +156,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\define display-server-connection()
|
||||
\whitespace trim
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
||||
|
||||
<$set name="transclusion" value=<<connectionTiddler>>>
|
||||
@@ -156,16 +169,18 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\define close-library-button()
|
||||
\whitespace trim
|
||||
<$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''>
|
||||
<$button class='tc-btn-big-green'>
|
||||
<$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)$]]"/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
\end
|
||||
|
||||
\define plugin-library-listing()
|
||||
\whitespace trim
|
||||
<div class="tc-tab-set">
|
||||
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
|
||||
<div class="tc-tab-buttons">
|
||||
@@ -187,6 +202,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
<$set name=PluginLibraryURL value={{!!url}}>
|
||||
<<close-library-button>>
|
||||
</$set>
|
||||
 
|
||||
<<display-server-connection>>
|
||||
</$reveal>
|
||||
</$list>
|
||||
@@ -196,6 +212,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\end
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\whitespace trim
|
||||
|
||||
<div>
|
||||
<<plugin-library-listing>>
|
||||
|
||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Parsing/Caption}}
|
||||
\define lingo-base() $:/language/ControlPanel/Parsing/
|
||||
|
||||
\define toggle(Type)
|
||||
\whitespace trim
|
||||
<$checkbox
|
||||
tiddler="""$:/config/WikiParserRules/$Type$/$(rule)$"""
|
||||
field="text"
|
||||
@@ -16,10 +17,12 @@ default="enable">
|
||||
\end
|
||||
|
||||
\define rules(type,Type)
|
||||
\whitespace trim
|
||||
<$list filter="[wikiparserrules[$type$]]" variable="rule">
|
||||
<dd><<toggle $Type$>></dd>
|
||||
</$list>
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
||||
\define lingo-base() $:/language/ControlPanel/Plugins/
|
||||
|
||||
\define plugin-table(type)
|
||||
\whitespace trim
|
||||
<$set name="plugin-type" value="""$type$""">
|
||||
<$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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
\define each-updateable-plugin(body)
|
||||
\whitespace trim
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo">
|
||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||
<$list filter="[<assetInfo>get[original-title]has[version]!version<libraryVersion>]" variable="ignore">
|
||||
@@ -25,8 +26,11 @@ $body$
|
||||
<$wikify name="count-filter" text=<<each-updateable-plugin "[[<$text text=<<assetInfo>>/>]]">>><$count filter=<<count-filter>>/></$wikify>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<$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>
|
||||
|
||||
<div class="tc-plugin-library-listing">
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
title: $:/core/ui/ControlPanel/Plugins/AddPlugins
|
||||
|
||||
\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">
|
||||
{{$:/core/images/download-button}} <<lingo Add/Caption>>
|
||||
{{$:/core/images/download-button}}
|
||||
 
|
||||
<<lingo Add/Caption>>
|
||||
</$button>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Saving
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: {{$:/language/ControlPanel/Saving/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Saving/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
@@ -8,13 +8,14 @@ caption: {{$:/language/ControlPanel/Saving/TiddlySpot/Caption}}
|
||||
http://$(userName)$.tiddlyspot.com/$path$/
|
||||
\end
|
||||
\define siteLink(path)
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" state="$:/UploadName" text="">
|
||||
<$set name="userName" value={{$:/UploadName}}>
|
||||
<$reveal type="match" state="$:/UploadURL" text="">
|
||||
<<siteURL $path$>>
|
||||
</$reveal>
|
||||
<$reveal type="nomatch" state="$:/UploadURL" text="">
|
||||
<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}>>
|
||||
<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}/>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</$reveal>
|
||||
|
||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
||||
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
|
||||
\whitespace trim
|
||||
|
||||
<$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
||||
title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
|
||||
\whitespace trim
|
||||
|
||||
<$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
||||
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
|
||||
\whitespace trim
|
||||
|
||||
<$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings
|
||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
||||
\whitespace trim
|
||||
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
|
||||
|
||||
<$select tiddler="$:/config/Toolbar/ButtonClass">
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Toolbars
|
||||
tags: $:/tags/ControlPanel/Appearance
|
||||
caption: {{$:/language/ControlPanel/Toolbars/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
{{$:/language/ControlPanel/Toolbars/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
|
||||
@@ -3,7 +3,14 @@ title: $:/core/ui/ControlPanel/Toolbars/EditorItemTemplate
|
||||
\define config-title()
|
||||
$(config-base)$$(currentTiddler)$
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<$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>
|
||||
|
||||
@@ -3,7 +3,17 @@ title: $:/core/ui/ControlPanel/Toolbars/ItemTemplate
|
||||
\define config-title()
|
||||
$(config-base)$$(currentTiddler)$
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<$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>
|
||||
|
||||
@@ -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]]
|
||||
|
||||
\define searchResultList()
|
||||
\whitespace trim
|
||||
//<small>{{$:/language/Search/Matches/Title}}</small>//
|
||||
|
||||
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||
|
||||
@@ -1,21 +1,40 @@
|
||||
title: $:/core/ui/EditTemplate
|
||||
|
||||
\define delete-edittemplate-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<newFieldNameInputTiddler>] [<newFieldNameSelectionTiddler>] [<newTagNameTiddler>] [<newTagNameInputTiddler>] [<newTagNameSelectionTiddler>] [<typeInputTiddler>] [<typeSelectionTiddler>]"/>
|
||||
|
||||
\define save-tiddler-actions()
|
||||
\whitespace trim
|
||||
<$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[<newFieldValueTiddler>get<currentTiddler>] }}}/>
|
||||
<<delete-edittemplate-state-tiddlers>>
|
||||
<$action-sendmessage $message="tm-save-tiddler"/>
|
||||
\end
|
||||
|
||||
\define cancel-delete-tiddler-actions(message)
|
||||
<<delete-edittemplate-state-tiddlers>>
|
||||
\whitespace trim
|
||||
<<delete-edittemplate-state-tiddlers>>
|
||||
<$action-sendmessage $message="tm-$message$-tiddler"/>
|
||||
\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>
|
||||
<$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">>>
|
||||
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">>>
|
||||
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>>>
|
||||
<$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">>>
|
||||
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">> 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">
|
||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
title: $:/core/ui/EditTemplate/body/editor
|
||||
|
||||
\whitespace trim
|
||||
|
||||
<$edit
|
||||
|
||||
field="text"
|
||||
|
||||
@@ -8,9 +8,13 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
||||
\end
|
||||
|
||||
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
||||
<$vars 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">
|
||||
\whitespace trim
|
||||
<$let
|
||||
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">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
@@ -28,11 +32,10 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
</div>
|
||||
</$reveal>
|
||||
|
||||
<$reveal stateTitle=<<edit-preview-state>> type="nomatch" text="yes">
|
||||
<$reveal stateTitle=<<edit-preview-state>> type="nomatch" text="yes" tag="div">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
</$reveal>
|
||||
</$dropzone>
|
||||
</$vars>
|
||||
</$set>
|
||||
</$let>
|
||||
|
||||
@@ -4,6 +4,7 @@ tags: $:/tags/EditTemplate
|
||||
\define config-title()
|
||||
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||
\end
|
||||
\whitespace trim
|
||||
<div class="tc-tiddler-title tc-tiddler-edit-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>
|
||||
|
||||
3
core/ui/EditTemplate/fieldEditor-default.tid
Normal file
3
core/ui/EditTemplate/fieldEditor-default.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/EditTemplate/fieldEditor/default
|
||||
|
||||
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> default="" class="tc-edit-texteditor tc-edit-fieldeditor" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||
@@ -15,7 +15,8 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
||||
\end
|
||||
|
||||
\define new-field-actions()
|
||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
\whitespace trim
|
||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldNameTiddler>get[text]] :map[<newFieldValueTiddler>get<currentTiddler>] }}}/>
|
||||
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
||||
\end
|
||||
@@ -23,26 +24,34 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
||||
\define delete-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
|
||||
\define cancel-search-actions-inner()
|
||||
<$list filter="[<storeTitle>has[text]] [<newFieldNameTiddler>has[text]]" variable="ignore" emptyMessage="""<<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>>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions()
|
||||
\whitespace trim
|
||||
<$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"/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define new-field()
|
||||
\whitespace trim
|
||||
<$vars name={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||
<$reveal type="nomatch" text="" default=<<name>>>
|
||||
<$button tooltip=<<lingo Fields/Add/Button/Hint>>>
|
||||
<$action-sendmessage $message="tm-add-field"
|
||||
$name=<<name>>
|
||||
$value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
$value={{{ [<newFieldValueTiddler>get<name>] }}}/>
|
||||
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
<<lingo Fields/Add/Button>>
|
||||
</$button>
|
||||
@@ -66,7 +75,7 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
<$text text=<<currentField>>/>:</td>
|
||||
<td class="tc-edit-field-value">
|
||||
<$keyboard key="((delete-field))" actions="""<$action-deletefield $field=<<currentField>>/><$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/></$set>""">
|
||||
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||
<$transclude tiddler={{{ [<currentField>] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}] }}} />
|
||||
</$keyboard>
|
||||
</td>
|
||||
<td class="tc-edit-field-remove">
|
||||
@@ -126,16 +135,18 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
<$let currentTiddler=<<newFieldValueTiddler>> currentField={{{ [<newFieldNameTiddler>get[text]] }}}>
|
||||
<span class="tc-edit-field-add-value tc-small-gap-right">
|
||||
<$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
||||
<$keyboard key="((add-field))" actions=<<new-field-actions>>>
|
||||
<$edit-text tiddler=<<newFieldValueTiddler>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||
<$transclude tiddler={{{ [<currentField>] :cascade[all[shadows+tiddlers]tag[$:/tags/FieldEditorFilter]!is[draft]get[text]] :and[!is[blank]else{$:/core/ui/EditTemplate/fieldEditor/default}] }}} />
|
||||
</$keyboard>
|
||||
</$set>
|
||||
</span>
|
||||
<span class="tc-edit-field-add-button">
|
||||
<$macrocall $name="new-field"/>
|
||||
</span>
|
||||
</$let>
|
||||
</$vars>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
|
||||
@@ -3,10 +3,12 @@ tags: $:/tags/EditTemplate
|
||||
|
||||
\define lingo-base() $:/language/EditTemplate/Shadow/
|
||||
\define pluginLinkBody()
|
||||
\whitespace trim
|
||||
<$link to="""$(pluginTitle)$""">
|
||||
<$text text="""$(pluginTitle)$"""/>
|
||||
</$link>
|
||||
\end
|
||||
\whitespace trim
|
||||
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
|
||||
|
||||
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/EditTemplate/title
|
||||
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"/>
|
||||
|
||||
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
|
||||
@@ -9,7 +10,7 @@ tags: $:/tags/EditTemplate
|
||||
|
||||
<div class="tc-message-box">
|
||||
|
||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -23,7 +24,7 @@ tags: $:/tags/EditTemplate
|
||||
|
||||
<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>
|
||||
|
||||
@@ -33,18 +34,22 @@ tags: $:/tags/EditTemplate
|
||||
|
||||
<$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">
|
||||
|
||||
<$vars stateTiddler=<<qualify "$:/state/edit/references">> >
|
||||
|
||||
<$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>
|
||||
</$reveal>
|
||||
<$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>
|
||||
</$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[]]
|
||||
dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown
|
||||
|
||||
\whitespace trim
|
||||
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed">
|
||||
{{$:/core/images/fixed-height}}
|
||||
</$reveal>
|
||||
|
||||
@@ -3,9 +3,10 @@ title: $:/core/ui/EditorToolbar/excise-dropdown
|
||||
\define lingo-base() $:/language/Buttons/Excise/
|
||||
|
||||
\define body(config-title)
|
||||
\whitespace trim
|
||||
''<<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}}>
|
||||
<$list filter="""[<new-title>is[tiddler]]""">
|
||||
@@ -15,16 +16,16 @@ title: $:/core/ui/EditorToolbar/excise-dropdown
|
||||
</$list>
|
||||
</$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="transclude"><<lingo Caption/Replace/Transclusion>></option>
|
||||
<option value="macro"><<lingo Caption/Replace/Macro>></option>
|
||||
</$select>
|
||||
|
||||
<$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>
|
||||
|
||||
<$button>
|
||||
|
||||
@@ -13,6 +13,7 @@ condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]
|
||||
\define replacement-text-file() [[$title$]]
|
||||
|
||||
\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">
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
@@ -24,10 +25,13 @@ condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]
|
||||
\end
|
||||
|
||||
\define buttons()
|
||||
\whitespace trim
|
||||
<$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>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="popup" state=<<importState>> tag="div" class="tc-editor-importpopup">
|
||||
<div class="tc-editor-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 add-link-actions()
|
||||
\whitespace trim
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
||||
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
\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 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
|
||||
|
||||
\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()
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
||||
{{$:/core/images/chevron-right}}
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<nextTab>>/>"""/>
|
||||
\define 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)
|
||||
\whitespace trim
|
||||
''<<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">>>
|
||||
@@ -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">
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
||||
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
||||
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
||||
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
 
|
||||
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
||||
<<external-link>>
|
||||
 
|
||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
||||
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
||||
{{$:/core/images/close-button}}
|
||||
|
||||
@@ -5,10 +5,14 @@ $:/config/EditorToolbarButtons/Visibility/$(toolbarItem)$
|
||||
\end
|
||||
|
||||
\define conditional-button()
|
||||
\whitespace trim
|
||||
<$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>
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<div class="tc-text-editor-toolbar-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()
|
||||
<div style="display: inline-block; vertical-align: middle; background-color: $(colour-picker-value)$; width: 1em; height: 1em; border-radius: 50%;"/>
|
||||
\end
|
||||
\whitespace trim
|
||||
<$set name="colour-picker-value" value={{$:/config/BitmapEditor/Colour}}>
|
||||
<<toolbar-paint>>
|
||||
</$set>
|
||||
|
||||
@@ -8,6 +8,7 @@ condition: [<targetTiddler>]
|
||||
button-classes: tc-text-editor-toolbar-item-start-group
|
||||
shortcuts: ((preview))
|
||||
|
||||
\whitespace trim
|
||||
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
||||
{{$:/core/images/preview-open}}
|
||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
||||
|
||||
@@ -33,9 +33,14 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
||||
\end
|
||||
|
||||
\define toolbar-button-size(config-title)
|
||||
\whitespace trim
|
||||
''{{$:/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}}
|
||||
</$button>
|
||||
|
||||
|
||||
@@ -3,20 +3,30 @@ title: $:/core/ui/ExportTiddlyWikiCore
|
||||
\define jsFileName() tiddlywikicore-$(version)$.js
|
||||
\define noExportMsg()
|
||||
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>
|
||||
\end
|
||||
\rules except wikilink
|
||||
\whitespace trim
|
||||
|
||||
''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">
|
||||
<$list filter="[[$:/boot/boot.js]is[missing]]" variable="ignore" emptyMessage="""<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/tiddlywiki5.js" filename=<<jsFileName>>/>""" >
|
||||
<$button
|
||||
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-sendmessage $message="tm-modal" $param=<<qualify "$:/temp/alert">>/>
|
||||
</$list>
|
||||
{{$:/core/images/download-button}} Download ~TiddlyWiki core
|
||||
{{$:/core/images/download-button}}
|
||||
 
|
||||
Download TiddlyWiki core
|
||||
</$button>
|
||||
|
||||
[[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 overWriteWarning()
|
||||
\whitespace trim
|
||||
<$list filter="[<currentTiddler>!has<suppressedField>]">
|
||||
<$text text={{{[subfilter<payloadTitleFilter>!is[tiddler]then[]] ~[<lingo-base>addsuffix[Listing/Rename/OverwriteWarning]get[text]]}}}/>
|
||||
</$list>
|
||||
@@ -43,16 +44,19 @@ title: $:/core/ui/ImportListing
|
||||
\define renameFieldState() $(currentTiddler)$!!state-rename-$(payloadTiddler)$
|
||||
|
||||
\define select-all-actions()
|
||||
\whitespace trim
|
||||
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
|
||||
<$action-setfield $field={{{ [<payloadTiddler>addprefix[selection-]] }}} $value={{$:/state/import/select-all}}/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<table class="tc-import-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th align="left">
|
||||
<$checkbox tiddler="$:/state/import/select-all" field="text" checked="checked" unchecked="unchecked" default="checked" actions=<<select-all-actions>>>
|
||||
 
|
||||
<<lingo Listing/Select/Caption>>
|
||||
</$checkbox>
|
||||
</th>
|
||||
@@ -88,16 +92,30 @@ title: $:/core/ui/ImportListing
|
||||
</td>
|
||||
<td>
|
||||
<<selectionInfo>>
|
||||
 
|
||||
<<libraryInfo>>
|
||||
 
|
||||
<<overWriteWarning>>
|
||||
</td>
|
||||
</tr>
|
||||
<$reveal type="match" state=<<renameFieldState>> text="yes" tag="tr">
|
||||
<td colspan="3">
|
||||
<div class="tc-flex">
|
||||
<$edit-text tiddler=<<newImportTitleTiddler>> default={{{[subfilter<payloadTitleFilter>]}}} tag="input" class="tc-import-rename tc-flex-grow-1"/><span class="tc-small-gap-left"><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/CancelRename]get[text]]}}}>{{$:/core/images/close-button}}<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button><span class="tc-small-gap-right"/></span><$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/ConfirmRename]get[text]]}}}>{{$:/core/images/done-button}}<$action-setfield $field=<<renameField>> $value={{{[<newImportTitleTiddler>get[text]minlength[1]else<payloadTiddler>]}}} /><$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/></$button>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<div class="tc-flex">
|
||||
<$edit-text tiddler=<<newImportTitleTiddler>> default={{{[subfilter<payloadTitleFilter>]}}} tag="input" class="tc-import-rename tc-flex-grow-1"/>
|
||||
<span class="tc-small-gap-left">
|
||||
<$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/CancelRename]get[text]]}}}>
|
||||
{{$:/core/images/close-button}}
|
||||
<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/>
|
||||
</$button>
|
||||
<span class="tc-small-gap-right"/>
|
||||
</span>
|
||||
<$button class="tc-btn-invisible" set=<<renameFieldState>> setTo="no" tooltip={{{[<lingo-base>addsuffix[Listing/Rename/ConfirmRename]get[text]]}}}>
|
||||
{{$:/core/images/done-button}}
|
||||
<$action-setfield $field=<<renameField>> $value={{{[<newImportTitleTiddler>get[text]minlength[1]else<payloadTiddler>]}}} />
|
||||
<$action-deletetiddler $tiddler=<<newImportTitleTiddler>>/>
|
||||
</$button>
|
||||
</div>
|
||||
</td>
|
||||
</$reveal>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ImportPreviews/Fields
|
||||
tags: $:/tags/ImportPreview
|
||||
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
||||
|
||||
\whitespace trim
|
||||
<table class="tc-view-field-table">
|
||||
<tbody>
|
||||
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/advanced-search
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((advanced-search))
|
||||
|
||||
\whitespace trim
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||
<$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
|
||||
key: ((change-sidebar-layout))
|
||||
|
||||
<$list filter="[{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]]"
|
||||
emptyMessage="""<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fixed-fluid"/>""">
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]]"
|
||||
emptyMessage="<$action-setfield $tiddler='$:/themes/tiddlywiki/vanilla/options/sidebarlayout' text='fixed-fluid'/>">
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" text="fluid-fixed"/>
|
||||
</$list>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-image
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((new-image))
|
||||
|
||||
\whitespace trim
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
{{$:/core/ui/Actions/new-image}}
|
||||
</$navigator>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-journal
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((new-journal))
|
||||
|
||||
\whitespace trim
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
{{$:/core/ui/Actions/new-journal}}
|
||||
</$navigator>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/new-tiddler
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((new-tiddler))
|
||||
|
||||
\whitespace trim
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
{{$:/core/ui/Actions/new-tiddler}}
|
||||
</$navigator>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/KeyboardShortcuts/save-wiki
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((save-wiki))
|
||||
|
||||
\whitespace trim
|
||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
||||
</$wikify>
|
||||
|
||||
@@ -2,8 +2,9 @@ title: $:/core/ui/KeyboardShortcuts/toggle-sidebar
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((toggle-sidebar))
|
||||
|
||||
<$list filter="[[$:/state/sidebar]is[missing]] [{$:/state/sidebar}removeprefix[yes]]" emptyMessage="""
|
||||
<$action-setfield $tiddler="$:/state/sidebar" text="yes"/>
|
||||
""">
|
||||
\whitespace trim
|
||||
<$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"/>
|
||||
</$list>
|
||||
|
||||
@@ -2,14 +2,26 @@ title: $:/snippets/LayoutSwitcher
|
||||
tags: $:/tags/ControlPanel/Appearance
|
||||
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
<$linkcatcher to="$:/layout">
|
||||
<div class="tc-chooser">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
||||
<$list filter="[{$:/layout}!has[text]]" variable="ignore" emptyMessage="""
|
||||
<$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>
|
||||
<$list
|
||||
filter="[{$:/layout}!has[text]]"
|
||||
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>
|
||||
</$list>
|
||||
</$list>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
title: $:/core/ui/ListItemTemplate
|
||||
|
||||
<div class="tc-menu-list-item">
|
||||
<$link />
|
||||
</div>
|
||||
<div class="tc-menu-list-item"><$link /></div>
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/snippets/ListTaggedCascade
|
||||
|
||||
\whitespace trim
|
||||
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
||||
|
||||
<ol>
|
||||
|
||||
@@ -5,16 +5,17 @@ color: #bbb
|
||||
\define lingo-base() $:/language/Manager/
|
||||
|
||||
\define list-item-content-item()
|
||||
\whitespace trim
|
||||
<div class="tc-manager-list-item-content-item">
|
||||
<$vars state-title="""$:/state/popup/manager/item/$(listItem)$""">
|
||||
<$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">
|
||||
{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$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">
|
||||
{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$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>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-manager-wrapper">
|
||||
<div class="tc-manager-controls">
|
||||
<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="tags"><<lingo Controls/Show/Option/Tags>></option>
|
||||
</$select>
|
||||
</div>
|
||||
<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 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>
|
||||
<$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag">
|
||||
<option value=<<tag>>><$text text=<<tag>>/></option>
|
||||
@@ -44,7 +46,7 @@ color: #bbb
|
||||
</$select>
|
||||
</div>
|
||||
<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">
|
||||
<$list filter="title modified modifier created creator created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
@@ -56,12 +58,15 @@ color: #bbb
|
||||
</$list>
|
||||
</optgroup>
|
||||
</$select>
|
||||
 
|
||||
<$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
||||
 
|
||||
<<lingo Controls/Order/Prompt>>
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system">
|
||||
 
|
||||
{{$:/language/SystemTiddlers/Include/Prompt}}
|
||||
</$checkbox>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/Manager/ItemSidebar/Icon
|
||||
tags: $:/tags/Manager/ItemSidebar
|
||||
caption: {{$:/language/Manager/Item/Icon}}
|
||||
|
||||
\whitespace trim
|
||||
<p>
|
||||
<div class="tc-manager-icon-editor">
|
||||
<$button popup=<<qualify "$:/state/popup/image-picker">> class="tc-btn-invisible">
|
||||
@@ -12,10 +13,9 @@ caption: {{$:/language/Manager/Item/Icon}}
|
||||
<div class="tc-block-dropdown-wrapper" style="position: static;">
|
||||
<$reveal state=<<qualify "$:/state/popup/image-picker">> type="nomatch" text="" default="" tag="div" class="tc-popup">
|
||||
<div class="tc-block-dropdown tc-popup-keep" style="width: 80%; left: 10%; right: 10%; padding: 0.5em;">
|
||||
<$macrocall $name="image-picker-include-tagged-images" actions="""
|
||||
<$action-setfield $field="icon" $value=<<imageTitle>>/>
|
||||
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/image-picker">>/>
|
||||
"""/>
|
||||
<$macrocall
|
||||
$name="image-picker-include-tagged-images"
|
||||
actions="<$action-setfield $field='icon' $value=<<imageTitle>>/><$action-deletetiddler $tiddler=<<qualify '$:/state/popup/image-picker'>>/>"/>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/MissingTemplate
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-tiddler-missing">
|
||||
<$button popup=<<qualify "$:/state/popup/missing">> class="tc-btn-invisible tc-missing-tiddler-label">
|
||||
<$view field="title" format="text" />
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/MoreSideBar/Types
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: {{$:/language/SideBar/Types/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
<$list filter={{$:/core/Filters/TypedTiddlers!!filter}}>
|
||||
<div class="tc-menu-list-item">
|
||||
<$view field="type"/>
|
||||
|
||||
@@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Plugins/Languages
|
||||
tags: $:/tags/MoreSideBar/Plugins
|
||||
caption: {{$:/language/ControlPanel/Plugins/Languages/Caption}}
|
||||
|
||||
<$list filter="[!has[draft.of]plugin-type[language]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>
|
||||
<$list filter="[!has[draft.of]plugin-type[language]sort[name]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>
|
||||
|
||||
@@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Plugins/Plugins
|
||||
tags: $:/tags/MoreSideBar/Plugins
|
||||
caption: {{$:/language/ControlPanel/Plugins/Plugins/Caption}}
|
||||
|
||||
<$list filter="[!has[draft.of]plugin-type[plugin]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}>>/>
|
||||
<$list filter="[!has[draft.of]plugin-type[plugin]sort[name]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}>>/>
|
||||
|
||||
@@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Plugins/Theme
|
||||
tags: $:/tags/MoreSideBar/Plugins
|
||||
caption: {{$:/language/ControlPanel/Plugins/Themes/Caption}}
|
||||
|
||||
<$list filter="[!has[draft.of]plugin-type[theme]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>
|
||||
<$list filter="[!has[draft.of]plugin-type[theme]sort[name]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>
|
||||
|
||||
@@ -16,6 +16,6 @@ description: {{$:/language/Buttons/ControlPanel/Hint}}
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$list filter="[list[$:/StoryList]] +[field:title[$:/ControlPanel]]" emptyMessage=<<control-panel-button>>>
|
||||
<$list filter="[list<tv-story-list>] +[field:title[$:/ControlPanel]]" emptyMessage=<<control-panel-button>>>
|
||||
<<control-panel-button "tc-selected">>
|
||||
</$list>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/PageStylesheet
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\whitespace trim
|
||||
|
||||
<$set name="currentTiddler" value={{$:/language}}>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ title: $:/PaletteManager
|
||||
edit $(colourName)$
|
||||
\end
|
||||
\define colour-tooltip(showhide) $showhide$ editor for $(newColourName)$
|
||||
|
||||
\define resolve-colour(macrocall)
|
||||
\import $:/core/macros/utils
|
||||
\whitespace trim
|
||||
@@ -15,6 +16,7 @@ title: $:/PaletteManager
|
||||
<<name>>
|
||||
</$wikify>
|
||||
\end
|
||||
|
||||
\define delete-colour-index-actions() <$action-setfield $index=<<colourName>>/>
|
||||
\define palette-manager-colour-row-segment()
|
||||
\whitespace trim
|
||||
@@ -41,6 +43,7 @@ title: $:/PaletteManager
|
||||
</$set>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define palette-manager-colour-row()
|
||||
\whitespace trim
|
||||
<tr>
|
||||
@@ -57,28 +60,30 @@ title: $:/PaletteManager
|
||||
</td>
|
||||
</tr>
|
||||
\end
|
||||
|
||||
\define palette-manager-table()
|
||||
\whitespace trim
|
||||
<table>
|
||||
<tbody>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]indexes[]]" variable="colourName">
|
||||
<$list filter="[<currentTiddler>indexes[]removeprefix<colourName>suffix[]]" variable="ignore" emptyMessage="""
|
||||
<$list filter="[{$:/state/palettemanager/showexternal}removeprefix[yes]suffix[]]" variable="ignore">
|
||||
<<palette-manager-colour-row>>
|
||||
</$list>
|
||||
""">
|
||||
<$list
|
||||
filter="[<currentTiddler>indexes[]removeprefix<colourName>suffix[]]"
|
||||
variable="ignore"
|
||||
emptyMessage="<$list filter='[{$:/state/palettemanager/showexternal}removeprefix[yes]suffix[]]' variable='ignore'><<palette-manager-colour-row>></$list>">
|
||||
<<palette-manager-colour-row>>
|
||||
</$list>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
\end
|
||||
\whitespace trim
|
||||
<$set name="currentTiddler" value={{$:/palette}}>
|
||||
|
||||
<<lingo Prompt>> <$link to={{$:/palette}}><$macrocall $name="currentTiddler" $output="text/plain"/></$link>
|
||||
<<lingo Prompt>> <$link to={{$:/palette}}><$macrocall $name="currentTiddler" $output="text/plain"/></$link>
|
||||
|
||||
<$list filter="[all[current]is[shadow]is[tiddler]]" variable="listItem">
|
||||
<<lingo Prompt/Modified>>
|
||||
 
|
||||
<$button message="tm-delete-tiddler" param={{$:/palette}}><<lingo Reset/Caption>></$button>
|
||||
</$list>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ $(currentTiddler)$/$(currentTab)$
|
||||
\define default-tiddler-title()
|
||||
$:/core/ui/PluginInfo/Default/$(currentTab)$
|
||||
\end
|
||||
\whitespace trim
|
||||
<$transclude tiddler=<<localised-info-tiddler-title>> mode="block">
|
||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode="block">
|
||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode="block">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/PluginInfo/Default/contents
|
||||
|
||||
\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/
|
||||
\whitespace trim
|
||||
<<lingo Hint>>
|
||||
<ul>
|
||||
<$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<<lingo Empty/Hint>>>
|
||||
|
||||
@@ -2,13 +2,15 @@ title: $:/core/ui/SearchResults
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
<$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 mode="block"/>
|
||||
</$list>
|
||||
""">
|
||||
<$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 mode='block'/></$list>">
|
||||
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<currentTab>>/>""" explicitState="$:/state/tab/search-results/sidebar"/>
|
||||
<$macrocall $name="tabs"
|
||||
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
|
||||
default={{$:/config/SearchResults/Default}}
|
||||
actions="<$action-setfield $tiddler='$:/state/search/currentTab' text=<<currentTab>>/>"
|
||||
explicitState="$:/state/tab/search-results/sidebar"/>
|
||||
|
||||
</$list>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/SideBar/More
|
||||
tags: $:/tags/SideBar
|
||||
caption: {{$:/language/SideBar/More/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-more-sidebar">
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]" default={{$:/config/DefaultMoreSidebarTab}} state="$:/state/tab/moresidebar" class="tc-vertical tc-sidebar-tabs-more" explicitState="$:/state/tab/moresidebar-1850697562"/>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ caption: {{$:/language/SideBar/Open/Caption}}
|
||||
|
||||
\define droppable-item(button)
|
||||
\whitespace trim
|
||||
<$droppable actions=<<drop-actions>> enable=<<tv-allow-drag-and-drop>>>
|
||||
<$droppable actions=<<drop-actions>> enable=<<tv-allow-drag-and-drop>> tag="div">
|
||||
<<placeholder>>
|
||||
<div>
|
||||
$button$
|
||||
@@ -26,12 +26,12 @@ $button$
|
||||
<div class="tc-sidebar-tab-open">
|
||||
<$list filter="[list<tv-story-list>]" history=<<tv-history-list>> storyview="pop">
|
||||
<div class="tc-sidebar-tab-open-item">
|
||||
<$macrocall $name="droppable-item" button="""<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="tc-btn-invisible tc-btn-mini tc-small-gap-right">{{$:/core/images/close-button}}</$button><$link to={{!!title}}><$view field="title"/></$link>"""/>
|
||||
<$macrocall $name="droppable-item" button="<$button message='tm-close-tiddler' tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class='tc-btn-invisible tc-btn-mini tc-small-gap-right'>{{$:/core/images/close-button}}</$button><$link to={{!!title}}><$view field='title'/></$link>"/>
|
||||
</div>
|
||||
</$list>
|
||||
<$tiddler tiddler="">
|
||||
<div>
|
||||
<$macrocall $name="droppable-item" button="""<$button message="tm-close-all-tiddlers" class="tc-btn-invisible tc-btn-mini"><<lingo Button>></$button>"""/>
|
||||
<$macrocall $name="droppable-item" button="<$button message='tm-close-all-tiddlers' class='tc-btn-invisible tc-btn-mini'><<lingo Button>></$button>"/>
|
||||
</div>
|
||||
</$tiddler>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/TiddlerFieldTemplate
|
||||
|
||||
\whitespace trim
|
||||
<tr class="tc-view-field">
|
||||
<td class="tc-view-field-name">
|
||||
<$text text=<<listItem>>/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/TiddlerFields
|
||||
|
||||
\whitespace trim
|
||||
<table class="tc-view-field-table">
|
||||
<tbody>
|
||||
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/TiddlerInfo
|
||||
|
||||
\whitespace trim
|
||||
<div style="position:relative;">
|
||||
<div class="tc-tiddler-controls" style="position:absolute;right:0;">
|
||||
<$reveal state="$:/config/TiddlerInfo/Mode" type="match" text="sticky">
|
||||
|
||||
@@ -5,4 +5,5 @@ caption: {{$:/language/TiddlerInfo/Advanced/Caption}}
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem">
|
||||
|
||||
<$transclude tiddler=<<listItem>> mode="block"/>
|
||||
|
||||
</$list>
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/TiddlerInfo/Advanced/PluginInfo
|
||||
tags: $:/tags/TiddlerInfo/Advanced
|
||||
|
||||
\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/
|
||||
\whitespace trim
|
||||
<$list filter="[all[current]has[plugin-type]]">
|
||||
|
||||
! <<lingo Heading>>
|
||||
|
||||
@@ -19,6 +19,7 @@ tags: $:/tags/TiddlerInfo/Advanced
|
||||
<$list filter="[all[current]shadowsource[]]">
|
||||
|
||||
<$set name="pluginTiddler" value=<<currentTiddler>>>
|
||||
|
||||
<<lingo Shadow/Source>>
|
||||
</$set>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/TopBar/menu
|
||||
tags: $:/tags/TopRightBar
|
||||
|
||||
\whitespace trim
|
||||
<$list filter="[[$:/state/sidebar]get[text]] +[else[yes]!match[no]]" variable="ignore">
|
||||
<$button set="$:/state/sidebar" setTo="no" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class="tc-btn-invisible tc-hide-sidebar-btn">{{$:/core/images/chevron-right}}</$button>
|
||||
</$list>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/UntaggedTemplate
|
||||
|
||||
\define lingo-base() $:/language/SideBar/
|
||||
\whitespace trim
|
||||
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-untagged-label tc-tag-label">
|
||||
<<lingo Tags/Untagged/Caption>>
|
||||
</$button>
|
||||
|
||||
@@ -3,6 +3,7 @@ title: $:/core/ui/ViewTemplate/body/import
|
||||
\define lingo-base() $:/language/Import/
|
||||
|
||||
\define confirmCancel()
|
||||
\whitespace trim
|
||||
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
||||
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
||||
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
||||
@@ -10,14 +11,18 @@ title: $:/core/ui/ViewTemplate/body/import
|
||||
\end
|
||||
|
||||
\define buttons()
|
||||
\whitespace trim
|
||||
<$button actions=<<confirmCancel>> ><<lingo Listing/Cancel/Caption>></$button>
|
||||
 
|
||||
<$button message="tm-perform-import" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>
|
||||
<<lingo Listing/Preview>> <$select tiddler="$:/state/importpreviewtype" default="$:/core/ui/ImportPreviews/Text">
|
||||
 
|
||||
<<lingo Listing/Preview>> <$select tiddler="$:/state/importpreviewtype" default="$:/core/ui/ImportPreviews/Text">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportPreview]!has[draft.of]]">
|
||||
<option value=<<currentTiddler>>>{{!!caption}}</option>
|
||||
</$list>
|
||||
</$select>
|
||||
\end
|
||||
\whitespace trim
|
||||
|
||||
<$list filter="[all[current]field:plugin-type[import]]">
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/ViewTemplate/body/plugin
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-tiddler-plugin-info">
|
||||
<$let plugin-type={{!!plugin-type}}
|
||||
default-popup-state="yes"
|
||||
|
||||
@@ -2,6 +2,7 @@ title: $:/core/ui/ViewTemplate/classic
|
||||
tags: $:/tags/ViewTemplate $:/tags/EditTemplate
|
||||
|
||||
\define lingo-base() $:/language/ClassicWarning/
|
||||
\whitespace trim
|
||||
<$list filter="[all[current]type[text/x-tiddlywiki]]">
|
||||
<div class="tc-message-box">
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user