1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-22 19:04:38 +00:00

Compare commits

...

559 Commits

Author SHA1 Message Date
Jermolene
5e7065c391 Version number update for 5.1.11 2016-01-30 14:27:54 +00:00
Jermolene
a869316b1f Readme update 2016-01-30 14:27:29 +00:00
Jermolene
c24598885a Preparing for release of 5.1.11 2016-01-30 14:26:24 +00:00
Jermolene
3bf9ad78fa Update release note for 5.1.11 2016-01-30 12:44:58 +00:00
Jeremy Ruston
5bba45bb0a Rename TiddlyWiki_Jingle_by_Måns_Mårtensson.tid to TiddlyWiki_Jingle_by_Mans_Martensson.tid
Fixes #2227

(Note I fixed this by editing the filename in the github.com online editor. It's happened before; I've raised #2261 to address the root cause)
2016-01-30 08:51:53 +00:00
Jermolene
8b2f320f7f Missed off d240ab5003 2016-01-29 17:24:11 +00:00
Jermolene
d240ab5003 Fix broken plugin library
Fixes #2260
2016-01-29 17:16:16 +00:00
Jermolene
f1deea3b74 Preparing for 5.1.11 2016-01-29 17:15:57 +00:00
Jermolene
def26a40ac Version number update for 5.1.10 2016-01-29 17:03:12 +00:00
Jeremy Ruston
0b4ce5be28 Merge pull request #2257 from koke24/master
Ask permission Jermolene for make a pull request
2016-01-28 13:35:13 +00:00
jose-manuel.urio@at.seg-social.es
ac345c86a1 Ask permission Jermolene for make a pull request 2016-01-27 15:57:23 +01:00
Jeremy Ruston
94107dc64c Merge pull request #2209 from ARRRRGH/patch-1
Signing CLA
2016-01-11 18:51:17 -06:00
ARRRRGH
6613cc7b2c Signing CLA 2016-01-11 15:09:12 +01:00
Jeremy Ruston
4a5b531f78 Merge pull request #2197 from flibbles/patch-1
Signed CLA
2016-01-09 06:13:01 +00:00
Cameron Fischer
10df62b24f Signed CLA 2016-01-08 17:26:19 -05:00
Jermolene
2d9d09adcc Readme update 2016-01-07 23:26:02 +00:00
Jermolene
3d19b585ae Preparing for release of 5.1.10 2016-01-07 23:16:58 +00:00
Jermolene
e47f06bd5e Docs update 2016-01-07 23:11:59 +00:00
Jermolene
6b68d9b0c4 Restore sample alert 2016-01-07 23:01:52 +00:00
Jermolene
5109e96cec Docs updates 2016-01-07 23:00:38 +00:00
Jermolene
334497ce4e Move "get more plugins" button into a transcludable tiddler 2016-01-07 23:00:29 +00:00
Jermolene
c1763193df Docs update: "Editions" 2016-01-07 22:20:02 +00:00
Jermolene
e1912b624b Dev docs typo 2016-01-07 22:20:02 +00:00
Jeremy Ruston
e71bff0110 Merge pull request #2190 from buggyj/issue2189
fix for 2189
2016-01-07 22:19:04 +00:00
buggyj
74e8afdcdd fix for #2189 2016-01-07 22:11:26 +00:00
Jermolene
01f8b954ae Add all translations to the "introduction" edition 2016-01-07 17:48:50 +00:00
Jermolene
a1079270a2 Don't mark the centralised theme as experimental 2016-01-07 16:49:14 +00:00
Jermolene
64efee40e5 Retracting #2147
The problem is that this change scrambles the ordering of tabs that use
programmatic ordering, for example here:

https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/ti
ddlers/releasenotes/TiddlyWiki_Releases.tid#L13
2016-01-07 16:48:51 +00:00
Jermolene
0747635fba Fixed current tiddler overwrite in tabs macro
Fixed a side-effect of 03519c14b0 from
@matabele whereby the current tiddler is overwritten by the
`<$tiddler>` widget, which means that it is not accessible when
rendering the caption of the tab.

This causes a problem with eg the “Add Plugins” modal where it breaks
the count on the tabs.
2016-01-07 12:40:10 +00:00
Jermolene
822bd1f3cc Docs update 2016-01-06 16:03:50 +00:00
Jermolene
877aed3ead Move 5.1.10 release note 2016-01-06 16:03:43 +00:00
Jermolene
7ee985407b Release note update 2016-01-06 10:09:33 +00:00
Jermolene
5a543276f5 Update release note 2016-01-06 09:59:03 +00:00
Jeremy Ruston
677e100ea2 Merge pull request #2185 from matabele/patch-8
Fixed typos in docsof ActionListops widget
2016-01-06 09:45:14 +00:00
Jeremy Ruston
e0c84ee85d Merge pull request #2184 from mdeabreu/patch-1
Add info about recent TiddlyDesktop releases
2016-01-06 09:43:52 +00:00
Jermolene
b873df0ba2 Revert "Merge pull request #2166 from matabele/patch-5"
This reverts commit 83c54f4bb5, reversing
changes made to 0cbe97615a.
2016-01-06 09:38:39 +00:00
Jermolene
3fa5ba52f9 Revert "Merge pull request #2183 from matabele/patch-7"
This reverts commit cd36ad582b, reversing
changes made to 83c54f4bb5.
2016-01-06 09:38:12 +00:00
William Jackson
366cdb608d Fixed typos in docsof ActionListops widget 2016-01-06 07:32:33 +02:00
mdeabreu
20983c0174 Update cla-individual.md 2016-01-05 11:20:57 -08:00
mdeabreu
d917198abb Add information about TiddlyDesktop v0.0.8 2016-01-05 11:11:09 -08:00
Jeremy Ruston
cd36ad582b Merge pull request #2183 from matabele/patch-7
Updated docs of ActionSetfield widget to include setting of TextReferences
2016-01-05 19:10:37 +00:00
Jeremy Ruston
83c54f4bb5 Merge pull request #2166 from matabele/patch-5
Fix inadvertent clearing of text field (default) when `field` attribu…
2016-01-05 19:10:26 +00:00
mdeabreu
fcfddf2b46 Add information about TiddlyDesktop v0.0.7 2016-01-05 11:09:55 -08:00
William Jackson
152c3db9a1 Updated docs to include setting of TextReferences
Can now accept any number of attributes of the form TextReference="value" -- these may be fields "(Tiddler!!field="value") or indices (Tiddler##index="value.)
2016-01-05 21:02:18 +02:00
Jermolene
0cbe97615a Add size attribute to select widget for multiple selection mode 2016-01-05 18:48:21 +00:00
Jermolene
93f7d8c028 Fix bug with tiddler widget and a blank tiddler title 2016-01-05 18:48:04 +00:00
Jeremy Ruston
31b4f104e4 Merge pull request #2161 from matabele/patch-3
Tidied up the code in the x-listops filters
2016-01-05 15:30:39 +00:00
Jeremy Ruston
540354a693 Merge pull request #2162 from matabele/patch-4
Updated docs of the ActionListops widget to reflect changes to attribute names
2016-01-05 15:30:27 +00:00
Jeremy Ruston
2cd812c15f Merge pull request #2160 from matabele/patch-2
Changed the name of the 'list' attribute to 'field' for the $action-listops widget
2016-01-05 13:06:48 +00:00
Jermolene
b2fd3366e3 Move staged content from prerelease
These updates had been staged so that I could still perform updates of
tiddlywiki.com for the previous release
2016-01-05 13:05:10 +00:00
Jeremy Ruston
114f4dbcea Merge pull request #2171 from nameanyone/tw5-htabs-spaces
Replace spaces between horizontal tabs with margin
2016-01-05 12:58:04 +00:00
Jeremy Ruston
791f97983e Merge pull request #2153 from tobibeer/rows-for-edittext
add rows attribute to edittext, plus docs
2016-01-05 12:31:37 +00:00
Jeremy Ruston
1cb8247063 Merge pull request #2177 from nameanyone/tw5-relnotes-edit
Remove obsolete reference to "recent" filter operator
2016-01-05 10:54:03 +00:00
Jermolene
0240a8048f Fix default date format 2016-01-04 20:09:06 +00:00
Jeremy Ruston
45092d289e Merge pull request #2179 from alexhough/patch-5
add "Transclusion and Substitution" to learn more
2016-01-03 18:20:06 +00:00
Jermolene
5cc1f2b313 Fix problem with search popup disappearing
This one took quite a lot of tracking down…

