From 05280f09d79a5b8eff6e6fc6d70f3d05d701b0bf Mon Sep 17 00:00:00 2001
From: TheDiveO
Date: Tue, 30 Sep 2014 23:01:32 +0200
Subject: [PATCH 001/117] Added new filter operator for adding prefixes and
suffixes to titles; these new filter operators are useful in contexts where
only a filter expression is allowed and where macro processing isn't allowed.
The filters complement the existing remove suffix and prefix filter
operators. (So much for the "filter" in filter operator.)
---
core/modules/filters/addprefix.js | 28 ++++++++++++++++++++++++++++
core/modules/filters/addsuffix.js | 28 ++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644 core/modules/filters/addprefix.js
create mode 100644 core/modules/filters/addsuffix.js
diff --git a/core/modules/filters/addprefix.js b/core/modules/filters/addprefix.js
new file mode 100644
index 000000000..d1f0a822b
--- /dev/null
+++ b/core/modules/filters/addprefix.js
@@ -0,0 +1,28 @@
+/*\
+title: $:/core/modules/filters/addprefix.js
+type: application/javascript
+module-type: filteroperator
+
+Filter operator for adding a prefix to each title in the list. This is
+especially useful in contexts where only a filter expression is allowed
+and macro substitution isn't available.
+
+\*/
+(function(){
+
+/*jslint node: true, browser: true */
+/*global $tw: false */
+"use strict";
+
+/*
+Export our filter function
+*/
+exports.addprefix = function(source,operator,options) {
+ var results = [];
+ source(function(tiddler,title) {
+ results.push(operator.operand + title);
+ });
+ return results;
+};
+
+})();
diff --git a/core/modules/filters/addsuffix.js b/core/modules/filters/addsuffix.js
new file mode 100644
index 000000000..fb80c2573
--- /dev/null
+++ b/core/modules/filters/addsuffix.js
@@ -0,0 +1,28 @@
+/*\
+title: $:/core/modules/filters/addsuffix.js
+type: application/javascript
+module-type: filteroperator
+
+Filter operator for adding a suffix to each title in the list. This is
+especially useful in contexts where only a filter expression is allowed
+and macro substitution isn't available.
+
+\*/
+(function(){
+
+/*jslint node: true, browser: true */
+/*global $tw: false */
+"use strict";
+
+/*
+Export our filter function
+*/
+exports.addsuffix = function(source,operator,options) {
+ var results = [];
+ source(function(tiddler,title) {
+ results.push(title + operator.operand);
+ });
+ return results;
+};
+
+})();
From 5dd6ebff05a3380db2901294b2cfc89c1a0e71bf Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 09:18:29 +0100
Subject: [PATCH 002/117] Fix problem with zoomin storyview and hidden sidebar
Fixes #933
---
core/modules/storyviews/zoomin.js | 15 ++++++---------
themes/tiddlywiki/vanilla/base.tid | 11 +++++++++++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js
index 0ae8e8f46..0588d58f7 100644
--- a/core/modules/storyviews/zoomin.js
+++ b/core/modules/storyviews/zoomin.js
@@ -35,7 +35,7 @@ var ZoominListView = function(listWidget) {
} else {
self.currentTiddlerDomNode = domNode;
}
- domNode.style.position = "absolute";
+ $tw.utils.addClass(domNode,"tc-storyview-zoomin-tiddler");
});
};
@@ -52,9 +52,8 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
return;
}
// Make the new tiddler be position absolute and visible so that we can measure it
+ $tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
- {position: "absolute"},
- {display: "block"},
{transformOrigin: "0 0"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@@ -134,9 +133,9 @@ ZoominListView.prototype.insert = function(widget) {
return;
}
// Make the newly inserted node position absolute and hidden
+ $tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
- {display: "none"},
- {position: "absolute"}
+ {display: "none"}
]);
};
@@ -152,9 +151,8 @@ ZoominListView.prototype.remove = function(widget) {
return;
}
// Set up the tiddler that is being closed
+ $tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
- {position: "absolute"},
- {display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@@ -168,9 +166,8 @@ ZoominListView.prototype.remove = function(widget) {
var toWidgetDomNode = toWidget && toWidget.findFirstDomNode();
// Set up the tiddler we're moving back in
if(toWidgetDomNode) {
+ $tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(toWidgetDomNode,[
- {position: "absolute"},
- {display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(10)"},
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index 31c1da4da..54ea117df 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -850,6 +850,17 @@ canvas.tc-edit-bitmapeditor {
width: 10%;
}
+/*
+** Storyview Classes
+*/
+
+.tc-storyview-zoomin-tiddler {
+ position: absolute;
+ display: block;
+ width: 100%;
+ width: calc(100% - 84px);
+}
+
/*
** Dropdowns
*/
From 61acea7e8d8eae8fb8860b41ccab476f73852e81 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Mon, 6 Oct 2014 16:32:23 +0800
Subject: [PATCH 003/117] make simpler
---
editions/tw5.com/tiddlers/howtos/Upgrading.tid | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/editions/tw5.com/tiddlers/howtos/Upgrading.tid b/editions/tw5.com/tiddlers/howtos/Upgrading.tid
index db04fd0b2..8d0117687 100644
--- a/editions/tw5.com/tiddlers/howtos/Upgrading.tid
+++ b/editions/tw5.com/tiddlers/howtos/Upgrading.tid
@@ -13,18 +13,16 @@ The process described here is for upgrading standalone TiddlyWiki files. There i
<<<
When upgrading, please remember the [[The First Rule of Using TiddlyWiki]]:
-//You are responsible for looking after your own data; take care to make backups, especially when upgrading the ~TiddlyWiki core//
+//Backup your data!//
<<<
! Online upgrading
This process will work on most desktop browsers. Note that none of your personal data leaves your browser with this process.
-# Locate your TiddlyWiki file in the file system (ie using Windows Explorer, the Finder on Mac OS X, or your file manager on Linux)
-# Visit http://tiddlywiki.com/upgrade.html in your browser
+# Visit the new version tiddywiki in http://tiddlywiki.com/upgrade.html in your browser
# Drag your old TiddlyWiki HTML file into the browser window
#* If the file is encrypted you will be prompted for the password
-# Review the list of tiddlers that will be upgraded
# Click ''Upgrade''
# Save changes to save the new version
From 67db9d57a28f065845f1beaa6c99915dd5d46d2c Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 10:02:20 +0100
Subject: [PATCH 004/117] Boot prefix should preserve $tw in the browser
This change allows raw markup tiddlers to preload configuration values
into the `$tw` global
---
boot/bootprefix.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/bootprefix.js b/boot/bootprefix.js
index d22620858..bff9a2aa2 100644
--- a/boot/bootprefix.js
+++ b/boot/bootprefix.js
@@ -99,7 +99,7 @@ return $tw
if(typeof(exports) === "undefined") {
// Set up $tw global for the browser
- window.$tw = _bootprefix();
+ window.$tw = _bootprefix(window.$tw);
} else {
// Export functionality as a module
exports.bootprefix = _bootprefix;
From 0c8e5380778303cdd3308bed4a15290214841f8b Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 10:02:34 +0100
Subject: [PATCH 005/117] Add support for custom password prompts
---
boot/boot.js | 8 +++--
.../How to customise the password prompt.tid | 15 +++++++++
.../tiddlers/system/PatchEncryptionPrompt.tid | 33 +++++++++++++++++++
3 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 editions/dev/tiddlers/from tw5.com/How to customise the password prompt.tid
create mode 100644 editions/dev/tiddlers/system/PatchEncryptionPrompt.tid
diff --git a/boot/boot.js b/boot/boot.js
index 9d838a0d6..02307f600 100644
--- a/boot/boot.js
+++ b/boot/boot.js
@@ -1244,10 +1244,14 @@ Decrypt any tiddlers stored within the element with the ID "encryptedArea". The
$tw.boot.decryptEncryptedTiddlers = function(callback) {
var encryptedArea = document.getElementById("encryptedStoreArea");
if(encryptedArea) {
- var encryptedText = encryptedArea.innerHTML;
+ var encryptedText = encryptedArea.innerHTML,
+ prompt = "Enter a password to decrypt this TiddlyWiki";
// Prompt for the password
+ if($tw.utils.hop($tw.boot,"encryptionPrompts")) {
+ prompt = $tw.boot.encryptionPrompts.decrypt;
+ }
$tw.passwordPrompt.createPrompt({
- serviceName: "Enter a password to decrypt this TiddlyWiki",
+ serviceName: prompt,
noUserName: true,
submitText: "Decrypt",
callback: function(data) {
diff --git a/editions/dev/tiddlers/from tw5.com/How to customise the password prompt.tid b/editions/dev/tiddlers/from tw5.com/How to customise the password prompt.tid
new file mode 100644
index 000000000..53eb35433
--- /dev/null
+++ b/editions/dev/tiddlers/from tw5.com/How to customise the password prompt.tid
@@ -0,0 +1,15 @@
+title: How to customise the password prompt
+tags: howto
+created: 20141006085526118
+modified: 20141006085526118
+
+You can customise the text and appearance of the password prompt that is displayed when encrypted TiddlyWiki files are first opened.
+
+To do so, create a tiddler tagged {{$:/core/wiki/rawmarkup|$:/core/ui/TagTemplate}} containing:
+
+# A JavaScript `
+
From b7bbcfa05659808c1e51a4f2f5f1d6afbc2ed3a1 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 10:22:09 +0100
Subject: [PATCH 006/117] Prompt twice when setting password
Fixes #364
---
boot/boot.js | 33 +++++++++++++++++++++-----------
core/modules/startup/password.js | 1 +
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/boot/boot.js b/boot/boot.js
index 02307f600..2ac978d72 100644
--- a/boot/boot.js
+++ b/boot/boot.js
@@ -477,6 +477,7 @@ submitText: text to use for submit button (defaults to "Login")
serviceName: text of the human readable service name
noUserName: set true to disable username prompt
canCancel: set true to enable a cancel button (callback called with null)
+repeatPassword: set true to prompt for the password twice
callback: function to be called on submission with parameter of object {username:,password:}. Callback must return `true` to remove the password prompt
*/
$tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
@@ -493,6 +494,11 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
children.push(dm("input",{
attributes: {type: "password", name: "password", placeholder: "Password"}
}));
+ if(options.repeatPassword) {
+ children.push(dm("input",{
+ attributes: {type: "password", name: "password2", placeholder: "Repeat password"}
+ }));
+ }
if(options.canCancel) {
children.push(dm("button",{
text: "Cancel",
@@ -527,18 +533,23 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
data[element.name] = element.value;
}
});
- // Call the callback
- if(options.callback(data)) {
- // Remove the prompt if the callback returned true
- self.removePrompt(promptInfo);
+ // Check that the passwords match
+ if(options.repeatPassword && data.password !== data.password2) {
+ alert("Passwords do not match");
} else {
- // Clear the password if the callback returned false
- $tw.utils.each(form.elements,function(element) {
- if(element.name === "password") {
- element.value = "";
- }
- });
- }
+ // Call the callback
+ if(options.callback(data)) {
+ // Remove the prompt if the callback returned true
+ self.removePrompt(promptInfo);
+ } else {
+ // Clear the password if the callback returned false
+ $tw.utils.each(form.elements,function(element) {
+ if(element.name === "password" || element.name === "password2") {
+ element.value = "";
+ }
+ });
+ }
+ }
event.preventDefault();
return false;
},true);
diff --git a/core/modules/startup/password.js b/core/modules/startup/password.js
index 41902e9e9..8913d0833 100644
--- a/core/modules/startup/password.js
+++ b/core/modules/startup/password.js
@@ -25,6 +25,7 @@ exports.startup = function() {
noUserName: true,
submitText: "Set password",
canCancel: true,
+ repeatPassword: true,
callback: function(data) {
if(data) {
$tw.crypto.setPassword(data.password);
From e6d59ece6f99b9bfe49fa2d2fae6f3b9025c8954 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Mon, 6 Oct 2014 22:36:02 +0800
Subject: [PATCH 007/117] add how to install plugin
---
editions/tw5.com/tiddlers/plugins/Plugins.tid | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/editions/tw5.com/tiddlers/plugins/Plugins.tid b/editions/tw5.com/tiddlers/plugins/Plugins.tid
index 00b6ae653..5f223e968 100644
--- a/editions/tw5.com/tiddlers/plugins/Plugins.tid
+++ b/editions/tw5.com/tiddlers/plugins/Plugins.tid
@@ -19,3 +19,13 @@ The tiddlers within a plugin appear as ShadowTiddlers.
Plugins can contain JavaScript modules, style sheets, and templates to extend the functionality of TiddlyWiki itself. Plugins can also be used to distribute ordinary text, images or other content. Plugins can be updated from their source as a unit.
See the PluginMechanism discussion for more details about how plugins are implemented internally.
+
+''How to Install a TW5 plugin?''
+
+# Create a backup of your current TiddlyWiki 5 installation (just for case)
+# Open your TiddlyWiki 5 in browser
+# Find a plugin, e.g. [[$:/plugins/xxx/ooo]] (this link just a example, you need to find a real plugin)
+# Move this link: [[$:/plugins/xxx/ooo]] to browser window where is opened your TiddlyWiki
+# Save your TiddlyWiki
+# Refresh the window
+# Now, you can use it
From a2ddf6c4a0fef01dff60272fb6ba7662c9e3b968 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Mon, 6 Oct 2014 23:19:16 +0800
Subject: [PATCH 008/117] i'm not sure what i'm doing...
---
licenses/cla-individual.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md
index 6c3ab1f26..aaa073497 100644
--- a/licenses/cla-individual.md
+++ b/licenses/cla-individual.md
@@ -174,3 +174,5 @@ Ton Gerner, @gernert, 2014/09/19
Julie Bertrand, @Evolena, 2014/09/22
Andrey Yankin, @andrey013, 2014/09/30
+
+David john, @fghhfg, 2014/10/06
From 0d7209ff2fe2a5b85ec601bef160a6fde47fed06 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Mon, 6 Oct 2014 23:38:48 +0800
Subject: [PATCH 009/117] more clear "How to sign the CLA"
---
editions/tw5.com/tiddlers/community/Contributing.tid | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/editions/tw5.com/tiddlers/community/Contributing.tid b/editions/tw5.com/tiddlers/community/Contributing.tid
index bca4442f0..8baebe86c 100644
--- a/editions/tw5.com/tiddlers/community/Contributing.tid
+++ b/editions/tw5.com/tiddlers/community/Contributing.tid
@@ -24,6 +24,12 @@ Like other OpenSource projects, TiddlyWiki5 needs a signed contributor license a
Create a GitHub pull request to add your name to `cla-individual.md` or `cla-entity.md`, with the date in the format (YYYY/MM/DD).
+''step by step''
+
+# click [[licenses/CLA-individual|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md]] or [[licenses/CLA-entity|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md]]
+# in `cla-individual.md` or `cla-entity.md` click icon on the top-right corner (clicking this button will fork the project so you can edit the file)
+# add you name under the bottom
+
eg: `Jeremy Ruston, @Jermolene, 2011/11/22`
---
From f2e97eeb25268ab03f2145e7d93567fba53ff24e Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Tue, 7 Oct 2014 00:38:12 +0800
Subject: [PATCH 010/117] add a example
---
editions/tw5.com/tiddlers/widgets/BrowseWidget.tid | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid b/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid
index cc997f8df..e29a556e4 100644
--- a/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid
+++ b/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid
@@ -16,3 +16,13 @@ The content of the `<$browse>` widget is ignored.
|multiple |Set to "multiple" to select multiple file upload |
On iPhone/iPad choosing the multiple option will remove the ability to take photographs/videos directly into TiddlyWiki.
+
+''e.g.''
+
+```
+<$browse>
+```
+
+renders as:
+
+<$browse>
From 651ed60987cd3d2060bad389def8d681c6c7f741 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Tue, 7 Oct 2014 02:28:40 +0800
Subject: [PATCH 011/117] add some way to invoke macro
---
.../tiddlers/wikitext/Macros in WikiText.tid | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/editions/tw5.com/tiddlers/wikitext/Macros in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Macros in WikiText.tid
index aa242e4c1..0872f26b8 100644
--- a/editions/tw5.com/tiddlers/wikitext/Macros in WikiText.tid
+++ b/editions/tw5.com/tiddlers/wikitext/Macros in WikiText.tid
@@ -71,3 +71,20 @@ By using triple-double quotes you can specify parameter values that include sing
Rodentville,
Ratland.""">>
```
+
+! Invoked
+
+There are many different ways to invoke macro.A macro called `italicise` that takes a single parameter called `text` can be invoked in any of these ways:
+
+```
+<>
+<>
+<$macrocall $name="italicise" text="Text to be made into italics"/>
+<$macrocall $name="italicise" text={{Title of tiddler containing text to be italicised}}/>
+<$macrocall $name="italicise" text=<>/>
+```
+
+''also see''
+
+* [[Macros]]
+* [[MacroCallWidget]]
From f6f9c74fe97ac3f17cc4bfa4fd555b6c7075dd49 Mon Sep 17 00:00:00 2001
From: TheDiveO
Date: Mon, 6 Oct 2014 21:49:54 +0200
Subject: [PATCH 012/117] added documentation tiddlers for addprefix and
addsuffix; updated documentation tiddlers for prefix, suffix, removeprefix,
removesuffix to reference the new addprefix and addsuffix filter operators.
---
.../tiddlers/filters/FilterOperator addprefix.tid | 15 +++++++++++++++
.../tiddlers/filters/FilterOperator addsuffix.tid | 15 +++++++++++++++
.../tiddlers/filters/FilterOperator prefix.tid | 2 +-
.../filters/FilterOperator removeprefix.tid | 2 +-
.../filters/FilterOperator removesuffix.tid | 2 +-
.../tiddlers/filters/FilterOperator suffix.tid | 2 +-
6 files changed, 34 insertions(+), 4 deletions(-)
create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid
create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid
new file mode 100644
index 000000000..48ac8129d
--- /dev/null
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid
@@ -0,0 +1,15 @@
+created: 20140410103123179
+modified: 20140410103123179
+tags: Filters
+caption: addprefix
+title: FilterOperator: addprefix
+type: text/vnd.tiddlywiki
+
+The ''addprefix'' filter operator add a prefix to all titles in the current list.
+
+For example:
+
+|!Filter String |!Description |
+|`one two three +[addprefix[tid-]]` |Returns `tid-one`, `tid-two`, `tid-three` |
+
+See also [[FilterOperator: prefix]], [[FilterOperator: suffix]], [[FilterOperator: addsuffix]], [[FilterOperator: removeprefix]] and [[FilterOperator: removesuffix]].
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid
new file mode 100644
index 000000000..ecd3748b7
--- /dev/null
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid
@@ -0,0 +1,15 @@
+created: 20140828133830424
+modified: 20140902145613329
+tags: Filters
+caption: addsuffix
+title: FilterOperator: addsuffix
+type: text/vnd.tiddlywiki
+
+The ''addsuffix'' filter operator adds a suffix to all titles in the current list.
+
+For example:
+
+|!Filter String |!Description |
+|`one two three +[addsuffix[-tid]]` |Returns `one-tid`, `two-tid`, `three-tid` |
+
+See also [[FilterOperator: suffix]], [[FilterOperator: prefix]], [[FilterOperator: addprefix]], [[FilterOperator: removesuffix]], and [[FilterOperator: removeprefix]].
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid
index 41139bbb4..af965c7c6 100644
--- a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid
@@ -13,4 +13,4 @@ For example:
|`[tag[task]!prefix[hidden]]` |Returns tiddlers tagged `task` whose titles do not start with `hidden` |
|`[prefix[$:/]]` |Equivalent to `[is[system]]` |
-See also [[FilterOperator: removeprefix]], [[FilterOperator: removesuffix]] and [[FilterOperator: removesuffix]].
+See also [[FilterOperator: removeprefix]], [[FilterOperator: removesuffix]], [[FilterOperator: removesuffix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]].
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid
index a3aebd3bd..c9ab7b69a 100644
--- a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid
@@ -12,4 +12,4 @@ For example:
|!Filter String |!Description |
|`tid-one tid-two three +[removeprefix[tid-]]` |Returns `one`, `two` |
-See also [[FilterOperator: prefix]], [[FilterOperator: suffix]] and [[FilterOperator: removesuffix]].
+See also [[FilterOperator: prefix]], [[FilterOperator: suffix]], [[FilterOperator: removesuffix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]].
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid
index b07a4e3d2..9b55a9383 100644
--- a/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid
@@ -12,4 +12,4 @@ For example:
|!Filter String |!Description |
|`one-tid two-tid three +[removesuffix[-tid]]` |Returns `one`, `two` |
-See also [[FilterOperator: suffix]], [[FilterOperator: prefix]] and [[FilterOperator: removeprefix]].
+See also [[FilterOperator: suffix]], [[FilterOperator: prefix]], [[FilterOperator: removeprefix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]].
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid
index a82c9fca5..0c12a01a2 100644
--- a/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid
+++ b/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid
@@ -13,4 +13,4 @@ For example:
|`[tag[task]!suffix[hidden]]` |Returns tiddlers tagged `task` whose titles do not end with `hidden` |
|`[suffix[.jpg]]` |Returns tiddlers whose titles end with `.jpg` |
-See also [[FilterOperator: removesuffix]], [[FilterOperator: prefix]] and [[FilterOperator: removeprefix]].
+See also [[FilterOperator: removesuffix]], [[FilterOperator: prefix]], [[FilterOperator: removeprefix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]].
From cbe2a53d6a8bbd22f53d88a3b8e7fde2f3f05630 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 21:10:35 +0100
Subject: [PATCH 013/117] Extend fakedom for KaTeX on Node.js
To make KaTeX work on the server we need to add support for the style
attribute and for setting the textContent of an element.
---
core/modules/utils/fakedom.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js
index dd36369a2..d7cb633b7 100755
--- a/core/modules/utils/fakedom.js
+++ b/core/modules/utils/fakedom.js
@@ -39,6 +39,7 @@ var TW_Element = function(tag,namespace) {
this.attributes = {};
this.isRaw = false;
this.children = [];
+ this.style = {};
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
};
@@ -137,6 +138,13 @@ Object.defineProperty(TW_Element.prototype, "outerHTML", {
}
}
}
+ if(this.style) {
+ var style = [];
+ for(var s in this.style) {
+ style.push(s + ":" + this.style[s] + ";");
+ }
+ output.push(" style='",style.join(""),"'")
+ }
output.push(">");
if($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {
output.push(this.innerHTML);
@@ -179,6 +187,9 @@ Object.defineProperty(TW_Element.prototype, "textContent", {
});
return b.join("");
}
+ },
+ set: function(value) {
+ this.children = [new TW_TextNode(value)];
}
});
From 63c174d7ed56284e80ad6cd6ae966b81f9181cc9 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 21:20:19 +0100
Subject: [PATCH 014/117] Update KaTeX wrapper to support operation under
Node.js
Now we can generate static HTML containing mathematical typesetting
---
core/modules/utils/fakedom.js | 4 +++-
editions/katexdemo/tiddlers/HelloThere.tid | 4 +---
editions/katexdemo/tiddlywiki.info | 7 ++++++-
plugins/tiddlywiki/katex/files/tiddlywiki.files | 4 +++-
plugins/tiddlywiki/katex/wrapper.js | 6 +++++-
5 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js
index d7cb633b7..1c4bf2755 100755
--- a/core/modules/utils/fakedom.js
+++ b/core/modules/utils/fakedom.js
@@ -143,7 +143,9 @@ Object.defineProperty(TW_Element.prototype, "outerHTML", {
for(var s in this.style) {
style.push(s + ":" + this.style[s] + ";");
}
- output.push(" style='",style.join(""),"'")
+ if(style.length > 0) {
+ output.push(" style='",style.join(""),"'")
+ }
}
output.push(">");
if($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {
diff --git a/editions/katexdemo/tiddlers/HelloThere.tid b/editions/katexdemo/tiddlers/HelloThere.tid
index 719121c1e..c3ecef5bb 100644
--- a/editions/katexdemo/tiddlers/HelloThere.tid
+++ b/editions/katexdemo/tiddlers/HelloThere.tid
@@ -2,9 +2,7 @@ title: HelloThere
This is a TiddlyWiki plugin for mathematical typesetting based on KaTeX from Khan Academy.
-It is completely self-contained, and doesn't need an Internet connection in order to work.
-
-//This first version of the plugin cannot be used to generate static content under Node.js, but that capability will come in a future update. (Note that you can still use it when running the client-server configuration under Node.js).//
+It is completely self-contained, and doesn't need an Internet connection in order to work. It works both in the browser and under Node.js.
! Installation
diff --git a/editions/katexdemo/tiddlywiki.info b/editions/katexdemo/tiddlywiki.info
index 8f24a036e..b45c7b950 100644
--- a/editions/katexdemo/tiddlywiki.info
+++ b/editions/katexdemo/tiddlywiki.info
@@ -10,6 +10,11 @@
],
"build": {
"index": [
- "--rendertiddler","$:/core/save/all","katexdemo.html","text/plain"]
+ "--rendertiddler","$:/core/save/all","katexdemo.html","text/plain"],
+ "static": [
+ "--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
+ "--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
+ "--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
+ "--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
}
}
diff --git a/plugins/tiddlywiki/katex/files/tiddlywiki.files b/plugins/tiddlywiki/katex/files/tiddlywiki.files
index 1c290da42..522f9e7fe 100644
--- a/plugins/tiddlywiki/katex/files/tiddlywiki.files
+++ b/plugins/tiddlywiki/katex/files/tiddlywiki.files
@@ -78,7 +78,9 @@
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/katex/katex.min.js",
"module-type": "library"
- }
+ },
+ "prefix": "(function(document) {\n",
+ "suffix": "\n})($tw.node ? $tw.fakeDocument : window.document)\n"
}
]
}
diff --git a/plugins/tiddlywiki/katex/wrapper.js b/plugins/tiddlywiki/katex/wrapper.js
index 517ff5950..1e91d5223 100644
--- a/plugins/tiddlywiki/katex/wrapper.js
+++ b/plugins/tiddlywiki/katex/wrapper.js
@@ -37,7 +37,11 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) {
// Render it into a span
var span = this.document.createElement("span");
try {
- katex.render(text,span);
+ if($tw.browser) {
+ katex.render(text,span);
+ } else {
+ span.innerHTML = katex.renderToString(text);
+ }
} catch(ex) {
span.className = "tc-error";
span.textContent = ex;
From 548776e828534a216e5d8f400a4dd043a2bd9052 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 6 Oct 2014 21:20:28 +0100
Subject: [PATCH 015/117] Add KaTeX static build
---
bin/fullbld.sh | 1 +
readme.md | 58 ++++++++++++++++++++++++++++++++++----------------
2 files changed, 41 insertions(+), 18 deletions(-)
diff --git a/bin/fullbld.sh b/bin/fullbld.sh
index c54ef8a9f..736ace45b 100755
--- a/bin/fullbld.sh
+++ b/bin/fullbld.sh
@@ -106,6 +106,7 @@ node ./tiddlywiki.js \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
--rendertiddler $:/core/save/empty plugins/tiddlywiki/katex/empty.html text/plain \
+ --rendertiddler $:/core/templates/static.template.html plugins/tiddlywiki/katex/static.html text/plain \
|| exit 1
# /plugins/tiddlywiki/tahoelafs/index.html Demo wiki with Tahoe-LAFS plugin
diff --git a/readme.md b/readme.md
index 7cceed996..be28003ce 100644
--- a/readme.md
+++ b/readme.md
@@ -1,167 +1,189 @@
Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.
TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText.
Running tiddlywiki from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix --.
Running tiddlywiki from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix --.
From 811e92c0eb80d85f21ceb6d2cf3f8b4090a66e25 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 13:02:43 +0100
Subject: [PATCH 016/117] Docs update
---
editions/tw5.com/tiddlers/community/Contributing.tid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/editions/tw5.com/tiddlers/community/Contributing.tid b/editions/tw5.com/tiddlers/community/Contributing.tid
index 8baebe86c..e07553141 100644
--- a/editions/tw5.com/tiddlers/community/Contributing.tid
+++ b/editions/tw5.com/tiddlers/community/Contributing.tid
@@ -28,7 +28,7 @@ Create a GitHub pull request to add your name to `cla-individual.md` or `cla-ent
# click [[licenses/CLA-individual|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md]] or [[licenses/CLA-entity|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md]]
# in `cla-individual.md` or `cla-entity.md` click icon on the top-right corner (clicking this button will fork the project so you can edit the file)
-# add you name under the bottom
+# add your name at the bottom
eg: `Jeremy Ruston, @Jermolene, 2011/11/22`
From cda495d692ecdb56e43f931c47528b402e4b7479 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 13:16:04 +0100
Subject: [PATCH 017/117] Doc tweaks
---
editions/tw5.com/tiddlers/plugins/Plugins.tid | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/editions/tw5.com/tiddlers/plugins/Plugins.tid b/editions/tw5.com/tiddlers/plugins/Plugins.tid
index 5f223e968..5cf0eb025 100644
--- a/editions/tw5.com/tiddlers/plugins/Plugins.tid
+++ b/editions/tw5.com/tiddlers/plugins/Plugins.tid
@@ -20,12 +20,12 @@ Plugins can contain JavaScript modules, style sheets, and templates to extend th
See the PluginMechanism discussion for more details about how plugins are implemented internally.
-''How to Install a TW5 plugin?''
+! How to install a plugin
-# Create a backup of your current TiddlyWiki 5 installation (just for case)
-# Open your TiddlyWiki 5 in browser
-# Find a plugin, e.g. [[$:/plugins/xxx/ooo]] (this link just a example, you need to find a real plugin)
-# Move this link: [[$:/plugins/xxx/ooo]] to browser window where is opened your TiddlyWiki
+# Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]])
+# Open your TiddlyWiki in a browser
+# Find a link to a plugin, e.g. [[$:/plugins/tiddlywiki/example]] (this link is just a example, you need to find a real plugin)
+# Move the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki
# Save your TiddlyWiki
# Refresh the window
-# Now, you can use it
+# The plugin should now be available for use
From dd829d9140d2cc933c11aaaa518149b152216081 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 13:16:24 +0100
Subject: [PATCH 018/117] Docs tweaks
---
editions/tw5.com/tiddlers/plugins/Plugins.tid | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/editions/tw5.com/tiddlers/plugins/Plugins.tid b/editions/tw5.com/tiddlers/plugins/Plugins.tid
index 5cf0eb025..702070bfa 100644
--- a/editions/tw5.com/tiddlers/plugins/Plugins.tid
+++ b/editions/tw5.com/tiddlers/plugins/Plugins.tid
@@ -24,8 +24,8 @@ See the PluginMechanism discussion for more details about how plugins are implem
# Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]])
# Open your TiddlyWiki in a browser
-# Find a link to a plugin, e.g. [[$:/plugins/tiddlywiki/example]] (this link is just a example, you need to find a real plugin)
-# Move the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki
+# In another browser window, find a link to the plugin, e.g. [[$:/plugins/tiddlywiki/example]]. You will typically find links to plugins on the home page of the plugin (for example, http://tiddlywiki.com/plugins/tiddlywiki/katex/)
+# Drag the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki
# Save your TiddlyWiki
# Refresh the window
# The plugin should now be available for use
From 09b6540998fec6bf1fb14842be8e8c53dbd5c46a Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 14:07:41 +0100
Subject: [PATCH 019/117] Update history for tm-home message
---
core/modules/startup/story.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js
index 6c7258485..460e48ba3 100644
--- a/core/modules/startup/story.js
+++ b/core/modules/startup/story.js
@@ -59,6 +59,9 @@ exports.startup = function() {
var storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),
storyList = $tw.wiki.filterTiddlers(storyFilter);
$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: "", list: storyList},$tw.wiki.getModificationFields());
+ if(storyList[0]) {
+ $tw.wiki.addToHistory(storyList[0]);
+ }
});
// Listen for the tm-permalink message
$tw.rootWidget.addEventListener("tm-permalink",function(event) {
From a0460c391b0971df7ffebeec1b65603de37b8221 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 14:07:55 +0100
Subject: [PATCH 020/117] Fix problem with recent zoomin changes
---
core/modules/storyviews/zoomin.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js
index 0588d58f7..1a66bdf33 100644
--- a/core/modules/storyviews/zoomin.js
+++ b/core/modules/storyviews/zoomin.js
@@ -54,6 +54,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
// Make the new tiddler be position absolute and visible so that we can measure it
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
+ {display: "block"},
{transformOrigin: "0 0"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@@ -153,6 +154,7 @@ ZoominListView.prototype.remove = function(widget) {
// Set up the tiddler that is being closed
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
+ {display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@@ -168,6 +170,7 @@ ZoominListView.prototype.remove = function(widget) {
if(toWidgetDomNode) {
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(toWidgetDomNode,[
+ {display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(10)"},
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
From ef1d5310918dae088ce9361c1682ce0f99cf568a Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 14:35:42 +0100
Subject: [PATCH 021/117] Add confirmation for clearing password
Fixes #925
---
core/language/en-GB/Misc.multids | 2 ++
core/modules/startup/password.js | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids
index 0e9b91d2c..991fe28f9 100644
--- a/core/language/en-GB/Misc.multids
+++ b/core/language/en-GB/Misc.multids
@@ -9,6 +9,8 @@ ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<>/>
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<>/>"?
ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<>/>"?
DropMessage: Drop here (or click escape to cancel)
+Encryption/ConfirmClearPassword: Do you wish to clear the password? This will remove the encryption applied when saving this wiki
+Encryption/PromptSetPassword: Set a new password for this TiddlyWiki
InvalidFieldName: Illegal characters in field name "<$text text=<>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)
MissingTiddler/Hint: Missing tiddler "<$text text=<>/>" - click {{$:/core/images/edit-button}} to create
RecentChanges/DateFormat: DDth MMM YYYY
diff --git a/core/modules/startup/password.js b/core/modules/startup/password.js
index 8913d0833..6205b3e7d 100644
--- a/core/modules/startup/password.js
+++ b/core/modules/startup/password.js
@@ -21,7 +21,7 @@ exports.synchronous = true;
exports.startup = function() {
$tw.rootWidget.addEventListener("tm-set-password",function(event) {
$tw.passwordPrompt.createPrompt({
- serviceName: "Set a new password for this TiddlyWiki",
+ serviceName: $tw.language.getString("Encryption/PromptSetPassword"),
noUserName: true,
submitText: "Set password",
canCancel: true,
@@ -35,6 +35,11 @@ exports.startup = function() {
});
});
$tw.rootWidget.addEventListener("tm-clear-password",function(event) {
+ if($tw.browser) {
+ if(!confirm($tw.language.getString("Encryption/ConfirmClearPassword"))) {
+ return;
+ }
+ }
$tw.crypto.setPassword(null);
});
// Ensure that $:/isEncrypted is maintained properly
From 70c8659948ad817b7256fd5f216961dab0440cc5 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 15:50:46 +0100
Subject: [PATCH 022/117] Update release note
---
.../tiddlers/releasenotes/Release 5.1.3.tid | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid
index 0edc92ab3..20834ce95 100644
--- a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid
+++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid
@@ -10,18 +10,32 @@ type: text/vnd.tiddlywiki
!! Usability Improvements
-*
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/tree/master/languages/ru-RU]] Russian translation
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ef1d5310918dae088ce9361c1682ce0f99cf568a]] confirmation when clearing password
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b7bbcfa05659808c1e51a4f2f5f1d6afbc2ed3a1]] additional prompt when setting password
+* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/63c174d7ed56284e80ad6cd6ae966b81f9181cc9]] ~KaTeX plugin to be able to work under Node.js to generate static HTML
!! Hackability Improvements
-*
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/65504d5d41e45326ab1b1b6c0c21eea4c9772797]] new [[FilterOperator: addprefix]] and [[FilterOperator: addsuffix]]
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0c8e5380778303cdd3308bed4a15290214841f8b]] support for custom password prompts
+* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/c26bd4c5a872f56c47e9f5cfc3fada468c53ddde]] the ListMacro to display ''caption'' field if present
!! Bug Fixes
-*
+* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/cc576b052e2b05fd93fcb4f3eb8d9ee5278abf3e]] [[FilterOperator: each]] to work with missing tiddlers
+* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/5dd6ebff05a3380db2901294b2cfc89c1a0e71bf]] problem with tiddler width in zoomin storyview with the sidebar hidden
+* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/09b6540998fec6bf1fb14842be8e8c53dbd5c46a]] bug whereby the `tm-home` message wasn't navigating to a tiddler, causing problems in zoomin storyview
+* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/3ca8d7b6cca46ffa424bcf9bdc134da464fc84f4]] problem with jumping toolbar icons under Firefox
+* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/f85b07e70b71d0622a9459e4b04e2027540abda8]] problem with untagged label being incorrectly coloured
!! Contributors
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
+* [[@andrey013|https://github.com/andrey013]]
+* [[@Eucaly|https://github.com/Eucaly]]
+* [[@fghhfg|https://github.com/fghhfg]]
* [[@pmario|https://github.com/pmario]]
+* [[@TheDiveO|https://github.com/TheDiveO]]
+
From b3dcd7d625ec83701ef3a77f3fb8101af57c154f Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 20:41:22 +0100
Subject: [PATCH 023/117] Fix tiddler title background colour for sticky titles
---
themes/tiddlywiki/stickytitles/styles.tid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/tiddlywiki/stickytitles/styles.tid b/themes/tiddlywiki/stickytitles/styles.tid
index 3276d5cfe..179a7084d 100644
--- a/themes/tiddlywiki/stickytitles/styles.tid
+++ b/themes/tiddlywiki/stickytitles/styles.tid
@@ -10,5 +10,5 @@ tags: [[$:/tags/Stylesheet]]
position: -ms-sticky;
position: sticky;
top: 0px;
- background: #fff;
+ background: <>;
}
From b3c3442024bc3231c71d26af46159a28d456a11e Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Wed, 8 Oct 2014 04:21:13 +0800
Subject: [PATCH 024/117] Update Learning.tid
---
editions/tw5.com/tiddlers/learning/Learning.tid | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/editions/tw5.com/tiddlers/learning/Learning.tid b/editions/tw5.com/tiddlers/learning/Learning.tid
index 0318a2f3b..14a18a1b7 100644
--- a/editions/tw5.com/tiddlers/learning/Learning.tid
+++ b/editions/tw5.com/tiddlers/learning/Learning.tid
@@ -10,3 +10,7 @@ Learn more about using TiddlyWiki:
<>
+---
+
+* [[WikiText]] - advanced TiddlyWiki syntax
+* [[Reference]] - there is everything about TiddlyWiki, including macros, widgets messages, filters etc...
From ff23a84d2832859391744d600245b53845bd6824 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 21:44:54 +0100
Subject: [PATCH 025/117] Docs tweaks
---
editions/tw5.com/tiddlers/learning/Learning.tid | 5 +----
editions/tw5.com/tiddlers/reference/Reference.tid | 6 +++++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/editions/tw5.com/tiddlers/learning/Learning.tid b/editions/tw5.com/tiddlers/learning/Learning.tid
index 14a18a1b7..07f4a2b64 100644
--- a/editions/tw5.com/tiddlers/learning/Learning.tid
+++ b/editions/tw5.com/tiddlers/learning/Learning.tid
@@ -10,7 +10,4 @@ Learn more about using TiddlyWiki:
<>
----
-
-* [[WikiText]] - advanced TiddlyWiki syntax
-* [[Reference]] - there is everything about TiddlyWiki, including macros, widgets messages, filters etc...
+Also see the complete [[Reference]], including advanced WikiText, macros, widgets, filters etc.
diff --git a/editions/tw5.com/tiddlers/reference/Reference.tid b/editions/tw5.com/tiddlers/reference/Reference.tid
index 2ead9fc0a..e51738e76 100644
--- a/editions/tw5.com/tiddlers/reference/Reference.tid
+++ b/editions/tw5.com/tiddlers/reference/Reference.tid
@@ -7,4 +7,8 @@ list: Concepts Definitions WikiText Macros Widgets Filters Messages Commands Mec
The following topics provide the canonical reference documentation for TiddlyWiki:
-<>
+
+
+<>
+
+
\ No newline at end of file
From dc9981322aeb508d5ebac0b691b0d703f8c1995e Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 22:11:43 +0100
Subject: [PATCH 026/117] Increase size of search cancel button
---
themes/tiddlywiki/vanilla/base.tid | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index 54ea117df..19ae05ec0 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -403,7 +403,9 @@ button.tc-untagged-label {
}
.tc-search a svg {
- height: 0.75em;
+ width: 1.2em;
+ height: 1.2em;
+ vertical-align: middle;
}
.tc-search-results {
From a604afe8712a4c2d3059fca9fe2b6b3f60f5b960 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Tue, 7 Oct 2014 22:33:06 +0100
Subject: [PATCH 027/117] Fix list in "Filters" tiddler
Mentioned by @Evolena in #922
---
editions/tw5.com/tiddlers/filters/FilterOperators.tid | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/editions/tw5.com/tiddlers/filters/FilterOperators.tid b/editions/tw5.com/tiddlers/filters/FilterOperators.tid
index 23d5be995..478f33888 100644
--- a/editions/tw5.com/tiddlers/filters/FilterOperators.tid
+++ b/editions/tw5.com/tiddlers/filters/FilterOperators.tid
@@ -1,14 +1,11 @@
created: 20140410103123179
-modified: 20140410103123179
+modified: 20141007213204936
tags: Concepts
title: FilterOperators
type: text/vnd.tiddlywiki
-\define bulletList(filter)
-
-\end
Filter operators are the individual elements of [[filters|Filters]]. See [[Introduction to Filters]] for details.
The full list of available filter operators is:
-<>
+<>
From 96d1981dcc36e55c522b9d2b989e20991a489f5e Mon Sep 17 00:00:00 2001
From: Bram Chen
Date: Wed, 8 Oct 2014 09:21:54 +0800
Subject: [PATCH 028/117] Update chinese translations * Add confirmation for
clearing password
---
languages/zh-Hans/Misc.multids | 2 ++
languages/zh-Hant/Misc.multids | 2 ++
2 files changed, 4 insertions(+)
diff --git a/languages/zh-Hans/Misc.multids b/languages/zh-Hans/Misc.multids
index 326e00522..f5251fcc3 100644
--- a/languages/zh-Hans/Misc.multids
+++ b/languages/zh-Hans/Misc.multids
@@ -9,6 +9,8 @@ ConfirmDeleteTiddler: 您确定要删除条目 "<$text text=<>/>"?
ConfirmOverwriteTiddler: 您确定要覆写条目 "<$text text=<>/>"?
ConfirmEditShadowTiddler: 您即将要编辑默认条目,任何更改将会覆盖默认的系统,使未来的升级不寻常。您确定要编辑 "<$text text=<>/>"?
DropMessage: 拖放到此处 (或按 ESC 键取消)
+Encryption/ConfirmClearPassword: 您要清除密码?这将移除保存此维基时套用的加密
+Encryption/PromptSetPassword: 为此 TiddlyWiki 设置一个新密码
InvalidFieldName: 栏位名称 "<$text text=<>/>" 包含无效字符,栏位名称只能包含小写字母、数字、底线 (`_`)、 连字号 (`-`) 和小数点 (`.`)
MissingTiddler/Hint: 佚失条目 "<$text text=<>/>" - 点击 {{$:/core/images/edit-button}} 可创建此条目
RecentChanges/DateFormat: YYYY年0MM月0DD日
diff --git a/languages/zh-Hant/Misc.multids b/languages/zh-Hant/Misc.multids
index e39a20c77..f37a88703 100644
--- a/languages/zh-Hant/Misc.multids
+++ b/languages/zh-Hant/Misc.multids
@@ -9,6 +9,8 @@ ConfirmDeleteTiddler: 您確定要刪除條目 "<$text text=<>/>"?
ConfirmOverwriteTiddler: 您確定要覆寫條目 "<$text text=<>/>"?
ConfirmEditShadowTiddler: 您即將要編輯預設條目,任何更改將會覆蓋預設的系統,使未來的升級不尋常。您確定要編輯 "<$text text=<>/>"?
DropMessage: 拖放到此處 (或按 ESC 鍵取消)
+Encryption/ConfirmClearPassword: 您要清除密碼?這將移除儲存此維基時套用的加密
+Encryption/PromptSetPassword: 為此 TiddlyWiki 設置一個新密碼
InvalidFieldName: 欄位名稱 "<$text text=<>/>" 包含無效字元,欄位名稱只能包含小寫字母、數字、底線 (`_`)、 連接號 (`-`) 和小數點 (`.`)
MissingTiddler/Hint: 佚失條目 "<$text text=<>/>" - 點擊 {{$:/core/images/edit-button}} 可建立此條目
RecentChanges/DateFormat: YYYY年0MM月0DD日
From a361ab0608a8634ea5dbfa28735c4856bde15655 Mon Sep 17 00:00:00 2001
From: fghhfg
Date: Wed, 8 Oct 2014 16:21:09 +0800
Subject: [PATCH 029/117] Update Searching.tid
---
editions/tw5.com/tiddlers/features/Searching.tid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/editions/tw5.com/tiddlers/features/Searching.tid b/editions/tw5.com/tiddlers/features/Searching.tid
index ff85bec79..1d01b9481 100644
--- a/editions/tw5.com/tiddlers/features/Searching.tid
+++ b/editions/tw5.com/tiddlers/features/Searching.tid
@@ -22,4 +22,4 @@ To the right of the search box, when there are no search results displayed below
* The ''shadows'' tab allows you to limit your search to shadow tiddlers.
-* The ''filter'' tab is not a search box, per se, but a way to obtain a list of all tiddlers that meet the specific criteria described by that filter, for example, "All tags except system tags".
+* The ''filter'' tab is not a search box, per se, but a way to obtain a list of all tiddlers that meet the specific criteria described by that filter, for example, "All tags except system tags". More information in [[Introduction to Filters]].
From 3b69b7b6e84252857e21477f8e92036c610935fc Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Wed, 8 Oct 2014 14:07:48 +0100
Subject: [PATCH 030/117] Coding style tweak
---
core/modules/utils/utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js
index 0ed21f88c..2afcd136c 100644
--- a/core/modules/utils/utils.js
+++ b/core/modules/utils/utils.js
@@ -167,7 +167,7 @@ exports.slowInSlowOut = function(t) {
return (1 - ((Math.cos(t * Math.PI) + 1) / 2));
};
-exports.formatDateString = function (date,template) {
+exports.formatDateString = function(date,template) {
var t = template.replace(/0hh12/g,$tw.utils.pad($tw.utils.getHours12(date)));
t = t.replace(/hh12/g,$tw.utils.getHours12(date));
t = t.replace(/0hh/g,$tw.utils.pad(date.getHours()));
From 0dcf54c3b59ed04645928f0ec4ced647e5a0da7f Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Wed, 8 Oct 2014 17:45:26 +0100
Subject: [PATCH 031/117] Add support for action widgets
This is part of the groundwork for fixing #336
---
core/language/en-GB/Misc.multids | 1 +
core/modules/widgets/action-navigate.js | 79 ++++++++++++++++++
core/modules/widgets/action-sendmessage.js | 82 +++++++++++++++++++
core/modules/widgets/button.js | 9 +-
core/modules/widgets/navigator.js | 16 +++-
core/modules/widgets/widget.js | 14 ++++
.../tw5.com/tiddlers/ActionNavigateWidget.tid | 36 ++++++++
.../tiddlers/ActionSendMessageWidget.tid | 31 +++++++
editions/tw5.com/tiddlers/ActionWidgets.tid | 23 ++++++
.../WidgetMessage_ tm-new-tiddler.tid | 8 +-
.../tw5.com/tiddlers/widgets/ButtonWidget.tid | 21 +++--
11 files changed, 303 insertions(+), 17 deletions(-)
create mode 100644 core/modules/widgets/action-navigate.js
create mode 100644 core/modules/widgets/action-sendmessage.js
create mode 100644 editions/tw5.com/tiddlers/ActionNavigateWidget.tid
create mode 100644 editions/tw5.com/tiddlers/ActionSendMessageWidget.tid
create mode 100644 editions/tw5.com/tiddlers/ActionWidgets.tid
diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids
index 991fe28f9..8d91730cb 100644
--- a/core/language/en-GB/Misc.multids
+++ b/core/language/en-GB/Misc.multids
@@ -8,6 +8,7 @@ ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text
ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<>/>"?
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<>/>"?
ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<>/>"?
+DefaultNewTiddlerTitle: New Tiddler
DropMessage: Drop here (or click escape to cancel)
Encryption/ConfirmClearPassword: Do you wish to clear the password? This will remove the encryption applied when saving this wiki
Encryption/PromptSetPassword: Set a new password for this TiddlyWiki
diff --git a/core/modules/widgets/action-navigate.js b/core/modules/widgets/action-navigate.js
new file mode 100644
index 000000000..b6688df08
--- /dev/null
+++ b/core/modules/widgets/action-navigate.js
@@ -0,0 +1,79 @@
+/*\
+title: $:/core/modules/widgets/action-navigate.js
+type: application/javascript
+module-type: widget
+
+Action widget to navigate to a tiddler
+
+\*/
+(function(){
+
+/*jslint node: true, browser: true */
+/*global $tw: false */
+"use strict";
+
+var Widget = require("$:/core/modules/widgets/widget.js").widget;
+
+var NavigateWidget = function(parseTreeNode,options) {
+ this.initialise(parseTreeNode,options);
+};
+
+/*
+Inherit from the base widget class
+*/
+NavigateWidget.prototype = new Widget();
+
+/*
+Render this widget into the DOM
+*/
+NavigateWidget.prototype.render = function(parent,nextSibling) {
+ this.computeAttributes();
+ this.execute();
+};
+
+/*
+Compute the internal state of the widget
+*/
+NavigateWidget.prototype.execute = function() {
+ this.actionTo = this.getAttribute("$to");
+ this.actionScroll = this.getAttribute("$scroll");
+};
+
+/*
+Refresh the widget by ensuring our attributes are up to date
+*/
+NavigateWidget.prototype.refresh = function(changedTiddlers) {
+ var changedAttributes = this.computeAttributes();
+ if(changedAttributes["$to"] || changedAttributes["$scroll"]) {
+ this.refreshSelf();
+ return true;
+ }
+ return this.refreshChildren(changedTiddlers);
+};
+
+/*
+Invoke the action associated with this widget
+*/
+NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {
+ var bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),
+ suppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);
+ if(this.actionScroll === "yes") {
+ suppressNavigation = false;
+ } else if(this.actionScroll === "no") {
+ suppressNavigation = true;
+ }
+ this.dispatchEvent({
+ type: "tm-navigate",
+ navigateTo: this.actionTo === undefined ? this.getVariable("currentTiddler") : this.actionTo,
+ navigateFromTitle: this.getVariable("storyTiddler"),
+ navigateFromNode: triggeringWidget,
+ navigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
+ },
+ navigateSuppressNavigation: suppressNavigation
+ });
+ return true; // Action was invoked
+};
+
+exports["action-navigate"] = NavigateWidget;
+
+})();
diff --git a/core/modules/widgets/action-sendmessage.js b/core/modules/widgets/action-sendmessage.js
new file mode 100644
index 000000000..fa788240a
--- /dev/null
+++ b/core/modules/widgets/action-sendmessage.js
@@ -0,0 +1,82 @@
+/*\
+title: $:/core/modules/widgets/action-sendmessage.js
+type: application/javascript
+module-type: widget
+
+Action widget to send a message
+
+\*/
+(function(){
+
+/*jslint node: true, browser: true */
+/*global $tw: false */
+"use strict";
+
+var Widget = require("$:/core/modules/widgets/widget.js").widget;
+
+var SendMessageWidget = function(parseTreeNode,options) {
+ this.initialise(parseTreeNode,options);
+};
+
+/*
+Inherit from the base widget class
+*/
+SendMessageWidget.prototype = new Widget();
+
+/*
+Render this widget into the DOM
+*/
+SendMessageWidget.prototype.render = function(parent,nextSibling) {
+ this.computeAttributes();
+ this.execute();
+};
+
+/*
+Compute the internal state of the widget
+*/
+SendMessageWidget.prototype.execute = function() {
+ this.actionMessage = this.getAttribute("$message");
+ this.actionParam = this.getAttribute("$param");
+};
+
+/*
+Refresh the widget by ensuring our attributes are up to date
+*/
+SendMessageWidget.prototype.refresh = function(changedTiddlers) {
+ var changedAttributes = this.computeAttributes();
+ if(changedAttributes["$message"] || changedAttributes["$param"]) {
+ this.refreshSelf();
+ return true;
+ }
+ return this.refreshChildren(changedTiddlers);
+};
+
+/*
+Invoke the action associated with this widget
+*/
+SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
+ // Get the parameter
+ var param = this.actionParam;
+ // If the parameter is missing then we'll assemble the attributes as a hashmap
+ if(!param) {
+ param = Object.create(null);
+ var count = 0;
+ $tw.utils.each(this.attributes,function(attribute,name) {
+ if(name.charAt(0) !== "$") {
+ param[name] = attribute;
+ count++;
+ }
+ });
+ // Revert to an empty parameter if no values were found
+ if(!count) {
+ param = undefined;
+ }
+ }
+ // Dispatch the message
+ this.dispatchEvent({type: this.actionMessage, param: param, tiddlerTitle: this.getVariable("currentTiddler")});
+ return true; // Action was invoked
+};
+
+exports["action-sendmessage"] = SendMessageWidget;
+
+})();
diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js
index 21268d7a5..142c13ada 100644
--- a/core/modules/widgets/button.js
+++ b/core/modules/widgets/button.js
@@ -59,6 +59,9 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
// Add a click event handler
domNode.addEventListener("click",function (event) {
var handled = false;
+ if(self.invokeActions(event)) {
+ handled = true;
+ }
if(self.to) {
self.navigateTo(event);
handled = true;
@@ -87,6 +90,10 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
this.domNodes.push(domNode);
};
+ButtonWidget.prototype.getBoundingClientRect = function() {
+ return this.domNodes[0].getBoundingClientRect();
+}
+
ButtonWidget.prototype.isSelected = function() {
var tiddler = this.wiki.getTiddler(this.set);
return tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;
@@ -99,7 +106,7 @@ ButtonWidget.prototype.isPoppedUp = function() {
};
ButtonWidget.prototype.navigateTo = function(event) {
- var bounds = this.domNodes[0].getBoundingClientRect();
+ var bounds = this.getBoundingClientRect();
this.dispatchEvent({
type: "tm-navigate",
navigateTo: this.to,
diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js
index 2241180e4..4c554a70e 100755
--- a/core/modules/widgets/navigator.js
+++ b/core/modules/widgets/navigator.js
@@ -374,11 +374,19 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
// Create a new draft tiddler
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
// Get the story details
- var storyList = this.getStoryList();
- // Get the template tiddler if there is one
- var templateTiddler = this.wiki.getTiddler(event.param);
+ var storyList = this.getStoryList(),
+ templateTiddler,originalTitle;
+ // Get the template
+ if(typeof event.param === "object") {
+ templateTiddler = event.param;
+ originalTitle = templateTiddler.title;
+ } else {
+ templateTiddler = this.wiki.getTiddler(event.param);
+ originalTitle = templateTiddler && templateTiddler.fields.title;
+ }
+ originalTitle = originalTitle || $tw.language.getString("DefaultNewTiddlerTitle");
// Title the new tiddler
- var title = this.wiki.generateNewTitle((templateTiddler && templateTiddler.fields.title) || "New Tiddler");
+ var title = this.wiki.generateNewTitle(originalTitle);
// Create the draft tiddler
var draftTitle = this.generateDraftTitle(title),
draftTiddler = new $tw.Tiddler({
diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js
index df434973c..a4942a86f 100755
--- a/core/modules/widgets/widget.js
+++ b/core/modules/widgets/widget.js
@@ -475,6 +475,20 @@ Widget.prototype.removeChildDomNodes = function() {
}
};
+/*
+Invoke any action widgets that are immediate children of this widget
+*/
+Widget.prototype.invokeActions = function(event) {
+ var handled = false;
+ for(var t=0; t
+<$action-navigate $to="ButtonWidget" $scroll="no"/>
+<$action-navigate $to="ActionWidgets"/>
+Click me!
+$button>'/>
diff --git a/editions/tw5.com/tiddlers/ActionSendMessageWidget.tid b/editions/tw5.com/tiddlers/ActionSendMessageWidget.tid
new file mode 100644
index 000000000..6b621df67
--- /dev/null
+++ b/editions/tw5.com/tiddlers/ActionSendMessageWidget.tid
@@ -0,0 +1,31 @@
+caption: action-sendmessage
+created: 20141008134309742
+modified: 20141008162952455
+tags: Widgets ActionWidgets
+title: ActionSendMessageWidget
+type: text/vnd.tiddlywiki
+
+! Introduction
+
+The ''action-sendmessage'' widget is an [[action widget|ActionWidgets]] that sends a [[message|WidgetMessages]] back up the widget tree. ActionWidgets are used within triggering widgets such as the ButtonWidget.
+
+! Content and Attributes
+
+The ''action-sendmessage'' widget is invisible. Any content within it is ignored.
+
+|!Attribute |!Description |
+|$message |The message to send (eg, [[WidgetMessage: tm-new-tiddler]]) |
+|$param |Optional parameter string whose meaning is dependent on the message being sent |
+|//{any attributes not starting with $}// |Multiple parameters that are attached to the message if the `$param$` attribute is not provided |
+
+! Examples
+
+Here is an example of button that displays both a notification and a wizard, and creates a new tiddler with tags and text:
+
+<$macrocall $name='wikitext-example-without-html'
+src='<$button>
+<$action-sendmessage $message="tm-modal" $param="SampleWizard"/>
+<$action-sendmessage $message="tm-notify" $param="SampleNotification"/>
+<$action-sendmessage $message="tm-new-tiddler" title="This is newly created tiddler" tags="OneTag [[Another Tag]]" text=<>/>
+Click me!
+$button>'/>
diff --git a/editions/tw5.com/tiddlers/ActionWidgets.tid b/editions/tw5.com/tiddlers/ActionWidgets.tid
new file mode 100644
index 000000000..f1f9de2ca
--- /dev/null
+++ b/editions/tw5.com/tiddlers/ActionWidgets.tid
@@ -0,0 +1,23 @@
+created: 20141008134425548
+modified: 20141008144957192
+tags: Widgets
+title: ActionWidgets
+type: text/vnd.tiddlywiki
+
+Action widgets are a special type of widget that perform an action such as sending a message, navigating to a tiddler, or changing the value of a tiddler. They are used in association with other widgets that trigger those actions (for example, the ButtonWidget).
+
+Action widgets are invisible. They must be the immediate children of their parent triggering widget. The actions are performed in sequence. For example, here is a button that triggers two actions of sending different messages:
+
+```
+<$button>
+<$action-sendmessage $message="tm-home"/>
+<$action-sendmessage $message="tm-full-screen"/>
+Click me!
+$button>
+```
+
+Take care not to accidentally introduce an extra line break after the opening tag of the button widget. Doing so will trigger the WikiText parser to wrap the action widgets in a paragraph element. This means that the action widgets will not be triggered as they are no longer immediate children of the triggering widget.
+
+The following action widgets are provided:
+
+<>
diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid
index 6cad0c4ae..9085c9a8a 100644
--- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid
+++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid
@@ -1,17 +1,17 @@
+caption: tm-new-tiddler
created: 20140226194405353
-modified: 20140724194729158
+modified: 20141008142952355
tags: Messages navigator-message
title: WidgetMessage: tm-new-tiddler
type: text/vnd.tiddlywiki
-caption: tm-new-tiddler
The new tiddler message creates a new draft tiddler and adds it to the current story. It requires the following properties on the `event` object:
|!Name |!Description |
-|param |Optional title of a tiddler to use as a template for the new tiddler |
+|param |Either the title of a tiddler to use as a template for the new tiddler or a hashmap of tiddler fields |
|navigateFromTitle |Title of the tiddler from which the navigation to the new tiddler was initiated |
-The new tiddler message is usually generated with the LinkWidget or the ButtonWidget and is handled by the NavigatorWidget.
+The new tiddler message is usually generated with the LinkWidget, ButtonWidget or ActionSendMessageWidget and is handled by the NavigatorWidget.
! Example
diff --git a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid
index cd96a91cf..f3f52412a 100644
--- a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid
+++ b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid
@@ -1,17 +1,22 @@
-title: ButtonWidget
-created: 201310241419
-modified: 201406170837
-tags: Widgets
caption: button
+created: 20131024141900000
+modified: 20141008145311298
+tags: Widgets
+title: ButtonWidget
+type: text/vnd.tiddlywiki
! Introduction
The button widget displays an HTML `