Fixes #2172
2016-01-03 18:05:08 +00:00
Jermolene
665d6657bb It's 2016!
🎉🎊🎆
2016-01-03 18:04:21 +00:00
Jermolene
f8723397e9 Fix clean.sh
Was ignoring editions with numerals in pathname
2016-01-03 18:02:49 +00:00
alexhough
fa3ea480fe add "Transclusion and Substitution" to learn more 2016-01-03 17:11:13 +00:00
William Jackson
ac8b706d42 Correct Formatting
Removed extra tab spacing and corrected syntax error
2016-01-03 16:30:00 +02:00
nameanyone
658ccadca7 Remove obsolete reference to "recent" filter operator 2015-12-31 13:40:28 -08:00
Jermolene
f42acfa73e Revised banner for 5.1.10 2015-12-31 14:03:48 +00:00
Jeremy Ruston
f2591761b0 Merge pull request #2169 from nameanyone/tw5-fold-button-spaces
Remove spaces around the fold button
2015-12-31 09:17:12 +00:00
Jermolene
56ff0027e0 Add new release banner for 5.1.10 2015-12-31 08:47:09 +00:00
nameanyone
49c6a172ad Get rid of newline at eof. 2015-12-30 16:57:49 -08:00
nameanyone
bd9cd10de1 Remove the trailing space as well, missed that. 2015-12-30 15:38:35 -08:00
Jermolene
040e35eab6 Restore accidentally deleted tiddler fields
Fixes #2174
2015-12-29 15:51:26 +00:00
Jermolene
e3f381ed8d Remove extraneous whitespace between tag pills
Fixes #2170
2015-12-29 15:21:53 +00:00
nameanyone
2a26ca53c2 Add margin to horizontal tabs 2015-12-29 00:12:06 -08:00
nameanyone
747eb9daba Remove spaces between horizontal tabs 2015-12-29 00:02:19 -08:00
nameanyone
7fbe29fd04 Remove spaces around the fold button
...by removing newlines betwen widgets. Makes source harder to read but eliminates space characters from the end result.
2015-12-28 22:28:48 -08:00
William Jackson
a44edee782 Changed indents from spaces to tabs
I am informed this is the correct convention for TW5.
2015-12-28 18:12:22 +02:00
William Jackson
471f28e52b Fix inadvertent clearing of text field (default) when field attribute of the ActionSetField widget isn't set.
When using the widget with only short form SetText attributes (field="value) -- the default field (text) of the default tiddler is set to the default value ("") -- thus clearing the text field of the current tiddler. I have inserted a conditional to test for the presence of the `field` attribute.

Whilst I was about this, I have inserted code to enable the setting of any number of TextReferences -- this fixes the issue of only being able to set one index per widget and also allows different tiddlers to be targeted by the same widget.
2015-12-28 18:08:05 +02:00
William Jackson
91b970e422 Updated docs of the ListOps widget to reflect changes to attribute names 2015-12-28 10:42:46 +02:00
William Jackson
48987e186a Tidied up the code in the filters 2015-12-28 10:31:39 +02:00
William Jackson
2f51c3695d Changed the name of the 'list' attribute to 'field'
Other users found this to be confusing -- I have made this change in both this widget and the $checklist widget to maintain consistency
2015-12-28 10:22:28 +02:00
Jeremy Ruston
0d27f3b836 Merge pull request #2154 from spelufo/katex-displaymode
Revert katex plugin to using `$$`. Use multiline for display mode.
2015-12-24 18:02:54 +00:00
Santiago Pelufo
8e02390353 Revert katex plugin to using $$. Use multiline for display mode. 2015-12-24 13:52:19 -03:00
Jermolene
2fe2c531e8 Update release note 2015-12-24 16:04:47 +00:00
Jeremy Ruston
62e6d3a99c Merge pull request #2006 from tobibeer/move-if-macro
moved if-macro, see #2005
2015-12-24 15:23:19 +00:00
Jeremy Ruston
fe00229ad5 Merge pull request #2004 from inmysocks/patch-9
Modified fieldmangler to create a tiddler if adding a tag (see #2001 )
2015-12-24 15:22:41 +00:00
Tobias Beer
456e7abc5d add rows attribute to edittext, plus docs 2015-12-24 15:40:00 +01:00
Jermolene
3a426dfd2a Docs for #2049 2015-12-24 14:12:53 +00:00
Jeremy Ruston
e344dbe077 Merge pull request #2049 from inmysocks/patch-11
Let $keyboard trigger action-widgets
2015-12-24 14:12:32 +00:00
Jeremy Ruston
44bf4310d2 Merge pull request #2058 from maweki/tiddlyweb-description
Expand description of "TiddlyWeb and TiddlySpace components"
2015-12-24 14:03:10 +00:00
Jeremy Ruston
dcc53b8e96 Merge pull request #2074 from mklauber/master
Manage a list field by allowing the <$select> widget to select multiple items.
2015-12-24 13:48:43 +00:00
Jermolene
075f5b757f Merge branch 'mklauber-patch-1' 2015-12-24 13:47:13 +00:00
Jermolene
3e1128787a Merge branch 'patch-1' of https://github.com/mklauber/TiddlyWiki5 into mklauber-patch-1 2015-12-24 13:46:21 +00:00
Jeremy Ruston
68c633c9bb Merge pull request #2094 from jho1965us/patch-1
Changed Transclusion from html to TidlerWiki syntax in order to force…
2015-12-24 12:40:07 +00:00
Jeremy Ruston
08fed4840f Merge pull request #2151 from tobibeer/sticky-popup-docs
documentation for "tc-popup-keep"
2015-12-24 11:01:32 +00:00
Jermolene
f4f86e3c23 Fixed problem with deleting alerts introduced in #1981 2015-12-24 11:00:47 +00:00
Jeremy Ruston
b1bc75d4eb Merge pull request #2150 from matabele/patch-4
Added a tooltip
2015-12-24 10:52:29 +00:00
Jeremy Ruston
2da1af2a41 Merge pull request #2149 from matabele/patch-3
Added a tooltip
2015-12-24 10:52:10 +00:00
Jeremy Ruston
07c1af106b Merge pull request #2148 from matabele/patch-2
Added a paragraph describing the use of tooltips
2015-12-24 10:51:55 +00:00
Jeremy Ruston
7ef60ded52 Merge pull request #2147 from matabele/patch-1
Added tooltip option to Tabs macro
2015-12-24 10:51:41 +00:00
William Jackson
b7c2063f63 Added sorting on 'order' field by default
What do you think of this idea?
2015-12-24 09:02:33 +02:00
Tobias Beer
c2dea12f1c documentation for "tc-popup-keep" 2015-12-23 23:28:47 +01:00
William Jackson
d7f24a5779 Added a tooltip 2015-12-23 22:37:14 +02:00
William Jackson
61235a12fb Added a tooltip 2015-12-23 22:35:46 +02:00
William Jackson
b905874c06 Added a paragraph describing the use of tooltips 2015-12-23 22:28:52 +02:00
William Jackson
03519c14b0 Added tooltip option
Tooltips should be entered in the 'tooltip' field of each tab tiddler
2015-12-23 20:55:03 +02:00
Jeremy Ruston
15eab0ce1c Merge pull request #2146 from spelufo/katex-displaymode
Show how to use display mode in katexdemo/tiddlers/HelloThere.tid
2015-12-23 18:20:57 +00:00
Santiago Pelufo
5be0de798f Show how to use display mode in katexdemo/tiddlers/HelloThere.tid 2015-12-23 14:57:24 -03:00
Jeremy Ruston
7676f93932 Merge pull request #2125 from tobibeer/set-emptyValue-always
always set emptyValue, not just for filter
2015-12-23 17:42:41 +00:00
Jeremy Ruston
3dc001620c Merge pull request #2145 from spelufo/katex-displaymode
Make latex-parser.js render $$$ as display mode math
2015-12-23 17:19:58 +00:00
Santiago Pelufo
a94ba99ec2 Make latex-parser.js render $$$ as display mode math 2015-12-23 14:14:58 -03:00
Jeremy Ruston
55f053ec89 Merge pull request #2139 from spelufo/katex-displaymode
Add displayMode attribute to katex widget
2015-12-23 13:20:49 +00:00
Jermolene
57ceffd67c Merge #1909 from @nameanyone 2015-12-23 12:19:47 +00:00
Jermolene
7037b66479 Updated Dutch translation from @gernert 2015-12-23 08:34:52 +00:00
Jeremy Ruston
aa06f4ea8c Merge pull request #2142 from IreneKnapp/master
Add Google, Inc as a signer of the entity CLA.
2015-12-22 18:14:55 +00:00
Jeremy Ruston
ccf6edb940 Merge pull request #1933 from felixhayashi/fix/scrolling
Auto-height fix for text area which is contained in a scroll container
2015-12-22 14:08:56 +00:00
Jeremy Ruston
fa1814d0f4 Merge pull request #2048 from felixhayashi/fix/count
Replacing count with Object.keys
2015-12-22 12:41:24 +00:00
Jeremy Ruston
44dfbec3cf Merge pull request #2136 from pmario/de-DE
de-DE: some minor language fixes. feedback from tobias
2015-12-22 12:21:44 +00:00
Irene Knapp
3959b1b89e Add Google, Inc as a signer of the entity CLA.
I emailed a PDF with an actual signature, a moment ago, to
jeremy@jermolene.com.  My understanding is that this signature would be valid
not just for me but for other Googlers who contribute to TiddlyWiki in future,
if there are any.  So I've omitted my personal name from the signature line -
I think this is probably the way it's supposed to be?  If you look at the PDF
you'll see that it's actually one of our lawyers who agreed to it, not me
as an individual.  I'll be using my @google.com email address for this and any
future patches, so record-keeping at TiddlyWiki's end shouldn't need a record
of GitHub usernames.
2015-12-21 15:00:05 -08:00
Jeremy Ruston
ef1cd5f55f Merge pull request #1967 from Drakor/fixActionSetField
fixed bug in $action-setfield introduced by #1963
2015-12-21 22:17:51 +00:00
Jeremy Ruston
de99dd5196 Merge pull request #1981 from tobibeer/delete-alerts-without-confirm
Delete alerts without confirm
2015-12-21 22:15:25 +00:00
Jeremy Ruston
a34ac01d63 Merge pull request #2100 from tobibeer/fix-edittemplate-shadow
fix broken template: core/ui/EditTemplate/shadow
2015-12-21 22:12:36 +00:00
Jermolene
07ac75b084 Fix search dropdown positioning
This fixes a problem introduced in
72941f3e9a whereby the change to
tc-drop-down affected other dropdowns.
2015-12-20 08:53:29 +00:00
Jermolene
ad1793c8f5 Minor tweaks to boot kernel for AWS
Part of the upcoming AWS integration work is a custom build of
TiddlyWiki that can run as an Amazon Lambda function. These tweaks
enable the new build to control the loading of SJCL, the package info,
and any preloaded tiddlers.
2015-12-19 18:52:25 +00:00
Jermolene
64b916bb43 Ignore any node_modules directory 2015-12-19 18:47:58 +00:00
Jermolene
231d0a3dc8 Add plugin wrappers for async and jszip
The immediate motivation is the work I’m doing to integrate with Amazon
Web Services.

We should be able to use JSZip to export multiple tiddlers in a single
operation from the browser.
2015-12-19 18:47:42 +00:00
Santiago Pelufo
aaf3e6bb9e Add displayMode attribute to katex widget. 2015-12-18 11:46:19 -03:00
Mario Pietsch
b0dce4f8e4 fix spelling .. 2015-12-18 14:14:38 +01:00
Mario Pietsch
9468e50146 added plugin link to the EditTemplate 2015-12-18 11:58:02 +01:00
Jermolene
6e7f532825 Remove extraneous icon for blog plugin
We had just reused the text-slicer icon
2015-12-13 18:26:37 +00:00
Tobias Beer
ea8a8f1b53 always set emptyValue, not just for filter 2015-12-09 23:33:07 +01:00
Jermolene
c2105de49c Remove modifier/modified/revision fields from #2037 2015-12-06 19:11:41 +00:00
Jeremy Ruston
da36f1c728 Merge pull request #2037 from matabele/Listops
ActionListopsWidget
2015-12-06 19:04:26 +00:00
Jermolene
4a8511c6f2 Added file and folder icons
These icons are skinnier than the regular icons; I found I couldn’t
produce sufficiently detailed images with the regular line width.
2015-11-25 15:32:53 +00:00
Jermolene
aae1bf9f80 Blog edition: Add classes for the static menu 2015-11-25 15:32:53 +00:00
Tobias Beer
4e0a5c862c fix broken template: core/ui/EditTemplate/shadow 2015-11-25 15:22:15 +01:00
Jens
6c89b27328 Changed Transclusion from html to TidlerWiki syntax in order to force new tab when following
With the html syntax when you go back after following the link knowledges of open tiddlers is lost.
Not sure if there should also be feature request for TiddlerWiki to store knowledge of open tiddlers in browser history.
2015-11-22 13:53:59 +01:00
Jeremy Ruston
cd6b443533 Merge pull request #2093 from xcazin/master
Catch up on fr-FR translations
2015-11-21 18:05:19 +00:00
Xavier Cazin
7dbb4240f1 fr-FR translation of strings related to Toolbar Button Style 2015-11-21 18:50:25 +01:00
Xavier Cazin
d0c33ec3d2 fr-FR translation of strings related to CamelCase enabling/disabling 2015-11-21 18:45:57 +01:00
Xavier Cazin
8d2bdaa338 fr-FR translation of Parsing hint 2015-11-21 18:40:06 +01:00
Xavier Cazin
8501847942 Typo in Parsing hint 2015-11-21 18:37:51 +01:00
Xavier Cazin
9e03252e01 fr-FR translation of updates to the help of the savetiddlers command 2015-11-21 18:27:34 +01:00
Xavier Cazin
05f0bea61f fr-FR translation for updates to the help for the rendertiddler command 2015-11-21 18:17:41 +01:00
Xavier Cazin
1aa4cb5f55 fr-FR translation of the warning about loading TW Classic 2015-11-21 18:01:33 +01:00
Xavier Cazin
d48deefa91 fr-FR translation for the Lazy Loading warning about external text 2015-11-21 16:07:19 +01:00
Xavier Cazin
4a2fc8cbc0 fr-FR translation of the clarification for the password command 2015-11-21 15:55:35 +01:00
Xavier Cazin
65f891dcdf fr-FR translation for tidder date format 2015-11-21 15:49:34 +01:00
Xavier Cazin
b0c9dcf353 fr-FR translations for strings related to Performance Instrumentation 2015-11-21 15:42:04 +01:00
Xavier Cazin
e209254bc6 More fr-FR translations for strings related to plugins 2015-11-21 15:12:32 +01:00
Xavier Cazin
8c2ecca7e6 fr-FR translations for strings related to search matches 2015-11-21 15:03:56 +01:00
Xavier Cazin
98b6a45044 fr-FR translations for strings related to Internal Javascript Errors 2015-11-21 15:00:25 +01:00
Xavier Cazin
6eba06e23e fr-FR translations of a string related to tiddler importation 2015-11-21 14:56:24 +01:00
Xavier Cazin
b4994f2e77 fr-FR translations for strings related to plugin installation 2015-11-21 14:54:19 +01:00
Xavier Cazin
d90828d14e fr-FR translation of strings related to tiddler folding buttons 2015-11-21 14:42:31 +01:00
jed
848e351685 removed the handled variable
because it serves no purpose here. That test isn't required in this context.
2015-11-16 10:48:25 +01:00
Jermolene
15f52bd7ce Add support for Nw.js special features to browse widget 2015-11-13 18:47:30 +00:00
Matt Lauber
d94ffbae39 Unchange CLA. 2015-11-13 12:36:05 -05:00
Matt Lauber
d7623b6985 Update cla-individual.md 2015-11-13 12:34:07 -05:00
Matt Lauber
8ccee5d015 Remove cla for separate PR, and clean up variable declaration. 2015-11-13 11:30:06 -05:00
Matt Lauber
35ce8c8b55 typo 2015-11-13 08:18:20 -05:00
Matt Lauber
f540be4ac4 use $tw.utils.stringifyList 2015-11-13 08:06:51 -05:00
Matt Lauber
065b274b98 Use the $tw.utls.parseStringArray function to break up a list. 2015-11-13 08:04:13 -05:00
Matt Lauber
46a3b2f261 Singing CLA 2015-11-13 07:57:10 -05:00
Matt Lauber
1569090046 typo 2015-11-13 07:53:47 -05:00
Matt Lauber
75380c56cc Oops, deleted metadata 2015-11-13 07:53:19 -05:00
Matt Lauber
c535dd605c Grant the select widget the ability to select multiple values.
Multiple values are placed in a given tiddler-field combination as if
that field were a list field.
2015-11-13 07:50:34 -05:00
Jeremy Ruston
3a33282705 Merge pull request #2073 from tobibeer/each-list
change suffix each:list to each:list-item
2015-11-13 10:10:36 +00:00
Tobias Beer
ef3e44eb48 rename suffix each:list to each_list-item
based on #1422, improves readability of the filter expression

tests passed
2015-11-13 11:07:24 +01:00
Tobias Beer
b152a0a894 Merge remote-tracking branch 'refs/remotes/Jermolene/master' into each-list 2015-11-13 10:49:25 +01:00
Jermolene
ac00aa8407 Allow server module to work under Node even if $tw.browser is defined
Needed for TiddlyDesktop, where want to be able to run the HTTP server
in a hybrid browser/node environment.
2015-11-10 18:13:30 +00:00
Jermolene
d3586c7bf1 Update Italian translation 2015-11-10 18:12:40 +00:00
Mario Pietsch
f08c2c8a60 first pass, some minor fixes. feedback from tobias 2015-11-08 13:14:57 +01:00
William Jackson
5877a26855 Create ListopsData.tid
Data tiddler for Extended Listops documentation examples
2015-11-08 10:40:49 +02:00
William Jackson
8980e491c4 Create sortby.tid 2015-11-08 10:38:14 +02:00
William Jackson
085ebd4e23 Create sortby.tid 2015-11-08 10:37:39 +02:00
William Jackson
7ba2649194 Create replace.tid 2015-11-08 10:36:53 +02:00
William Jackson
85895374ea Create replace.tid 2015-11-08 10:36:17 +02:00
William Jackson
34e0bf13f2 Create remove.tid 2015-11-08 10:35:37 +02:00
William Jackson
12431a9fbc Create remove.tid 2015-11-08 10:35:05 +02:00
William Jackson
91c87ec2ac Create putlast.tid 2015-11-08 10:34:21 +02:00
William Jackson
0c78c63fae Create putlast.tid 2015-11-08 10:33:39 +02:00
William Jackson
617c13d196 Create putfirst.tid 2015-11-08 10:32:56 +02:00
William Jackson
008f22b511 Create putfirst.tid 2015-11-08 10:32:12 +02:00
William Jackson
cb6b8233fa Create putbefore.tid 2015-11-08 10:30:47 +02:00
William Jackson
cab0900ddd Create putbefore.tid 2015-11-08 10:30:08 +02:00
William Jackson
72889a0527 Create putafter.tid 2015-11-08 10:29:17 +02:00
William Jackson
ec2d819c8c Create putafter.tid 2015-11-08 10:28:38 +02:00
William Jackson
88a5c742e7 Create prepend.tid 2015-11-08 10:27:35 +02:00
William Jackson
1358cd5185 Create prepend.tid 2015-11-08 10:26:45 +02:00
William Jackson
18a0f6b12d Create move.tid 2015-11-08 10:25:42 +02:00
William Jackson
b1cfc8633f Create move.tid 2015-11-08 10:25:04 +02:00
William Jackson
abdd1e7fd6 Create append.tid 2015-11-08 10:11:17 +02:00
William Jackson
b2edbd8d1d Create append.tid 2015-11-08 10:10:37 +02:00
William Jackson
31b9835a4e Create allbefore.tid 2015-11-08 10:09:00 +02:00
William Jackson
e9c79faf05 Create allbefore.tid 2015-11-08 10:08:01 +02:00
William Jackson
d87c328fd9 Create allafter.tid 2015-11-08 10:06:50 +02:00
William Jackson
2adb005c28 Create allafter.tid 2015-11-08 10:05:26 +02:00
William Jackson
fad106d2d5 Update FilterOperators.tid
Added category for extended listops filter operators
2015-11-08 10:02:28 +02:00
William Jackson
7370d61602 Create The Extended Listops Filters.tid
Supplementary documentation for the ActionListops widget -- examples using the extended filters
2015-11-08 09:59:41 +02:00
William Jackson
ac9aa78859 Create ActionListopsWidget.tid
Primary documentation for ActionListops widget
2015-11-08 09:56:37 +02:00
William Jackson
befb13dde1 Update x-listops.js
Change default suffix for append[], prepend[] and remove[] operators from 1 to All
2015-11-08 09:49:07 +02:00
Jermolene
3b64497c57 Fix docs typo
Thanks @BramChen
2015-11-05 15:09:45 +00:00
Jeremy Ruston
faee511d20 Merge pull request #2060 from BramChen/zh
Update chinese translations
2015-11-05 14:06:41 +00:00
Bram Chen
171fd2c853 Improve chinese translations of edit info banner for shadow tiddlers
Add the name of the plugin that contains the shadow tiddler
2015-11-05 21:48:22 +08:00
Jermolene
99969024f8 Update release note 2015-11-05 13:07:34 +00:00
Jermolene
0b99ac2b75 Add information about TiddlyDesktop v0.0.6 2015-11-05 13:07:27 +00:00
Jeremy Ruston
583ed07af2 Merge pull request #1422 from tobibeer/each-list
added list suffix for each filter
2015-11-05 12:45:27 +00:00
Jermolene
0769b90bb7 Text-slicer: Control preview column with dropdown
Instead of showing a sequence of all documents in the preview column,
we just show a single document, with a dropdown to choose which one is
shown.

The change makes it easier to deal with large numbers of documents.
2015-11-05 12:33:21 +00:00
Jermolene
bc0cbf9070 Add a lazy loading template for all non-system tiddlers
With this new template you can run TiddlyWiki under Node.js such that
all non-system tiddlers are lazily loaded, and not baked into the HTML
file.
2015-11-05 12:33:20 +00:00
Jermolene
d0ca776edb Improve edit info banner for shadow tiddlers
Add the name of the plugin that contains the shadow tiddler
2015-11-05 12:33:20 +00:00
Felix Hayashi
f217451fc5 Replacing count's function body with Object.keys
see #2046
2015-11-03 23:47:47 +01:00
Mario Wenzel
eb34709cc4 Expand description of "TiddlyWeb and TiddlySpace components"
This should fix #2019
2015-11-03 19:56:14 +01:00
Jeremy Ruston
d59d9238f7 Merge pull request #2056 from BramChen/zh
Update chinese translations
2015-10-30 09:17:07 +00:00
Jermolene
513ed8774c Tweak spiral 2015-10-29 21:49:05 +00:00
Bram Chen
7307c32dd2 Add chinese translations of toolbar option fold-bar 2015-10-29 20:08:43 +08:00
Jeremy Ruston
03383ad1ae Merge pull request #2054 from pmario/foldbar-translatable
makes the new toolbar option fold-bar translatable
2015-10-29 11:17:39 +00:00
Jeremy Ruston
837a96e569 Merge pull request #2053 from pmario/de-DE
update german translation texts
2015-10-29 11:17:11 +00:00
Mario Pietsch
4dadbe5ba8 makes the new toolbar option fold-bar translatable 2015-10-29 12:05:54 +01:00
Mario Pietsch
eb25fdc472 update german translation texts 2015-10-29 10:49:07 +01:00
Jermolene
41480968ac Add spiral icon 2015-10-28 18:11:55 +00:00
William Jackson
817882a404 Update x-listops.js
Added prefix and suffix options to 'append' and 'prepend' operators
2015-10-27 10:17:07 +02:00
Felix Hayashi
d3ab4144d4 Allows text areas to be auto-height while being wrapped in an
element that has scrollbars. The wrapper element with the
scroll bar does not need to be a direct parent of the text area.

**update:** fixed a bug that came up in the discussion

This is fixed now: https://github.com/Jermolene/TiddlyWiki5/pull/1933#issuecomment-141774881

The problem was the check in getScrollContainer()
2015-10-26 21:22:10 +01:00
Jeremy Ruston
52e0524fbf Merge pull request #1984 from senevoldsen90/master
Local relative urls in Markdown map to WikiLinks
2015-10-26 19:51:16 +00:00
jed
e55c5b0669 Let $keyboard trigger action-widgets
Because of the refresh problems with the other widgets triggering action-widgets I am doing this one by itself. I hadn't included it before.

This shouldn't have any more problems than the button widget does, and any problems caused by it should be fixed by any fix we use for the button widget. See #1564 for more background
2015-10-26 20:23:09 +01:00
Jeremy Ruston
106f11343e Merge pull request #2026 from Evolena/def-list
Text-slicer: Add support for definition lists
2015-10-26 19:18:15 +00:00
Jeremy Ruston
9d7a850e83 Merge pull request #1943 from Spangenhelm/patch-1
Fix the title
2015-10-26 18:14:57 +00:00
Jeremy Ruston
89bd088a75 Merge pull request #1931 from erwanm/master
New resource tiddler in tw.com for TWCommunitySearch
2015-10-26 18:12:14 +00:00
Jermolene
bcb49b64f6 Update for TiddlyDesktop v0.0.5 2015-10-26 17:16:43 +00:00
Jermolene
41287d7859 Update Russian translation 2015-10-25 23:13:26 +00:00
Jeremy Ruston
72cd6a5802 Merge pull request #2045 from tgrosinger/patch-1
Fix typo which prevented example from working
2015-10-25 22:15:09 +00:00
Tony Grosinger
c0de553370 Fix typo which prevented example from working 2015-10-25 13:56:21 -07:00
Jeremy Ruston
f593bae2b2 Merge pull request #1999 from BramChen/zh
Update chinese translations
2015-10-25 09:13:11 +00:00
Bram Chen
a6fe696269 Update chinese translations for the recently new localisable strings 2015-10-25 12:24:36 +08:00
Bram Chen
e6963cbccd Remove extraneous spaces 2015-10-25 11:25:09 +08:00
Bram Chen
5d61dfb1d7 Merge branch 'master' into zh 2015-10-25 11:11:12 +08:00
Jermolene
7ecaba9a65 Update release note 2015-10-24 19:14:29 +01:00
Jermolene
0996f06a32 Merge branch 'pr/2007'
Conflicts:
	licenses/cla-individual.md
2015-10-24 19:13:42 +01:00
Jeremy Ruston
7040d483f2 Merge pull request #2028 from kixam/master
communicate on a new datepicker plugin
2015-10-24 18:56:49 +01:00
Jeremy Ruston
7cd81efa37 Merge pull request #2041 from araname/master
Update korean translation
2015-10-24 18:56:12 +01:00
Jeremy Ruston
612a2707c6 Merge pull request #2040 from afeldspar/patch-2
add explanation on 'set' attribute
2015-10-24 18:55:49 +01:00
Jeremy Ruston
3e1c6c1972 Merge pull request #2043 from afeldspar/patch-3
fix typo in FilterRun.tid diagram
2015-10-24 18:54:47 +01:00
Jeremy Ruston
36f0a50ec1 Merge pull request #2039 from afeldspar/patch-1
Update cla-individual.md
2015-10-24 18:54:16 +01:00
afeldspar
0d6450cfb5 fix typo in FilterRun.tid diagram
corrected typo in the railroad diagram, which showed a double-quote where a single-quote should have been.
2015-10-24 09:52:03 -04:00
Evolena
717e9ae913 Better wording and naming 2015-10-24 12:01:43 +02:00
Jermolene
ba15086381 Remove extraneous apostrophe
Thanks @paul-cross (2354271723243753a8a19c6181d4822592d02a3e)
2015-10-23 17:54:59 +01:00
Myeongjin Lee
52022691f9 Update korean translation 2015-10-23 17:24:55 +09:00
Jermolene
a089fb94a6 Add clean.sh for removing build output
We use a regex to delete all files in `./editions/*/output/*`
2015-10-22 22:46:47 +01:00
William Jackson
3e445b8853 Update x-listops.js
Corrected the logic of the 'allafter' filter and added a new 'move' filter.
2015-10-22 16:40:36 +02:00
afeldspar
7492086f31 add explanation on 'set' attribute
Attempted a fix for the problem I raised in #2038, by adding an explanation of why a TextReference in a button widget's 'set' attribute will lack the curly braces seen nearly anywhere else a TextReference is used as a widget attribute.
2015-10-20 21:15:58 -04:00
afeldspar
5232d5a0a7 Update cla-individual.md 2015-10-20 21:04:35 -04:00
Jeremy Ruston
9f954ce55d Merge pull request #2036 from araname/master
add localisable strings
2015-10-20 18:15:28 +01:00
William Jackson
56d467fb47 Create action-listops.js
Action widget designed to apply filters to the current list and save the modified list back to the list. The widget is able to manipulate lists in any field or any data index of the target tiddler, and includes an option to manipulate the tags of the target tiddler. The widget is used in conjunction with the extended list operator filters (xlistops.js)
2015-10-18 18:41:40 +02:00
William Jackson
49894abaf4 Create x-listops.js
These filters are designed to be used with the action-listops widget.
2015-10-18 18:37:08 +02:00
Myeongjin
a0468a5e6c add localisable strings for plugin library 2015-10-18 18:33:59 +09:00
Myeongjin
33bca3d390 add localisable strings for search 2015-10-18 18:09:41 +09:00
Myeongjin
4347d91c57 add localisable strings for Import/Imported 2015-10-18 17:29:04 +09:00
Myeongjin
2fee131aa4 add localisable strings for Internal JavaScript Error 2015-10-18 17:26:42 +09:00
Myeongjin
d7f1f973a9 replace type to rendertype at setfield help 2015-10-18 17:23:37 +09:00
Myeongjin
8e68f904f1 remove unnecessary spaces 2015-10-18 16:49:48 +09:00
Aurélien Correia
95f98d36d9 communicate on a new datepicker plugin 2015-10-15 09:33:42 +02:00
Evolena
0a220a09da Text-slicer: Add support for definition lists 2015-10-14 20:25:11 +02:00
Jeremy Ruston
26d0029746 Merge pull request #1997 from Marxsal/patch-7
A primer on how to export tiddlers
2015-10-14 14:34:10 +01:00
Jeremy Ruston
b1633e0f2d Merge pull request #1952 from tobibeer/1937-set-refresh-filter
fixes #1937 — filter refresh in set widget
2015-10-14 14:18:29 +01:00
Bram Chen
0703a257f3 Add chinese translations of Settings/PerformanceInstrumentation 2015-10-14 21:07:33 +08:00
Bram Chen
7609bcdf0e Merge branch 'master' into zh 2015-10-14 20:40:26 +08:00
Jermolene
fe1b318987 Release note updates 2015-10-14 12:01:40 +01:00
Jermolene
e31abf89ac Fix accidental commit of wrong default performance instrumentation setting 2015-10-14 12:01:35 +01:00
Jermolene
33563d01ba Add user interface for enabling performance instrumentation 2015-10-14 10:59:55 +01:00
Jeremy Ruston
093f507319 Merge pull request #2015 from tobibeer/patch-1
updated Modules documentation
2015-10-13 18:59:31 +01:00
Tobias Beer
9f6fea7607 updated to point to new location 2015-10-13 12:23:58 +02:00
Jermolene
85553609b1 Ensure edit-text widget fixes height even if refresh isn't required
Fixes #1995
2015-10-12 17:54:51 +01:00
Jermolene
acc44c6f67 Tweaks to "Tight" theme 2015-10-12 17:54:17 +01:00
Tobias Beer
00f6aafed6 being specific about the tiddler to be deleted via action-deletetiddler 2015-10-10 21:01:07 +02:00
Tobias Beer
9a23c2471c modified alert template and execute action-deletetiddler on currentTiddler by default 2015-10-10 16:47:11 +02:00
Tobias Beer
5d36e17c18 Revert "no delete confirmation for alerts"
This reverts commit 88c1a1e062.
2015-10-10 16:35:22 +02:00
Jermolene
98983c4072 Add badges from https://shields.io 2015-10-10 14:30:58 +01:00
Jermolene
69b4f174c3 Introduce new "tight" theme
Fixing #2008
2015-10-09 17:59:56 +01:00
Jermolene
2d9471fe3b Text-Slicer: Add support for static rendering of external images 2015-10-09 17:09:30 +01:00
senevoldsen90
ed1a306f88 Signing the CLA 2015-10-09 15:24:59 +02:00
senevoldsen90
e5cef9a5a6 Local relative urls in Markdown map to WikiLinks 2015-10-09 15:11:24 +02:00
Tobias Beer
51739e3fd2 moved if-macro, see #2005
as per #2005 from @Evolena
2015-10-09 10:39:00 +02:00
jed
4c95dc9bbb Modified fieldmangler to create a tiddler if adding a tag to one that doesn't exist
This came up as an issue and I don't have any reason it shouldn't be here. It could be useful.
2015-10-08 20:39:19 +02:00
Jermolene
5faba15446 Text-slicer updates 2015-10-08 18:04:24 +01:00
Jermolene
7e9f7afa94 Tweak the sidebar tabs gradient 2015-10-08 15:10:54 +01:00
Jermolene
6add992bf2 Fix issue with tiddlers such as $:/templates/something not being synced
Fixed #2002
2015-10-08 15:10:46 +01:00
Tobias Beer
2acea55711 added example documentation
the documentation for the feature seems already there / merged
2015-10-08 14:22:05 +02:00
Tobias Beer
26114eb3ff removed pushOnce 2015-10-08 14:22:01 +02:00
Tobias Beer
b34e4f628d adopted style recommendations 2015-10-08 14:21:57 +02:00
Tobias Beer
71968e0973 added $tw.utils.pushOnce
retained check for basic each nonetheless

tests pass
2015-10-08 14:21:51 +02:00
Tobias Beer
843f18dc7e reverted test.cmd
not sure how handling these files in the console works, reverted back to
previous version, to be run from repo folder
2015-10-08 14:21:27 +02:00
Tobias Beer
8b74706e35 fixed helper function and added tests
tests: ok
2015-10-08 14:21:24 +02:00
Tobias Beer
32c41479cc using variable declaration for readability 2015-10-08 14:18:55 +02:00
Tobias Beer
95eb8810b6 removed pushOnce 2015-10-08 14:07:12 +02:00
Tobias Beer
91b5547cdf adopted style recommendations 2015-10-08 14:07:08 +02:00
Tobias Beer
d0a24bd9f0 added $tw.utils.pushOnce
retained check for basic each nonetheless

tests pass
2015-10-08 14:07:06 +02:00
Tobias Beer
4788725ccf reverted test.cmd
not sure how handling these files in the console works, reverted back to
previous version, to be run from repo folder
2015-10-08 14:07:03 +02:00
Tobias Beer
f684a6beb0 fixed helper function and added tests
tests: ok
2015-10-08 14:07:00 +02:00
Tobias Beer
a88ead9c0f removed conditional from iterator
I'd really like to see a profiler run against the two to see the
performance impact of one over the other
2015-10-08 14:06:57 +02:00
Tobias Beer
c3cbbc3f66 renamed value to items 2015-10-08 14:06:54 +02:00
Tobias Beer
f9464dfaf8 using variable declaration for readability 2015-10-08 14:06:51 +02:00
Tobias Beer
baca2703f1 added list suffix for each filter
implements #1369

when the suffix is `list`, interprets the field as a list of individual
tiddler titles and returns all titles referenced in the list field of
the source list, existing or not
2015-10-08 14:06:48 +02:00
Bram Chen
a42dff1a41 Add chinese translations of Tiddler/DateFormat 2015-10-08 09:21:01 +08:00
Bram Chen
3853a76c9a Add chinese translations of clarification about password command 2015-10-08 09:09:31 +08:00
Jermolene
8a763e9d83 Re-establish gradient for sidebar tab divider 2015-10-07 20:45:14 +01:00
Jermolene
acbf87657b Switch to absolute date format
The present implementation of relative dates doesn’t auto-update, nor
does it work effectively in static renderings. Until that’s fixed, I
think it is better to switch to absolute dates.
2015-10-07 18:35:23 +01:00
Marxsal
79972fe57f Applying recomendations
Giving better descriptive names to sub-headings
2015-10-06 10:36:19 -07:00
Marxsal
5163b541cf A primer on how to export tiddlers
Showing how to export individual, selection, or all tiddlers.
2015-10-06 09:11:21 -07:00
Jermolene
1e06824ed1 Release note update 2015-10-05 15:57:44 +01:00
Jermolene
2803890baf Release note update 2015-10-05 10:23:42 +01:00
Jermolene
0035a00463 Switch to transparent colours for "more" sidebar tabs
Although falling short of the proposal in #1976, this change makes the
sidebar tabs work much better with different colour page backgrounds
and background images.
2015-10-05 09:53:18 +01:00
Jermolene
6b3dd1bb63 Release note and docs updates 2015-10-05 09:53:18 +01:00
Jeremy Ruston
5fafa0fb07 Merge pull request #1978 from BramChen/zh
Update chinese translations
2015-10-04 22:19:52 +01:00
Jeremy Ruston
a30f9e1739 Merge pull request #1992 from tgrosinger/master
Add documentation to tw5.com for CodeBlock widget
2015-10-04 21:46:57 +01:00
Jeremy Ruston
9db8a9326f Merge pull request #1994 from tgrosinger/patch-2
Provide clarification about running with password
2015-10-04 21:41:54 +01:00
Tony Grosinger
2e1ad771d6 Whitespace clean up and missing close tag
Clean up for CodeblockWidget documentation.
2015-10-04 13:05:46 -07:00
Tony Grosinger
11b09be523 Provide clarification about running with password 2015-10-04 10:51:27 -07:00
Jeremy Ruston
1b25962948 Merge pull request #1990 from tobibeer/patch-1
example description for tagging filter
2015-10-04 17:05:41 +01:00
Tobias Beer
db2eaf56d4 overlooked "either", removed 2015-10-04 18:03:49 +02:00
Tobias Beer
2f8ae31377 better wording 2015-10-04 18:02:48 +02:00
Jeremy Ruston
6ef894f240 Merge pull request #1991 from tgrosinger/patch-1
Signing the CLA
2015-10-04 16:55:36 +01:00
Tony Grosinger
650a9a76df Add documentation to tw5.com for CodeBlock widget
Partial fix for #1985
2015-10-03 16:48:47 -07:00
Tony Grosinger
c3356e50e3 Signing the CLA 2015-10-03 16:17:00 -07:00
Tobias Beer
adb81f7eab example description for tagging filter 2015-10-04 01:01:34 +02:00
Jeremy Ruston
4e281d51c4 Merge pull request #1988 from zahlman/patch-2
Documentation for filter operators
2015-10-03 19:11:19 +01:00
Jeremy Ruston
a14eb78d76 Merge pull request #1986 from zahlman/patch-1
Signing the CLA
2015-10-03 19:10:02 +01:00
Karl Knechtel
3ab7db1a59 One more fix 2015-10-03 08:43:55 -04:00
Karl Knechtel
d806f1d0f1 Assorted wikitext fixes 2015-10-03 08:42:56 -04:00
Karl Knechtel
b23d53e9b0 Fix stray line 2015-10-03 08:36:56 -04:00
Karl Knechtel
6598455e83 Create Filter Operators.tid 2015-10-03 08:32:47 -04:00
Karl Knechtel
8d58e2d651 Signing the CLA 2015-10-03 07:11:35 -04:00
Tobias Beer
88c1a1e062 no delete confirmation for alerts 2015-10-02 11:36:07 +02:00
Bram Chen
8f5ad753af Improve chinese translations of help texts 2015-10-01 21:53:49 +08:00
Jermolene
c0c0b6653c Blog updates 2015-10-01 12:13:48 +01:00
Jermolene
99df9f46f7 Add support for tiddlers containing mp4 videos 2015-10-01 12:13:38 +01:00
Jermolene
814353d8ce Fix accidental inconsistency between savetiddlers and rendertiddlers
“-do-not-delete” flag for savetiddlers command was introduced in 5.1.10
without consistency with the already implemented “noclean” flag for the
rendertiddlers command
2015-09-29 17:04:01 +01:00
Jermolene
7b8928886b Add tw.utils.tagToCssSelector() helper method 2015-09-28 20:27:43 +01:00
Jermolene
6ac178323f Docs: better definition of a plugin 2015-09-28 17:59:44 +01:00
Jermolene
72941f3e9a Addresses #1066 by moving the search results into a dropdown.
The dropdown can be summoned by clicking on the search field. It will
only appear if the search field is not empty. When the search field is
not empty the dropdown can be also be summoned by clicking on the arrow
or search result count.

There are still some wrinkles where the dropdown doesn’t appear when
expected; I’d appreciate feedback to help reproduce those cases.

This change should still work with custom search result tabs.
2015-09-27 22:53:46 +01:00
Jermolene
b30126ec22 Text-slicer: add support for document metadata fields
The metadata for each field is in a tiddler tagged
`$:/tags/DocumentMetaData` with the field `caption` being the displayed
caption for the field and `field` being the name of the field.
`field-type` is the type of the field, and can be “string” or “list”.
2015-09-27 22:53:46 +01:00
Jermolene
ebb3a62d9a Docs updates 2015-09-27 22:53:46 +01:00
Jermolene
b27a41eb86 Hide the fold-bar by default 2015-09-27 22:53:46 +01:00
Andreas Hahn
99c5fa46dd fixed bug in $action-setfield introduced by #1963: At least one of '$field', '$value' or '$index' must be specified in order to act upon the information from the fields. Prevents default deletion of the 'text' field when none are specified. 2015-09-27 15:35:54 +02:00
Jeremy Ruston
6107bbfd6e Merge pull request #1966 from matabele/patch-1
Update cla-individual.md
2015-09-27 09:36:30 +01:00
William Jackson
8c538af9df Update cla-individual.md
Signing CLA
2015-09-26 20:39:34 +02:00
Jeremy Ruston
115c40dc4a Merge pull request #1964 from tobibeer/clear-tiddler-body
clears tiddler body for when one adds right-floating element to subtitle
2015-09-26 17:42:54 +01:00
Tobias Beer
6b1e6b7545 clears tiddler body for when one adds right-floating element to subtitle
otherwise has no effect
2015-09-26 12:22:17 +02:00
Jeremy Ruston
fd997c4581 Merge pull request #1963 from tobibeer/action-setfield-remove-index-or-field
updated #1480 "undefined value removes field or index"
2015-09-25 16:34:03 +01:00
Tobias Beer
1b2d54b4bf wording for docs 2015-09-25 15:43:31 +02:00
Tobias Beer
6b3fc8d538 updated #1480 "undefined value removes field or index"
when $value is unspecified, $action-setfield removes field or index...

modified

setText() — $:/core/modules/wiki.js
invokeAction() — $:/core/modules/widgets/action-setfield

demo

http://tobibeer.github.io/tw/batch/#ActionSetField-RemoveIndex
2015-09-25 15:20:37 +02:00
Jermolene
57c40a8a56 Text-slicer: Tweaks to fix recently introduced bugs!
* Fixes problem with slicing wikitext tiddlers
* Adjusts position of heading expand/collapse icons in the view
template segment
2015-09-22 12:57:53 +02:00
Tobias Beer
a1ce254e95 fixes #1937 — filter refresh in set widget
as per @EvanBalster
2015-09-21 17:24:26 +02:00
Jermolene
90e0b6f555 Remove extraneous whitespace from view template 2015-09-19 21:12:37 +01:00
Jermolene
6ee8c14d89 Updates to the Danish translation 2015-09-19 18:59:23 +01:00
Jermolene
c03dc4c37c Make the fold-bar be selectable as though it were a toolbar button 2015-09-19 09:36:26 +01:00
Jermolene
e6529af04e Tiddler editor: accept new tags and fields when clicking "confirm"
Fixes #1939
2015-09-19 09:36:11 +01:00
Jermolene
21175012dc Text-slicer: Fixes for images 2015-09-18 19:45:34 +01:00
Jermolene
cf00658ddf Add full-width "unfold" button for folded tiddlers
And also a full-height “fold” button for unfolded tiddlers.

Trying to address #1908
2015-09-18 19:45:34 +01:00
Jermolene
b641cb402d Add banner for unfolding tiddlers 2015-09-18 19:45:34 +01:00
Jeremy Ruston
6309d41b42 Merge pull request #1942 from BramChen/zh
Update chinese translations
2015-09-18 17:29:43 +01:00
Jermolene
268da52f8c Documentation updates
Adding “Story River” to the “Concepts” category, and doing some
clean-up of other entries in the category by moving some concepts to
become sub-concepts in the TOC
2015-09-18 09:19:21 +01:00
Jermolene
dc020276b0 Update filesystemadaptor to use a metafile for all binary files
Previously, newly created image files would end up being saved as a
base64-encoded .tid file. Now they are saved as an ordinary binary file
with an accompanying .meta file for the metadata.
2015-09-17 19:43:10 +01:00
Jermolene
e2d63a03b2 Text-slicer: Improvements to image handling 2015-09-17 19:41:41 +01:00
Jermolene
1fef272388 Text-slicer: starting to support images 2015-09-17 08:41:21 +01:00
Jermolene
7b8cb928cf Text-slicer: initial support for anchors 2015-09-16 18:59:03 +01:00
Florent V.
bbc802e228 Fix the title
to match the one required by the "FieldManglerWidget" tiddler's link to examples, broken for now. (pointing to a non existant tiddler because of the wrong name)
2015-09-16 04:55:07 +02:00
Bram Chen
8e98102281 Improve chinese translations of "tools" button tooltip 2015-09-16 10:15:31 +08:00
Jermolene
207406eeb3 tw5.com-docs improvements
Better not to override any of the tw5.com documentation tiddlers!
2015-09-15 17:51:20 +01:00
Jermolene
f4d11cb471 Add text-slicer to full edition 2015-09-15 17:50:57 +01:00
Jermolene
a19f7454ca Improve "tools" button tooltip
Thanks @Evolena
2015-09-15 17:50:49 +01:00
Jermolene
5dbaf187f1 Text-slicer: more refactoring 2015-09-15 13:37:12 +01:00
Jermolene
746aab2cf6 Create a plugin and edition for tw5.com docs
By making the docs available as a plugin we make it easier for people
to fork their own copy of the docs without losing the ability to get
updates in the future (which can be done just be updating the docs
plugin)
2015-09-15 13:37:01 +01:00
Jermolene
803d70225a Allow tiddlywiki.files to load directories recursively 2015-09-15 13:35:54 +01:00
Jermolene
f917c4da1a Clarify hint for import button
Triggered by this discussion:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg
/tiddlywiki/lVu-WIP4GXs/QvJB7by3NEAJ
2015-09-15 13:35:17 +01:00
Jermolene
d4bd253779 Release note update 2015-09-15 13:34:15 +01:00
Jeremy Ruston
5ef0259ab2 Merge pull request #1935 from hegart-dmishiv/patch-1
My first attempt at editing the TW documentation
2015-09-14 16:24:43 +01:00
Jeremy Ruston
f7cf62de57 Merge pull request #1936 from hegart-dmishiv/patch-2
Signing the CLA
2015-09-14 16:24:05 +01:00
Hegart Dmishiv
6976e57af6 Signing the CLA
You may not believe the date, but I'm in Auckland, New Zealand, which is GMT+12 timezone, so I come from the future!
2015-09-15 02:20:32 +12:00
Hegart Dmishiv
3c71c10da9 My first attempt at editing the TW documentation
Feel free to ignore this pull request if you want to, although it might be a useful addition to this page. I use NZ English normally, which is closer to UK English than to US English, but I still get confused between the two sometimes, having spent so long around the (predominately American) Internet.
2015-09-15 02:01:06 +12:00
Erwan Moreau
fb69a43325 Update TWCommunitySearch.tid 2015-09-13 19:23:25 +01:00
Erwan Moreau
7f93cea6d0 Create TWCommunitySearch.tid 2015-09-13 18:47:55 +01:00
Jermolene
e19617a5ce Text-slicer updates 2015-09-13 09:37:57 +01:00
Jermolene
e62778a50f Text-slicer: Make sliced documents collapsible 2015-09-12 09:41:25 +01:00
Jermolene
3592a9560b Highlight plugin: add static demo
Also clean up some coding style issues
2015-09-11 22:36:30 +01:00
Jermolene
c80db86b67 Update to v8.8.0 of highlight.js 2015-09-11 19:53:06 +01:00
Jermolene
b379ab4f87 Text-slicer: better static HTML generation 2015-09-11 13:34:01 +01:00
Jermolene
c20e5b47b6 Clarify external text tiddler limitations 2015-09-11 13:34:01 +01:00
Jermolene
939596bd47 Add new "htmlencodedplainwikified" format to view widget
Triggered by the text-slicer plugin, but general purpose.

The clunky implementation shows the shortcomings of the view widget. It
was one of the first widgets to be implemented; subsequently, the
implementation of macros gives us a potentially more flexible way of
implementing these kinds of text transformations.
2015-09-11 13:34:01 +01:00
Jermolene
eb9fb6635d Fix issues with creation and modification dates
There were several places where tiddlers were being written without the
creation/modification details being updated.

See
https://groups.google.com/d/msgid/tiddlywiki/17ef8ab0-0128-4467-8a9d-f17
bdbcf3618%40googlegroups.com
2015-09-11 13:34:01 +01:00
Jeremy Ruston
35e84c41ed Merge pull request #1923 from BramChen/zh
Update chinese translations
2015-09-09 19:35:59 +01:00
Jermolene
3a700c025d Fix thumbnail macro tiddler title 2015-09-09 17:46:42 +01:00
Jeremy Ruston
06ba6f62cb Merge pull request #1927 from Evolena/master
Fix thumbnail macro when no caption parameter is provided
2015-09-09 17:46:10 +01:00
Jermolene
79132a1797 Revert incomplete experimental change to narrow screen layout
Fixes #1911
2015-09-09 17:12:36 +01:00
Jermolene
51d71f9858 Update blog edition docs
Fixes #1928
2015-09-09 17:03:26 +01:00
Jermolene
470238acbf Fixes to KaTeX v0.5.1 upgrade
I hadn’t noticed that the fonts had changed…
2015-09-09 13:56:52 +01:00
Evolena
a25955d8c6 Fix thumbnail macro when no caption parameter is provided 2015-09-08 20:32:07 +02:00
Jermolene
424b2fea32 Add th-saving-tiddler hook for autotagging etc.
@danielo515 this enhancement is intended to make it easier to implement
things like the auto tag plugin. Does it meet your needs?
2015-09-08 16:16:50 +01:00
Bram Chen
0861e1bb3a Add chinese Translations of lazy loading message 2015-09-08 22:14:25 +08:00
Bram Chen
8cf02fcb0f Merge branch 'master' into zh 2015-09-08 21:10:30 +08:00
Jermolene
ecdae4ceff Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
Jermolene
f405a89b28 Update to KaTeX v0.5.1 2015-09-08 10:37:33 +01:00
Jermolene
026c84197f Text-Slicer: Support folding and fix bug with filter for retrieving list contents 2015-09-07 17:01:11 +01:00
Jermolene
76c12a9ecc Make it easier for other view template segments to support folding 2015-09-07 17:00:03 +01:00
Bram Chen
1d33f5ed48 Add chinese translations of warning message for detected TiddlyWiki Classic plugins 2015-09-05 10:27:56 +08:00
Jermolene
2e0845b806 Release note update 2015-09-04 17:22:41 +01:00
Jermolene
2c9b1ae257 Add warning when trying to use plugins designed for TiddlyWiki Classic 2015-09-04 17:18:34 +01:00
Jeremy Ruston
1491ba71aa Merge pull request #1921 from BramChen/zh
Update zh-Hant and zh-Hans
2015-09-04 17:11:38 +01:00
Jermolene
f0a655d8b2 Text-slicer: Switch from weaving with tags to lists alone
Many reasons:
* to allow subtrees to be grafted more easily
* to keep the tags for an entry clean by removing structural tags and
leaving the semantic tags
* to avoid the duplication of expressing the same relationship through
both the tags and list fields
2015-09-04 09:05:33 +01:00
Jermolene
4ea5dce284 Text-slicer improvements
1. Switch from using the text field of lists for storing the associated
filter to using the field `toc-list-filter` (to make it harder to
accidentally parse the text of an ordinary tiddler as a filter)
2. Fix several bugs
2015-09-04 08:42:07 +01:00
Bram Chen
34619481ad Add chinese translations for new options of rendertiddler and savetiddlers commands 2015-09-03 21:34:55 +08:00
Jermolene
5dcb53abae Docs update for text-slicer 2015-09-03 08:54:48 +01:00
Jermolene
ad6a6f3b75 Introduce the blog plugin 2015-09-03 08:54:41 +01:00
Jermolene
5176f008f0 Enhance savetiddlers command with do not delete option 2015-09-03 08:54:17 +01:00
Jermolene
4ccdaf3faf Enhance rendertiddler command with template option 2015-09-03 08:53:08 +01:00
Jermolene
c4244e8f04 Text-slicer improvements
# Allow the slicer to be used as a command
# Sort the document preview column
2015-09-01 17:25:45 +01:00
Jermolene
1d30ee955c Remove accidentally committed change
I’d added text-slicer to the main wiki just to check that it worked.
2015-09-01 17:12:38 +01:00
Jermolene
b4aa895cac Text-slicer: add support for exclude filters
The exclude filter `+[tag[intro]]` will produce a document that only
includes the paragraphs with the tag “intro”. These are derived from
the paragraphs in the original document with the CSS class “intro”.
2015-09-01 09:59:23 +01:00
Jermolene
17dc21b809 Text-slicer refactoring 2015-08-31 20:32:32 +01:00
Jermolene
0be82ea7fb Text-slicer: Introduce separate static templates
Much easier to have separate sets of templates for interactive vs
static document trees
2015-08-31 19:50:56 +01:00
Jermolene
cc4bef9c0e Text-slicer: reorganise plugin shadow tiddler titles 2015-08-31 16:49:47 +01:00
Jermolene
ae80f9176d Typo from last commit 2015-08-31 16:25:03 +01:00
Jermolene
73f3244113 Hide the fold-all and unfold-all buttons by default 2015-08-31 15:48:43 +01:00
Jermolene
709126dd64 Don't queue change events for deleting non-existent tiddlers
Fixes #1919
2015-08-31 15:48:32 +01:00
Jermolene
684fbb1ee8 Update to KaTeX v0.5.0 2015-08-31 15:10:07 +01:00
Jermolene
faa32bc424 Text-slicer: Make sure hide/show gadgets hidden in preview 2015-08-31 14:54:39 +01:00
Jermolene
bc448ce1fd Text-slicer: updates
* Add warning in document tiddler toolbar if tiddler already exists
* Live preview document in new window
* Fix slicer.js bug that was preventing the list field of headings from
being filled in correctly
* Rationalise some class names
2015-08-31 14:15:44 +01:00
Jermolene
51d771a074 Extend tm-open-window to pass variables 2015-08-31 14:13:32 +01:00
Jermolene
4d4181b048 Missed off last commit 2015-08-30 19:15:12 +01:00
Jermolene
4cac7b6784 Lots of enhancement to the text-slicer plugin
Now includes a special document view column on the left. Headings can
be expanded/collapsed, and tiddler titles can be inspected and renamed
via the toolbar. Clicking on an entry opens the associated tiddler. The
default tiddler view template includes a special section for tiddlers
that are part of a document
2015-08-30 19:15:04 +01:00
Jermolene
0d55f2c46b Observe storyleft position in fluid-fixed mode 2015-08-30 19:12:34 +01:00
Jermolene
3fbe07f1f8 Fix link widget propogation behaviour
Without this fix, using nested link widgets with custom elements causes
clicks on the inner element to trigger links on each of the containing
widgets
2015-08-30 19:12:12 +01:00
Jermolene
68e15c1064 Move rename tiddler handling into navigator widget
For consistency with the other tiddler manipulation primitives.
2015-08-30 19:11:14 +01:00
Jermolene
a204784c0c Limited implementation of external text tiddlers in the browser
Triggered by the discussion in #1917
2015-08-29 16:33:04 +01:00
Jermolene
abd8201aaa Text-slicer refactoring
Substantially cleaning up the main slicer code
2015-08-29 15:23:31 +01:00
Jermolene
97979e1fb1 Text-Slicer: update docs and change default view 2015-08-28 19:40:58 +01:00
Jermolene
46087fd270 Text-slicer update
* Improved docs on the created structure
* Added support for converting CSS classes as tags
* Added display of tags within the toolbar
2015-08-28 19:13:50 +01:00
Jermolene
f443719223 Text-slicer: Add selectable output views 2015-08-17 11:16:53 -04:00
Jermolene
74bd6e8232 Remove old code
Experimental code, accidentally committed
2015-08-10 22:20:40 +01:00
Jermolene
abcb2d3a1c Text-slicer: improved generation of paragraph names 2015-08-10 20:32:30 +01:00
Jermolene
2eb645e5e5 Add getAttribute to fakeDom 2015-08-10 20:32:13 +01:00
Jermolene
d3ca636a5b Text-slicer: switch to use tabbed internal navigation 2015-08-10 19:39:04 +01:00
Jeremy Ruston
c06b3c4ef7 Merge pull request #1906 from BramChen/zh
Update zh-Hant and zh-Hans
2015-08-10 11:43:19 +01:00
Jermolene
3cfad8b044 Refactoring of text-slicer
Now we process the rendered HTML of tiddlers, which allows us to
process HTML generated by MS Word. In fact, the HTML that MS Word
generates is so awful, I’ve instead been using Mammoth to do the
conversion: https://github.com/mwilliamson/mammoth.js

Also some necessary improvements to the fake dom implementation.
2015-08-10 11:41:23 +01:00
Jermolene
010b01f205 Remove extra DIV added to view template
One of the changes for introducing folded tiddlers was the extra reveal
widget here, which introduces an extra DIV element, breaking some CSS
rules. To fix it, we re-use the reveal widgets generated DIV as the
tiddler body DIV
2015-08-10 11:39:11 +01:00
Bram Chen
66b405ac81 Update chinese translation of all fold/ unfold buttons
* new "fold all" and "unfold all" page buttons
* new "unfold tiddler" toolbar button
2015-08-10 13:49:13 +08:00
Jermolene
4d5c14bca7 Release note update 2015-08-09 17:25:26 +01:00
Jermolene
ac08dc2e35 Added fold/unfold all buttons
More translations, @BramChen, apologies…
2015-08-09 17:25:01 +01:00
Jermolene
4bcf1e298b Release note updates 2015-08-09 16:44:47 +01:00
Jermolene
4152fbbfeb Use different wording for unfolding vs folding
Apologies for making more work @BramChen!
2015-08-09 16:40:58 +01:00
Jermolene
16c69bb419 Tweaks to fold button 2015-08-09 16:11:37 +01:00
Jeremy Ruston
27ec05e521 Merge pull request #1905 from BramChen/zh
Update zh-Hant and zh-Hans
2015-08-09 14:33:39 +01:00
Bram Chen
0f32af1cce Add chinese translations of "fold" button for the tiddler toolbar 2015-08-09 21:03:51 +08:00
Jermolene
bad4a19f8e Add fold others button 2015-08-09 12:56:48 +01:00
Jermolene
c91c7b7cbb Updates to Korean translation 2015-08-09 12:44:57 +01:00
Jermolene
ef87dd0687 Update release note 2015-08-09 11:11:04 +01:00
Jermolene
5d43cd7408 Add fold tiddler toolbar button
Addressing this tweet:
https://twitter.com/s_stryjecki/status/629349768280604672
2015-08-09 11:10:04 +01:00
Jermolene
6a3c4d6c91 Flip logic for suppressing timestamps
Fixing a mistake from the earlier commits, so that the default remains
that the timestamps are applied.
2015-08-09 11:09:02 +01:00
Jermolene
318a1cf212 Release note updates 2015-08-08 14:43:01 +01:00
Jeremy Ruston
1022854900 Merge pull request #1904 from araname/master
Signing the CLA
2015-08-08 14:39:02 +01:00
Myeongjin
be0ab28e89 Signing the CLA 2015-08-08 22:32:39 +09:00
Jermolene
fbe4bc18b9 Move JS-oriented mechanism docs to /dev
Fixes #1889
2015-08-08 13:56:42 +01:00
Jermolene
7421616754 Make keyboard shortcuts configurable
Fixes #1892
2015-08-08 13:43:14 +01:00
Jermolene
6c6b723a0d Tweak sidebar height for narrow screens 2015-08-08 13:08:10 +01:00
Jermolene
4f5cf4597a Remove blur effect from modals
Fixes #1893
2015-08-08 13:08:10 +01:00
Jeremy Ruston
e27e49e00c Merge pull request #1894 from BramChen/zh
Update chinese translations
2015-08-08 13:04:43 +01:00
Jermolene
cac6d3b4d9 Improve sidebar behaviour on narrow screens
Now the sidebar is a fixed overlay. It is scrollable, taking up 50% of
the height of the screen, so that the underlying page can be partially
seen.

There’s more to be done: on narrow screens we probably want the sidebar
to be hidden by default.
2015-08-08 08:39:37 +01:00
Bram Chen
d01d8539a6 Merge branch 'master' into zh 2015-08-07 09:51:48 +08:00
Jermolene
e5cd8313a0 Update actionsetfield widget to allow timestamp to be preserved 2015-08-06 18:17:09 +01:00
Jeremy Ruston
821617058d Merge pull request #1901 from SuperDOS/master
Update cla-individual.md
2015-08-06 17:43:57 +01:00
SuperDOS
22563792c4 Update cla-individual.md 2015-08-06 15:16:19 +02:00
Jermolene
b1cf0fdd68 Text-slicer tweaks
* Add site title/subtitle
* Remove proxy title tiddler used for renames when no longer used
2015-08-05 19:21:48 +01:00
Jermolene
cbbe90313b Add in-place editing for text-slicer plugin
@pmario \o/
2015-08-05 15:08:03 +01:00
Jermolene
fdce67399d Provide option to suppress navigation for edit/cancel/save 2015-08-05 15:07:19 +01:00
Bram Chen
d7263d8413 Merge branch 'master' into zh 2015-08-05 15:01:48 +08:00
Jermolene
72ed4b2673 Add renaming to text-slicer tiddler toolbar
The plan is to expose the functionality in other places, too - for
example, the edit template and the tag manager
2015-08-04 17:44:07 +01:00
Jermolene
be0ebfeeae Make the text slicer tiddler toolbar be tag-driven 2015-08-04 17:34:28 +01:00
Jermolene
535d8d6fa0 Stop using an import tiddler for text slicer
Instead we directly output the tiddlers (we keep the old code around;
later we’ll make the output mode switchable).

Also improve the icon
2015-08-04 08:04:57 +01:00
Jermolene
dd1f82c1aa Improve the text-slicer icon 2015-08-03 17:09:48 +01:00
Jermolene
898e992694 Improvements to text-slicer plugin
1. Introduce template tiddlers for the document, each tiddler, and the
tiddler toolbar
2. Move the text slicer toolbar button to the left of the edit button
3. Add a selectable toolbar, currently just containing the tiddler title
2015-08-03 15:10:35 +01:00
Jermolene
2e5c500300 Fix slice button tooltip 2015-08-03 09:13:45 +01:00
Jermolene
8b9e790e69 Improve text slicer docs 2015-08-03 09:13:36 +01:00
Jermolene
cc1acdaf74 Add ko-KR and sv-SE to translators edition 2015-08-03 08:43:21 +01:00
Bram Chen
b57feaa6a8 Correct encoding of chinese character 2015-08-03 14:19:26 +08:00
Bram Chen
db20d8f812 Merge branch 'master' into zh 2015-08-03 13:56:06 +08:00
Jermolene
9168480d18 Clear caches when changing plugins 2015-08-02 22:22:33 +01:00
Jermolene
bc0d8c7c65 Add Korean (Korean Republic) translation 2015-08-02 13:59:26 +01:00
Jermolene
c6c9abeb1b Add Swedish translation by Superdos 2015-08-02 11:39:57 +01:00
Jermolene
d2c14ba203 Use nested icon for text-slicer
We transclude the existing text-slicer icon on top of the hexagonal
background image.
2015-08-02 11:38:55 +01:00
Jermolene
1e25de984b More specificity for plugin listing CSS rules
This is to enable us to use nested SVGs as icons (see next commit)
2015-08-02 11:38:25 +01:00
Bram Chen
0691286092 Merge branch 'master' into zh 2015-08-02 09:11:56 +08:00
Jermolene
9ec38eef32 Improve text-slicer macros
Encapsulate tiddler display so that we can detect draft tiddlers and
display them through their own template
2015-08-01 18:10:00 +01:00
Jermolene
d938c10144 Use new story object to navigate to slicer output 2015-08-01 18:09:30 +01:00
Jermolene
c23e26be5f No longer need to keep text slicer output open 2015-08-01 18:09:14 +01:00
Jermolene
8444961cd2 Introduce Story object
A lightweight object to encapsulate manipulation of the story and
history lists
2015-08-01 18:09:00 +01:00
Bram Chen
e1cce60df3 Add chinese translations for parser rule configuration in control panel 2015-08-01 21:19:03 +08:00
Jermolene
a4d0210f90 Use $:/TextSlicer for text-slicer output 2015-08-01 13:48:57 +01:00
Jermolene
cd29eed067 Fix problem with importing using wrong import tiddler name 2015-08-01 13:48:46 +01:00
Jermolene
3b321b5d26 Add buttons to the top of the $:/Import tiddler too 2015-08-01 13:19:39 +01:00
Jermolene
8488a13761 Introduce text-slicer plugin and edition
A first pass at a plugin that splits formatted text into individual
tiddlers according to lists and headings.
2015-08-01 13:15:24 +01:00
Jermolene
8f746f9dde Add parse tree utility for collecting text 2015-08-01 13:14:32 +01:00
Jermolene
7cc85e8162 Use relative links for editions
Thus making the links work properly in both the release and prerelease
2015-08-01 13:14:17 +01:00
Jermolene
f708b4df65 Turn off performance instrumentation
The plan is to make it be a user configurable option
2015-08-01 13:13:47 +01:00
Jermolene
58188cf805 Improvements to parser rule configuration
* Ignore parser rule configuration in safe mode
* Made text translatable
* Added new setting for camelcase links
* Added warning on parser rule configuration tab

See #1875
2015-07-31 13:33:33 +01:00
Jermolene
d5e690a06d First pass at global disabling of parser rules
This is to address #1875 more quickly than via #345.

This commit only includes a partial implementation of the UI - see the
ticket for details.
2015-07-30 12:28:29 +01:00
Jermolene
9e1741a549 Move 5.1.10-specific content to "staging" folder
So that we can build tw5.com with 5.1.9 for content updates.
2015-07-29 08:23:38 +01:00
Jermolene
73210a7b8c Refine the way that we support serialised external tiddler files
The old way was sufficiently backwards compatible that it was
impossible to use TiddlyWiki 5.1.9 to build the tw5.com edition.
2015-07-28 19:56:56 +01:00
Jeremy Ruston
273daa9613 Fix unicode characters in filename 2015-07-20 19:07:55 +01:00
Jeremy Ruston
6de92a0293 Fix unicode characters in filename 2015-07-20 19:07:26 +01:00
Jeremy Ruston
66bdb71c4a Fix unicode characters in filename 2015-07-20 19:07:08 +01:00
Jeremy Ruston
90b12676c4 Merge pull request #1887 from inmysocks/ResumeBuilder
Updated spelling of résumé, fixed settings for new resumes, other minor fixes
2015-07-20 19:03:52 +01:00
inmysocks
e508b7b765 Updated spelling of résumé, fixed settings for new resumes, other minor fixes
The spelling for résumé should include the accents everywhere but in some tiddler titles.
Newly created resumes now automatically have the default settings for visibility and templates
The first page of the resume wizard now has options for which sections are displayed along with the order and templates to use
The print option no longer puts a black box around the text area out the output
Some temp tiddlers are included to prevent the default 'Enter text for <tiddlername> tiddler' from showing up in some text entry boxes
There are some other minor layout improvements
2015-07-20 11:52:58 -06:00
Jermolene
c25f7e786f Correct accents for "résumé"
@inmysocks this may be a bit of pedantry too far, but I found I keep
reading it as “resume” in the sense of “normal services was resumed”.

We definitely shouldn’t try to add accents to the URLs, but I wonder if
it might be worth updating the edition itself, too?
2015-07-20 10:52:24 +01:00
Jeremy Ruston
92bfbc578c Merge pull request #1886 from inmysocks/ResumeBuilder
Resume builder update
2015-07-20 08:29:10 +01:00
inmysocks
756ebae1f6 Added a section creation tool and some minor fixes
The section creation tool is a semi-automated tool for adding new resume sections.
It still requires knowledge of wikitext but it requires far less knowledge of the inner workings of the resume builder
than just creating a section on your own would.
2015-07-19 17:54:46 -06:00
inmysocks
45bf43d8d0 Added Print button, cleaned up a lot of other minor stuff
Notable changes:

Removed the sidbar tabs other than the resume preview
Fixed ordering problems for the sections in the resume wizard
Fixed some minor display problems in some of the input tiddlers
Updated the documentation a little
2015-07-19 13:04:10 -06:00
Jermolene
ea10d85604 Add link to "resume builder" edition 2015-07-18 13:34:30 +01:00
Jeremy Ruston
7e94fa8e84 Merge pull request #1885 from inmysocks/ResumeBuilder
Added resume builder edition
2015-07-18 12:33:20 +01:00
Jermolene
3fbf29093b Use tiddler control colour for search icons
Fixes #1787
2015-07-18 12:22:35 +01:00
Jermolene
ecbd97b4b4 Revise support for external tiddler files
Fixes #1884
2015-07-18 11:45:30 +01:00
inmysocks
684d6e4377 Added the state tiddler to make the preview open by default
Yep, I may actually be learning to use git. It only took 10 years of using it.
2015-07-18 00:32:26 -06:00
inmysocks
8bb0a9b7c8 Moved files to be keep consistent organization
Also remembered to add tiddlywiki.info, that is important.
2015-07-18 00:23:51 -06:00
inmysocks
56ea55ddc4 Added resume builder edition
Lets see if this works this time
2015-07-18 00:05:26 -06:00
Jermolene
dfc935b520 Fix link to SocialCalc
Fixes #1884
2015-07-17 08:59:29 +01:00
Jermolene
72cf85f0d4 Restore error trapping for KaTeX rendering 2015-07-17 08:58:58 +01:00
Jermolene
69ae017f49 Update the plugin library version 2015-07-17 08:58:39 +01:00
Jermolene
9b6151c6c4 Update dev docs 2015-07-14 17:03:37 +01:00
Jermolene
f8027a3708 Fixed problem with static generation of KaTeX in the browser 2015-07-14 08:45:14 +01:00
Jermolene
18e38bb2bc Fix bug with 2cb6400773
The problem was that we failed to escape the dash in the regexp,
meaning that it was matching all characters from “.” to “_”.
2015-07-14 08:33:12 +01:00
Jermolene
2cb6400773 Extend automatic system tiddler linking to digits and underscore
Fixes #1877
2015-07-13 14:42:55 +01:00
Jermolene
396af28d16 Update SavingMechanism docs 2015-07-12 09:08:19 +01:00
Jermolene
e0aacc84d5 Add publishFilter to default save template
Making #1800 a bit more useful
2015-07-12 09:08:11 +01:00
Jermolene
7ae5eab3a8 Refactored file save filter docs
@danielo515 I hope this still makes sense.
2015-07-10 17:02:27 +01:00
Jeremy Ruston
c2342fce7a Merge pull request #1876 from danielo515/patch-10
Filters involved saving mechanism of standalone
2015-07-10 16:44:14 +01:00
Jermolene
32f6d7f1b0 Revert getTiddlerData() and add getTiddlerDataCached()
For backwards compatibility, we now explicitly request the cacheable
version of this method.

Fixes #1873
2015-07-10 16:43:50 +01:00
Daniel Rodríguez Rivero
0e75497d58 Filters involved saving mechanism of standalone
This is directly extracted from the groups. I though that putting this info into documentation will be useful, because it is not stated in any other place.

ref: https://groups.google.com/d/msg/tiddlywiki/zB40PBIDkBE/DzV1ZHudM3sJ
2015-07-09 17:11:09 +02:00
Jeremy Ruston
0c276c327b Merge pull request #1874 from nameanyone/master
Expanded example
2015-07-09 08:30:19 +01:00
nameanyone
4cfb6813f5 Expanded example 2015-07-08 23:26:15 -07:00
Jeremy Ruston
d327d6fbed Merge pull request #1868 from idoine/patch-44
Update FieldManglerWidget.tid
2015-07-08 16:29:46 +01:00
Jeremy Ruston
fad9fd13b5 Merge pull request #1869 from idoine/patch-45
Create FieldMangler Widget (Examples).tid
2015-07-08 16:29:39 +01:00
Jeremy Ruston
82fac2599d Merge pull request #1867 from idoine/patch-43
Update variable-macros.tid
2015-07-08 16:29:16 +01:00
Jermolene
862e358b57 Refine check for client server plugins
Fixes #1870
2015-07-08 15:48:13 +01:00
Jermolene
7dddc925ae Allow delete button to be used in view toolbar
Fixes #1871
2015-07-08 15:33:18 +01:00
Jermolene
8f63e2a959 Optimise iterating through tiddlers
Astonishingly, it’s much quicker to use `Object.keys()` to get an array
of key names, and then iterate through that. I’m seeing 25% speed
improvements for an empty tiddler iterator.
2015-07-08 08:27:28 +01:00
Jermolene
8bfc6f3557 Adjust cache names for parse caches
The old names were a hangover from an old refactoring.
2015-07-08 08:26:19 +01:00
Marc Viot
5be980c64e Rename FieldMangler Widget (Examples) to FieldMangler Widget (Examples).tid 2015-07-06 19:52:11 +02:00
Marc Viot
5924616ee9 Create FieldMangler Widget (Examples) 2015-07-06 19:46:21 +02:00
Marc Viot
caeb736c2b Update FieldManglerWidget.tid
Add a link to example
2015-07-06 19:09:17 +02:00
Marc Viot
a75cfefe88 Update variable-macros.tid
Add ability to handle widget example
2015-07-06 19:05:44 +02:00
Jermolene
203bc4b242 Prepare for 5.1.10 2015-07-06 11:23:49 +01:00
Jermolene
48d452c535 Update test for recent parser changes 2015-07-06 11:23:30 +01:00
Jermolene
848a7f4e74 Optimise getStateQualifier()
Another fix for #1864, this time we’re caching state qualifiers as they
are expensive to compute.
2015-07-06 11:23:12 +01:00
Jermolene
c6e48ebc2d Performance optimisations
In some situations, I’m seeing x2.5 speedups with these optimisations

Starts fixing #1864
2015-07-05 19:47:44 +01:00
Jermolene
a86cfe2663 Minor coding style tweaks 2015-07-05 18:09:35 +01:00
Jermolene
31fc9babfe Move "recent" filter docs to prerelease
This is to ensure that the changes don’t appear in any subsequent build
of tiddlywiki.com while we’re on 5.1.9.
2015-07-05 18:08:38 +01:00
Jeremy Ruston
c4397792f5 Merge pull request #1863 from nameanyone/master
New filter "recent"
2015-07-05 18:04:05 +01:00
Jermolene
4b2cf2eeee 2nd attempt to fix creation date
Thanks @nameanyone
2015-07-05 18:02:57 +01:00
Jermolene
b0cb17cd83 Re-establish caching of results of parsing a tiddler
I switched this optimisation off back in
ed35d91be6, in October 2013, as part of a
big refactoring of the parsing and widget mechanism. I’ve been meaning
to switch it back on for some time.

My rough measurements suggest that this optimisation can reduce
rendering time by 5-10%.
2015-07-05 17:48:18 +01:00
Jermolene
c1005b9d12 Fix invalid creation date
Thanks @nameanyone
2015-07-05 09:27:54 +01:00
nameanyone
9d17127144 Filter operator "recent": examples 2015-07-03 15:31:37 -07:00
nameanyone
a1e5000984 Filter operator "recent": documentation 2015-07-03 15:31:18 -07:00
Jermolene
a58dc869bd Correct typo 2015-07-03 17:44:55 +01:00
Jermolene
f1ae41da9a Update release documentation 2015-07-03 16:59:40 +01:00
Jermolene
56403a21bf Update 5.1.9 release date 2015-07-03 16:59:30 +01:00
nameanyone
a37ba2afbe New filter operator "recent"
Select tiddlers with a specified date field (default "modified") within the last N days (default 0, meaning today).
2015-06-30 14:05:03 -07:00
789 changed files with 14750 additions and 1046 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.c9/
tmp/
output/
node_modules/

View File

@@ -5,3 +5,4 @@ plugins/tiddlywiki/highlight/files/
plugins/tiddlywiki/jasmine/files/
plugins/tiddlywiki/markdown/files/
plugins/tiddlywiki/markdown/files/
node_modules/

View File

@@ -2,3 +2,4 @@
.c9/
tmp/
output/
node_modules/

5
bin/clean.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
# Remove any output files
find . -regex "^./editions/[a-z0-9\.-]*/output/.*" -delete

View File

@@ -62,22 +62,22 @@ $tw.utils.isDate = function(value) {
Iterate through all the own properties of an object or array. Callback is invoked with (element,title,object)
*/
$tw.utils.each = function(object,callback) {
var next,f;
var next,f,length;
if(object) {
if(Object.prototype.toString.call(object) == "[object Array]") {
for (f=0; f<object.length; f++) {
for (f=0, length=object.length; f<length; f++) {
next = callback(object[f],f,object);
if(next === false) {
break;
}
}
} else {
for(f in object) {
if(Object.prototype.hasOwnProperty.call(object,f)) {
next = callback(object[f],f,object);
if(next === false) {
break;
}
var keys = Object.keys(object);
for (f=0, length=keys.length; f<length; f++) {
var key = keys[f];
next = callback(object[key],key,object);
if(next === false) {
break;
}
}
}
@@ -126,8 +126,8 @@ Display an error and exit
*/
$tw.utils.error = function(err) {
// Prepare the error message
var errHeading = "Internal JavaScript Error",
promptMsg = "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser";
var errHeading = ( $tw.language == undefined ? "Internal JavaScript Error" : $tw.language.getString("InternalJavaScriptError/Title") ),
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
// Log the error to the console
console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);
if($tw.browser && !$tw.node) {
@@ -590,7 +590,7 @@ Crypto helper object for encrypted content. It maintains the password text in a
the password, and to encrypt/decrypt a block of text
*/
$tw.utils.Crypto = function() {
var sjcl = $tw.node ? require("./sjcl.js") : window.sjcl,
var sjcl = $tw.node ? (global.sjcl || require("./sjcl.js")) : window.sjcl,
currentPassword = null,
callSjcl = function(method,inputText,password) {
password = password || currentPassword;
@@ -885,10 +885,12 @@ $tw.Wiki = function(options) {
this.deleteTiddler = function(title) {
// Uncomment the following line for detailed logs of all tiddler deletions
// console.log("Deleting",title,tiddler)
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
if($tw.utils.hop(tiddlers,title)) {
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
}
};
// Get a tiddler from the store
@@ -910,7 +912,10 @@ $tw.Wiki = function(options) {
// Iterate through all tiddler titles
this.each = function(callback) {
for(var title in tiddlers) {
var titles = Object.keys(tiddlers),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
callback(tiddlers[title],title);
}
};
@@ -922,7 +927,10 @@ $tw.Wiki = function(options) {
// Iterate through all shadow tiddler titles
this.eachShadow = function(callback) {
for(var title in shadowTiddlers) {
var titles = Object.keys(shadowTiddlers),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
@@ -930,10 +938,15 @@ $tw.Wiki = function(options) {
// Iterate through all tiddlers and then the shadows
this.eachTiddlerPlusShadows = function(callback) {
for(var title in tiddlers) {
var titles = Object.keys(tiddlers),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
callback(tiddlers[title],title);
}
for(var title in shadowTiddlers) {
titles = Object.keys(shadowTiddlers);
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(!Object.prototype.hasOwnProperty.call(tiddlers,title)) {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
@@ -943,7 +956,10 @@ $tw.Wiki = function(options) {
// Iterate through all the shadows and then the tiddlers
this.eachShadowPlusTiddlers = function(callback) {
for(var title in shadowTiddlers) {
var titles = Object.keys(shadowTiddlers),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(Object.prototype.hasOwnProperty.call(tiddlers,title)) {
callback(tiddlers[title],title);
} else {
@@ -951,7 +967,9 @@ $tw.Wiki = function(options) {
callback(shadowInfo.tiddler,title);
}
}
for(var title in tiddlers) {
titles = Object.keys(tiddlers);
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(!Object.prototype.hasOwnProperty.call(shadowTiddlers,title)) {
callback(tiddlers[title],title);
}
@@ -1067,6 +1085,8 @@ $tw.Wiki = function(options) {
});
}
});
this.clearCache(null);
this.clearGlobalCache();
};
};
@@ -1379,10 +1399,6 @@ $tw.loadTiddlersBrowser = function() {
for(var t=0; t<containerIds.length; t++) {
$tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById(containerIds[t])));
}
// Load any preloaded tiddlers
if($tw.preloadTiddlers) {
$tw.wiki.addTiddlers($tw.preloadTiddlers);
}
};
} else {
@@ -1445,22 +1461,41 @@ $tw.loadTiddlersFromPath = function(filepath,excludeRegExp) {
if(files.indexOf("tiddlywiki.files") !== -1) {
// If so, process the files it describes
var filesInfo = JSON.parse(fs.readFileSync(filepath + path.sep + "tiddlywiki.files","utf8"));
// First the tiddlers
$tw.utils.each(filesInfo.tiddlers,function(tidInfo) {
var type = tidInfo.fields.type || "text/plain",
typeInfo = $tw.config.contentTypeInfo[type],
pathname = path.resolve(filepath,tidInfo.file),
text = fs.readFileSync(pathname,typeInfo ? typeInfo.encoding : "utf8"),
fileTiddlers = $tw.wiki.deserializeTiddlers(path.extname(pathname),text) || [];
$tw.utils.each(fileTiddlers,function(tiddler) {
$tw.utils.extend(tiddler,tidInfo.fields);
text = fs.readFileSync(pathname,typeInfo ? typeInfo.encoding : "utf8");
if(tidInfo.isTiddlerFile) {
var fileTiddlers = $tw.wiki.deserializeTiddlers(path.extname(pathname),text) || [];
$tw.utils.each(fileTiddlers,function(tiddler) {
$tw.utils.extend(tiddler,tidInfo.fields);
if(tidInfo.prefix) {
tiddler.text = tidInfo.prefix + tiddler.text;
}
if(tidInfo.suffix) {
tiddler.text = tiddler.text + tidInfo.suffix;
}
});
tiddlers.push({tiddlers: fileTiddlers});
} else {
if(tidInfo.prefix) {
tiddler.text = tidInfo.prefix + tiddler.text;
text = tidInfo.prefix + text;
}
if(tidInfo.suffix) {
tiddler.text = tiddler.text + tidInfo.suffix;
text = text + tidInfo.suffix;
}
});
tiddlers.push({tiddlers: fileTiddlers});
tidInfo.fields.text = text;
tiddlers.push({tiddlers: [tidInfo.fields]});
}
});
// Then any recursive directories
$tw.utils.each(filesInfo.directories,function(dirPath) {
var pathname = path.resolve(filepath,dirPath);
if(fs.existsSync(pathname) && fs.statSync(pathname).isDirectory()) {
tiddlers.push.apply(tiddlers,$tw.loadTiddlersFromPath(pathname,excludeRegExp));
}
});
} else {
// If not, read all the files in the directory
@@ -1769,7 +1804,7 @@ $tw.boot.startup = function(options) {
$tw.boot.wikiPath = process.cwd();
}
// Read package info
$tw.packageInfo = require("../package.json");
$tw.packageInfo = $tw.packageInfo || require("../package.json");
// Check node version number
if(!$tw.utils.checkVersions(process.version.substr(1),$tw.packageInfo.engines.node.substr(2))) {
$tw.utils.error("TiddlyWiki5 requires node.js version " + $tw.packageInfo.engines.node);
@@ -1796,6 +1831,7 @@ $tw.boot.startup = function(options) {
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/font-woff","base64",".woff");
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
$tw.utils.registerFileType("video/mp4","base64",".mp4");
$tw.utils.registerFileType("audio/mp3","base64",".mp3");
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
@@ -1826,6 +1862,10 @@ $tw.boot.startup = function(options) {
} else {
$tw.loadTiddlersNode();
}
// Load any preloaded tiddlers
if($tw.preloadTiddlers) {
$tw.wiki.addTiddlers($tw.preloadTiddlers);
}
// Unpack plugin tiddlers
$tw.wiki.readPluginInfo();
$tw.wiki.registerPluginTiddlers("plugin",$tw.safeMode ? ["$:/core"] : undefined);

View File

@@ -99,7 +99,14 @@ $tw.preloadTiddler = function(fields) {
$tw.preloadTiddlers.push(fields);
};
return $tw
/*
Convenience function for pushing an array of tiddlers onto the preloading array
*/
$tw.preloadTiddlerArray = function(fieldsArray) {
$tw.preloadTiddlers.push.apply($tw.preloadTiddlers,fieldsArray);
};
return $tw;
});

View File

@@ -4,7 +4,7 @@ type: text/plain
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
Copyright © Jeremy Ruston 2004-2007
Copyright © UnaMesa Association 2007-2015
Copyright © UnaMesa Association 2007-2016
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

14
core/images/file.tid Normal file
View File

@@ -0,0 +1,14 @@
title: $:/core/images/file
tags: $:/tags/Image
<svg class="tc-image-file tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="nonzero">
<path d="M111.96811,30.5 L112,30.5 L112,119.999079 C112,124.417866 108.419113,128 104.000754,128 L23.9992458,128 C19.5813843,128 16,124.417687 16,119.999079 L16,8.00092105 C16,3.58213437 19.5808867,0 23.9992458,0 L81,0 L81,0.0201838424 C83.1589869,-0.071534047 85.3482153,0.707077645 86.9982489,2.35711116 L109.625176,24.9840387 C111.151676,26.510538 111.932942,28.4998414 111.96811,30.5 L111.96811,30.5 Z M81,8 L24,8 L24,120 L104,120 L104,30.5 L89.0003461,30.5 C84.5818769,30.5 81,26.9216269 81,22.4996539 L81,8 Z"></path>
<rect x="32" y="36" width="64" height="8" rx="8"></rect>
<rect x="32" y="52" width="64" height="8" rx="8"></rect>
<rect x="32" y="68" width="64" height="8" rx="8"></rect>
<rect x="32" y="84" width="64" height="8" rx="8"></rect>
<rect x="32" y="100" width="64" height="8" rx="8"></rect>
<rect x="32" y="20" width="40" height="8" rx="8"></rect>
</g>
</svg>

View File

@@ -0,0 +1,11 @@
title: $:/core/images/fold-all-button
tags: $:/tags/Image
<svg class="tc-image-fold-all tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<rect x="0" y="0" width="128" height="16" rx="8"></rect>
<rect x="0" y="64" width="128" height="16" rx="8"></rect>
<path d="M64.0292774,58.6235628 C61.9791013,58.6242848 59.9275217,57.8435723 58.3632024,56.279253 L35.7458219,33.6618725 C32.6211696,30.5372202 32.6166093,25.4673401 35.7408036,22.3431458 C38.8586409,19.2253085 43.9325646,19.2211982 47.0595304,22.348164 L64.0250749,39.3137085 L80.9906194,22.348164 C84.1152717,19.2235117 89.1851518,19.2189514 92.3093461,22.3431458 C95.4271834,25.460983 95.4312937,30.5349067 92.3043279,33.6618725 L69.6869474,56.279253 C68.1237851,57.8424153 66.0737951,58.6247195 64.0241231,58.6250809 Z" transform="translate(64.024316, 39.313708) scale(1, -1) translate(-64.024316, -39.313708) "></path>
<path d="M64.0292774,123.621227 C61.9791013,123.621949 59.9275217,122.841236 58.3632024,121.276917 L35.7458219,98.6595365 C32.6211696,95.5348842 32.6166093,90.4650041 35.7408036,87.3408098 C38.8586409,84.2229725 43.9325646,84.2188622 47.0595304,87.345828 L64.0250749,104.311373 L80.9906194,87.345828 C84.1152717,84.2211757 89.1851518,84.2166154 92.3093461,87.3408098 C95.4271834,90.458647 95.4312937,95.5325707 92.3043279,98.6595365 L69.6869474,121.276917 C68.1237851,122.840079 66.0737951,123.622383 64.0241231,123.622745 Z" transform="translate(64.024316, 104.311372) scale(1, -1) translate(-64.024316, -104.311372) "></path>
</g>
</svg>

View File

@@ -0,0 +1,10 @@
title: $:/core/images/fold-button
tags: $:/tags/Image
<svg class="tc-image-fold tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<rect x="0" y="0" width="128" height="16" rx="8"></rect>
<path d="M64.0292774,63.6235628 C61.9791013,63.6242848 59.9275217,62.8435723 58.3632024,61.279253 L35.7458219,38.6618725 C32.6211696,35.5372202 32.6166093,30.4673401 35.7408036,27.3431458 C38.8586409,24.2253085 43.9325646,24.2211982 47.0595304,27.348164 L64.0250749,44.3137085 L80.9906194,27.348164 C84.1152717,24.2235117 89.1851518,24.2189514 92.3093461,27.3431458 C95.4271834,30.460983 95.4312937,35.5349067 92.3043279,38.6618725 L69.6869474,61.279253 C68.1237851,62.8424153 66.0737951,63.6247195 64.0241231,63.6250809 Z" transform="translate(64.024316, 44.313708) scale(1, -1) translate(-64.024316, -44.313708) "></path>
<path d="M64.0049614,105.998482 C61.9547853,105.999204 59.9032057,105.218491 58.3388864,103.654172 L35.7215059,81.0367916 C32.5968535,77.9121393 32.5922933,72.8422592 35.7164876,69.7180649 C38.8343248,66.6002276 43.9082485,66.5961173 47.0352144,69.7230831 L64.0007589,86.6886276 L80.9663034,69.7230831 C84.0909557,66.5984308 89.1608358,66.5938705 92.2850301,69.7180649 C95.4028673,72.8359021 95.4069777,77.9098258 92.2800119,81.0367916 L69.6626314,103.654172 C68.099469,105.217334 66.0494791,105.999639 63.999807,106 Z" transform="translate(64.000000, 86.688628) scale(1, -1) translate(-64.000000, -86.688628) "></path>
</g>
</svg>

View File

@@ -0,0 +1,10 @@
title: $:/core/images/fold-others-button
tags: $:/tags/Image
<svg class="tc-image-fold-others tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<rect x="0" y="56.0314331" width="128" height="16" rx="8"></rect>
<path d="M101.657101,104.948818 C100.207918,103.498614 98.2051847,102.599976 95.9929031,102.599976 L72,102.599976 L72,78.6070725 C72,76.3964271 71.1036108,74.3936927 69.6545293,72.9441002 L69.6571005,72.9488183 C68.2079177,71.4986143 66.2051847,70.5999756 63.9929031,70.5999756 L32.0070969,70.5999756 C27.5881712,70.5999756 24,74.1816976 24,78.5999756 C24,83.0092633 27.5848994,86.5999756 32.0070969,86.5999756 L56,86.5999756 L56,110.592879 C56,112.803524 56.8963895,114.806259 58.3454713,116.255852 L58.3429,116.251133 C59.7920828,117.701337 61.7948156,118.599976 64.0070969,118.599976 L88,118.599976 L88,142.592879 C88,147.011804 91.581722,150.599976 96,150.599976 C100.409288,150.599976 104,147.015076 104,142.592879 L104,110.607072 C104,108.396427 103.103611,106.393693 101.654529,104.9441 Z" transform="translate(64.000000, 110.599976) rotate(-45.000000) translate(-64.000000, -110.599976) "></path>
<path d="M101.725643,11.7488671 C100.27646,10.2986632 98.2737272,9.40002441 96.0614456,9.40002441 L72.0685425,9.40002441 L72.0685425,-14.5928787 C72.0685425,-16.8035241 71.1721533,-18.8062584 69.7230718,-20.255851 L69.725643,-20.2511329 C68.2764602,-21.7013368 66.2737272,-22.5999756 64.0614456,-22.5999756 L32.0756394,-22.5999756 C27.6567137,-22.5999756 24.0685425,-19.0182536 24.0685425,-14.5999756 C24.0685425,-10.1906879 27.6534419,-6.59997559 32.0756394,-6.59997559 L56.0685425,-6.59997559 L56.0685425,17.3929275 C56.0685425,19.6035732 56.964932,21.6063078 58.4140138,23.0559004 L58.4114425,23.0511823 C59.8606253,24.5013859 61.8633581,25.4000244 64.0756394,25.4000244 L88.0685425,25.4000244 L88.0685425,49.3929275 C88.0685425,53.8118532 91.6502645,57.4000244 96.0685425,57.4000244 C100.47783,57.4000244 104.068542,53.815125 104.068542,49.3929275 L104.068542,17.4071213 C104.068542,15.1964759 103.172153,13.1937416 101.723072,11.744149 Z" transform="translate(64.068542, 17.400024) scale(1, -1) rotate(-45.000000) translate(-64.068542, -17.400024) "></path>
</g>
</svg>

9
core/images/folder.tid Normal file
View File

@@ -0,0 +1,9 @@
title: $:/core/images/folder
tags: $:/tags/Image
<svg class="tc-image-folder tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M55.6943257,128.000004 L7.99859666,128.000004 C3.5810937,128.000004 0,124.413822 0,119.996384 L0,48.0036243 C0,43.5833471 3.58387508,40.0000044 7.99859666,40.0000044 L16,40.0000044 L16,31.9999914 C16,27.5817181 19.5783731,24 24.0003461,24 L55.9996539,24 C60.4181231,24 64,27.5800761 64,31.9999914 L64,40.0000044 L104.001403,40.0000044 C108.418906,40.0000044 112,43.5861868 112,48.0036243 L112,59.8298353 L104,59.7475921 L104,51.9994189 C104,49.7887607 102.207895,48.0000044 99.9972215,48.0000044 L56,48.0000044 L56,36.0000255 C56,33.7898932 54.2072328,32 51.9957423,32 L28.0042577,32 C25.7890275,32 24,33.7908724 24,36.0000255 L24,48.0000044 L12.0027785,48.0000044 C9.78987688,48.0000044 8,49.7906032 8,51.9994189 L8,116.00059 C8,118.211248 9.79210499,120.000004 12.0027785,120.000004 L58.7630167,120.000004 L55.6943257,128.000004 L55.6943257,128.000004 Z"></path>
<path d="M23.8728955,55.5 L119.875702,55.5 C124.293205,55.5 126.87957,59.5532655 125.650111,64.5630007 L112.305967,118.936999 C111.077582,123.942356 106.497904,128 102.083183,128 L6.08037597,128 C1.66287302,128 -0.923492342,123.946735 0.305967145,118.936999 L13.650111,64.5630007 C14.878496,59.5576436 19.4581739,55.5 23.8728955,55.5 L23.8728955,55.5 L23.8728955,55.5 Z M25.6530124,64 L113.647455,64 C115.858129,64 117.151473,66.0930612 116.538306,68.6662267 L105.417772,115.333773 C104.803671,117.910859 102.515967,120 100.303066,120 L12.3086228,120 C10.0979492,120 8.8046054,117.906939 9.41777189,115.333773 L20.5383062,68.6662267 C21.1524069,66.0891409 23.4401107,64 25.6530124,64 L25.6530124,64 L25.6530124,64 Z"></path>
</g>
</svg>

8
core/images/spiral.tid Normal file
View File

@@ -0,0 +1,8 @@
title: $:/core/images/spiral
tags: $:/tags/Image
<svg class="tc-image-spiral tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="nonzero">
<path d="M64.534 68.348c3.39 0 6.097-2.62 6.476-5.968l-4.755-.538 4.75.583c.377-3.07-1.194-6.054-3.89-7.78-2.757-1.773-6.34-2.01-9.566-.7-3.46 1.403-6.14 4.392-7.35 8.148l-.01.026c-1.3 4.08-.72 8.64 1.58 12.52 2.5 4.2 6.77 7.2 11.76 8.27 5.37 1.15 11.11-.05 15.83-3.31 5.04-3.51 8.46-9.02 9.45-15.3 1.05-6.7-.72-13.63-4.92-19.19l.02.02c-4.42-5.93-11.2-9.82-18.78-10.78-7.96-1.01-16.13 1.31-22.59 6.43-6.81 5.39-11.18 13.41-12.11 22.26-.98 9.27 1.87 18.65 7.93 26.02 6.32 7.69 15.6 12.56 25.74 13.48 10.54.96 21.15-2.42 29.45-9.4l.01-.01c8.58-7.25 13.94-17.78 14.86-29.21.94-11.84-2.96-23.69-10.86-32.9-8.19-9.5-19.95-15.36-32.69-16.27-13.16-.94-26.24 3.49-36.34 12.34l.01-.01c-10.41 9.08-16.78 22.1-17.68 36.15-.93 14.44 4.03 28.77 13.79 39.78 10.03 11.32 24.28 18.2 39.6 19.09 15.73.92 31.31-4.56 43.24-15.234 12.23-10.954 19.61-26.44 20.5-43.074.14-2.64-1.89-4.89-4.52-5.03-2.64-.14-4.89 1.88-5.03 4.52-.75 14.1-7 27.2-17.33 36.45-10.03 8.98-23.11 13.58-36.3 12.81-12.79-.75-24.67-6.48-33-15.89-8.07-9.11-12.17-20.94-11.41-32.827.74-11.52 5.942-22.15 14.43-29.54l.01-.01c8.18-7.17 18.74-10.75 29.35-9.998 10.21.726 19.6 5.41 26.11 12.96 6.24 7.273 9.32 16.61 8.573 25.894-.718 8.9-4.88 17.064-11.504 22.66l.01-.007c-6.36 5.342-14.44 7.92-22.425 7.19-7.604-.68-14.52-4.314-19.21-10.027-4.44-5.4-6.517-12.23-5.806-18.94.67-6.3 3.76-11.977 8.54-15.766 4.46-3.54 10.05-5.128 15.44-4.44 5.03.63 9.46 3.18 12.32 7.01l.02.024c2.65 3.5 3.75 7.814 3.1 11.92-.59 3.71-2.58 6.925-5.45 8.924-2.56 1.767-5.61 2.403-8.38 1.81-2.42-.516-4.42-1.92-5.53-3.79-.93-1.56-1.15-3.3-.69-4.75l-4.56-1.446L59.325 65c.36-1.12 1.068-1.905 1.84-2.22.25-.103.48-.14.668-.13.06.006.11.015.14.025.01 0 .01 0-.01-.01-.02-.015-.054-.045-.094-.088-.06-.064-.12-.145-.17-.244-.15-.29-.23-.678-.18-1.11l-.005.04c.15-1.332 1.38-2.523 3.035-2.523-2.65 0-4.79 2.144-4.79 4.787s2.14 4.785 4.78 4.785z"></path>
</g>
</svg>

View File

@@ -0,0 +1,11 @@
title: $:/core/images/unfold-all-button
tags: $:/tags/Image
<svg class="tc-image-unfold-all tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<rect x="0" y="0" width="128" height="16" rx="8"></rect>
<rect x="0" y="64" width="128" height="16" rx="8"></rect>
<path d="M85.598226,8.34884273 C84.1490432,6.89863875 82.1463102,6 79.9340286,6 L47.9482224,6 C43.5292967,6 39.9411255,9.581722 39.9411255,14 C39.9411255,18.4092877 43.5260249,22 47.9482224,22 L71.9411255,22 L71.9411255,45.9929031 C71.9411255,50.4118288 75.5228475,54 79.9411255,54 C84.3504132,54 87.9411255,50.4151006 87.9411255,45.9929031 L87.9411255,14.0070969 C87.9411255,11.7964515 87.0447363,9.79371715 85.5956548,8.34412458 Z" transform="translate(63.941125, 30.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -30.000000) "></path>
<path d="M85.6571005,72.2899682 C84.2079177,70.8397642 82.2051847,69.9411255 79.9929031,69.9411255 L48.0070969,69.9411255 C43.5881712,69.9411255 40,73.5228475 40,77.9411255 C40,82.3504132 43.5848994,85.9411255 48.0070969,85.9411255 L72,85.9411255 L72,109.934029 C72,114.352954 75.581722,117.941125 80,117.941125 C84.4092877,117.941125 88,114.356226 88,109.934029 L88,77.9482224 C88,75.737577 87.1036108,73.7348426 85.6545293,72.2852501 Z" transform="translate(64.000000, 93.941125) scale(1, -1) rotate(-45.000000) translate(-64.000000, -93.941125) "></path>
</g>
</svg>

View File

@@ -0,0 +1,10 @@
title: $:/core/images/unfold-button
tags: $:/tags/Image
<svg class="tc-image-unfold tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<rect x="0" y="0" width="128" height="16" rx="8"></rect>
<path d="M85.598226,11.3488427 C84.1490432,9.89863875 82.1463102,9 79.9340286,9 L47.9482224,9 C43.5292967,9 39.9411255,12.581722 39.9411255,17 C39.9411255,21.4092877 43.5260249,25 47.9482224,25 L71.9411255,25 L71.9411255,48.9929031 C71.9411255,53.4118288 75.5228475,57 79.9411255,57 C84.3504132,57 87.9411255,53.4151006 87.9411255,48.9929031 L87.9411255,17.0070969 C87.9411255,14.7964515 87.0447363,12.7937171 85.5956548,11.3441246 Z" transform="translate(63.941125, 33.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -33.000000) "></path>
<path d="M85.6571005,53.4077172 C84.2079177,51.9575133 82.2051847,51.0588745 79.9929031,51.0588745 L48.0070969,51.0588745 C43.5881712,51.0588745 40,54.6405965 40,59.0588745 C40,63.4681622 43.5848994,67.0588745 48.0070969,67.0588745 L72,67.0588745 L72,91.0517776 C72,95.4707033 75.581722,99.0588745 80,99.0588745 C84.4092877,99.0588745 88,95.4739751 88,91.0517776 L88,59.0659714 C88,56.855326 87.1036108,54.8525917 85.6545293,53.4029991 Z" transform="translate(64.000000, 75.058875) scale(1, -1) rotate(-45.000000) translate(-64.000000, -75.058875) "></path>
</g>
</svg>

View File

@@ -30,12 +30,24 @@ ExportTiddler/Caption: export tiddler
ExportTiddler/Hint: Export tiddler
ExportTiddlers/Caption: export tiddlers
ExportTiddlers/Hint: Export tiddlers
Fold/Caption: fold tiddler
Fold/Hint: Fold the body of this tiddler
Fold/FoldBar/Caption: fold-bar
Fold/FoldBar/Hint: Optional bars to fold and unfold tiddlers
Unfold/Caption: unfold tiddler
Unfold/Hint: Unfold the body of this tiddler
FoldOthers/Caption: fold other tiddlers
FoldOthers/Hint: Fold the bodies of other opened tiddlers
FoldAll/Caption: fold all tiddlers
FoldAll/Hint: Fold the bodies of all opened tiddlers
UnfoldAll/Caption: unfold all tiddlers
UnfoldAll/Hint: Unfold the bodies of all opened tiddlers
FullScreen/Caption: full-screen
FullScreen/Hint: Enter or leave full-screen mode
Help/Caption: help
Help/Hint: Show help panel
Import/Caption: import
Import/Hint: Import files
Import/Hint: Import many types of file including text, image, TiddlyWiki or JSON
Info/Caption: info
Info/Hint: Show information for this tiddler
Home/Caption: home

View File

@@ -38,6 +38,11 @@ Palette/Editor/Reset/Caption: reset
Palette/HideEditor/Caption: hide editor
Palette/Prompt: Current palette:
Palette/ShowEditor/Caption: show editor
Parsing/Caption: Parsing
Parsing/Hint: Here you can globally disable individual wiki parser rules. Take care as disabling some parser rules can prevent ~TiddlyWiki functioning correctly (you can restore normal operation with [[safe mode|http://tiddlywiki.com/#SafeMode]] )
Parsing/Block/Caption: Block Parse Rules
Parsing/Inline/Caption: Inline Parse Rules
Parsing/Pragma/Caption: Pragma Parse Rules
Plugins/Add/Hint: Install plugins from the official library
Plugins/Add/Caption: Get more plugins
Plugins/Caption: Plugins
@@ -47,11 +52,14 @@ Plugins/Disabled/Status: (disabled)
Plugins/Empty/Hint: None
Plugins/Enable/Caption: enable
Plugins/Enable/Hint: Enable this plugin when reloading page
Plugins/Install: install
Plugins/Installed/Hint: Currently installed plugins:
Plugins/Languages/Caption: Languages
Plugins/Languages/Hint: Language pack plugins
Plugins/OpenPluginLibrary: open plugin library
Plugins/Plugins/Caption: Plugins
Plugins/Plugins/Hint: Plugins
Plugins/Reinstall: reinstall
Plugins/Themes/Caption: Themes
Plugins/Themes/Hint: Theme plugins
Saving/Caption: Saving
@@ -71,6 +79,9 @@ Settings/AutoSave/Caption: Autosave
Settings/AutoSave/Disabled/Description: Do not save changes automatically
Settings/AutoSave/Enabled/Description: Save changes automatically
Settings/AutoSave/Hint: Automatically save changes during editing
Settings/CamelCase/Caption: Camel Case Wiki Links
Settings/CamelCase/Hint: You can globally disable automatic linking of ~CamelCase phrases. Requires reload to take effect
Settings/CamelCase/Description: Enable automatic ~CamelCase linking
Settings/Caption: Settings
Settings/Hint: These settings let you customise the behaviour of TiddlyWiki.
Settings/NavigationAddressBar/Caption: Navigation Address Bar
@@ -82,6 +93,9 @@ Settings/NavigationHistory/Caption: Navigation History
Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler:
Settings/NavigationHistory/No/Description: Do not update history
Settings/NavigationHistory/Yes/Description: Update history
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
@@ -115,8 +129,7 @@ Toolbars/EditToolbar/Caption: Edit Toolbar
Toolbars/EditToolbar/Hint: Choose which buttons are displayed for tiddlers in edit mode
Toolbars/Hint: Select which toolbar buttons are displayed
Toolbars/PageControls/Caption: Page Toolbar
Toolbars/PageControls/Hint: Choose which buttons are displayed on the main page toolbar
Toolbars/PageControls/Hint: Choose which buttons are displayed on the main page toolbar
Toolbars/ViewToolbar/Caption: View Toolbar
Toolbars/ViewToolbar/Hint: Choose which buttons are displayed for tiddlers in view mode
Tools/Download/Full/Caption: Download full wiki

View File

@@ -13,8 +13,8 @@ Fields/Add/Prompt: Add a new field:
Fields/Add/Value/Placeholder: field value
Fields/Add/Dropdown/System: System fields
Fields/Add/Dropdown/User: User fields
Shadow/Warning: This is a shadow tiddler. Any changes will override the default version
Shadow/OverriddenWarning: This is a modified shadow tiddler. You can revert to the default version by deleting this tiddler
Shadow/Warning: This is a shadow tiddler. Any changes you make will override the default version from the plugin <<pluginLink>>
Shadow/OverriddenWarning: This is a modified shadow tiddler. You can revert to the default version in the plugin <<pluginLink>> by deleting this tiddler
Tags/Add/Button: add
Tags/Add/Placeholder: tag name
Tags/Dropdown/Caption: tag list

View File

@@ -1,7 +1,7 @@
title: $:/language/Help/load
description: Load tiddlers from a file
Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files
Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files
```
--load <filepath>

View File

@@ -7,3 +7,4 @@ Set a password for subsequent crypto operations
--password <password>
```
''Note'': This should not be used for serving TiddlyWiki with password protection. Instead, see the password option under the [[ServerCommand]].

View File

@@ -1,10 +1,10 @@
title: $:/language/Help/rendertiddler
description: Render an individual tiddler as a specified ContentType
Render an individual tiddler as a specified ContentType, defaults to `text/html` and save it to the specified filename:
Render an individual tiddler as a specified ContentType, defaulting to `text/html` and save it to the specified filename. Optionally a template can be specified, in which case the template tiddler is rendered with the "currentTiddler" variable set to the tiddler that is being rendered (the first parameter value).
```
--rendertiddler <title> <filename> [<type>]
--rendertiddler <title> <filename> [<type>] [<template>]
```
By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.

View File

@@ -15,4 +15,4 @@ For example:
By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
Any files in the target directory are deleted unless the "noclean" parameter is specified. The target directory is recursively created if it is missing.
Any files in the target directory are deleted unless the ''noclean'' flag is specified. The target directory is recursively created if it is missing.

View File

@@ -1,7 +1,7 @@
title: $:/language/Help/savetiddler
description: Saves a raw tiddler to a file
Saves an individual tiddler in its raw text or binary format to the specified filename.
Saves an individual tiddler in its raw text or binary format to the specified filename.
```
--savetiddler <title> <filename>

View File

@@ -1,12 +1,14 @@
title: $:/language/Help/savetiddlers
description: Saves a group of raw tiddlers to a directory
Saves a group of tiddlers in their raw text or binary format to the specified directory.
Saves a group of tiddlers in their raw text or binary format to the specified directory.
```
--savetiddlers <filter> <pathname>
--savetiddlers <filter> <pathname> ["noclean"]
```
By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
The output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''noclean'' flag.
Any missing directories in the pathname are automatically created.

View File

@@ -12,7 +12,7 @@ At the root, it serves a rendering of a specified tiddler. Away from the root, i
The parameters are:
* ''port'' - port number to serve from (defaults to "8080")
* ''roottiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all")
* ''roottiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all")
* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to "text/plain")
* ''servetype'' - the content type with which the root tiddler should be served (defaults to "text/html")
* ''username'' - the default username for signing edits

View File

@@ -14,5 +14,4 @@ The parameters are:
* ''filter'' - filter identifying the tiddlers to be affected
* ''fieldname'' - the field to modify (defaults to "text")
* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted
* ''type'' - the text type to render (defaults to "text/plain"; "text/html" can be used to include HTML tags)
* ''rendertype'' - the text type to render (defaults to "text/plain"; "text/html" can be used to include HTML tags)

View File

@@ -1,7 +1,7 @@
title: $:/language/Help/verbose
description: Triggers verbose output mode
Triggers verbose output, useful for debugging
Triggers verbose output, useful for debugging
```
--verbose

View File

@@ -1,13 +1,14 @@
title: $:/language/Import/
Imported: The following tiddlers were imported:
Listing/Cancel/Caption: Cancel
Listing/Hint: These tiddlers are ready to import:
Listing/Import/Caption: Import
Listing/Select/Caption: Select
Listing/Status/Caption: Status
Listing/Title/Caption: Title
Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin
Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)
Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin
Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)
Upgrader/Plugins/Upgraded: Upgraded plugin from <<incoming>> to <<upgraded>>
Upgrader/State/Suppressed: Blocked temporary state tiddler
Upgrader/System/Suppressed: Blocked system tiddler

View File

@@ -1,7 +1,8 @@
title: $:/language/
AboveStory/ClassicPlugin/Warning: It looks like you are trying to load a plugin designed for ~TiddlyWiki Classic. Please note that [[these plugins do not work with TiddlyWiki version 5.x.x|http://tiddlywiki.com/#TiddlyWikiClassic]]. ~TiddlyWiki Classic plugins detected:
BinaryWarning/Prompt: This tiddler contains binary data
ClassicWarning/Hint: This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details.
ClassicWarning/Hint: This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details.
ClassicWarning/Upgrade/Caption: upgrade
CloseAll/Button: close all
ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text=<<title>>/>"?
@@ -18,9 +19,13 @@ Encryption/Password: Password
Encryption/RepeatPassword: Repeat password
Encryption/PasswordNoMatch: Passwords do not match
Encryption/SetPassword: Set password
InternalJavaScriptError/Title: Internal JavaScript Error
InternalJavaScriptError/Hint: Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
InvalidFieldName: Illegal characters in field name "<$text text=<<fieldName>>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)
LazyLoadingWarning: <p>Loading external text from ''<$text text={{!!_canonical_uri}}/>''</p><p>If this message doesn't disappear you may be using a browser that doesn't support external text in this configuration. See http://tiddlywiki.com/#ExternalText</p>
MissingTiddler/Hint: Missing tiddler "<$text text=<<currentTiddler>>/>" - click {{$:/core/images/edit-button}} to create
OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library
OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect
RecentChanges/DateFormat: DDth MMM YYYY
SystemTiddler/Tooltip: This is a system tiddler
@@ -29,4 +34,5 @@ TagManager/Count/Heading: Count
TagManager/Icon/Heading: Icon
TagManager/Info/Heading: Info
TagManager/Tag/Heading: Tag
Tiddler/DateFormat: DDth MMM YYYY at hh12:0mmam
UnsavedChangesWarning: You have unsaved changes in TiddlyWiki

View File

@@ -5,6 +5,9 @@ Filter/Caption: Filter
Filter/Hint: Search via a [[filter expression|http://tiddlywiki.com/static/Filters.html]]
Filter/Matches: //<small><<resultCount>> matches</small>//
Matches: //<small><<resultCount>> matches</small>//
Matches/All: All matches:
Matches/Title: Title matches:
Search: Search
Shadows/Caption: Shadows
Shadows/Hint: Search for shadow tiddlers
Shadows/Matches: //<small><<resultCount>> matches</small>//

View File

@@ -32,9 +32,15 @@ Command.prototype.execute = function() {
path = require("path"),
title = this.params[0],
filename = path.resolve(this.commander.outputPath,this.params[1]),
type = this.params[2] || "text/html";
type = this.params[2] || "text/html",
template = this.params[3],
variables = {};
$tw.utils.createFileDirectories(filename);
fs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),"utf8",function(err) {
if(template) {
variables.currentTiddler = title;
title = template;
}
fs.writeFile(filename,this.commander.wiki.renderTiddler(type,title,{variables: variables}),"utf8",function(err) {
self.callback(err);
});
return null;

View File

@@ -39,7 +39,7 @@ Command.prototype.execute = function() {
pathname = path.resolve(outputPath,this.params[2]),
type = this.params[3] || "text/html",
extension = this.params[4] || ".html",
deleteDirectory = (this.params[5] || "") != "noclean",
deleteDirectory = (this.params[5] || "").toLowerCase() !== "noclean",
tiddlers = wiki.filterTiddlers(filter);
if(deleteDirectory) {
$tw.utils.deleteDirectory(pathname);

View File

@@ -43,7 +43,7 @@ Command.prototype.execute = function() {
basepath = this.params[2],
skinnyListTitle = this.params[3];
// Get the container tiddler as data
var containerData = self.commander.wiki.getTiddlerData(containerTitle,undefined);
var containerData = self.commander.wiki.getTiddlerDataCached(containerTitle,undefined);
if(!containerData) {
return "'" + containerTitle + "' is not a tiddler bundle";
}

View File

@@ -35,8 +35,11 @@ Command.prototype.execute = function() {
wiki = this.commander.wiki,
filter = this.params[0],
pathname = path.resolve(this.commander.outputPath,this.params[1]),
deleteDirectory = (this.params[2] || "").toLowerCase() !== "noclean",
tiddlers = wiki.filterTiddlers(filter);
$tw.utils.deleteDirectory(pathname);
if(deleteDirectory) {
$tw.utils.deleteDirectory(pathname);
}
$tw.utils.createDirectory(pathname);
$tw.utils.each(tiddlers,function(title) {
var tiddler = self.commander.wiki.getTiddler(title),

View File

@@ -12,7 +12,7 @@ Serve tiddlers over http
/*global $tw: false */
"use strict";
if(!$tw.browser) {
if($tw.node) {
var util = require("util"),
fs = require("fs"),
url = require("url"),
@@ -170,7 +170,7 @@ var Command = function(params,commander,callback) {
if(fields.revision) {
delete fields.revision;
}
state.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title}));
state.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title},state.wiki.getModificationFields()));
var changeCount = state.wiki.getChangeCount(title).toString();
response.writeHead(204, "OK",{
Etag: "\"default/" + encodeURIComponent(title) + "/" + changeCount + ":\"",
@@ -301,7 +301,7 @@ Command.prototype.execute = function() {
console.log("Serving on " + host + ":" + port);
console.log("(press ctrl-C to exit)");
// Warn if required plugins are missing
if($tw.boot.wikiInfo.plugins.indexOf("tiddlywiki/tiddlyweb") === -1 || $tw.boot.wikiInfo.plugins.indexOf("tiddlywiki/filesystem") === -1) {
if(!$tw.wiki.getTiddler("$:/plugins/tiddlywiki/tiddlyweb") || !$tw.wiki.getTiddler("$:/plugins/tiddlywiki/filesystem")) {
$tw.utils.warning("Warning: Plugins required for client-server operation (\"tiddlywiki/filesystem\" and \"tiddlywiki/tiddlyweb\") are missing from tiddlywiki.info file");
}
return null;

View File

@@ -29,7 +29,7 @@ Command.prototype.execute = function() {
}
var self = this,
title = this.params[0],
pluginData = this.commander.wiki.getTiddlerData(title);
pluginData = this.commander.wiki.getTiddlerDataCached(title);
if(!pluginData) {
return "Plugin '" + title + "' not found";
}

View File

@@ -0,0 +1,49 @@
/*\
title: $:/core/modules/filters/days.js
type: application/javascript
module-type: filteroperator
Filter operator that selects tiddlers with a specified date field within a specified date interval.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.days = function(source,operator,options) {
var results = [],
fieldName = operator.suffix || "modified",
dayInterval = (parseInt(operator.operand,10)||0),
dayIntervalSign = $tw.utils.sign(dayInterval),
targetTimeStamp = (new Date()).setHours(0,0,0,0) + 1000*60*60*24*dayInterval,
isWithinDays = function(dateField) {
var sign = $tw.utils.sign(targetTimeStamp - (new Date(dateField)).setHours(0,0,0,0));
return sign === 0 || sign === dayIntervalSign;
};
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(tiddler && tiddler.fields[fieldName]) {
if(!isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {
results.push(title);
}
}
});
} else {
source(function(tiddler,title) {
if(tiddler && tiddler.fields[fieldName]) {
if(isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {
results.push(title);
}
}
});
}
return results;
};
})();

View File

@@ -3,7 +3,8 @@ title: $:/core/modules/filters/each.js
type: application/javascript
module-type: filteroperator
Filter operator that selects one tiddler for each unique value of the specified field
Filter operator that selects one tiddler for each unique value of the specified field.
With suffix "list", selects all tiddlers that are values in a specified list field.
\*/
(function(){
@@ -16,22 +17,34 @@ Filter operator that selects one tiddler for each unique value of the specified
Export our filter function
*/
exports.each = function(source,operator,options) {
var results = [],
values = {};
source(function(tiddler,title) {
if(tiddler) {
var value;
if((operator.operand === "") || (operator.operand === "title")) {
value = title;
} else {
value = tiddler.getFieldString(operator.operand);
var results =[] ,
value,values = {},
field = operator.operand || "title";
if(operator.suffix !== "list-item") {
source(function(tiddler,title) {
if(tiddler) {
value = (field === "title") ? title : tiddler.getFieldString(field);
if(!$tw.utils.hop(values,value)) {
values[value] = true;
results.push(title);
}
}
if(!$tw.utils.hop(values,value)) {
values[value] = true;
results.push(title);
});
} else {
source(function(tiddler,title) {
if(tiddler) {
$tw.utils.each(
options.wiki.getTiddlerList(title,field),
function(value) {
if(!$tw.utils.hop(values,value)) {
values[value] = true;
results.push(value);
}
}
);
}
}
});
});
}
return results;
};

View File

@@ -18,7 +18,7 @@ Export our filter function
exports.indexes = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
var data = options.wiki.getTiddlerData(title);
var data = options.wiki.getTiddlerDataCached(title);
if(data) {
$tw.utils.pushTop(results,Object.keys(data));
}

View File

@@ -18,7 +18,7 @@ Export our filter function
exports.plugintiddlers = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
var pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerData(title,{tiddlers:[]});
var pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerDataCached(title,{tiddlers:[]});
if(pluginInfo && pluginInfo.tiddlers) {
$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {
results.push(title);

View File

@@ -16,13 +16,16 @@ Filter operator returning all the tags of the selected tiddlers
Export our filter function
*/
exports.tags = function(source,operator,options) {
var results = [];
var tags = {};
source(function(tiddler,title) {
var t, length;
if(tiddler && tiddler.fields.tags) {
$tw.utils.pushTop(results,tiddler.fields.tags);
for(t=0, length=tiddler.fields.tags.length; t<length; t++) {
tags[tiddler.fields.tags[t]] = true;
}
}
});
return results;
return Object.keys(tags);
};
})();

View File

@@ -0,0 +1,30 @@
/*\
title: $:/core/modules/filters/wikiparserrules.js
type: application/javascript
module-type: filteroperator
Filter operator for returning the names of the wiki parser rules in this wiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.wikiparserrules = function(source,operator,options) {
var results = [];
$tw.utils.each($tw.modules.types.wikirule,function(mod) {
var exp = mod.exports;
if(exp.types[operator.operand]) {
results.push(exp.name);
}
});
results.sort();
return results;
};
})();

View File

@@ -0,0 +1,189 @@
/*\
title: $:/core/modules/filters/x-listops.js
type: application/javascript
module-type: filteroperator
Extended filter operators to manipulate the current list.
\*/
(function () {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Fetch titles from the current list
*/
var prepare_results = function (source) {
var results = [];
source(function (tiddler, title) {
results.push(title);
});
return results;
};
/*
Moves a number of items from the tail of the current list before the item named in the operand
*/
exports.putbefore = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand),
count = parseInt(operator.suffix) || 1;
return (index === -1) ?
results.slice(0, -1) :
results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index, -count));
};
/*
Moves a number of items from the tail of the current list after the item named in the operand
*/
exports.putafter = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand),
count = parseInt(operator.suffix) || 1;
return (index === -1) ?
results.slice(0, -1) :
results.slice(0, index + 1).concat(results.slice(-count)).concat(results.slice(index + 1, -count));
};
/*
Replaces the item named in the operand with a number of items from the tail of the current list
*/
exports.replace = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand),
count = parseInt(operator.suffix) || 1;
return (index === -1) ?
results.slice(0, -count) :
results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index + 1, -count));
};
/*
Moves a number of items from the tail of the current list to the head of the list
*/
exports.putfirst = function (source, operator) {
var results = prepare_results(source),
count = parseInt(operator.suffix) || 1;
return results.slice(-count).concat(results.slice(0, -count));
};
/*
Moves a number of items from the head of the current list to the tail of the list
*/
exports.putlast = function (source, operator) {
var results = prepare_results(source),
count = parseInt(operator.suffix) || 1;
return results.slice(count).concat(results.slice(0, count));
};
/*
Moves the item named in the operand a number of places forward or backward in the list
*/
exports.move = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand),
count = parseInt(operator.suffix) || 1,
marker = results.splice(index, 1);
return results.slice(0, index + count).concat(marker).concat(results.slice(index + count));
};
/*
Returns the items from the current list that are after the item named in the operand
*/
exports.allafter = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand);
return (index === -1 || index > (results.length - 2)) ? [] :
(operator.suffix) ? results.slice(index) :
results.slice(index + 1);
};
/*
Returns the items from the current list that are before the item named in the operand
*/
exports.allbefore = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand);
return (index <= 0) ? [] :
(operator.suffix) ? results.slice(0, index + 1) :
results.slice(0, index);
};
/*
Appends the items listed in the operand array to the tail of the current list
*/
exports.append = function (source, operator) {
var append = $tw.utils.parseStringArray(operator.operand, "true"),
results = prepare_results(source),
count = parseInt(operator.suffix) || append.length;
return (append.length === 0) ? results :
(operator.prefix) ? results.concat(append.slice(-count)) :
results.concat(append.slice(0, count));
};
/*
Prepends the items listed in the operand array to the head of the current list
*/
exports.prepend = function (source, operator) {
var prepend = $tw.utils.parseStringArray(operator.operand, "true"),
results = prepare_results(source),
count = parseInt(operator.suffix) || prepend.length;
return (prepend.length === 0) ? results :
(operator.prefix) ? prepend.slice(-count).concat(results) :
prepend.slice(0, count).concat(results);
};
/*
Returns all items from the current list except the items listed in the operand array
*/
exports.remove = function (source, operator) {
var array = $tw.utils.parseStringArray(operator.operand, "true"),
results = prepare_results(source),
count = parseInt(operator.suffix) || array.length,
p,
len,
index;
len = array.length - 1;
for (p = 0; p < count; ++p) {
if (operator.prefix) {
index = results.indexOf(array[len - p]);
} else {
index = results.indexOf(array[p]);
}
if (index !== -1) {
results.splice(index, 1);
}
}
return results;
};
/*
Returns all items from the current list sorted in the order of the items in the operand array
*/
exports.sortby = function (source, operator) {
var results = prepare_results(source);
if (!results || results.length < 2) {
return results;
}
var lookup = $tw.utils.parseStringArray(operator.operand, "true");
results.sort(function (a, b) {
return lookup.indexOf(a) - lookup.indexOf(b);
});
return results;
};
/*
Removes all duplicate items from the current list
*/
exports.unique = function (source, operator) {
var results = prepare_results(source);
var set = results.reduce(function (a, b) {
if (a.indexOf(b) < 0) {
a.push(b);
}
return a;
}, []);
return set;
};
})();

View File

@@ -22,7 +22,7 @@ function Language(options) {
}
/*
Return a single translateable string. The title is automatically prefixed with "$:/language/"
Return a wikified translateable string. The title is automatically prefixed with "$:/language/"
Options include:
variables: optional hashmap of variables to supply to the language wikification
*/
@@ -32,6 +32,14 @@ Language.prototype.getString = function(title,options) {
return this.wiki.renderTiddler("text/plain",title,{variables: options.variables});
};
/*
Return a raw, unwikified translateable string. The title is automatically prefixed with "$:/language/"
*/
Language.prototype.getRawString = function(title) {
title = "$:/language/" + title;
return this.wiki.getTiddlerText(title);
};
exports.Language = Language;
})();

View File

@@ -32,29 +32,39 @@ The exception is `skipWhiteSpace`, which just returns the position after the whi
Look for a whitespace token. Returns null if not found, otherwise returns {type: "whitespace", start:, end:,}
*/
exports.parseWhiteSpace = function(source,pos) {
var node = {
type: "whitespace",
start: pos
};
var re = /(\s)+/g;
re.lastIndex = pos;
var match = re.exec(source);
if(match && match.index === pos) {
node.end = pos + match[0].length;
return node;
var p = pos,c;
while(true) {
c = source.charAt(p);
if((c === " ") || (c === "\f") || (c === "\n") || (c === "\r") || (c === "\t") || (c === "\v") || (c === "\u00a0")) { // Ignores some obscure unicode spaces
p++;
} else {
break;
}
}
if(p === pos) {
return null;
} else {
return {
type: "whitespace",
start: pos,
end: p
}
}
return null;
};
/*
Convenience wrapper for parseWhiteSpace. Returns the position after the whitespace
*/
exports.skipWhiteSpace = function(source,pos) {
var whitespace = $tw.utils.parseWhiteSpace(source,pos);
if(whitespace) {
return whitespace.end;
var c;
while(true) {
c = source.charAt(pos);
if((c === " ") || (c === "\f") || (c === "\n") || (c === "\r") || (c === "\t") || (c === "\v") || (c === "\u00a0")) { // Ignores some obscure unicode spaces
pos++;
} else {
return pos;
}
}
return pos;
};
/*

View File

@@ -0,0 +1,35 @@
/*\
title: $:/core/modules/parsers/videoparser.js
type: application/javascript
module-type: parser
The video parser parses a video tiddler into an embeddable HTML element
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var AudioParser = function(type,text,options) {
var element = {
type: "element",
tag: "video",
attributes: {
controls: {type: "string", value: "controls"}
}
},
src;
if(options._canonical_uri) {
element.attributes.src = {type: "string", value: options._canonical_uri};
} else if(text) {
element.attributes.src = {type: "string", value: "data:" + type + ";base64," + text};
}
this.tree = [element];
};
exports["video/mp4"] = AudioParser;
})();

View File

@@ -78,10 +78,13 @@ exports.parse = function() {
}
// Save the macro definition
return [{
type: "macrodef",
name: this.match[1],
params: params,
text: text
type: "set",
attributes: {
name: {type: "string", value: this.match[1]},
value: {type: "string", value: text}
},
children: [],
params: params
}];
};

View File

@@ -18,7 +18,7 @@ exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /~?\$:\/[a-zA-Z/.-]+/mg;
this.matchRegExp = /~?\$:\/[a-zA-Z0-9/.\-_]+/mg;
};
exports.parse = function() {

View File

@@ -26,15 +26,24 @@ Attributes are stored as hashmaps of the following objects:
var WikiParser = function(type,text,options) {
this.wiki = options.wiki;
var self = this;
// Check for an externally linked tiddler
if($tw.browser && (text || "") === "" && options._canonical_uri) {
this.loadRemoteTiddler(options._canonical_uri);
text = $tw.language.getRawString("LazyLoadingWarning");
}
// Initialise the classes if we don't have them already
if(!this.pragmaRuleClasses) {
WikiParser.prototype.pragmaRuleClasses = $tw.modules.createClassesFromModules("wikirule","pragma",$tw.WikiRuleBase);
this.setupRules(WikiParser.prototype.pragmaRuleClasses,"$:/config/WikiParserRules/Pragmas/");
}
if(!this.blockRuleClasses) {
WikiParser.prototype.blockRuleClasses = $tw.modules.createClassesFromModules("wikirule","block",$tw.WikiRuleBase);
this.setupRules(WikiParser.prototype.blockRuleClasses,"$:/config/WikiParserRules/Block/");
}
if(!this.inlineRuleClasses) {
WikiParser.prototype.inlineRuleClasses = $tw.modules.createClassesFromModules("wikirule","inline",$tw.WikiRuleBase);
this.setupRules(WikiParser.prototype.inlineRuleClasses,"$:/config/WikiParserRules/Inline/");
}
// Save the parse text
this.type = type || "text/vnd.tiddlywiki";
@@ -48,16 +57,51 @@ var WikiParser = function(type,text,options) {
this.blockRules = this.instantiateRules(this.blockRuleClasses,"block",0);
this.inlineRules = this.instantiateRules(this.inlineRuleClasses,"inline",0);
// Parse any pragmas
this.tree = this.parsePragmas();
this.tree = [];
var topBranch = this.parsePragmas();
// Parse the text into inline runs or blocks
if(options.parseAsInline) {
this.tree.push.apply(this.tree,this.parseInlineRun());
topBranch.push.apply(topBranch,this.parseInlineRun());
} else {
this.tree.push.apply(this.tree,this.parseBlocks());
topBranch.push.apply(topBranch,this.parseBlocks());
}
// Return the parse tree
};
/*
*/
WikiParser.prototype.loadRemoteTiddler = function(url) {
var self = this;
$tw.utils.httpRequest({
url: url,
type: "GET",
callback: function(err,data) {
if(!err) {
var tiddlers = self.wiki.deserializeTiddlers(".tid",data,self.wiki.getCreationFields());
$tw.utils.each(tiddlers,function(tiddler) {
tiddler["_canonical_uri"] = url;
});
if(tiddlers) {
self.wiki.addTiddlers(tiddlers);
}
}
}
});
};
/*
*/
WikiParser.prototype.setupRules = function(proto,configPrefix) {
var self = this;
if(!$tw.safemode) {
$tw.utils.each(proto,function(object,name) {
if(self.wiki.getTiddlerText(configPrefix + name,"enable") !== "enable") {
delete proto[name];
}
});
}
};
/*
Instantiate an array of parse rules
*/
@@ -122,7 +166,7 @@ WikiParser.prototype.findNextMatch = function(rules,startPos) {
Parse any pragmas at the beginning of a block of parse text
*/
WikiParser.prototype.parsePragmas = function() {
var tree = [];
var currentTreeBranch = this.tree;
while(true) {
// Skip whitespace
this.skipWhitespace();
@@ -137,9 +181,15 @@ WikiParser.prototype.parsePragmas = function() {
break;
}
// Process the pragma rule
tree.push.apply(tree,nextMatch.rule.parse());
var subTree = nextMatch.rule.parse();
if(subTree.length > 0) {
// Quick hack; we only cope with a single parse tree node being returned, which is true at the moment
currentTreeBranch.push.apply(currentTreeBranch,subTree);
subTree[0].children = [];
currentTreeBranch = subTree[0].children;
}
}
return tree;
return currentTreeBranch;
};
/*

View File

@@ -18,7 +18,7 @@ exports.after = ["load-modules"];
exports.synchronous = true;
// Set to `true` to enable performance instrumentation
var PERFORMANCE_INSTRUMENTATION = false;
var PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = "$:/config/Performance/Instrumentation";
var widget = require("$:/core/modules/widgets/widget.js");
@@ -29,7 +29,7 @@ exports.startup = function() {
}
$tw.version = $tw.utils.extractVersionInfo();
// Set up the performance framework
$tw.perf = new $tw.Performance(PERFORMANCE_INSTRUMENTATION);
$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes");
// Kick off the language manager and switcher
$tw.language = new $tw.Language();
$tw.languageSwitcher = new $tw.PluginSwitcher({

View File

@@ -118,7 +118,7 @@ function openStartupTiddlers(options) {
}
// Process the story filter to get the story list
var storyList = $tw.wiki.filterTiddlers(storyFilter);
//invoke any hooks that might change the default story list
// Invoke any hooks that want to change the default story list
storyList = $tw.hooks.invokeHook("th-opening-default-tiddlers-list",storyList);
// If the target tiddler isn't included then splice it in at the top
if(target && storyList.indexOf(target) === -1) {

View File

@@ -30,7 +30,8 @@ exports.startup = function() {
paramObject = event.paramObject || {},
template = paramObject.template || "$:/core/templates/single.tiddler.window",
width = paramObject.width || "700",
height = paramObject.height || "600";
height = paramObject.height || "600",
variables = $tw.utils.extend({},paramObject,{currentTiddler: title});
// Open the window
var srcWindow = window.open("","external-" + title,"scrollbars,width=" + width + ",height=" + height),
srcDocument = srcWindow.document;
@@ -48,7 +49,7 @@ exports.startup = function() {
$tw.wiki.removeEventListener("change",refreshHandler);
},false);
// Set up the styles
var styleWidgetNode = $tw.wiki.makeTranscludeWidget("$:/core/ui/PageStylesheet",{document: $tw.fakeDocument}),
var styleWidgetNode = $tw.wiki.makeTranscludeWidget("$:/core/ui/PageStylesheet",{document: $tw.fakeDocument, variables: variables}),
styleContainer = $tw.fakeDocument.createElement("style");
styleWidgetNode.render(styleContainer,null);
var styleElement = srcDocument.createElement("style");
@@ -56,7 +57,7 @@ exports.startup = function() {
srcDocument.head.insertBefore(styleElement,srcDocument.head.firstChild);
// Render the text of the tiddler
var parser = $tw.wiki.parseTiddler(template),
widgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: {currentTiddler: title}});
widgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: variables});
widgetNode.render(srcDocument.body,srcDocument.body.firstChild);
// Function to handle refreshes
refreshHandler = function(changes) {

138
core/modules/story.js Normal file
View File

@@ -0,0 +1,138 @@
/*\
title: $:/core/modules/story.js
type: application/javascript
module-type: global
Lightweight object for managing interactions with the story and history lists.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Construct Story object with options:
wiki: reference to wiki object to use to resolve tiddler titles
storyTitle: title of story list tiddler
historyTitle: title of history list tiddler
*/
function Story(options) {
options = options || {};
this.wiki = options.wiki || $tw.wiki;
this.storyTitle = options.storyTitle || "$:/StoryList";
this.historyTitle = options.historyTitle || "$:/HistoryList";
};
Story.prototype.navigateTiddler = function(navigateTo,navigateFromTitle,navigateFromClientRect) {
this.addToStory(navigateTo,navigateFromTitle);
this.addToHistory(navigateTo,navigateFromClientRect);
};
Story.prototype.getStoryList = function() {
return this.wiki.getTiddlerList(this.storyTitle) || [];
};
Story.prototype.addToStory = function(navigateTo,navigateFromTitle,options) {
options = options || {};
var storyList = this.getStoryList();
// See if the tiddler is already there
var slot = storyList.indexOf(navigateTo);
// Quit if it already exists in the story river
if(slot >= 0) {
return;
}
// First we try to find the position of the story element we navigated from
var fromIndex = storyList.indexOf(navigateFromTitle);
if(fromIndex >= 0) {
// The tiddler is added from inside the river
// Determine where to insert the tiddler; Fallback is "below"
switch(options.openLinkFromInsideRiver) {
case "top":
slot = 0;
break;
case "bottom":
slot = storyList.length;
break;
case "above":
slot = fromIndex;
break;
case "below": // Intentional fall-through
default:
slot = fromIndex + 1;
break;
}
} else {
// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is "top"
if(options.openLinkFromOutsideRiver === "bottom") {
// Insert at bottom
slot = storyList.length;
} else {
// Insert at top
slot = 0;
}
}
// Add the tiddler
storyList.splice(slot,0,navigateTo);
// Save the story
this.saveStoryList(storyList);
};
Story.prototype.saveStoryList = function(storyList) {
var storyTiddler = this.wiki.getTiddler(this.storyTitle);
this.wiki.addTiddler(new $tw.Tiddler(
this.wiki.getCreationFields(),
{title: this.storyTitle},
storyTiddler,
{list: storyList},
this.wiki.getModificationFields()
));
};
Story.prototype.addToHistory = function(navigateTo,navigateFromClientRect) {
var titles = $tw.utils.isArray(navigateTo) ? navigateTo : [navigateTo];
// Add a new record to the top of the history stack
var historyList = this.wiki.getTiddlerData(this.historyTitle,[]);
$tw.utils.each(titles,function(title) {
historyList.push({title: title, fromPageRect: navigateFromClientRect});
});
this.wiki.setTiddlerData(this.historyTitle,historyList,{"current-tiddler": titles[titles.length-1]});
};
Story.prototype.storyCloseTiddler = function(targetTitle) {
// TBD
};
Story.prototype.storyCloseAllTiddlers = function() {
// TBD
};
Story.prototype.storyCloseOtherTiddlers = function(targetTitle) {
// TBD
};
Story.prototype.storyEditTiddler = function(targetTitle) {
// TBD
};
Story.prototype.storyDeleteTiddler = function(targetTitle) {
// TBD
};
Story.prototype.storySaveTiddler = function(targetTitle) {
// TBD
};
Story.prototype.storyCancelTiddler = function(targetTitle) {
// TBD
};
Story.prototype.storyNewTiddler = function(targetTitle) {
// TBD
};
exports.Story = Story;
})();

View File

@@ -18,7 +18,7 @@ var ZoominListView = function(listWidget) {
var self = this;
this.listWidget = listWidget;
// Get the index of the tiddler that is at the top of the history
var history = this.listWidget.wiki.getTiddlerData(this.listWidget.historyTitle,[]),
var history = this.listWidget.wiki.getTiddlerDataCached(this.listWidget.historyTitle,[]),
targetTiddler;
if(history.length > 0) {
targetTiddler = history[history.length-1].title;

View File

@@ -44,7 +44,7 @@ exports.upgrade = function(wiki,titles,tiddlers) {
var mapping = MAPPINGS[title];
if(mapping) {
var tiddler = new $tw.Tiddler(tiddlers[title]),
tiddlerData = wiki.getTiddlerData(tiddler,{});
tiddlerData = wiki.getTiddlerDataCached(tiddler,{});
for(var index in mapping) {
var mappedTitle = mapping[index];
if(!tiddlers[mappedTitle] || tiddlers[mappedTitle].title !== mappedTitle) {

View File

@@ -43,7 +43,7 @@ exports.convertStyleNameToPropertyName = function(styleName) {
// Convert it by first removing any hyphens
var propertyName = $tw.utils.unHyphenateCss(styleName);
// Then check if it needs a prefix
if(document.body.style[propertyName] === undefined) {
if($tw.browser && document.body.style[propertyName] === undefined) {
var prefixes = ["O","MS","Moz","webkit"];
for(var t=0; t<prefixes.length; t++) {
var prefixedName = prefixes[t] + propertyName.substr(0,1).toUpperCase() + propertyName.substr(1);

View File

@@ -58,7 +58,11 @@ exports.httpRequest = function(options) {
if(data && !$tw.utils.hop(headers,"Content-type")) {
request.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");
}
request.send(data);
try {
request.send(data);
} catch(e) {
options.callback(e);
}
return request;
};

View File

@@ -31,12 +31,7 @@ Trigger a popup open or closed. Parameters are in a hashmap:
*/
Popup.prototype.triggerPopup = function(options) {
// Check if this popup is already active
var index = -1;
for(var t=0; t<this.popups.length; t++) {
if(this.popups[t].title === options.title) {
index = t;
}
}
var index = this.findPopup(options.title);
// Compute the new state
var state = index === -1;
if(options.force !== undefined) {
@@ -50,6 +45,16 @@ Popup.prototype.triggerPopup = function(options) {
}
};
Popup.prototype.findPopup = function(title) {
var index = -1;
for(var t=0; t<this.popups.length; t++) {
if(this.popups[t].title === title) {
index = t;
}
}
return index;
};
Popup.prototype.handleEvent = function(event) {
if(event.type === "click") {
// Find out what was clicked on
@@ -107,12 +112,14 @@ Popup.prototype.show = function(options) {
var info = this.popupInfo(options.domNode);
// Cancel any higher level popups
this.cancel(info.popupLevel);
// Store the popup details
this.popups.push({
title: options.title,
wiki: options.wiki,
domNode: options.domNode
});
// Store the popup details if not already there
if(this.findPopup(options.title) === -1) {
this.popups.push({
title: options.title,
wiki: options.wiki,
domNode: options.domNode
});
}
// Set the state tiddler
options.wiki.setTextReference(options.title,
"(" + options.domNode.offsetLeft + "," + options.domNode.offsetTop + "," +

View File

@@ -26,6 +26,12 @@ var TW_TextNode = function(text) {
this.textContent = text;
};
Object.defineProperty(TW_TextNode.prototype, "nodeType", {
get: function() {
return 3;
}
});
Object.defineProperty(TW_TextNode.prototype, "formattedTextContent", {
get: function() {
return this.textContent.replace(/(\r?\n)/g,"");
@@ -43,6 +49,19 @@ var TW_Element = function(tag,namespace) {
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
};
Object.defineProperty(TW_Element.prototype, "nodeType", {
get: function() {
return 1;
}
});
TW_Element.prototype.getAttribute = function(name) {
if(this.isRaw) {
throw "Cannot getAttribute on a raw TW_Element";
}
return this.attributes[name];
};
TW_Element.prototype.setAttribute = function(name,value) {
if(this.isRaw) {
throw "Cannot setAttribute on a raw TW_Element";
@@ -93,6 +112,12 @@ TW_Element.prototype.hasChildNodes = function() {
return !!this.children.length;
};
Object.defineProperty(TW_Element.prototype, "childNodes", {
get: function() {
return this.children;
}
});
Object.defineProperty(TW_Element.prototype, "firstChild", {
get: function() {
return this.children[0];
@@ -103,6 +128,12 @@ TW_Element.prototype.addEventListener = function(type,listener,useCapture) {
// Do nothing
};
Object.defineProperty(TW_Element.prototype, "tagName", {
get: function() {
return this.tag || "";
}
});
Object.defineProperty(TW_Element.prototype, "className", {
get: function() {
return this.attributes["class"] || "";

View File

@@ -56,4 +56,24 @@ exports.findParseTreeNode = function(nodeArray,search) {
return undefined;
};
/*
Helper to get the text of a parse tree node or array of nodes
*/
exports.getParseTreeText = function getParseTreeText(tree) {
var output = [];
if($tw.utils.isArray(tree)) {
$tw.utils.each(tree,function(node) {
output.push(getParseTreeText(node));
});
} else {
if(tree.type === "text") {
output.push(tree.text);
}
if(tree.children) {
return getParseTreeText(tree.children);
}
}
return output.join("");
};
})();

View File

@@ -28,9 +28,9 @@ Performance.prototype.report = function(name,fn) {
self.measures = {};
var startTime = $tw.utils.timer(),
result = fn.apply(this,arguments);
self.logger.log(name + ": " + $tw.utils.timer(startTime) + "ms");
self.logger.log(name + ": " + $tw.utils.timer(startTime).toFixed(2) + "ms");
for(var m in self.measures) {
self.logger.log("+" + m + ": " + self.measures[m] + "ms");
self.logger.log("+" + m + ": " + self.measures[m].toFixed(2) + "ms");
}
return result;
};

View File

@@ -35,9 +35,7 @@ exports.trim = function(str) {
Return the number of keys in an object
*/
exports.count = function(object) {
var s = 0;
$tw.utils.each(object,function() {s++;});
return s;
return Object.keys(object || {}).length;
};
/*
@@ -171,6 +169,17 @@ exports.extendDeepCopy = function(object,extendedProperties) {
return result;
};
exports.deepFreeze = function deepFreeze(object) {
var property, key;
Object.freeze(object);
for(key in object) {
property = object[key];
if($tw.utils.hop(object,key) && (typeof property === "object") && !Object.isFrozen(property)) {
deepFreeze(property);
}
}
};
exports.slowInSlowOut = function(t) {
return (1 - ((Math.cos(t * Math.PI) + 1) / 2));
};
@@ -622,4 +631,27 @@ exports.makeDataUri = function(text,type) {
return parts.join("");
};
})();
/*
Useful for finding out the fully escaped CSS selector equivalent to a given tag. For example:
$tw.utils.tagToCssSelector("$:/tags/Stylesheet") --> tc-tagged-\%24\%3A\%2Ftags\%2FStylesheet
*/
exports.tagToCssSelector = function(tagName) {
return "tc-tagged-" + encodeURIComponent(tagName).replace(/[!"#$%&'()*+,\-./:;<=>?@[\\\]^`{\|}~,]/mg,function(c) {
return "\\" + c;
});
};
/*
IE does not have sign function
*/
exports.sign = Math.sign || function(x) {
x = +x; // convert to a number
if (x === 0 || isNaN(x)) {
return x;
}
return x > 0 ? 1 : -1;
};
})();

View File

@@ -67,7 +67,7 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
removeFields[name] = undefined;
}
});
this.wiki.addTiddler(new $tw.Tiddler(tiddler,removeFields));
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,removeFields,this.wiki.getCreationFields()));
}
return true; // Action was invoked
};

View File

@@ -0,0 +1,92 @@
/*\
title: $:/core/modules/widgets/action-listops.js
type: application/javascript
module-type: widget
Action widget to apply list operations to any tiddler field (defaults to the 'list' field of the current tiddler)
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var ActionListopsWidget = function(parseTreeNode, options) {
this.initialise(parseTreeNode, options);
};
/**
* Inherit from the base widget class
*/
ActionListopsWidget.prototype = new Widget();
/**
* Render this widget into the DOM
*/
ActionListopsWidget.prototype.render = function(parent, nextSibling) {
this.computeAttributes();
this.execute();
};
/**
* Compute the internal state of the widget
*/
ActionListopsWidget.prototype.execute = function() {
// Get our parameters
this.target = this.getAttribute("$tiddler", this.getVariable(
"currentTiddler"));
this.filter = this.getAttribute("$filter");
this.subfilter = this.getAttribute("$subfilter");
this.listField = this.getAttribute("$field", "list");
this.listIndex = this.getAttribute("$index");
this.filtertags = this.getAttribute("$tags");
};
/**
* Refresh the widget by ensuring our attributes are up to date
*/
ActionListopsWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.$tiddler || changedAttributes.$filter ||
changedAttributes.$subfilter || changedAttributes.$field ||
changedAttributes.$index || changedAttributes.$tags) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
/**
* Invoke the action associated with this widget
*/
ActionListopsWidget.prototype.invokeAction = function(triggeringWidget,
event) {
//Apply the specified filters to the lists
var field = this.listField,
index,
type = "!!",
list = this.listField;
if(this.listIndex) {
field = undefined;
index = this.listIndex;
type = "##";
list = this.listIndex;
}
if(this.filter) {
this.wiki.setText(this.target, field, index, $tw.utils.stringifyList(
this.wiki
.filterTiddlers(this.filter, this)));
}
if(this.subfilter) {
var subfilter = "[list[" + this.target + type + list + "]] " + this.subfilter;
this.wiki.setText(this.target, field, index, $tw.utils.stringifyList(
this.wiki
.filterTiddlers(subfilter, this)));
}
if(this.filtertags) {
var tagfilter = "[list[" + this.target + "!!tags]] " + this.filtertags;
this.wiki.setText(this.target, "tags", undefined, $tw.utils.stringifyList(
this.wiki.filterTiddlers(tagfilter, this)));
}
return true; // Action was invoked
};
exports["action-listops"] = ActionListopsWidget;
})();

View File

@@ -39,6 +39,7 @@ SetFieldWidget.prototype.execute = function() {
this.actionField = this.getAttribute("$field");
this.actionIndex = this.getAttribute("$index");
this.actionValue = this.getAttribute("$value");
this.actionTimestamp = this.getAttribute("$timestamp","yes") === "yes";
};
/*
@@ -57,13 +58,15 @@ SetFieldWidget.prototype.refresh = function(changedTiddlers) {
Invoke the action associated with this widget
*/
SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
var self = this;
if(typeof this.actionValue === "string") {
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue);
var self = this,
options = {};
options.suppressTimestamp = !this.actionTimestamp;
if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) {
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);
}
$tw.utils.each(this.attributes,function(attribute,name) {
if(name.charAt(0) !== "$") {
self.wiki.setText(self.actionTiddler,name,undefined,attribute);
self.wiki.setText(self.actionTiddler,name,undefined,attribute,options);
}
});
return true; // Action was invoked

View File

@@ -42,9 +42,14 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
if(this.tooltip) {
domNode.setAttribute("title",this.tooltip);
}
// Nw.js supports "nwsaveas" to force a "save as" dialogue that allows a new or existing file to be selected
if(this.nwsaveas) {
domNode.setAttribute("nwsaveas",this.nwsaveas);
}
// Nw.js supports "webkitdirectory" to allow a directory to be selected
if(this.webkitdirectory) {
domNode.setAttribute("webkitdirectory",this.webkitdirectory);
}
// Add a click event handler
domNode.addEventListener("change",function (event) {
if(self.message) {
@@ -71,6 +76,7 @@ BrowseWidget.prototype.execute = function() {
this.param = this.getAttribute("param");
this.tooltip = this.getAttribute("tooltip");
this.nwsaveas = this.getAttribute("nwsaveas");
this.webkitdirectory = this.getAttribute("webkitdirectory");
};
/*

View File

@@ -125,7 +125,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
}
}
if(hasChanged) {
this.wiki.addTiddler(new $tw.Tiddler(fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
}
};

View File

@@ -299,7 +299,7 @@ EditBitmapWidget.prototype.saveChanges = function() {
type = dataURL.substring(posColon+1,posSemiColon),
text = dataURL.substring(posComma+1);
var update = {type: type, text: text};
this.wiki.addTiddler(new $tw.Tiddler(tiddler,update));
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,update,this.wiki.getCreationFields()));
}
};

View File

@@ -52,6 +52,9 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
if(this.editSize) {
domNode.setAttribute("size",this.editSize);
}
if(this.editRows) {
domNode.setAttribute("rows",this.editRows);
}
// Assign classes
if(this.editClass) {
domNode.className = this.editClass;
@@ -79,7 +82,7 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
if(this.editFocus === "true") {
if(domNode.focus && domNode.select) {
domNode.focus();
domNode.select();
domNode.select();
}
}
};
@@ -148,6 +151,7 @@ EditTextWidget.prototype.execute = function() {
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
this.editSize = this.getAttribute("size");
this.editRows = this.getAttribute("rows");
this.editAutoHeight = this.getAttribute("autoHeight","yes") === "yes";
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
this.editFocusPopup = this.getAttribute("focusPopup");
@@ -178,13 +182,15 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
EditTextWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Completely rerender if any of our attributes have changed
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup) {
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows) {
this.refreshSelf();
return true;
} else if(changedTiddlers[this.editTitle]) {
this.updateEditor(this.getEditInfo().value);
return true;
}
// Fix the height anyway in case there has been a reflow
this.fixHeight();
return false;
};
@@ -211,18 +217,31 @@ EditTextWidget.prototype.updateEditorDomNode = function(text) {
}
};
/*
Get the first parent element that has scrollbars or use the body as fallback.
*/
EditTextWidget.prototype.getScrollContainer = function(el) {
while(el.parentNode) {
el = el.parentNode;
if(el.scrollTop) {
return el;
}
}
return this.document.body;
};
/*
Fix the height of textareas to fit their content
*/
EditTextWidget.prototype.fixHeight = function() {
var self = this,
domNode = this.domNodes[0];
var domNode = this.domNodes[0];
if(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === "textarea") {
// Resize the textarea to fit its content, preserving scroll position
var scrollPosition = $tw.utils.getScrollPosition(),
scrollTop = scrollPosition.y;
// Measure the specified minimum height
domNode.style.height = self.editMinHeight;
// Get the scroll container and register the current scroll position
var container = this.getScrollContainer(domNode),
scrollTop = container.scrollTop;
// Measure the specified minimum height
domNode.style.height = this.editMinHeight;
var minHeight = domNode.offsetHeight;
// Set its height to auto so that it snaps to the correct height
domNode.style.height = "auto";
@@ -230,12 +249,11 @@ EditTextWidget.prototype.fixHeight = function() {
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);
// Only try to change the height if it has changed
if(newHeight !== domNode.offsetHeight) {
domNode.style.height = newHeight + "px";
domNode.style.height = newHeight + "px";
// Make sure that the dimensions of the textarea are recalculated
$tw.utils.forceLayout(domNode);
// Check that the scroll position is still visible before trying to scroll back to it
scrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);
window.scrollTo(scrollPosition.x,scrollTop);
// Set the container to the position we registered at the beginning
container.scrollTop = scrollTop;
}
}
};

View File

@@ -135,6 +135,10 @@ FieldManglerWidget.prototype.handleAddTagEvent = function(event) {
$tw.utils.pushTop(modification.tags,tag);
this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));
}
} else if(typeof event.param === "string" && event.param.trim() !== "" && this.mangleTitle.trim() !== "") {
var tag = [];
tag.push(event.param.trim());
this.wiki.addTiddler({title: this.mangleTitle, tags: tag});
}
return true;
};

View File

@@ -42,6 +42,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
// Add a keyboard event handler
domNode.addEventListener("keydown",function (event) {
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
self.invokeActions(this,event);
self.dispatchMessage(event);
event.preventDefault();
event.stopPropagation();

View File

@@ -135,9 +135,9 @@ LinkWidget.prototype.handleClickEvent = function(event) {
});
if(this.domNodes[0].hasAttribute("href")) {
event.preventDefault();
event.stopPropagation();
return false;
}
event.stopPropagation();
return false;
};
LinkWidget.prototype.handleDragStartEvent = function(event) {

View File

@@ -156,7 +156,7 @@ Handle any changes to the history list
*/
ListWidget.prototype.handleHistoryChanges = function() {
// Get the history data
var newHistory = this.wiki.getTiddlerData(this.historyTitle,[]);
var newHistory = this.wiki.getTiddlerDataCached(this.historyTitle,[]);
// Ignore any entries of the history that match the previous history
var entry = 0;
while(entry < newHistory.length && entry < this.history.length && newHistory[entry].title === this.history[entry].title) {

View File

@@ -29,7 +29,12 @@ var NavigatorWidget = function(parseTreeNode,options) {
{type: "tm-close-other-tiddlers", handler: "handleCloseOtherTiddlersEvent"},
{type: "tm-new-tiddler", handler: "handleNewTiddlerEvent"},
{type: "tm-import-tiddlers", handler: "handleImportTiddlersEvent"},
{type: "tm-perform-import", handler: "handlePerformImportEvent"}
{type: "tm-perform-import", handler: "handlePerformImportEvent"},
{type: "tm-fold-tiddler", handler: "handleFoldTiddlerEvent"},
{type: "tm-fold-other-tiddlers", handler: "handleFoldOtherTiddlersEvent"},
{type: "tm-fold-all-tiddlers", handler: "handleFoldAllTiddlersEvent"},
{type: "tm-unfold-all-tiddlers", handler: "handleUnfoldAllTiddlersEvent"},
{type: "tm-rename-tiddler", handler: "handleRenameTiddlerEvent"}
]);
};
@@ -220,14 +225,17 @@ NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
return false;
}
// Replace the specified tiddler with a draft in edit mode
var draftTiddler = this.makeDraftTiddler(title),
draftTitle = draftTiddler.fields.title,
storyList = this.getStoryList();
this.removeTitleFromStory(storyList,draftTitle);
this.replaceFirstTitleInStory(storyList,title,draftTitle);
this.addToHistory(draftTitle,event.navigateFromClientRect);
this.saveStoryList(storyList);
return false;
var draftTiddler = this.makeDraftTiddler(title);
// Update the story and history if required
if(!event.paramObject || event.paramObject.suppressNavigation !== "yes") {
var draftTitle = draftTiddler.fields.title,
storyList = this.getStoryList();
this.removeTitleFromStory(storyList,draftTitle);
this.replaceFirstTitleInStory(storyList,title,draftTitle);
this.addToHistory(draftTitle,event.navigateFromClientRect);
this.saveStoryList(storyList);
return false;
}
};
// Delete a tiddler
@@ -333,23 +341,27 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
));
}
if(isConfirmed) {
// Save the draft tiddler as the real tiddler
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
// Create the new tiddler and pass it through the th-saving-tiddler hook
var newTiddler = new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
title: draftTitle,
"draft.title": undefined,
"draft.of": undefined
},this.wiki.getModificationFields()));
},this.wiki.getModificationFields());
newTiddler = $tw.hooks.invokeHook("th-saving-tiddler",newTiddler);
this.wiki.addTiddler(newTiddler);
// Remove the draft tiddler
this.wiki.deleteTiddler(title);
// Remove the original tiddler if we're renaming it
if(isRename) {
this.wiki.deleteTiddler(draftOf);
}
// Replace the draft in the story with the original
this.replaceFirstTitleInStory(storyList,title,draftTitle);
this.addToHistory(draftTitle,event.navigateFromClientRect);
if(draftTitle !== this.storyTitle) {
this.saveStoryList(storyList);
if(!event.paramObject || event.paramObject.suppressNavigation !== "yes") {
// Replace the draft in the story with the original
this.replaceFirstTitleInStory(storyList,title,draftTitle);
this.addToHistory(draftTitle,event.navigateFromClientRect);
if(draftTitle !== this.storyTitle) {
this.saveStoryList(storyList);
}
}
// Trigger an autosave
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
@@ -381,13 +393,15 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
// Remove the draft tiddler
if(isConfirmed) {
this.wiki.deleteTiddler(draftTitle);
if(originalTiddler) {
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
this.addToHistory(originalTitle,event.navigateFromClientRect);
} else {
this.removeTitleFromStory(storyList,draftTitle);
if(!event.paramObject || event.paramObject.suppressNavigation !== "yes") {
if(originalTiddler) {
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
this.addToHistory(originalTitle,event.navigateFromClientRect);
} else {
this.removeTitleFromStory(storyList,draftTitle);
}
this.saveStoryList(storyList);
}
this.saveStoryList(storyList);
}
}
return false;
@@ -539,10 +553,10 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
NavigatorWidget.prototype.handlePerformImportEvent = function(event) {
var self = this,
importTiddler = this.wiki.getTiddler(event.param),
importData = this.wiki.getTiddlerData(event.param,{tiddlers: {}}),
importData = this.wiki.getTiddlerDataCached(event.param,{tiddlers: {}}),
importReport = [];
// Add the tiddlers to the store
importReport.push("The following tiddlers were imported:\n");
importReport.push($tw.language.getString("Import/Imported") + "\n");
$tw.utils.each(importData.tiddlers,function(tiddlerFields) {
var title = tiddlerFields.title;
if(title && importTiddler && importTiddler.fields["selection-" + title] !== "unchecked") {
@@ -552,16 +566,60 @@ NavigatorWidget.prototype.handlePerformImportEvent = function(event) {
});
// Replace the $:/Import tiddler with an import report
this.wiki.addTiddler(new $tw.Tiddler({
title: IMPORT_TITLE,
title: event.param,
text: importReport.join("\n"),
"status": "complete"
}));
// Navigate to the $:/Import tiddler
this.addToHistory([IMPORT_TITLE]);
this.addToHistory([event.param]);
// Trigger an autosave
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
};
NavigatorWidget.prototype.handleFoldTiddlerEvent = function(event) {
var self = this,
paramObject = event.paramObject || {};
if(paramObject.foldedState) {
var foldedState = this.wiki.getTiddlerText(paramObject.foldedState,"show") === "show" ? "hide" : "show";
this.wiki.setText(paramObject.foldedState,"text",null,foldedState);
}
};
NavigatorWidget.prototype.handleFoldOtherTiddlersEvent = function(event) {
var self = this,
paramObject = event.paramObject || {},
prefix = paramObject.foldedStatePrefix;
$tw.utils.each(this.getStoryList(),function(title) {
self.wiki.setText(prefix + title,"text",null,event.param === title ? "show" : "hide");
});
};
NavigatorWidget.prototype.handleFoldAllTiddlersEvent = function(event) {
var self = this,
paramObject = event.paramObject || {},
prefix = paramObject.foldedStatePrefix;
$tw.utils.each(this.getStoryList(),function(title) {
self.wiki.setText(prefix + title,"text",null,"hide");
});
};
NavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) {
var self = this,
paramObject = event.paramObject || {},
prefix = paramObject.foldedStatePrefix;
$tw.utils.each(this.getStoryList(),function(title) {
self.wiki.setText(prefix + title,"text",null,"show");
});
};
NavigatorWidget.prototype.handleRenameTiddlerEvent = function(event) {
var self = this,
paramObject = event.paramObject || {},
from = paramObject.from || event.tiddlerTitle,
to = paramObject.to;
$tw.wiki.renameTiddler(from,to);
};
exports.navigator = NavigatorWidget;
})();

View File

@@ -79,7 +79,7 @@ RadioWidget.prototype.setValue = function() {
var tiddler = this.wiki.getTiddler(this.radioTitle),
addition = {};
addition[this.radioField] = this.radioValue;
this.wiki.addTiddler(new $tw.Tiddler({title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),{title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));
}
};

View File

@@ -51,7 +51,12 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
Handle a change event
*/
SelectWidget.prototype.handleChangeEvent = function(event) {
var value = this.getSelectDomNode().value;
if(this.selectMultiple == false) {
var value = this.getSelectDomNode().value;
} else {
var value = this.getSelectValues()
value = $tw.utils.stringifyList(value);
}
this.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value);
};
@@ -81,9 +86,21 @@ SelectWidget.prototype.setSelectValue = function() {
}
}
// Assign it to the select element if it's different than the current value
var domNode = this.getSelectDomNode();
if(domNode.value !== value) {
domNode.value = value;
if (this.selectMultiple) {
value = value === undefined ? "" : value;
var select = this.getSelectDomNode();
var values = Array.isArray(value) ? value : $tw.utils.parseStringArray(value);
for(var i=0; i < select.children.length; i++){
if(values.indexOf(select.children[i].value) != -1) {
select.children[i].selected = true;
}
}
} else {
var domNode = this.getSelectDomNode();
if(domNode.value !== value) {
domNode.value = value;
}
}
};
@@ -94,6 +111,22 @@ SelectWidget.prototype.getSelectDomNode = function() {
return this.children[0].domNodes[0];
};
// Return an array of the selected opion values
// select is an HTML select element
SelectWidget.prototype.getSelectValues = function() {
var select, result, options, opt;
select = this.getSelectDomNode();
result = [];
options = select && select.options;
for (var i=0; i<options.length; i++) {
opt = options[i];
if (opt.selected) {
result.push(opt.value || opt.text);
}
}
return result;
}
/*
Compute the internal state of the widget
*/
@@ -104,6 +137,8 @@ SelectWidget.prototype.execute = function() {
this.selectIndex = this.getAttribute("index");
this.selectClass = this.getAttribute("class");
this.selectDefault = this.getAttribute("default");
this.selectMultiple = this.getAttribute("multiple", false);
this.selectSize = this.getAttribute("size");
// Make the child widgets
var selectNode = {
type: "element",
@@ -113,6 +148,12 @@ SelectWidget.prototype.execute = function() {
if(this.selectClass) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"class",this.selectClass);
}
if(this.selectMultiple) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"multiple","multiple");
}
if(this.selectSize) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
}
this.makeChildWidgets([selectNode]);
};

View File

@@ -43,6 +43,15 @@ SetWidget.prototype.execute = function() {
this.setValue = this.getAttribute("value");
this.setEmptyValue = this.getAttribute("emptyValue");
// Set context variable
this.setVariable(this.setName,this.getValue(),this.parseTreeNode.params);
// Construct the child widgets
this.makeChildWidgets();
};
/*
Get the value to be assigned
*/
SetWidget.prototype.getValue = function() {
var value = this.setValue;
if(this.setFilter) {
var results = this.wiki.filterTiddlers(this.setFilter,this);
@@ -52,10 +61,10 @@ SetWidget.prototype.execute = function() {
if(results.length === 0 && this.setEmptyValue !== undefined) {
value = this.setEmptyValue;
}
} else if(!value && this.setEmptyValue) {
value = this.setEmptyValue;
}
this.setVariable(this.setName,value,this.parseTreeNode.params);
// Construct the child widgets
this.makeChildWidgets();
return value;
};
/*
@@ -63,11 +72,12 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
SetWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.name || changedAttributes.filter || changedAttributes.value || changedAttributes.emptyValue) {
if(changedAttributes.name || changedAttributes.filter || changedAttributes.value || changedAttributes.emptyValue ||
(this.setFilter && this.getValue() != this.variables[this.setName].value)) {
this.refreshSelf();
return true;
} else {
return this.refreshChildren(changedTiddlers);
return this.refreshChildren(changedTiddlers);
}
};

View File

@@ -55,6 +55,9 @@ ViewWidget.prototype.execute = function() {
case "htmlwikified":
this.text = this.getValueAsHtmlWikified();
break;
case "htmlencodedplainwikified":
this.text = this.getValueAsHtmlEncodedPlainWikified();
break;
case "htmlencoded":
this.text = this.getValueAsHtmlEncoded();
break;
@@ -132,6 +135,10 @@ ViewWidget.prototype.getValueAsHtmlWikified = function() {
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this});
};
ViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function() {
return $tw.utils.htmlEncode(this.wiki.renderText("text/plain","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this}));
};
ViewWidget.prototype.getValueAsHtmlEncoded = function() {
return $tw.utils.htmlEncode(this.getValueAsText());
};

View File

@@ -195,16 +195,23 @@ Widget.prototype.hasVariable = function(name,value) {
Construct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain
*/
Widget.prototype.getStateQualifier = function(name) {
this.qualifiers = this.qualifiers || Object.create(null);
name = name || "transclusion";
var output = [],
node = this;
while(node && node.parentWidget) {
if($tw.utils.hop(node.parentWidget.variables,name)) {
output.push(node.getVariable(name));
if(this.qualifiers[name]) {
return this.qualifiers[name];
} else {
var output = [],
node = this;
while(node && node.parentWidget) {
if($tw.utils.hop(node.parentWidget.variables,name)) {
output.push(node.getVariable(name));
}
node = node.parentWidget;
}
node = node.parentWidget;
var value = $tw.utils.hashString(output.join(""));
this.qualifiers[name] = value;
return value;
}
return $tw.utils.hashString(output.join(""));
};
/*

View File

@@ -0,0 +1,53 @@
/*\
title: $:/core/modules/wiki-bulkops.js
type: application/javascript
module-type: wikimethod
Bulk tiddler operations such as rename.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Rename a tiddler, and relink any tags or lists that reference it.
*/
exports.renameTiddler = function(fromTitle,toTitle) {
var self = this;
fromTitle = (fromTitle || "").trim();
toTitle = (toTitle || "").trim();
if(fromTitle && toTitle && fromTitle !== toTitle) {
// Rename the tiddler itself
var tiddler = this.getTiddler(fromTitle);
this.addTiddler(new $tw.Tiddler(tiddler,{title: toTitle},this.getModificationFields()));
this.deleteTiddler(fromTitle);
// Rename any tags or lists that reference it
this.each(function(tiddler,title) {
var tags = (tiddler.fields.tags || []).slice(0),
list = (tiddler.fields.list || []).slice(0),
isModified = false;
// Rename tags
$tw.utils.each(tags,function (title,index) {
if(title === fromTitle) {
tags[index] = toTitle;
isModified = true;
}
});
// Rename lists
$tw.utils.each(list,function (title,index) {
if(title === fromTitle) {
list[index] = toTitle;
isModified = true;
}
});
if(isModified) {
self.addTiddler(new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields()));
}
});
}
}
})();

View File

@@ -58,17 +58,24 @@ exports.setTextReference = function(textRef,value,currTiddlerTitle) {
this.setText(title,tr.field,tr.index,value);
};
exports.setText = function(title,field,index,value) {
exports.setText = function(title,field,index,value,options) {
options = options || {};
var creationFields = options.suppressTimestamp ? {} : this.getCreationFields(),
modificationFields = options.suppressTimestamp ? {} : this.getModificationFields();
// Check if it is a reference to a tiddler field
if(index) {
var data = this.getTiddlerData(title,Object.create(null));
data[index] = value;
this.setTiddlerData(title,data,this.getModificationFields());
if(value !== undefined) {
data[index] = value;
} else {
delete data[index];
}
this.setTiddlerData(title,data,modificationFields);
} else {
var tiddler = this.getTiddler(title),
fields = {title: title};
fields[field || "text"] = value;
this.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));
this.addTiddler(new $tw.Tiddler(creationFields,tiddler,fields,modificationFields));
}
};
@@ -186,11 +193,11 @@ exports.generateNewTitle = function(baseTitle,options) {
};
exports.isSystemTiddler = function(title) {
return title.indexOf("$:/") === 0;
return title && title.indexOf("$:/") === 0;
};
exports.isTemporaryTiddler = function(title) {
return title.indexOf("$:/temp/") === 0;
return title && title.indexOf("$:/temp/") === 0;
};
exports.isImageTiddler = function(title) {
@@ -577,7 +584,7 @@ exports.sortByList = function(array,listTitle) {
};
exports.getSubTiddler = function(title,subTiddlerTitle) {
var bundleInfo = this.getPluginInfo(title) || this.getTiddlerData(title);
var bundleInfo = this.getPluginInfo(title) || this.getTiddlerDataCached(title);
if(bundleInfo && bundleInfo.tiddlers) {
var subTiddler = bundleInfo.tiddlers[subTiddlerTitle];
if(subTiddler) {
@@ -613,6 +620,29 @@ Other types currently just return null.
titleOrTiddler: string tiddler title or a tiddler object
defaultData: default data to be returned if the tiddler is missing or doesn't contain data
Note that the same value is returned for repeated calls for the same tiddler data. The value is frozen to prevent modification; otherwise modifications would be visible to all callers
*/
exports.getTiddlerDataCached = function(titleOrTiddler,defaultData) {
var self = this,
tiddler = titleOrTiddler;
if(!(tiddler instanceof $tw.Tiddler)) {
tiddler = this.getTiddler(tiddler);
}
if(tiddler) {
return this.getCacheForTiddler(tiddler.fields.title,"data",function() {
// Return the frozen value
var value = self.getTiddlerData(tiddler.fields.title,defaultData);
$tw.utils.deepFreeze(value);
return value;
});
} else {
return defaultData;
}
};
/*
Alternative, uncached version of getTiddlerDataCached(). The return value can be mutated freely and reused
*/
exports.getTiddlerData = function(titleOrTiddler,defaultData) {
var tiddler = titleOrTiddler,
@@ -705,29 +735,29 @@ exports.clearGlobalCache = function() {
// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it
exports.getCacheForTiddler = function(title,cacheName,initializer) {
// Temporarily disable caching so that tweakParseTreeNode() works
return initializer();
// this.caches = this.caches || Object.create(null);
// var caches = this.caches[title];
// if(caches && caches[cacheName]) {
// return caches[cacheName];
// } else {
// if(!caches) {
// caches = Object.create(null);
// this.caches[title] = caches;
// }
// caches[cacheName] = initializer();
// return caches[cacheName];
// }
this.caches = this.caches || Object.create(null);
var caches = this.caches[title];
if(caches && caches[cacheName]) {
return caches[cacheName];
} else {
if(!caches) {
caches = Object.create(null);
this.caches[title] = caches;
}
caches[cacheName] = initializer();
return caches[cacheName];
}
};
// Clear all caches associated with a particular tiddler
// Clear all caches associated with a particular tiddler, or, if the title is null, clear all the caches for all the tiddlers
exports.clearCache = function(title) {
this.caches = this.caches || Object.create(null);
if($tw.utils.hop(this.caches,title)) {
delete this.caches[title];
if(title) {
this.caches = this.caches || Object.create(null);
if($tw.utils.hop(this.caches,title)) {
delete this.caches[title];
}
} else {
this.caches = Object.create(null);
}
};
@@ -753,7 +783,7 @@ Options include:
parseAsInline: if true, the text of the tiddler will be parsed as an inline run
_canonical_uri: optional string of the canonical URI of this content
*/
exports.old_parseText = function(type,text,options) {
exports.parseText = function(type,text,options) {
options = options || {};
// Select a parser
var Parser = $tw.Wiki.parsers[type];
@@ -777,53 +807,19 @@ exports.old_parseText = function(type,text,options) {
/*
Parse a tiddler according to its MIME type
*/
exports.old_parseTiddler = function(title,options) {
exports.parseTiddler = function(title,options) {
options = $tw.utils.extend({},options);
var cacheType = options.parseAsInline ? "newInlineParseTree" : "newBlockParseTree",
var cacheType = options.parseAsInline ? "inlineParseTree" : "blockParseTree",
tiddler = this.getTiddler(title),
self = this;
return tiddler ? this.getCacheForTiddler(title,cacheType,function() {
if(tiddler.hasField("_canonical_uri")) {
options._canonical_uri = tiddler.fields._canonical_uri;
}
return self.old_parseText(tiddler.fields.type,tiddler.fields.text,options);
return self.parseText(tiddler.fields.type,tiddler.fields.text,options);
}) : null;
};
var tweakMacroDefinition = function(nodeList) {
if(nodeList && nodeList[0] && nodeList[0].type === "macrodef") {
nodeList[0].type = "set";
nodeList[0].attributes = {
name: {type: "string", value: nodeList[0].name},
value: {type: "string", value: nodeList[0].text}
};
nodeList[0].children = nodeList.slice(1);
nodeList.splice(1,nodeList.length-1);
tweakMacroDefinition(nodeList[0].children);
}
};
var tweakParser = function(parser) {
// Move any macro definitions to contain the body tree
tweakMacroDefinition(parser.tree);
};
exports.parseText = function(type,text,options) {
var parser = this.old_parseText(type,text,options);
if(parser) {
tweakParser(parser);
}
return parser;
};
exports.parseTiddler = function(title,options) {
var parser = this.old_parseTiddler(title,options);
if(parser) {
tweakParser(parser);
}
return parser;
};
exports.parseTextReference = function(title,field,index,options) {
var tiddler,text;
if(options.subTiddler) {
@@ -1190,14 +1186,8 @@ fromPageRect: page coordinates of the origin of the navigation
historyTitle: title of history tiddler (defaults to $:/HistoryList)
*/
exports.addToHistory = function(title,fromPageRect,historyTitle) {
historyTitle = historyTitle || "$:/HistoryList";
var titles = $tw.utils.isArray(title) ? title : [title];
// Add a new record to the top of the history stack
var historyList = this.getTiddlerData(historyTitle,[]);
$tw.utils.each(titles,function(title) {
historyList.push({title: title, fromPageRect: fromPageRect});
});
this.setTiddlerData(historyTitle,historyList,{"current-tiddler": titles[titles.length-1]});
var story = new $tw.Story({wiki: this, historyTitle: historyTitle});
story.addToHistory(title,fromPageRect);
};
/*

View File

@@ -0,0 +1,10 @@
title: $:/core/templates/canonical-uri-external-text
<!--
This template is used to assign the ''_canonical_uri'' field to external text files.
Change the `./text/` part to a different base URI. The URI can be relative or absolute.
-->
./text/<$view field="title" format="doubleurlencoded"/>.tid

View File

@@ -1,6 +1,6 @@
title: $:/core/save/all
\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end
{{$:/core/templates/tiddlywiki5.html}}

View File

@@ -0,0 +1,6 @@
title: $:/core/save/lazy-all
\define saveTiddlerFilter()
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end
{{$:/core/templates/tiddlywiki5.html}}

View File

@@ -0,0 +1,27 @@
title: $:/core/ui/AboveStory/tw2-plugin-check
tags: $:/tags/AboveStory
\define lingo-base() $:/language/AboveStory/ClassicPlugin/
<$list filter="[all[system+tiddlers]tag[systemConfig]limit[1]]">
<div class="tc-message-box">
<<lingo Warning>>
<ul>
<$list filter="[all[system+tiddlers]tag[systemConfig]limit[1]]">
<li>
<$link><$view field="title"/></$link>
</li>
</$list>
</ul>
</div>
</$list>

View File

@@ -2,8 +2,7 @@ title: $:/core/ui/AlertTemplate
<div class="tc-alert">
<div class="tc-alert-toolbar">
<$button message="tm-delete-tiddler" class="tc-btn-invisible">
{{$:/core/images/delete-button}}</$button>
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/delete-button}}</$button>
</div>
<div class="tc-alert-subtitle">
<$view field="component"/> - <$view field="modified" format="date" template="0hh:0mm:0ss DD MM YYYY"/> <$reveal type="nomatch" state="!!count" text=""><span class="tc-alert-highlight">(count: <$view field="count"/>)</span></$reveal>

View File

@@ -6,8 +6,8 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
\define install-plugin-button()
<$button>
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion" emptyMessage="""install""">
reinstall
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/Install}}""">
{{$:/language/ControlPanel/Plugins/Reinstall}}
</$list>
</$button>
\end
@@ -65,12 +65,12 @@ This plugin is already installed at version <$text text=<<installedVersion>>/>
\define load-plugin-library-button()
<$button class="tc-btn-big-green">
<$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/>
{{$:/core/images/chevron-right}} open plugin library
{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}
</$button>
\end
\define display-server-assets(type)
Search: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/>
{{$:/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=""/>

View File

@@ -0,0 +1,33 @@
title: $:/core/ui/ControlPanel/Parsing
tags: $:/tags/ControlPanel/Advanced
caption: {{$:/language/ControlPanel/Parsing/Caption}}
\define lingo-base() $:/language/ControlPanel/Parsing/
\define parsing-inner(typeCap)
<li>
<$checkbox tiddler="""$:/config/WikiParserRules/$typeCap$/$(currentTiddler)$""" field="text" checked="enable" unchecked="disable" default="enable"> ''<$text text=<<currentTiddler>>/>'': </$checkbox>
</li>
\end
\define parsing-outer(typeLower,typeCap)
<ul>
<$list filter="[wikiparserrules[$typeLower$]]">
<<parsing-inner typeCap:"$typeCap$">>
</$list>
</ul>
\end
<<lingo Hint>>
! <<lingo Pragma/Caption>>
<<parsing-outer typeLower:"pragma" typeCap:"Pragma">>
! <<lingo Inline/Caption>>
<<parsing-outer typeLower:"inline" typeCap:"Inline">>
! <<lingo Block/Caption>>
<<parsing-outer typeLower:"block" typeCap:"Block">>

View File

@@ -96,9 +96,7 @@ No information provided
</$set>
\end
<$button message="tm-modal" param="$:/core/ui/ControlPanel/Modals/AddPlugins" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class="tc-btn-big-green" style="background:blue;">
{{$:/core/images/download-button}} <<lingo Add/Caption>>
</$button>
{{$:/core/ui/ControlPanel/Plugins/AddPlugins}}
<<lingo Installed/Hint>>

View File

@@ -0,0 +1,7 @@
title: $:/core/ui/ControlPanel/Plugins/AddPlugins
\define lingo-base() $:/language/ControlPanel/Plugins/
<$button message="tm-modal" param="$:/core/ui/ControlPanel/Modals/AddPlugins" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class="tc-btn-big-green" style="background:blue;">
{{$:/core/images/download-button}} <<lingo Add/Caption>>
</$button>

View File

@@ -0,0 +1,8 @@
title: $:/core/ui/ControlPanel/Settings/CamelCase
tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}}
\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/
<<lingo Hint>>
<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" field="text" checked="enable" unchecked="disable" default="enable"> <$link to="$:/config/WikiParserRules/Inline/wikilink"><<lingo Description>></$link> </$checkbox>

View File

@@ -0,0 +1,8 @@
title: $:/core/ui/ControlPanel/Settings/PerformanceInstrumentation
tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}
\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/
<<lingo Hint>>
<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><<lingo Description>></$link> </$checkbox>

View File

@@ -3,18 +3,13 @@ tags: $:/tags/SearchResults
caption: {{$:/language/Search/DefaultResults/Caption}}
\define searchResultList()
<$set name="resultCount" value="""<$count filter="[!is[system]search{$(searchTiddler)$}]"/>""">
{{$:/language/Search/Matches}}
</$set>
//<small>Title matches:</small>//
//<small>{{$:/language/Search/Matches/Title}}</small>//
<$list filter="[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
//<small>All matches:</small>//
//<small>{{$:/language/Search/Matches/All}}</small>//
<$list filter="[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
\end
<<searchResultList>>

View File

@@ -5,8 +5,8 @@ tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl
\end
<div class=<<frame-classes>>>
<$set name="storyTiddler" value=<<currentTiddler>>>
<$keyboard key="escape" message="tm-cancel-tiddler">
<$keyboard key="ctrl+enter" message="tm-save-tiddler">
<$keyboard key={{$:/config/shortcuts/cancel-edit-tiddler}} message="tm-cancel-tiddler">
<$keyboard key={{$:/config/shortcuts/save-tiddler}} message="tm-save-tiddler">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>

View File

@@ -2,18 +2,37 @@ title: $:/core/ui/EditTemplate/shadow
tags: $:/tags/EditTemplate
\define lingo-base() $:/language/EditTemplate/Shadow/
\define pluginLinkBody()
<$link to="""$(pluginTitle)$""">
<$text text="""$(pluginTitle)$"""/>
</$link>
\end
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
<$set name="pluginLink" value=<<pluginLinkBody>>>
<div class="tc-message-box">
<<lingo Warning>>
</div>
</$set>
</$list>
</$list>
<$list filter="[all[current]get[draft.of]is[shadow]is[tiddler]]">
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
<$set name="pluginLink" value=<<pluginLinkBody>>>
<div class="tc-message-box">
<<lingo OverriddenWarning>>
</div>
</$set>
</$list>
</$list>

View File

@@ -1,5 +1,5 @@
title: $:/core/ui/Buttons/delete
tags: $:/tags/EditToolbar
tags: $:/tags/EditToolbar $:/tags/ViewToolbar
caption: {{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}}
description: {{$:/language/Buttons/Delete/Hint}}

View File

@@ -3,11 +3,19 @@ tags: $:/tags/EditToolbar
caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}
description: {{$:/language/Buttons/Save/Hint}}
<$button message="tm-save-tiddler" tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>
<$fieldmangler>
<$button tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
<$action-sendmessage $message="tm-save-tiddler"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/done-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
</$list>
</$button>
</$button>
</$fieldmangler>

View File

@@ -0,0 +1,14 @@
title: $:/core/ui/Buttons/fold-all
tags: $:/tags/PageControls
caption: {{$:/core/images/fold-all-button}} {{$:/language/Buttons/FoldAll/Caption}}
description: {{$:/language/Buttons/FoldAll/Hint}}
<$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-fold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]" variable="listItem">
{{$:/core/images/fold-all-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/FoldAll/Caption}}/></span>
</$list>
</$button>

View File

@@ -0,0 +1,14 @@
title: $:/core/ui/Buttons/unfold-all
tags: $:/tags/PageControls
caption: {{$:/core/images/unfold-all-button}} {{$:/language/Buttons/UnfoldAll/Caption}}
description: {{$:/language/Buttons/UnfoldAll/Hint}}
<$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-unfold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]" variable="listItem">
{{$:/core/images/unfold-all-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/UnfoldAll/Caption}}/></span>
</$list>
</$button>

View File

@@ -5,7 +5,7 @@ tags: $:/tags/PageTemplate
<div class="tc-sidebar-header">
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes" retain="yes">
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes" retain="yes" animate="yes">
<h1 class="tc-site-title">

Some files were not shown because too many files have changed in this diff Show More