1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-02 16:20:23 +00:00

Compare commits

..

900 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
Jermolene
cc4d231942 Version number update for 5.1.9 2015-07-03 16:47:58 +01:00
Jermolene
266eee946c Update readmes 2015-07-03 16:47:39 +01:00
Jermolene
bc076eee27 Docs updates preparing for 5.1.9 release 2015-07-03 16:39:42 +01:00
Jermolene
4754356f5a Add @infurnoape to 5.1.9 contributors 2015-07-03 15:28:30 +01:00
Jeremy Ruston
c47ff42589 Merge pull request #1859 from BramChen/zh
Update zh-Hant and zh-Hans
2015-07-03 10:12:01 +01:00
Jermolene
5f346ff0be Remove unneeded file 2015-07-03 10:00:27 +01:00
Jeremy Ruston
e8348edd8d Merge pull request #1860 from xcazin/fr-FR
fr-FR translation of Fields/Add/Dropdown strings in Edit template
2015-07-03 09:49:18 +01:00
Jeremy Ruston
6bf0bbe160 Merge pull request #1861 from r1chard5mith/patch-4
changed the tag value used in the final example
2015-07-03 09:47:47 +01:00
Xavier Cazin
525e55c7ea Corrections to Encryption strings in fr-FR translation 2015-07-03 10:45:55 +02:00
Richard Smith
f3d915f578 changed the tag value used in the final example
Because "Introduction" is no longer used on Tiddlywiki.com, so the example is a bit confusing
2015-07-03 14:09:59 +10:00
Bram Chen
109eebaaa2 Add chinese translations for ToolbarButtonStyle in $:/ControlPanel Settings tab 2015-07-03 09:29:48 +08:00
Bram Chen
55530e80a8 Merge branch 'master' into zh 2015-07-03 09:08:08 +08:00
Jermolene
3a7e29674b Fix problem with checkbox widget and missing tiddlers
The newly added invertTag code was crashing if the tiddler doesn’t
exist.
2015-07-02 17:33:51 +01:00
Jermolene
8b7aad11c0 Update release notes 2015-07-02 17:33:26 +01:00
Jermolene
35703d846b Release note update 2015-07-02 17:10:28 +01:00
Jermolene
db0d95afcd Style tweaks for toolbar buttons 2015-07-02 16:59:35 +01:00
Xavier Cazin
9061e76670 fr-FR translation of Fields/Add/Dropdown strings in Edit template 2015-07-02 14:12:41 +02:00
Jermolene
f3b5dc530e First pass at selectable toolbar button styles
There’s not much to making the toolbar button styles switchable: the
change to the PageTemplate introduces a new configuration tiddler that
controls the button styling. Most of this commit is the user interface
for changing that setting, including the translatable text. I think
this again demonstrates that we need to be very selective about which
configuration options have a UI included in the core. Otherwise, a few
dozen more of these settings will start to become a significant
fraction of the core.
2015-07-02 08:57:06 +01:00
Bram Chen
a4e7ac9b2e Add chinese translations of Fields/Add/Dropdown 2015-07-02 09:35:28 +08:00
Jermolene
68564eaeff Update release note 2015-07-01 15:59:43 +01:00
Jermolene
31ebbb2d7d Add translatable strings for type dropdown 2015-07-01 15:58:49 +01:00
Jeremy Ruston
062aa03c5a Merge pull request #1849 from Infurnoape/master
Update fields.tid
2015-07-01 15:40:25 +01:00
Jeremy Ruston
755404958e Merge pull request #1858 from BramChen/zh
Update zh-Hant and zh-Hans
2015-07-01 14:27:03 +01:00
Bram Chen
ba188b70f5 Add chinese translations of TagManager/Count/Heading 2015-07-01 19:44:36 +08:00
Jeremy Ruston
908bb87505 Merge pull request #1857 from sukima/feature/move-tag-count-to-tag-manager
Move tag counts to TagManager
2015-07-01 09:24:32 +01:00
Jermolene
497a7ebf81 Revert e2d4e41e96
There were unintended sideeffects on the toolbar dropdown menus
2015-07-01 09:24:12 +01:00
Jermolene
8ada96eaa8 Add additional contributors
5.1.9 is shaping up to have an unusually large number of contributors.
I can’t thank everyone enough; it’s a source of great pride that
TiddlyWiki is sufficiently good that other people are prepared to help
me work on it.
2015-07-01 09:24:12 +01:00
Devin Weaver
7057c6252e Fix bad table rendering with info button
When the info button in the TagManager was press it revealed the info
table but it was squished in one cell and that pushed the right side of
the table past the width of the tiddler. So using a colspan optimises
the spacing (plus it looks better).
2015-06-30 23:59:23 -04:00
Devin Weaver
98a1ee1a8d Add untagged to TagManager
Used for stats and easy access to the untagged pill
2015-06-30 23:56:16 -04:00
Devin Weaver
7d348b3733 Move counts to TagManager 2015-06-30 23:56:02 -04:00
Jeremy Ruston
533c8eec7a Merge pull request #1851 from slovuj/patch-1
Wrong macro name in example description
2015-06-30 22:30:29 +01:00
Jeremy Ruston
ac2e6fff7e Merge pull request #1855 from slovuj/patch-2
Update cla-individual.md
2015-06-30 22:28:41 +01:00
Slo
03a216d756 Update cla-individual.md 2015-06-30 23:20:06 +02: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
Jermolene
15c76d997e Docs updates 2015-06-30 22:01:06 +01:00
Jermolene
e2d4e41e96 Update font size of text toolbar buttons 2015-06-30 18:58:13 +01:00
Jermolene
7318805077 Update release notes 2015-06-30 18:25:47 +01:00
Jeremy Ruston
1376eaa40a Merge pull request #1847 from marcor/master
Italian update
2015-06-30 18:25:06 +01:00
Jeremy Ruston
d4dc1a2441 Merge pull request #1848 from felixhayashi/improvement/docs
improved docs
2015-06-30 18:16:27 +01:00
Jermolene
8438be5256 Update docs 2015-06-30 17:56:23 +01:00
Jeremy Ruston
c2ca1d3ed4 Merge pull request #1850 from nameanyone/master
Add publishFilter to tiddlyweb save-offline
2015-06-30 17:53:34 +01:00
Slo
5b20255749 Wrong macro name in example description
The \define pragma below defines a macro called tags.
should be:
The \define pragma below defines a macro called tags-of-current-tiddler.
2015-06-30 11:01:49 +02:00
nameanyone
8ce3f9983f Update save-offline.tid 2015-06-29 14:31:33 -07:00
Jermolene
5f3587c38c Update to KaTeX 0.4.3 2015-06-29 21:07:26 +01:00
Andrew J Harrison
7ad15bc248 Update fields.tid
Add a new field drop down
2015-06-29 10:45:41 -07:00
Felix Hayashi
f69d1270ad improved docs
* Updated tiddlymap website
* Improved GitHub description
2015-06-28 13:43:11 +02:00
marcor
841f1b392c Yet another signature 2015-06-26 22:59:59 +02:00
Jermolene
bc885027c3 Updated Dutch translation 2015-06-26 16:31:11 +01:00
Jermolene
63f802efda Rename checkbox "invert" attribute to "invertTag"
And update docs
2015-06-26 10:18:15 +01:00
Jeremy Ruston
22d35bf989 Merge pull request #1846 from welford/xobkcehc
add invert parameter to checkbox plugin
2015-06-26 10:08:41 +01:00
marcor
cc59d445a2 Italian update 2015-06-26 00:15:44 +02:00
James Welford Anderson
379181ded5 add invert parameter to checkbox plugin
for when you want a tag to denote the lack of a check rather than the
presence of one.
2015-06-26 05:10:13 +09:00
Jeremy Ruston
f3c066ff48 Merge pull request #1837 from sukima/feature/multi-tiddler-file-syntax
Add a syntax specification to MultiTiddlerFiles
2015-06-25 17:33:15 +01:00
Jeremy Ruston
f74828f76d Merge pull request #1838 from sukima/patch-1
Add GitFixUm community example
2015-06-25 17:01:47 +01:00
Jeremy Ruston
1d94eac76e Merge pull request #1844 from sukima/feature/sjcl-tiddler
Add Stanford JavaScript Crypto Library tiddler
2015-06-25 14:28:04 +01:00
Jeremy Ruston
7050a8d8cf Merge pull request #1841 from xcazin/fredmv
Additions to the fr-FR edition by @idoine, slightly amended by @xcazin
2015-06-25 11:47:05 +01:00
Devin Weaver
b33c9625fb Add Stanford JavaScript Crypto Library tiddler 2015-06-24 19:56:26 -04:00
Xavier Cazin
3918286221 Replace occurrences of *tiddler ombre* by *tiddler shadow* in fr-FR edition 2015-06-24 15:29:12 +02:00
Xavier Cazin
b1dd1bc93c Additions to the fr-FR edition by @idoine, slightly amended by @xcazin 2015-06-24 12:25:58 +02:00
Jermolene
ff7824af11 Update release note 2015-06-24 09:25:33 +01:00
Jermolene
50c6ce8b73 Improve syslink parsing
Fixes #1767
2015-06-24 09:24:03 +01:00
Jermolene
948b72dc7a Add language icons to tw5.com 2015-06-23 10:49:59 +01:00
Jermolene
f3a66c17a6 Tweak translator docs 2015-06-23 10:49:59 +01:00
Jermolene
53072dd7aa Extended tiddlywiki.files to support tiddler files
Previously, we just read the target file as a block of UTF-8. With this
update, we deserialise the file, allowing us to use file formats like
.tid within the tiddlywiki.files file.
2015-06-23 10:49:59 +01:00
Jermolene
8e12d4cb70 Correct typo 2015-06-23 10:49:58 +01:00
Devin Weaver
162735303b Add GitFixUm community example
Thought this was a unique enough example to be part of the TW5.com site.
2015-06-21 17:49:59 -04:00
Devin Weaver
1ff1390863 Add a syntax specification to MultiTiddlerFiles
Been playing with the railraod plugin and I thought I'd try my hand at
writing some syntax specs for the MultiTiddlerFiles tiddler.
2015-06-21 14:35:55 -04:00
Jeremy Ruston
88c2f5a985 Merge pull request #1820 from idoine/patch-23
New fr_fr "Filter Whitespace.tid"
2015-06-21 13:47:03 +01:00
Jeremy Ruston
a006f44334 Merge pull request #1819 from idoine/patch-22
New fr_fr "Filter Parameter.tid"
2015-06-21 13:46:59 +01:00
Jeremy Ruston
5678605241 Merge pull request #1818 from idoine/patch-21
New fr_fr "Filter Run.tid" & "Filter Step.tid"
2015-06-21 13:46:52 +01:00
Jeremy Ruston
d9240b25fd Merge pull request #1817 from idoine/patch-20
New fr_fr "Filter Expression.tid"
2015-06-21 13:46:47 +01:00
Jeremy Ruston
0fa661f473 Merge pull request #1816 from idoine/patch-19
Upgrade fr FilterOperators.tid
2015-06-21 13:46:43 +01:00
Jeremy Ruston
fb1c7078a7 Merge pull request #1815 from idoine/patch-18
New fr_fr "Filter Syntax.tid"
2015-06-21 13:46:34 +01:00
Jeremy Ruston
145f5d8cc1 Merge pull request #1814 from idoine/patch-17
Upgrade fr Introduction to Filters.tid
2015-06-21 13:46:27 +01:00
Jeremy Ruston
14d3b0ffa8 Merge pull request #1813 from idoine/patch-16
Upgrade fr Filters.tid
2015-06-21 13:46:16 +01:00
Jeremy Ruston
f13b1d0ada Merge pull request #1812 from idoine/patch-15
Add fr TOCMacro Tabbed Ex 2/2 (warning)
2015-06-21 13:46:09 +01:00
Jeremy Ruston
6322c9bef2 Merge pull request #1811 from idoine/patch-14
Upgrade fr TOCMacro Tabbed Ex 1/2 (warning)
2015-06-21 13:45:59 +01:00
Jeremy Ruston
e55db75135 Merge pull request #1810 from idoine/patch-13
Upgrade fr TOCMacro Selective Expandable Example.tid (warning)
2015-06-21 13:40:16 +01:00
Jeremy Ruston
23b7b1120a Merge pull request #1809 from idoine/patch-12
Upgrade fr TOCMacro Sorted Expandable Example.tid (warning)
2015-06-21 13:40:08 +01:00
Jeremy Ruston
8c419eec20 Merge pull request #1808 from idoine/patch-11
Upgrade fr TOCMacro Expandable Example (warning)
2015-06-21 13:40:04 +01:00
Jeremy Ruston
ac79b14ef3 Merge pull request #1807 from idoine/patch-10
Upgrade fr TOCMacro Simple Example.tid (warning)
2015-06-21 13:39:34 +01:00
Jeremy Ruston
f6268f811e Merge pull request #1806 from idoine/patch-9
Usefull translated "T.o.C Macros (Examples)" for the new translated "T.o.C macro"
2015-06-21 13:39:09 +01:00
Jeremy Ruston
e0869271aa Merge pull request #1805 from idoine/patch-6
Corrections for the fr-FR edition
2015-06-21 13:38:59 +01:00
Jeremy Ruston
4c2900c9c3 Merge pull request #1804 from idoine/patch-5
Add New translated "$__CurvedText.tid" to fr
2015-06-21 13:38:48 +01:00
Jeremy Ruston
319d9a71af Merge pull request #1803 from idoine/patch-4
Translated  "Un wiki sur votre BiblioBox" ... to french
2015-06-21 13:38:33 +01:00
Jeremy Ruston
6d35101bf7 Merge pull request #1802 from idoine/patch-3
Extend Glossaire en-GB -> fr-FR with new words
2015-06-21 13:38:24 +01:00
Jeremy Ruston
ddb28681a7 Merge pull request #1765 from idoine/patch-2
l20 "demande de TiddlyFox qui vous demande s'il faut activer"
2015-06-21 13:37:36 +01:00
Marc Viot
8255d0d855 Rename Table-of-Contents Macros (Examples) to Table-of-Contents Macros (Examples).tid 2015-06-21 14:17:15 +02:00
Marc Viot
25683c64da New translated tiddler for fr_fr 2015-06-21 13:12:31 +02:00
Marc Viot
030b032f0d New translated tiddler for fr_fr 2015-06-21 13:06:48 +02:00
Marc Viot
d41563af6e New translated tiddler for fr_fr 2015-06-21 12:49:15 +02:00
Marc Viot
2e9848c169 New translated tiddler for fr_fr 2015-06-21 12:41:29 +02:00
Marc Viot
3d226eca3c New translated tiddler for fr_fr 2015-06-21 12:32:10 +02:00
Marc Viot
cd083a4980 Upgrade fr translation 2015-06-21 12:18:14 +02:00
Marc Viot
2803ed0a23 Add a Translated to french 2015-06-21 12:00:12 +02:00
Marc Viot
f4c630d5f7 Upgrade fr translation 2015-06-21 11:44:58 +02:00
Marc Viot
dc49c4410a Upgrade fr translation 2015-06-21 11:30:25 +02:00
Marc Viot
b1334b7d79 Upgrade fr translation TOCMacro Tabbed Ex 2/2 (warning)
Title was modified. 2 new tiddlers was created. The last one deleted. I just modified one and created this one (Perhaps, i'ts not the good way)
TableOfContentsMacro Tabbed Example => Example Table of Contents: Tabbed External
2015-06-21 11:17:28 +02:00
Marc Viot
5f20f37b15 Upgrade fr translation TOCMacro Tabbed Ex 1/2 (warning)
Title was modified. 2 new tiddlers was created. Here, the first. Just last one deleted (Perhaps, i'ts not the good way)
TableOfContentsMacro Tabbed Example => Example Table of Contents: Tabbed Internal
2015-06-21 11:04:57 +02:00
Marc Viot
e2cd12c6f3 Upgrade fr translation (warning)
Be carefull. Title was modified. A new tiddler was created. The old one deleted. I just modified this one.
TableOfContentsMacro Selective Expandable Example => Example Table of Contents: Selectively Expandable
2015-06-21 10:50:04 +02:00
Marc Viot
d7951cdfe8 Upgrade fr translation (warning)
Title was modified. A new tiddler was created, last tiddler was deleted. I just modified this one (perhaps it's not the good way)
TableOfContentsMacro Sorted Expandable Example => Example Table of Contents: Sorted Expandable
2015-06-21 10:39:05 +02:00
Marc Viot
437bb2e669 Upgrade fr translation (warning)
Be carefull, title was modified. A new tiddler was created, the last one deleted. But I just modified this one (perhaps its not the good way)
"TableOfContentsMacro Expandable Example" => "Example Table of Contents: Expandable"
2015-06-21 10:27:55 +02:00
Marc Viot
2b44189eb5 Upgrade fr translation (warning)
Be carefull, the last title was modified, a new tiddle was created, the last one deleted. 

TableOfContentsMacro Simple Example.tid => Example Table of Contents: Simple

So I just modified this one. Perhaps it's not the good way.
2015-06-21 10:17:22 +02:00
Marc Viot
69d6ec3147 Add usefull for the new translated toc macro 2015-06-21 10:00:55 +02:00
Marc Viot
d545ea6bec Corrections for the fr-FR edition
button "try" => "Essayez"  
button "hide" => "Cachez"
translate .toc-lorem()
2015-06-20 23:18:39 +02:00
Marc Viot
dc1c6ce756 Translate body to fr 2015-06-20 18:54:26 +02:00
Marc Viot
a82f31d831 translate to french 2015-06-20 18:45:41 +02:00
Marc Viot
8e7618ff7c Extend glossary with new words
a few changes :
- "shadow" (eng) to "ombre" (fr) , 
- "brouillon" (fr) to "ébauche" (fr), because "brouillon" often means "dirty"
- "tagging" (eng) to "étiquetage" (fr).
2015-06-20 17:35:39 +02:00
Jermolene
9283dc1de9 Correct filename typo
Thanks @BramChen
2015-06-20 12:56:54 +01:00
Jermolene
98a2afc4d2 Add commit link to release note 2015-06-20 09:33:46 +01:00
Jermolene
f42842f801 Add variable indicating preview region
@felixhayashi does this do the trick for you?
2015-06-20 09:33:11 +01:00
Jermolene
16546a5e2e Rename "configurations" to "platforms"
Because “configurations” was too overloaded with other meanings.
“Platforms” seems like the closest common usage for us
2015-06-20 09:24:14 +01:00
Jermolene
61b705b632 Further Catalan updates 2015-06-19 17:32:45 +01:00
Jermolene
d785d7a1e2 Docs tweak 2015-06-19 17:30:55 +01:00
Jermolene
11421f371c Add hidden settings docs 2015-06-19 17:29:05 +01:00
Jermolene
a89ae45188 Add hidden setting for autofocusing search box
Fixes #1748
2015-06-19 17:28:57 +01:00
Jermolene
46419cff72 Updates to Catalan translation 2015-06-19 16:56:33 +01:00
Jermolene
b31803608b Refactor navigator widget configuration
@felixhayashi sorry I should have realised earlier that it’s worth
doing it this way so that we can have different settings for different
story rivers.
2015-06-19 16:44:20 +01:00
Jermolene
61a722c7fd Docs updates 2015-06-19 16:39:47 +01:00
Jermolene
4a30d8772c Update button widget docs 2015-06-19 12:12:41 +01:00
Jermolene
37eb7cf507 Add an npmignore file
Previously, `npm publish` was ignoring the gitignore file, and
including the `output` folders that were scattered in the editions
folders.

Fixes #1758
2015-06-16 19:18:44 +01:00
Jermolene
3ed5c92361 Remove the tw2 edition
It was used for testing the TW2 build process, but now we can use
https://github.com/tiddlywiki/tiddlywiki.com for that
2015-06-16 19:13:10 +01:00
Jeremy Ruston
7e99bf1255 Merge pull request #1795 from pmario/de-DE
Last minute translations and responsive iframe fix for ff
2015-06-16 09:01:40 +01:00
Jeremy Ruston
39de87a1d4 Merge pull request #1797 from pmario/jack-ascii
First take: Motovun Jack.ascii art
2015-06-16 08:48:23 +01:00
Jermolene
32e6aafd4a Update release note 2015-06-16 08:39:44 +01:00
Jermolene
6e30403eb9 Make the pinstripe a little less subtle 2015-06-16 08:32:40 +01:00
Mario Pietsch
955628a383 First take: Motovun Jack.ascii art 2015-06-15 21:46:06 +02:00
Jermolene
d3ea7e3bb4 Tweaks for Catalan translation 2015-06-15 16:41:43 +01:00
Jermolene
37f5a9f725 Update plugin library versions 2015-06-15 15:42:52 +01:00
Jeremy Ruston
5597110aa6 Merge pull request #1796 from danielo515/patch-9
Added ActionSendMessageWidget
2015-06-15 15:42:04 +01:00
Daniel Rodríguez Rivero
6ed6ed3953 Added ActionSendMessageWidget
Added ActionSendMessageWidget to the list of possible message emiters on edit-tiddler message
2015-06-15 15:46:11 +02:00
Mario Pietsch
de0d9ef186 small text fix 2015-06-15 15:37:47 +02:00
Mario Pietsch
ec3e6f8694 translations and temporary iframe-responsive fix 2015-06-15 15:32:35 +02:00
Jermolene
98f78e50b8 Convert Dropbox macro to naked js file
@sukima - this avoids duplicating the metadata
2015-06-15 10:07:19 +01:00
Jeremy Ruston
317f92b8a2 Merge pull request #1793 from sukima/feature/dropbox-url
Add ability to auto generate Dropbox URL
2015-06-15 10:02:26 +01:00
Jeremy Ruston
84c45cfc70 Merge pull request #1794 from BramChen/zh
Update chinese translations
2015-06-15 10:02:07 +01:00
Jermolene
9aa9b59284 Include tiddler caption/title in static page titles 2015-06-15 09:54:56 +01:00
Bram Chen
a6297170a2 Add chinese translations of title links setting 2015-06-15 16:36:28 +08:00
Devin Weaver
8bcf38b0ae Add ability to auto generate Dropbox URL
I felt the conversion from the Dropbox share URL to the "secret" URL was
complicated enough to have the tiddler do it for the user. And so I
wrote a widget to do that. The user enters in the shared URL given by
Dropbox and the widget outputs the secret URL that they can copy / paste
with.

See if it is worth having on the TW5.com site.
2015-06-14 19:17:17 -04:00
Jermolene
610b2c3e33 Update release note 2015-06-13 20:37:27 +01:00
Jermolene
b4e5b3b9a0 Add Catalan translation 2015-06-13 20:30:12 +01:00
Jeremy Ruston
a5c49f2a0a Merge pull request #1751 from r1chard5mith/patch-1
Update Variables in WikiText.tid
2015-06-13 18:10:53 +01:00
Jermolene
4a3a5bf1f0 Don't autosave when cancelling an edit
Fixes #1762
2015-06-13 18:08:09 +01:00
Jermolene
2d7a05de98 Coding style tweaks 2015-06-13 18:06:34 +01:00
Jeremy Ruston
e4ea8c0cc2 Merge pull request #1763 from Drakor/fixCMRefresh
CodeMirror plugin now refreshes the tiddler type
2015-06-13 18:05:18 +01:00
Jeremy Ruston
10e75738d4 Merge pull request #1789 from xcazin/fr-FR
fr-FR translation of titles-as-links option in ControlPanel
2015-06-13 17:47:57 +01:00
Jeremy Ruston
ebe0d97914 Merge pull request #1766 from xcazin/fred
Corrections and new tiddlers by Marc Viot for the fr-FR edition
2015-06-13 17:31:37 +01:00
Jeremy Ruston
c589c32eba Merge pull request #1771 from lolole13/patch-1
or -> ou
2015-06-13 17:27:46 +01:00
Jeremy Ruston
b38351a5a5 Merge pull request #1777 from sukima/feature/issue-1776-clarify-edit-text-edge-case
Make EditTextWidget docs clearer
2015-06-13 17:25:44 +01:00
Jeremy Ruston
f54dcc7d11 Merge pull request #1780 from Marxsal/patch-5
Update: How to Apply Custom Styles
2015-06-13 17:12:57 +01:00
Jermolene
c168a79bda Merge branch 'r1chard5mith-patch-2' 2015-06-13 17:11:46 +01:00
Jermolene
3d22b1acc0 Merge branch 'patch-2' of https://github.com/r1chard5mith/TiddlyWiki5 into r1chard5mith-patch-2 2015-06-13 17:11:14 +01:00
Jermolene
8858193cb9 Merge branch 'StevenMcD-patch-2' 2015-06-13 17:09:50 +01:00
Xavier Cazin
b31416acfe fr-FR translation of titles-as-links option in ControlPanel 2015-06-13 18:09:15 +02:00
Jermolene
75e7188d5e Merge branch 'patch-2' of https://github.com/StevenMcD/TiddlyWiki5 into StevenMcD-patch-2 2015-06-13 17:08:35 +01:00
Xavier Cazin
2e06f24d33 Merge remote-tracking branch 'upstream/master' into fred 2015-06-13 17:58:45 +02:00
Jermolene
6f4ec20c47 Merge branch 'master' of https://github.com/lolole13/TiddlyWiki5 2015-06-13 16:48:06 +01:00
Jeremy Ruston
cf9aceecbd Merge pull request #1786 from silvyn/patch-2
sign the CLA
2015-06-13 15:58:36 +01:00
Jermolene
0d5033e2a0 Add title links setting 2015-06-13 15:22:50 +01:00
Jermolene
e3965dcd0c Add info about TiddlyWiki Camp Paris 2015-06-12 11:03:18 +01:00
Jermolene
6d4953a5aa Higher resolution favicon
Annoyingly, I’m still seeing a 16x16 icon on most browsers.
2015-06-10 20:21:47 +01:00
Jermolene
88ce6d0f16 Scale back the warnings on TiddlyDesktop 0.0.4
It seems that the previous wording was still encouraging people to run
0.0.3.
2015-06-10 20:21:22 +01:00
Sylvain Naudin
eadb31a560 Update cla-individual.md 2015-06-10 18:56:01 +02:00
Sylvain Naudin
b3694ec3cb sign the CLA 2015-06-10 18:49:18 +02:00
Marxsal
d18ad1e853 Update: How to Apply Custom Styles
The former instructions didn't explain how class names with special characters could be used in stylesheets. This adds explanation about escaping the % symbol.
2015-06-08 11:11:24 -07:00
Devin Weaver
f7b2e41f3a Make EditTextWidget docs clearer
This is my attempt to make the EditTextWidget clearer. I found it was
confusing and sent me down the wrong path prompting me to open
issue #1776.

Fixes #1776
2015-06-07 12:02:36 -04:00
Lolo le 13
9075a05758 cla singing 2015-06-07 15:46:27 +02:00
Jeremy Ruston
c971c3b22f Merge pull request #1768 from danielo515/patch-8
Add Encrypt Tiddler Plugin to ressources
2015-06-07 13:53:23 +01:00
Jermolene
62846ca745 Fix vertical tabs overflow problem
Fixes #1772 by reverting #1632
2015-06-07 12:51:25 +01:00
Jermolene
aa6326be5c Improve encryption docs 2015-06-07 12:26:11 +01:00
Jermolene
ec2a79ea3b Remove unneeded .java and .class files
Fixes #1775
2015-06-07 12:25:55 +01:00
Lolo le 13
37f8ee1c70 or -> ou
Just a one letter change for my first commit.
2015-06-04 23:14:34 +02:00
Daniel Rodríguez Rivero
4cb4a130ae Add Encrypt Tiddler Plugin to ressources
Encrypt tiddler plugin has its own demonstration wiki. Added as resource to tw.com edition.
2015-06-02 09:03:06 +02:00
Xavier Cazin
e361014b5c Corrections and new tiddlers by Marc Viot for the fr-FR edition 2015-06-01 14:58:21 +02:00
Marc Viot
0f5f961d5d l20 "demande de TiddlyFox qui vous demande s'il faut activer" => "demande de TiddlyFox d'activer" 2015-06-01 09:03:51 +02:00
Jermolene
ee2be63e31 Add @twMat's TWaddle to community resources 2015-05-29 09:48:02 +01:00
Andreas Hahn
d8366cc45f CodeMirror plugin now refreshes the tiddler type 2015-05-28 14:24:04 +02:00
Jermolene
fdbde1b389 Tweak contrast themes 2015-05-28 09:47:42 +01:00
Jeremy Ruston
483253798d Merge pull request #1760 from kixam/master
Communicate on the revival of vis.js Timeline plugin
2015-05-28 09:46:40 +01:00
Aurélien Correia
e195aea2c8 Sign the license agreement 2015-05-27 20:09:32 +02:00
Aurélien Correia
76c5ea5f6f Communicate on the revival of vis.js Timeline plugin 2015-05-27 12:32:55 +02:00
r1chard5mith
7a3ef3d9aa Update cla-individual.md
Added @richardwsmith
2015-05-22 19:43:15 +10:00
Jermolene
19fe567784 Update release note 2015-05-22 09:05:25 +01:00
Jermolene
1c72e77106 Add warning if required client-server plugins are missing 2015-05-22 09:05:25 +01:00
Jermolene
cf0671f97f Docs folder adjustments 2015-05-22 09:05:25 +01:00
Jermolene
74f3055b9c Add tooltips to image gallery demo 2015-05-22 09:05:25 +01:00
r1chard5mith
0e6517edd4 Update Variables in WikiText.tid
swapped `$(name$)` for `$(name)$` in line 12
2015-05-22 10:24:39 +10:00
Steven McDonald
b29e140119 Update cla-individual.md
Added my name to the CLA
2015-05-21 08:10:41 +02:00
Jeremy Ruston
8a999ea745 Merge pull request #1706 from buggyj/zoomin_nav
fix for issue -  Story freezing in zooming mode #1704
2015-05-18 22:39:55 +01:00
Jermolene
3e1b84064a Improved fix for illegal field name problem
Better fix for the problem identified in 9b4b9d4
2015-05-18 22:16:04 +01:00
Jermolene
9b4b9d4d88 Update sendmessage widget to allow name/value parameters
Using `$name` and `$value` attributes allows more flexibility in how
parameter names are specified, allowing parameter names that are not
valid attribute names.
2015-05-18 22:15:23 +01:00
Jermolene
ccd0b30b5c Add "SolarFlare" palette
Created by @nameanyone
2015-05-18 20:48:52 +01:00
Jermolene
5a6249894d Fix problem with field names containing special characters
The characters `> / ' " =` were causing problems.

Thanks @ericshulman
2015-05-18 19:29:10 +01:00
Jermolene
16ebdff1cc Clarify TextReference documentation
Prompted by this comment:

https://github.com/Jermolene/TiddlyWiki5/pull/1721#issuecomment-10217516
5
2015-05-18 19:07:14 +01:00
Jermolene
230f40c3bd Fix static banner on mobile
Fixes #1736
2015-05-18 18:48:36 +01:00
Jeremy Ruston
420eaa1c88 Merge pull request #1745 from pmario/improve-german-docs
Improve german docs
2015-05-18 17:52:36 +01:00
Jermolene
09debe56c1 Clarify use of "slider" terminology
Fixes #1735
2015-05-18 17:34:03 +01:00
Jermolene
57cfa95b83 Add "powered by" plugin to release note 2015-05-18 17:33:28 +01:00
Mario Pietsch
668286ae2e fix umlauts in filename 2015-05-18 17:01:07 +02:00
Mario Pietsch
405cec3fe1 Adopted the new Layout for the landing page. A bit more info 2015-05-18 16:53:58 +02:00
Jermolene
c11e1bb929 Add simple "powered by TiddlyWiki" plugin 2015-05-14 17:04:20 +01:00
Jermolene
6942efa628 Add styling for <kbd> elements 2015-05-14 10:16:33 +01:00
Jeremy Ruston
188f29df92 Merge pull request #1711 from xcazin/fr-FR
fr-FR translation of recent changes in core interface
2015-05-14 10:05:54 +01:00
Mario Pietsch
b3ee75b7c3 removed some files 2015-05-14 01:58:40 +02:00
Mario Pietsch
cd15dadbb9 first run 2015-05-14 01:56:00 +02:00
Jermolene
ecdcfe41ac Fix problem with #1723
Restoring operation of the “default” attribute
2015-05-14 00:07:53 +01:00
Jermolene
f88402b195 Don't set colour of SVG elements
Instead set the default colour on the body element so that it will be
inherited
2015-05-13 23:59:55 +01:00
Jeremy Ruston
1a09a38f66 Merge pull request #1729 from pmario/fix-thumbnail-icon-css
fix youtube icon cut of in FF win.
2015-05-13 23:55:54 +01:00
Jeremy Ruston
bdd2c3256f Merge pull request #1730 from pmario/german-translation
german UI translations
2015-05-13 23:55:26 +01:00
Jermolene
648f670bcb Tweaked icons 2015-05-13 23:55:00 +01:00
Jermolene
637aaca2fc Add pinstripe pattern
Useful for window backgrounds
2015-05-13 23:55:00 +01:00
Jermolene
81e4d43a25 Debug hooks for tracing tiddler deletions 2015-05-13 23:55:00 +01:00
Jeremy Ruston
f899f33a4a Merge pull request #1731 from pmario/fix-palette-chooser-styling
fix palette switcher popup overflow
2015-05-13 23:54:38 +01:00
Mario Pietsch
e8ab4a9687 fix palette switcher popup overflow 2015-05-13 13:26:11 +02:00
Mario Pietsch
47600584a2 german UI translations 2015-05-13 10:54:01 +02:00
Mario Pietsch
79caa56ae1 fix youtube icon cut of in FF win. also see: 28050fb488 (commitcomment-11170096) 2015-05-13 09:22:52 +02:00
Jeremy Ruston
363004ad60 Merge pull request #1712 from heroboy/patch-4
Update my real name
2015-05-12 18:13:07 +01:00
Jeremy Ruston
aa959912c0 Merge pull request #1728 from Jermolene/revert-1718-patch-5
Revert "Added a close library butten to add plugins modal"
2015-05-12 17:36:40 +01:00
Jeremy Ruston
9935902b92 Revert "Added a close library butten to add plugins modal" 2015-05-12 17:36:27 +01:00
Jeremy Ruston
2d65488e06 Merge pull request #1718 from inmysocks/patch-5
Added a close library butten to add plugins modal
2015-05-12 17:25:21 +01:00
Jeremy Ruston
04d293b9b1 Merge pull request #1721 from nameanyone/master
RevealWidget state can be a text reference
2015-05-12 13:09:43 +01:00
Jermolene
97ae0cd4f0 Remove CodeMirror plugin from default client-server editions
Fixes #1716
2015-05-12 12:52:37 +01:00
Jeremy Ruston
142770c248 Merge pull request #1720 from pmario/fix-thumbnail-icon-css
fix HelloThere video link icon for FF
2015-05-12 11:22:21 +01:00
Jeremy Ruston
f0206283cf Merge pull request #1723 from cehmke/fix-buttonwidget-textreference-selected
Use of getTextRefence in ButtonWidget.isSelected
2015-05-12 11:20:47 +01:00
Jeremy Ruston
cf3b63c13c Merge pull request #1724 from cehmke/select-refresh-children-first
SelectWidget: Update selected value if children have been refreshed
2015-05-12 11:20:06 +01:00
Jeremy Ruston
b55ec38bd8 Merge pull request #1722 from cehmke/patch-1
Added @cehmke to cla-individual.md
2015-05-12 11:19:45 +01:00
Jermolene
eb1bce2ff2 Switch to fluid-fixed just for the prerelease edition
Fixes #1719
2015-05-11 22:04:31 +01:00
Jermolene
af1096f6fc Adjust zoomin tiddler width for narrow screens
Fixes #1725

@felixhayashi could you verify that this works for you?
2015-05-11 20:57:02 +01:00
Jermolene
a961a40ece Prerelease tweaks 2015-05-11 20:16:15 +01:00
Jermolene
a98c042f33 Refactor prerelease greeting tiddler 2015-05-11 20:15:55 +01:00
Jermolene
b5ad255d0c Allow drafts typing timeout to be configured 2015-05-11 20:15:42 +01:00
cehmke
4d3103ff25 Update selected value if children have been refreshed
If the children have been refreshed, it is necessary to check, whether
the value of the select box has been changed.
2015-05-10 19:32:38 +02:00
Christian Ehmke
652abed3f6 Added @cehmke to cla-individual.md 2015-05-10 13:45:11 +02:00
cehmke
b8addaa520 use of getTextRefence in isSelected
Instead of a particular implementation make use of the overall function
getTextReference to determine the current value.
Add a missing semicolon.
2015-05-10 13:26:00 +02:00
nameanyone
29db528d74 RevealWidget state can be a text reference 2015-05-10 03:58:09 -07:00
Mario Pietsch
b070bd6bde fix HelloThere video link icon for FF 2015-05-10 10:25:37 +02:00
jed
ad4cd7326a Added a close library butten to add plugins modal
The button deletes the local tiddlers that contain information about the library. This allows you to:

*hide the library contents
*reload the library to see any updates to the plugins it contains. If this isn't done than local information about the available plugins is never updated (this problem may need a separate fix that doesn't require reloading the library).

I have three problems that should be addressed:

*I am not sure that the location and color of the close library button is appropriate
*When you click on the close library button a message asking you if you want to delete the $:/temp/ServerConnection/(url) tiddler appears, if you click 'cancel' than the library is shown as open and empty, the only way to fix this condition is to delete the server connection tiddler manually. I think there is a simple fix to this but I can't think of anything.
*Sometimes if you try to open a library that you have just closed it won't open properly. The tiddlers that contain the plugin information are created, but the server connection tiddler isn't created until you reload the wiki. This behavior is inconsistent and sometimes opening the library again works with no problems. I do not know why. I would be fine with requiring a refresh before a library could be reopened so that the startup module acts, but I am not sure what to do about this inconsistent behaivor. I have not been able to find any cause.
2015-05-08 18:24:10 -06:00
heroboy
aced47414c Update my name 2015-05-08 20:03:58 +08:00
Xavier Cazin
9ea02da8be fr-FR translation of recent changes in core interface. 2015-05-08 12:30:21 +02:00
Jermolene
42a3e31b1b Tweaks to #1678 2015-05-07 19:44:08 +01:00
Jeremy Ruston
e93d32cdd7 Merge pull request #1678 from felixhayashi/feature/vars_widget
Introducing the vars widget
2015-05-07 19:36:25 +01:00
Jermolene
e9a1a53922 Better error checking for reading field lists
This change ensures that lines starting with a colon are ignored,
allowing them to be used as comments.
2015-05-07 19:24:58 +01:00
Jeremy Ruston
3644462a80 Merge pull request #1693 from vouko/patch-4
Typo
2015-05-07 19:04:22 +01:00
Jeremy Ruston
f8dd5bd52f Merge pull request #1692 from vouko/patch-3
Update cla-individual.md
2015-05-07 19:02:15 +01:00
Jeremy Ruston
bb80f25527 Merge pull request #1703 from BramChen/zh
Update chinese translations
2015-05-07 18:55:08 +01:00
Jermolene
f87e74f131 Tweak palette icon 2015-05-07 18:54:56 +01:00
Jermolene
65a3a89746 Size single tiddler window content to fit 2015-05-06 18:09:22 +01:00
Bram Chen
11d9631ea4 Fix wording 2015-05-06 22:59:36 +08:00
Jermolene
61b75be94c Add "navigateFromTitle" to action-sendmessage
Fixes #1665
2015-05-06 08:14:26 +01:00
Jermolene
86e901f375 Fix event handler leak for modals and notifications
Also add support for passing custom variables into notifications.

Fixes #1694
2015-05-06 08:07:12 +01:00
buggyj
45e0f09ade fix multiply displayed tiddlers zoomin error 2015-05-06 07:42:55 +01:00
Bram Chen
35341d4e97 Add chinese translations of palette page control button 2015-05-06 09:53:14 +08:00
Jermolene
03f3b1fdb4 Fix tiddler filename 2015-05-05 21:53:45 +01:00
Jeremy Ruston
e0eb5186e6 Merge pull request #1702 from nameanyone/master
Transclusion and Substitution - fixed the link
2015-05-05 21:53:03 +01:00
Jermolene
97fd1330d6 Disable wikilinks within tab buttons
Thanks to @BramChen for the suggestion:
https://github.com/Jermolene/TiddlyWiki5/issues/1697#issuecomment-990092
50
2015-05-05 21:48:48 +01:00
nameanyone
a19452f819 Transclusion and Substitution - fixed the link
The tiddler got renamed a while ago, the link was pointing to non-existent old name.
2015-05-05 13:48:48 -07:00
Jermolene
02acbb1169 Hide palette page control button by default 2015-05-05 21:47:47 +01:00
Jermolene
cad5917eeb Request scrollbars in external windows 2015-05-05 21:47:37 +01:00
Jermolene
789069bb6b Add palette page control button 2015-05-05 18:53:35 +01:00
Jeremy Ruston
0fa806e202 Merge pull request #1701 from BramChen/zh
Update chinese translations
2015-05-05 15:09:49 +01:00
Bram Chen
8f372ff959 Add chinese translations of new Settings/LinkToBehaviour 2015-05-05 22:01:08 +08:00
Bram Chen
5afe8a7a0b Add chinese translations of "open new window" button 2015-05-05 21:41:34 +08:00
Bram Chen
6968be563e Merge remote-tracking branch 'upstream/master' 2015-05-05 15:58:58 +08:00
Jermolene
98a8df0ace Improve SVG curved text docs 2015-05-05 07:38:00 +01:00
Jermolene
dc980a19c8 Make the stacked view play well with the new fluid-fixed mode 2015-05-05 07:24:14 +01:00
Bram Chen
c64f6d3dd3 Merge remote-tracking branch 'upstream/master' 2015-05-05 07:39:23 +08:00
Jermolene
5528906a6b Fixes for zoomin storyview and fluid-fixed mode 2015-05-04 21:35:11 +01:00
Jermolene
1e2514f0a8 Default to fluid-fixed for the prerelease
Maybe we should change the default for tiddlywiki.com, but let’s hear
some views on that.
2015-05-04 21:34:42 +01:00
Jeremy Ruston
7adca1fd83 Merge pull request #1684 from nameanyone/master
Close outermost div element
2015-05-04 21:07:17 +01:00
Jeremy Ruston
99ea341ae1 Merge pull request #1685 from roma0104/issue1434
Added text notifying users of issue #1434
2015-05-04 20:59:48 +01:00
Jeremy Ruston
be3c41249b Merge pull request #1686 from BramChen/master
Update chinese translations
2015-05-04 20:51:59 +01:00
Jermolene
a79e7a1c57 Tweaks for #1662
Coding style and ui copy
2015-05-04 20:29:00 +01:00
Jeremy Ruston
4656a7e8f6 Merge pull request #1662 from felixhayashi/feature/navigator_widget
upgrading the navigator widget
2015-05-04 20:21:38 +01:00
Jermolene
b51603f3e2 Introduce fluid story/fixed sidebar mode
A new mode where the sidebar width is fixed and the story river expands
to fill the remaining space.
2015-05-04 19:19:40 +01:00
Jermolene
ef971bb521 Correct tiddler background colour
Bitmap backgrounds won’t get overridden unless we override the entire
background property.
2015-05-03 17:05:34 +01:00
Jermolene
403a460002 Check for dom node not found 2015-05-03 16:56:37 +01:00
Jermolene
0932c15e5c Clarify rendering parameters
srcDocument.body.firstChild will in fact be null, but it’s clearer to
write it out
2015-05-03 16:56:27 +01:00
Jermolene
3f26492ac8 Close subwindows when closing main window 2015-05-03 16:24:02 +01:00
Jermolene
48dcf959ff Refactor browser unload task handling
Make it possible to register multiple task functions that will be
called when the window is unloaded
2015-05-03 16:23:35 +01:00
Bram Chen
be0f82c280 Merge remote-tracking branch 'upstream/master' 2015-05-03 22:11:49 +08:00
Jermolene
d23f174d01 Add a margin for single tiddler windows 2015-05-03 15:05:26 +01:00
Jermolene
fdeb8a925f Introduce template for single tiddler windows
Lets us include global macros etc.
2015-05-03 14:58:33 +01:00
Felix Hayashi
9693f97b16 upgrading the navigator widget
Motivation / Agenda

* https://github.com/Jermolene/TiddlyWiki5/issues/1651
* https://github.com/Jermolene/TiddlyWiki5/issues/1650

Summary

* Changed the NavigatorWidget (primarily `addToStory()`)
* Applied lingo to settings
* Applied lingo to selectbox options
2015-05-03 13:24:16 +02:00
Bram Chen
945de74494 Merge remote-tracking branch 'upstream/master' 2015-05-03 19:15:09 +08:00
Jermolene
41d5031279 Position and hide the open-window button 2015-05-03 08:49:49 +01:00
Jermolene
ec567f67d3 Set title of external window 2015-05-03 08:49:37 +01:00
Bram Chen
dc9d9d05b4 Merge remote-tracking branch 'upstream/master' 2015-05-03 07:35:55 +08:00
Jermolene
8708f817fa Improve garbage collection of external windows
Now we remove event listeners when a window is closed
2015-05-02 17:22:53 +01:00
Jermolene
7866f9b2de Typo
Typically for JavaScript, initialising an object as an array doesn’t
break anything because an array is an object. Anyhow, it should be an
object in this case.
2015-05-02 17:22:23 +01:00
Bram Chen
8040e6338c Merge remote-tracking branch 'upstream/master' 2015-05-02 20:34:57 +08:00
Jermolene
7667225840 Docs update 2015-05-02 12:13:01 +01:00
Jermolene
9cf5d88cc9 Add "open new window" tiddler toolbar button 2015-05-02 12:12:51 +01:00
Jermolene
52529f9b32 Contrast palette tweaks 2015-05-02 12:12:31 +01:00
Vouko
e0ec325afa Update SetWidget.tid 2015-05-02 10:56:24 +02:00
Vouko
a12100457d Update cla-individual.md 2015-05-02 10:55:49 +02:00
Jermolene
7b4153f87f No longer autofocus the search box in the plugin library
It messes things up in iOS, and perhaps other browsers too
2015-04-30 17:45:22 +01:00
Jermolene
825f0f4e2b Docs updates 2015-04-30 16:44:49 +01:00
Jermolene
e16453acbc Docs update 2015-04-30 16:22:39 +01:00
Jermolene
3b78ebb9c0 Typos 2015-04-30 11:30:32 +01:00
Jermolene
94817911c3 Typo 2015-04-30 09:06:21 +01:00
Jermolene
6f7d80a2ac Missed off last commit 2015-04-29 22:24:46 +01:00
Jermolene
3e166f5fe9 Palette tweaks
Making it easier to tweak the two colours in the monochrome palettes
2015-04-29 22:24:36 +01:00
Jermolene
f270788f33 Typo 2015-04-29 22:15:52 +01:00
Jermolene
70a2019d85 Add new feature demos to prerelease 2015-04-29 22:13:06 +01:00
Jermolene
ead208332b Improvement to Contrast palette
Also add a light variant
2015-04-29 22:11:39 +01:00
Bram Chen
dab50c8470 Fix wording 2015-04-28 18:08:02 +08:00
Bram Chen
ee4064fbd7 Add chinese transaltions of descriptions for new palette colours 2015-04-28 18:04:16 +08:00
Jermolene
28050fb488 Palette tweaks 2015-04-28 09:12:04 +01:00
Jermolene
ea9f8a4ef1 Use vanilla theme to demo contrast palette
Because the Snow White theme includes gradients and shadows
2015-04-28 09:11:57 +01:00
Jermolene
0e7ae7ce20 Add descriptions for new palette colours 2015-04-28 09:11:26 +01:00
Jermolene
28421038e4 Tweak SVG example for dark palettes 2015-04-28 09:11:11 +01:00
Jermolene
3567e4c2c7 Palette editor: use colour name if description not available 2015-04-28 09:10:57 +01:00
Roma Hicks
5b7a7268d8 Changed structure to use less space. 2015-04-27 21:40:20 -05:00
Roma Hicks
f9c50d9a6d Added text notifying users of issue #1434 2015-04-27 21:31:18 -05:00
nameanyone
29829bb68a Update Latest.tid 2015-04-27 15:24:38 -07:00
nameanyone
8d12028374 Update Latest.tid 2015-04-27 15:23:41 -07:00
Jermolene
1b25d4b51a Improve "Contrast" palette
Trying to make it more useful for visually impaired users - see #1682
2015-04-27 21:46:31 +01:00
Jermolene
16301532bf Add button palette colours
We leave them blank by default so that we get the browser default
button colours
2015-04-27 21:46:07 +01:00
Felix Hayashi
740627795f This widget allows the user to set multiple variables in one go.
It thereby reduces code complexity that would arise when setting
many variables using "<$set>".

```
\define helloworld() Hello world!
<$vars greeting="Hi" me={{!!title}} sentence=<<helloworld>>>
  <<greeting>>! I am <<me>> and I say: <<sentence>>
</$vars>
```

How this Widget differs from the set widget:

 * Variables may be created by using the "key=value" notation
   that you already know from widgets like action-setfield.
 * You cannot specify a fallback ("emptyValue")
 * You cannot use a filter to produce a conditional variable assignement

Original discussion that led to the creation of this widget:
https://github.com/Jermolene/TiddlyWiki5/issues/1610
2015-04-27 17:07:13 +02:00
Jermolene
df84e93283 Add position: relative to scrollable widget
So that popups within the scrollable behave correctly.

Fixes #1679
2015-04-27 13:38:20 +01:00
Jermolene
e518c0e88e Fix typo #1681
Thanks @Ishindri
2015-04-27 13:25:43 +01:00
Jermolene
9f92c086c3 Add TiddlyDesktop releases to tiddlywiki.com
Fixes #1680
2015-04-27 13:19:50 +01:00
Jermolene
07e3a50e66 Missed off previous commit 2015-04-27 13:18:57 +01:00
Jermolene
b06b21222e Add TiddlyDesktop releases to tiddlywiki.com 2015-04-27 13:18:45 +01:00
Jeremy Ruston
edf939f4f1 Merge pull request #1677 from gernert/patch-5
Update SystemTags.tid
2015-04-26 09:55:07 +01:00
gernert
1d4c387113 Update SystemTags.tid
Add missing tags
2015-04-25 20:52:56 +02:00
Jermolene
3c7082e181 Fix contrastcolour typo 2015-04-24 11:13:10 +01:00
Jermolene
2cb1c1d017 Update copyright year 2015-04-24 11:13:10 +01:00
Jeremy Ruston
69e1e5a2aa Merge pull request #1659 from heroboy/patch-2
fix Simplified Chinese
2015-04-21 22:19:02 +01:00
Jeremy Ruston
cc0fc2b392 Merge pull request #1658 from heroboy/patch-1
fix Simplified Chinese
2015-04-21 22:18:47 +01:00
Jeremy Ruston
dd9f3a6ae0 Merge pull request #1667 from heroboy/patch-3
Update cla-individual.md
2015-04-21 22:18:20 +01:00
Jeremy Ruston
734d815c9d Merge pull request #1668 from BramChen/master
Improve chinese editions
2015-04-21 22:18:00 +01:00
Jermolene
75a33f5dff Fix problem with "foreground"/"background" palette colours using <<colour>> macro
See discussion here:

https://groups.google.com/d/topic/tiddlywiki/XDlO0EydXtY/discussion
2015-04-21 22:07:16 +01:00
Jermolene
a3ed82b703 Update dutch translation 2015-04-21 19:30:02 +01:00
Jermolene
139496209f Add support for custom elements to the button widget 2015-04-21 19:29:54 +01:00
Jermolene
bc6713007f TiddlySpot docs update 2015-04-21 19:29:44 +01:00
Jermolene
8776c3c7e5 Preparing for 5.1.9 2015-04-21 19:29:36 +01:00
Bram Chen
485de75ffc Add download-empty for chinese editions 2015-04-20 11:39:08 +08:00
Bram Chen
b798743b3e Improve metadata of chinese editions 2015-04-20 11:21:50 +08:00
heroboy
c5f1f4101e Update cla-individual.md 2015-04-19 19:30:58 +08:00
heroboy
0babda5120 fix Simplified Chinese
`缺失` is better in Simplified Chinese
2015-04-13 23:31:16 +08:00
heroboy
8203c7df5e fix Simplified Chinese
`缺失` is better than `佚失` in Simplified Chinese.
2015-04-13 23:26:30 +08:00
1909 changed files with 27331 additions and 185610 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/

5
.npmignore Normal file
View File

@@ -0,0 +1,5 @@
.DS_Store
.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

@@ -1,3 +1,3 @@
<h1 class=''>Script Files</h1><p>The <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> repository contains several scripts in the <code>bin</code> folder that you can use to automate common tasks, or as a useful starting point for your own scripts. See <a class='tc-tiddlylink tc-tiddlylink-missing' href='http://tiddlywiki.com/static/Scripts%2520for%2520building%2520tiddlywiki.com.html'>Scripts for building tiddlywiki.com</a> for details of the scripts used to build and release <a class='tc-tiddlylink-external' href='http://tiddlywiki.com/' target='_blank'>http://tiddlywiki.com/</a>.</p><p>All the scripts expect to be run from the root folder of the repository.</p><h2 class=''><code>serve</code>: serves tw5.com</h2><pre><code>./bin/serve.sh -h
<h1 class="">Script Files</h1><p>The <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki5.html">TiddlyWiki5</a> repository contains several scripts in the <code>bin</code> folder that you can use to automate common tasks, or as a useful starting point for your own scripts. See <a class="tc-tiddlylink tc-tiddlylink-missing" href="http://tiddlywiki.com/static/Scripts%2520for%2520building%2520tiddlywiki.com.html">Scripts for building tiddlywiki.com</a> for details of the scripts used to build and release <a class="tc-tiddlylink-external" href="http://tiddlywiki.com/" target="_blank">http://tiddlywiki.com/</a>.</p><p>All the scripts expect to be run from the root folder of the repository.</p><h2 class=""><code>serve</code>: serves tw5.com</h2><pre><code>./bin/serve.sh -h
./bin/serve.sh [edition dir] [username] [password] [host] [port]</code></pre><p>Or:</p><pre><code>./bin/serve.cmd -h
./bin/serve.cmd [edition dir] [username] [password] [host] [port]</code></pre><p>This script starts <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> running as an HTTP server, defaulting to the content from the <code>tw5.com-server</code> edition. By default, the Node.js serves on port 8080. If the optional <code>username</code> parameter is provided, it is used for signing edits. If the <code>password</code> is provided then HTTP basic authentication is used. Run the script with the <code>-h</code> parameter to see online help.</p><p>To experiment with this configuration, run the script and then visit <code>http://127.0.0.1:8080</code> in a browser.</p><p>Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).</p><h2 class=''><code>test</code>: build and run tests</h2><p>This script runs the <code>test</code> edition of <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> on the server to perform the server-side tests and to build <code>test.html</code> for running the tests in the browser.</p><h2 class=''><code>lazy</code>: serves tw5.com with lazily loaded images</h2><pre><code>./bin/lazy.sh &lt;username&gt; [&lt;password&gt;]</code></pre><p>Or:</p><pre><code>./bin/lazy.cmd &lt;username&gt; [&lt;password&gt;]</code></pre><p>This script serves the <code>tw5.com-server</code> edition content with <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/LazyLoading.html'>LazyLoading</a> applied to images.</p><h2 class=''><code>2bld</code>: builds <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> 2.6.5</h2><p>This script builds <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> 2.6.5 from the original source and then displays the differences between them (<code>diff</code> is used for *nix, <code>fc</code> for Windows).</p>
./bin/serve.cmd [edition dir] [username] [password] [host] [port]</code></pre><p>This script starts <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki5.html">TiddlyWiki5</a> running as an HTTP server, defaulting to the content from the <code>tw5.com-server</code> edition. By default, the Node.js serves on port 8080. If the optional <code>username</code> parameter is provided, it is used for signing edits. If the <code>password</code> is provided then HTTP basic authentication is used. Run the script with the <code>-h</code> parameter to see online help.</p><p>To experiment with this configuration, run the script and then visit <code>http://127.0.0.1:8080</code> in a browser.</p><p>Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).</p><h2 class=""><code>test</code>: build and run tests</h2><p>This script runs the <code>test</code> edition of <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on the server to perform the server-side tests and to build <code>test.html</code> for running the tests in the browser.</p><h2 class=""><code>lazy</code>: serves tw5.com with lazily loaded images</h2><pre><code>./bin/lazy.sh &lt;username&gt; [&lt;password&gt;]</code></pre><p>Or:</p><pre><code>./bin/lazy.cmd &lt;username&gt; [&lt;password&gt;]</code></pre><p>This script serves the <code>tw5.com-server</code> edition content with <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/LazyLoading.html">LazyLoading</a> applied to images.</p><h2 class=""><code>2bld</code>: builds <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> 2.6.5</h2><p>This script builds <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> 2.6.5 from the original source and then displays the differences between them (<code>diff</code> is used for *nix, <code>fc</code> for Windows).</p>

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) {
@@ -294,7 +294,9 @@ $tw.utils.parseFields = function(text,fields) {
if(p !== -1) {
var field = line.substr(0, p).trim(),
value = line.substr(p+1).trim();
fields[field] = value;
if(field) {
fields[field] = value;
}
}
}
});
@@ -588,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;
@@ -881,10 +883,14 @@ $tw.Wiki = function(options) {
// Delete a tiddler
this.deleteTiddler = function(title) {
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
// Uncomment the following line for detailed logs of all tiddler deletions
// console.log("Deleting",title,tiddler)
if($tw.utils.hop(tiddlers,title)) {
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
}
};
// Get a tiddler from the store
@@ -906,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);
}
};
@@ -918,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);
}
@@ -926,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);
@@ -939,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 {
@@ -947,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);
}
@@ -1063,6 +1085,8 @@ $tw.Wiki = function(options) {
});
}
});
this.clearCache(null);
this.clearGlobalCache();
};
};
@@ -1375,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 {
@@ -1441,18 +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 typeInfo = $tw.config.contentTypeInfo[tidInfo.fields.type || "text/plain"],
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");
if(tidInfo.prefix) {
text = tidInfo.prefix + text;
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) {
text = tidInfo.prefix + text;
}
if(tidInfo.suffix) {
text = text + tidInfo.suffix;
}
tidInfo.fields.text = text;
tiddlers.push({tiddlers: [tidInfo.fields]});
}
if(tidInfo.suffix) {
text = text + tidInfo.suffix;
});
// 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));
}
tidInfo.fields.text = text;
tiddlers.push({tiddlers: [tidInfo.fields]});
});
} else {
// If not, read all the files in the directory
@@ -1738,7 +1781,8 @@ $tw.boot.startup = function(options) {
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
},
log: {} // Log flags
log: {}, // Log flags
unloadTasks: []
});
if(!$tw.boot.tasks.readBrowserTiddlers) {
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
@@ -1760,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);
@@ -1787,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"]);
@@ -1797,12 +1842,30 @@ $tw.boot.startup = function(options) {
// Install the tiddler deserializer modules
$tw.Wiki.tiddlerDeserializerModules = Object.create(null);
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
// Call unload handlers in the browser
if($tw.browser) {
window.onbeforeunload = function(event) {
event = event || {};
var result;
$tw.utils.each($tw.unloadTasks,function(task) {
var r = task(event);
if(r) {
result = r;
}
});
return result;
}
}
// Load tiddlers
if($tw.boot.tasks.readBrowserTiddlers) {
$tw.loadTiddlersBrowser();
} 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);
@@ -1833,6 +1896,15 @@ $tw.boot.startup = function(options) {
$tw.boot.executeNextStartupTask();
};
/*
Add another unload task
*/
$tw.addUnloadTask = function(task) {
if($tw.unloadTasks.indexOf(task) === -1) {
$tw.unloadTasks.push(task);
}
}
/*
Execute the remaining eligible startup tasks
*/

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

@@ -1,4 +1,4 @@
<h1 class=''>Contributing to <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a></h1><p>We welcome contributions to the code and documentation of <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> in several ways:</p><ul><li><a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/ReportingBugs.html'>ReportingBugs</a></li><li>Helping to <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/Improving%2520TiddlyWiki%2520Documentation.html'>improve our documentation</a></li><li>Contributing to the code via <a class='tc-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5' target='_blank'>GitHub</a><ul><li>See <a class='tc-tiddlylink-external' href='http://tiddlywiki.com/dev' target='_blank'>http://tiddlywiki.com/dev</a> for more details</li></ul></li></ul><p>There are other ways to <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/HelpingTiddlyWiki.html'>help TiddlyWiki</a> too.</p><h1 class=''>Contributor License Agreement</h1><p>Like other <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/OpenSource.html'>OpenSource</a> projects, <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> needs a signed contributor license agreement from individual contributors. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the <a class='tc-tiddlylink tc-tiddlylink-missing' href='http://tiddlywiki.com/static/UnaMesa.html'>UnaMesa</a> Association (the legal entity that owns <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> on behalf of the community).</p><ul><li>For individuals use: <a class='tc-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md' target='_blank'>licenses/CLA-individual</a></li><li>For entities use: <a class='tc-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md' target='_blank'>licenses/CLA-entity</a></li></ul><h1 class=''>How to sign the CLA</h1><p>Create a <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/GitHub.html'>GitHub</a> pull request to add your name to <code>cla-individual.md</code> or <code>cla-entity.md</code>, with the date in the format (YYYY/MM/DD).</p><p><strong>step by step</strong></p><ol><li>click <a class='tc-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md' target='_blank'>licenses/CLA-individual</a> or <a class='tc-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md' target='_blank'>licenses/CLA-entity</a></li><li>in <code>cla-individual.md</code> or <code>cla-entity.md</code> click icon on the top-right corner (clicking this button will fork the project so you can edit the file)</li><li>add your name at the bottom</li></ol><p>eg: <code>Jeremy Ruston, @Jermolene, 2011/11/22</code></p><hr><p><em>The CLA documents used for this project were created using <a class='tc-tiddlylink-external' href='http://www.harmonyagreements.org' target='_blank'>Harmony Project Templates</a>. &quot;HA-CLA-I-LIST Version 1.0&quot; for &quot;CLA-individual&quot; and &quot;HA-CLA-E-LIST Version 1.0&quot; for &quot;CLA-entity&quot;.</em></p><p>Remarks
<h1 class="">Contributing to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki5.html">TiddlyWiki5</a></h1><p>We welcome contributions to the code and documentation of <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> in several ways:</p><ul><li><a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/ReportingBugs.html">ReportingBugs</a></li><li>Helping to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/Improving%2520TiddlyWiki%2520Documentation.html">improve our documentation</a></li><li>Contributing to the code via <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" target="_blank">GitHub</a><ul><li>See <a class="tc-tiddlylink-external" href="http://tiddlywiki.com/dev" target="_blank">http://tiddlywiki.com/dev</a> for more details</li></ul></li></ul><p>There are other ways to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/HelpingTiddlyWiki.html">help TiddlyWiki</a> too.</p><h1 class="">Contributor License Agreement</h1><p>Like other <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/OpenSource.html">OpenSource</a> projects, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki5.html">TiddlyWiki5</a> needs a signed contributor license agreement from individual contributors. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the <a class="tc-tiddlylink tc-tiddlylink-missing" href="http://tiddlywiki.com/static/UnaMesa.html">UnaMesa</a> Association (the legal entity that owns <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on behalf of the community).</p><ul><li>For individuals use: <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md" target="_blank">licenses/CLA-individual</a></li><li>For entities use: <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md" target="_blank">licenses/CLA-entity</a></li></ul><h1 class="">How to sign the CLA</h1><p>Create a <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/GitHub.html">GitHub</a> pull request to add your name to <code>cla-individual.md</code> or <code>cla-entity.md</code>, with the date in the format (YYYY/MM/DD).</p><p><strong>step by step</strong></p><ol><li>Navigate to <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md" target="_blank">licenses/CLA-individual</a> or <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md" target="_blank">licenses/CLA-entity</a> according to whether you are signing as an individual or representative of an organisation</li><li>Click the edit button at the top-right corner (clicking this button will fork the project so you can edit the file)</li><li>Add your name at the bottom<ul><li>eg: <code>Jeremy Ruston, @Jermolene, 2011/11/22</code></li></ul></li><li>Below the edit box for the CLA text you should see a box labelled <strong>Propose file change</strong></li><li>Enter a brief title to explain the change (eg, &quot;Signing the CLA&quot;)</li><li>Click the green button labelled <strong>Propose file change</strong></li><li>On the following screen, click the green button labelled <strong>Create pull request</strong></li></ol><hr><p><em>The CLA documents used for this project were created using <a class="tc-tiddlylink-external" href="http://www.harmonyagreements.org" target="_blank">Harmony Project Templates</a>. &quot;HA-CLA-I-LIST Version 1.0&quot; for &quot;CLA-individual&quot; and &quot;HA-CLA-E-LIST Version 1.0&quot; for &quot;CLA-entity&quot;.</em></p><p>Remarks
----—</p><ul><li><ul><li>When not owning the copyright in the entire work of authorship**</li></ul></li></ul><p>In this case, please clearly state so, since otherwise we assume that you are the legal copyright holder of the contributed work! Please provide links and additional information that clarify under which license the rest of the code is distributed.
</p><p><em>This file was automatically generated by <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a></em>
</p><p><em>This file was automatically generated by <a class="tc-tiddlylink tc-tiddlylink-resolves" href="http://tiddlywiki.com/static/TiddlyWiki5.html">TiddlyWiki5</a></em>
</p>

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-2014
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>

View File

@@ -0,0 +1,9 @@
title: $:/core/images/open-window
tags: $:/tags/Image
<svg class="tc-image-open-window tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M16,112 L104.993898,112 C108.863261,112 112,115.590712 112,120 C112,124.418278 108.858091,128 104.993898,128 L7.00610161,128 C3.13673853,128 0,124.409288 0,120 C0,119.998364 4.30952878e-07,119.996727 1.29273572e-06,119.995091 C4.89579306e-07,119.993456 0,119.99182 0,119.990183 L0,24.0098166 C0,19.586117 3.59071231,16 8,16 C12.418278,16 16,19.5838751 16,24.0098166 L16,112 Z"></path>
<path d="M96,43.1959595 L96,56 C96,60.418278 99.581722,64 104,64 C108.418278,64 112,60.418278 112,56 L112,24 C112,19.5907123 108.415101,16 103.992903,16 L72.0070969,16 C67.5881712,16 64,19.581722 64,24 C64,28.4092877 67.5848994,32 72.0070969,32 L84.5685425,32 L48.2698369,68.2987056 C45.1421332,71.4264093 45.1434327,76.4904296 48.267627,79.614624 C51.3854642,82.7324612 56.4581306,82.7378289 59.5835454,79.6124141 L96,43.1959595 Z M32,7.9992458 C32,3.58138434 35.5881049,0 39.9992458,0 L120.000754,0 C124.418616,0 128,3.5881049 128,7.9992458 L128,88.0007542 C128,92.4186157 124.411895,96 120.000754,96 L39.9992458,96 C35.5813843,96 32,92.4118951 32,88.0007542 L32,7.9992458 Z"></path>
</g>
</svg>

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

@@ -0,0 +1,8 @@
title: $:/core/images/palette
tags: $:/tags/Image
<svg class="tc-image-palette tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M80.2470434,39.1821571 C75.0645698,38.2680897 69.6261555,37.7814854 64.0193999,37.7814854 C28.6624616,37.7814854 0,57.1324214 0,81.0030106 C0,90.644534 4.67604329,99.5487133 12.5805659,106.738252 C23.5031767,91.1899067 26.3405471,72.3946229 36.8885698,63.5622337 C52.0716764,50.8486559 63.4268694,55.7343343 63.4268694,55.7343343 L80.2470434,39.1821571 Z M106.781666,48.8370714 C119.830962,56.749628 128.0388,68.229191 128.0388,81.0030106 C128.0388,90.3534932 128.557501,98.4142085 116.165191,106.082518 C105.367708,112.763955 112.341384,99.546808 104.321443,95.1851533 C96.3015017,90.8234987 84.3749007,96.492742 86.1084305,103.091059 C89.3087234,115.272303 105.529892,114.54645 92.4224435,119.748569 C79.3149955,124.950687 74.2201582,124.224536 64.0193999,124.224536 C56.1979176,124.224536 48.7040365,123.277578 41.7755684,121.544216 C51.620343,117.347916 69.6563669,109.006202 75.129737,102.088562 C82.7876655,92.4099199 87.3713218,80.0000002 83.3235694,72.4837191 C83.1303943,72.1250117 94.5392656,60.81569 106.781666,48.8370714 Z M1.13430476,123.866563 C0.914084026,123.867944 0.693884185,123.868637 0.473712455,123.868637 C33.9526848,108.928928 22.6351223,59.642592 59.2924543,59.6425917 C59.6085574,61.0606542 59.9358353,62.5865065 60.3541977,64.1372318 C34.4465025,59.9707319 36.7873124,112.168427 1.13429588,123.866563 L1.13430476,123.866563 Z M1.84669213,123.859694 C40.7185279,123.354338 79.9985412,101.513051 79.9985401,79.0466836 C70.7284906,79.0466835 65.9257264,75.5670082 63.1833375,71.1051511 C46.585768,64.1019718 32.81846,116.819636 1.84665952,123.859695 L1.84669213,123.859694 Z M67.1980193,59.8524981 C62.748213,63.9666823 72.0838429,76.2846822 78.5155805,71.1700593 C89.8331416,59.8524993 112.468264,37.2173758 123.785825,25.8998146 C135.103386,14.5822535 123.785825,3.26469247 112.468264,14.5822535 C101.150703,25.8998144 78.9500931,48.9868127 67.1980193,59.8524981 Z"></path>
</g>
</svg>

View File

@@ -3,6 +3,6 @@ tags: $:/tags/Image
<svg width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M27.6619958,98.5383065 C27.5690581,98.5388896 27.4761291,98.539182 27.383212,98.539182 C41.5122315,92.2342259 36.7359182,71.4340774 52.2062903,71.4340772 C52.3396942,72.0325374 52.4778143,72.6764878 52.6543744,73.3309353 C41.7206358,71.5725612 42.70852,93.6013809 27.6619958,98.5383065 Z M27.962646,98.5354078 C44.3675979,98.3221342 60.9448114,89.104528 60.944811,79.6231217 C57.0326028,79.6231217 55.0057081,78.1546059 53.8483468,76.2715831 C46.8437297,73.3160546 41.0335584,95.5643154 27.9626323,98.5354081 Z M60.4476718,66.8723739 C57.4632888,63.6421817 54.9582687,60.7541572 53.4305549,58.7453802 C47.3662923,50.7715364 44.307483,54.9700909 40.8462757,58.7453801 C37.3850684,62.5206692 41.7580858,65.5796149 38.4732643,68.2464352 C35.1884428,70.9132556 35.391237,71.8376623 29.8473278,66.9588778 C24.3034186,62.0800933 23.919977,60.7368279 26.4649349,57.9530299 C29.0098928,55.1692318 31.1369568,59.5524845 36.3357237,54.6053302 C41.5344905,49.6581758 37.1673192,45.2736183 37.1673192,45.2736183 C37.1673192,45.2736183 47.9916921,23.1463023 62.4556497,24.7805686 C76.9196074,26.4148348 56.9839048,22.6644011 52.0250205,40.0179431 C49.9018746,47.4478606 52.4201529,45.6971267 56.4460414,48.8353078 C57.8695188,49.9449088 63.120208,53.6842856 69.3136884,58.3372485 C77.8095419,50.1273311 87.3705002,40.8200581 90.1462007,38.0443577 C94.9225135,33.268045 99.6988262,38.0443577 94.9225134,42.8206705 C92.2168565,45.5263274 83.0052228,54.3768782 74.6585455,62.4104777 C84.7196352,70.2010353 95.1107413,79.0341049 95.1107416,82.5307694 C95.1107421,88.9149413 92.3944614,92.7263341 86.6764506,90.6368273 C83.0906414,89.3264812 73.3126471,80.2536547 65.0234105,71.7029822 C62.8994697,73.7599251 61.2357389,75.3821997 60.3189624,76.2989761 C57.6045976,78.4574835 53.6647127,73.2589589 55.5426497,71.5226634 C56.5140946,70.6244887 58.249291,68.9770292 60.4476718,66.8723739 L60.4476718,66.8723739 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z"></path>
<path d="M29.4078519,91.4716406 L51.4693474,69.4101451 L51.4646675,69.4054652 C50.5969502,68.5377479 50.5929779,67.1348725 51.4693474,66.2585029 C52.3396494,65.3882009 53.7499654,65.3874786 54.6163097,66.2538229 L64.0805963,75.7181095 C64.9483136,76.5858268 64.9522859,77.9887022 64.0759163,78.8650718 C63.2056143,79.7353737 61.7952984,79.736096 60.9289541,78.8697517 L60.9242741,78.8650718 L60.9242741,78.8650718 L38.8627786,100.926567 C36.2518727,103.537473 32.0187578,103.537473 29.4078519,100.926567 C26.796946,98.3156614 26.796946,94.0825465 29.4078519,91.4716406 Z M60.8017407,66.3810363 C58.3659178,63.6765806 56.3370667,61.2899536 54.9851735,59.5123615 C48.1295381,50.4979488 44.671561,55.2444054 40.7586738,59.5123614 C36.8457866,63.7803174 41.789473,67.2384487 38.0759896,70.2532832 C34.3625062,73.2681177 34.5917646,74.3131575 28.3243876,68.7977024 C22.0570105,63.2822473 21.6235306,61.7636888 24.5005999,58.6166112 C27.3776691,55.4695337 29.7823103,60.4247912 35.6595047,54.8320442 C41.5366991,49.2392972 36.5996215,44.2825646 36.5996215,44.2825646 C36.5996215,44.2825646 48.8365511,19.267683 65.1880231,21.1152173 C81.5394952,22.9627517 59.0022276,18.7228947 53.3962199,38.3410355 C50.9960082,46.7405407 53.8429162,44.7613399 58.3941742,48.3090467 C59.7875202,49.3951602 64.4244828,52.7100463 70.1884353,56.9943417 L90.8648751,36.3179019 L92.4795866,31.5515482 L100.319802,26.8629752 L103.471444,30.0146174 L98.782871,37.8548326 L94.0165173,39.4695441 L73.7934912,59.6925702 C86.4558549,69.2403631 102.104532,81.8392557 102.104532,86.4016913 C102.104533,93.6189834 99.0337832,97.9277545 92.5695848,95.5655717 C87.8765989,93.8506351 73.8015497,80.3744087 63.8173444,69.668717 L60.9242741,72.5617873 L57.7726319,69.4101451 L60.8017407,66.3810363 L60.8017407,66.3810363 Z M63.9533761,1.42108547e-13 L118.512977,32 L118.512977,96 L63.9533761,128 L9.39377563,96 L9.39377563,32 L63.9533761,1.42108547e-13 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

@@ -3,10 +3,7 @@ tags: $:/tags/Image
<svg class="tc-image-theme-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<g transform="translate(6.762422, 19.968999)">
<path d="M0.824945506,108.186742 C0.664785639,108.187747 0.504640965,108.188251 0.344516735,108.188251 C24.6927592,97.3230528 16.4618388,61.4785938 43.121606,61.4785936 C43.3514982,62.5099075 43.5895175,63.6196137 43.8937798,64.7474092 C25.0518979,61.7172401 26.754298,99.6790423 0.824939051,108.186742 Z M1.34304326,108.181747 C29.613352,107.814217 58.1805158,91.9297101 58.1805151,75.5906019 C51.4386888,75.5906018 47.9457839,73.0599394 45.9513275,69.8149659 C33.880418,64.7217657 23.8678719,103.061726 1.34301955,108.181748 Z"></path>
<path d="M48.871084,61.6312522 C45.6348746,64.6233738 52.4243955,73.581882 57.1020034,69.8621716 C65.3329228,61.631253 108.502656,20.4006304 116.733576,12.169711 C124.964495,3.9387916 116.733576,-4.29212771 108.502656,3.9387916 C100.271737,12.1697108 57.4180113,53.7289683 48.871084,61.6312522 Z"></path>
</g>
<path d="M62.2824054,71.6211067 C57.93733,66.8541323 54.3123948,62.6301561 51.9937779,59.5814279 C41.5433616,45.8402704 36.2721798,53.0755512 30.307554,59.5814276 C24.3429282,66.0873041 31.8788571,71.3587209 26.2181932,75.9543964 C20.5575294,80.5500719 20.9070004,82.1430826 11.3532982,73.7355757 C1.79959591,65.3280689 1.13881905,63.0132479 5.52449152,58.2159872 C9.91016399,53.4187265 13.5756887,60.9722938 22.5346144,52.4469667 C31.4935401,43.9216395 23.9676854,36.3658236 23.9676854,36.3658236 C23.9676854,36.3658236 42.6210998,-1.76571499 67.5465342,1.05058165 C92.4719685,3.8668783 58.1171911,-2.5961653 49.5716499,27.3088291 C45.9128772,40.1126497 50.2525733,37.0956468 57.1903023,42.5036084 C59.4792141,44.2878157 67.5103988,50.0176866 77.2457031,57.2905766 C71.4143155,62.9019825 66.2337717,67.8661661 62.2824054,71.6211067 Z M73.4870997,83.4678852 C87.4278174,97.7290403 103.323635,112.360587 109.285731,114.539289 C119.139459,118.140092 123.820369,111.571999 123.820368,100.570289 C123.820367,94.7414103 107.064445,80.3074425 90.2759123,67.2185217 C83.6390655,73.6178 77.7700759,79.2918373 73.4870997,83.4678852 Z"></path>
<path d="M55.854113,66.9453198 C54.3299482,65.1432292 53.0133883,63.518995 51.9542746,62.1263761 C40.8899947,47.578055 35.3091807,55.2383404 28.9941893,62.1263758 C22.6791979,69.0144112 30.6577916,74.5954741 24.6646171,79.4611023 C18.6714426,84.3267304 19.0414417,86.0133155 8.92654943,77.1119468 C-1.18834284,68.2105781 -1.88793412,65.7597832 2.7553553,60.6807286 C7.39864472,55.601674 11.2794845,63.5989423 20.7646627,54.5728325 C30.2498409,45.5467226 22.2819131,37.5470737 22.2819131,37.5470737 C22.2819131,37.5470737 42.0310399,-2.82433362 68.4206088,0.157393922 C94.8101776,3.13912147 58.4373806,-3.70356506 49.3898693,27.958066 C45.5161782,41.5139906 50.1107906,38.3197672 57.4560458,44.0453955 C59.1625767,45.3756367 63.8839488,48.777453 70.127165,53.3625321 C63.9980513,59.2416709 58.9704753,64.0315459 55.854113,66.9453198 Z M67.4952439,79.8919946 C83.5082212,96.9282402 105.237121,117.617674 112.611591,120.312493 C123.044132,124.12481 128.000001,117.170903 128,105.522947 C127.999999,98.3705516 104.170675,78.980486 84.0760493,63.7529565 C76.6683337,70.9090328 70.7000957,76.7055226 67.4952439,79.8919946 Z"></path>
<path d="M58.2852966,138.232794 L58.2852966,88.3943645 C56.318874,88.3923153 54.7254089,86.7952906 54.7254089,84.8344788 C54.7254089,82.8684071 56.3175932,81.2745911 58.2890859,81.2745911 L79.6408336,81.2745911 C81.608998,81.2745911 83.2045105,82.8724076 83.2045105,84.8344788 C83.2045105,86.7992907 81.614366,88.3923238 79.6446228,88.3943645 L79.6446228,88.3943646 L79.6446228,138.232794 C79.6446228,144.131009 74.8631748,148.912457 68.9649597,148.912457 C63.0667446,148.912457 58.2852966,144.131009 58.2852966,138.232794 Z M65.405072,-14.8423767 L72.5248474,-14.8423767 L76.0847351,-0.690681892 L72.5248474,6.51694947 L72.5248474,81.2745911 L65.405072,81.2745911 L65.405072,6.51694947 L61.8451843,-0.690681892 L65.405072,-14.8423767 Z" transform="translate(68.964960, 67.035040) rotate(45.000000) translate(-68.964960, -67.035040) "></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
@@ -52,6 +64,10 @@ NewJournalHere/Caption: new journal here
NewJournalHere/Hint: Create a new journal tiddler tagged with this one
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
OpenWindow/Caption: open in new window
OpenWindow/Hint: Open tiddler in new window
Palette/Caption: palette
Palette/Hint: Choose the colour palette
Permalink/Caption: permalink
Permalink/Hint: Set browser address bar to a direct link to this tiddler
Permaview/Caption: permaview

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,12 +93,31 @@ 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
Settings/ToolbarButtonStyle/Styles/Boxed: Boxed
Settings/ToolbarButtonStyle/Styles/Rounded: Rounded
Settings/ToolbarButtons/Caption: Toolbar Buttons
Settings/ToolbarButtons/Hint: Default toolbar button appearance:
Settings/ToolbarButtons/Icons/Description: Include icon
Settings/ToolbarButtons/Text/Description: Include text
Settings/DefaultSidebarTab/Caption: Default Sidebar Tab
Settings/DefaultSidebarTab/Hint: Specify which sidebar tab is displayed by default
Settings/LinkToBehaviour/Caption: Tiddler Opening Behaviour
Settings/LinkToBehaviour/InsideRiver/Hint: Navigation from //within// the story river
Settings/LinkToBehaviour/OutsideRiver/Hint: Navigation from //outside// the story river
Settings/LinkToBehaviour/OpenAbove: Open above the current tiddler
Settings/LinkToBehaviour/OpenBelow: Open below the current tiddler
Settings/LinkToBehaviour/OpenAtTop: Open at the top of the story river
Settings/LinkToBehaviour/OpenAtBottom: Open at the bottom of the story river
Settings/TitleLinks/Caption: Tiddler Titles
Settings/TitleLinks/Hint: Optionally display tiddler titles as links
Settings/TitleLinks/No/Description: Do not display tiddler titles as links
Settings/TitleLinks/Yes/Description: Display tiddler titles as links
StoryView/Caption: Story View
StoryView/Prompt: Current view:
Theme/Caption: Theme
@@ -99,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

@@ -6,6 +6,9 @@ alert-highlight: Alert highlight
alert-muted-foreground: Alert muted foreground
background: General background
blockquote-bar: Blockquote bar
button-background: Default button background
button-border: Default button border
button-foreground: Default button foreground
dirty-indicator: Unsaved changes indicator
code-background: Code background
code-border: Code border
@@ -58,6 +61,7 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
sidebar-tab-foreground: Sidebar tab foreground
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
site-title-foreground: Site title foreground
static-alert-foreground: Static alert foreground
tab-background-selected: Tab background for selected tabs
tab-background: Tab background

View File

@@ -11,8 +11,10 @@ Fields/Add/Button: add
Fields/Add/Name/Placeholder: field name
Fields/Add/Prompt: Add a new field:
Fields/Add/Value/Placeholder: field value
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
Fields/Add/Dropdown/System: System fields
Fields/Add/Dropdown/User: User fields
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,14 +19,20 @@ 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
TagManager/Colour/Heading: Colour
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 + ":\"",
@@ -300,6 +300,10 @@ Command.prototype.execute = function() {
this.server.listen(port,host);
console.log("Serving on " + host + ":" + port);
console.log("(press ctrl-C to exit)");
// Warn if required plugins are missing
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

@@ -33,10 +33,20 @@ exports.run = function(target,fallbackTarget,colourA,colourB) {
if(!rgbTarget) {
return colourA;
}
// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast
var rgbColourA = $tw.utils.parseCSSColor(colourA),
rgbColourB = $tw.utils.parseCSSColor(colourB),
brightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,
rgbColourB = $tw.utils.parseCSSColor(colourB);
if(rgbColourA && !rgbColourB) {
return rgbColourA;
}
if(rgbColourB && !rgbColourA) {
return rgbColourB;
}
if(!rgbColourA && !rgbColourB) {
// If neither colour is readable, return a crude inverse of the target
return [255 - rgbTarget[0],255 - rgbTarget[1],255 - rgbTarget[2],rgbTarget[3]];
}
// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast
var brightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,
brightnessA = rgbColourA[0] * 0.299 + rgbColourA[1] * 0.587 + rgbColourA[2] * 0.114,
brightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114;
return Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB;

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 = /~?\$:[^\s<|]+(?:[^\s<|])/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

@@ -75,14 +75,14 @@ function SaverHandler(options) {
}
});
// Set up our beforeunload handler
window.onbeforeunload = function(event) {
$tw.addUnloadTask(function(event) {
var confirmationMessage;
if(self.isDirty()) {
confirmationMessage = $tw.language.getString("UnsavedChangesWarning");
event.returnValue = confirmationMessage; // Gecko
}
return confirmationMessage;
};
});
}
// Install the save action handlers
if($tw.browser) {

View File

@@ -24,6 +24,7 @@ var PAGE_STYLESHEET_TITLE = "$:/core/ui/PageStylesheet";
var PAGE_TEMPLATE_TITLE = "$:/core/ui/PageTemplate";
// Time (in ms) that we defer refreshing changes to draft tiddlers
var DRAFT_TIDDLER_TIMEOUT_TITLE = "$:/config/Drafts/TypingTimeout";
var DRAFT_TIDDLER_TIMEOUT = 400;
exports.startup = function() {
@@ -81,7 +82,11 @@ exports.startup = function() {
}
timerId = null;
if(onlyDraftsHaveChanged) {
timerId = setTimeout(refresh,DRAFT_TIDDLER_TIMEOUT);
var timeout = parseInt($tw.wiki.getTiddlerText(DRAFT_TIDDLER_TIMEOUT_TITLE,""),10);
if(isNaN(timeout)) {
timeout = DRAFT_TIDDLER_TIMEOUT;
}
timerId = setTimeout(refresh,timeout);
$tw.utils.extend(deferredChanges,changes);
} else {
$tw.utils.extend(deferredChanges,changes);

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

@@ -0,0 +1,81 @@
/*\
title: $:/core/modules/startup/windows.js
type: application/javascript
module-type: startup
Setup root widget handlers for the messages concerned with opening external browser windows
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
exports.name = "windows";
exports.platforms = ["browser"];
exports.after = ["startup"];
exports.synchronous = true;
// Global to keep track of open windows (hashmap by title)
var windows = {};
exports.startup = function() {
// Handle open window message
$tw.rootWidget.addEventListener("tm-open-window",function(event) {
// Get the parameters
var refreshHandler,
title = event.param || event.tiddlerTitle,
paramObject = event.paramObject || {},
template = paramObject.template || "$:/core/templates/single.tiddler.window",
width = paramObject.width || "700",
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;
windows[title] = srcWindow;
// Check for reopening the same window
if(srcWindow.haveInitialisedWindow) {
return;
}
// Initialise the document
srcDocument.write("<html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>");
srcDocument.close();
srcDocument.title = title;
srcWindow.addEventListener("beforeunload",function(event) {
delete windows[title];
$tw.wiki.removeEventListener("change",refreshHandler);
},false);
// Set up the styles
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");
styleElement.innerHTML = styleContainer.textContent;
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: variables});
widgetNode.render(srcDocument.body,srcDocument.body.firstChild);
// Function to handle refreshes
refreshHandler = function(changes) {
if(styleWidgetNode.refresh(changes,styleContainer,null)) {
styleElement.innerHTML = styleContainer.textContent;
}
widgetNode.refresh(changes);
};
$tw.wiki.addEventListener("change",refreshHandler);
srcWindow.haveInitialisedWindow = true;
});
// Close open windows when unloading main window
$tw.addUnloadTask(function() {
$tw.utils.each(windows,function(win) {
win.close();
});
});
};
})();

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;
@@ -151,6 +151,11 @@ ZoominListView.prototype.remove = function(widget) {
removeElement();
return;
}
// Abandon if hidden
if(targetElement.style.display != "block" ) {
removeElement();
return;
}
// Set up the tiddler that is being closed
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
@@ -203,4 +208,4 @@ ZoominListView.prototype.remove = function(widget) {
exports.zoomin = ZoominListView;
})();
})();

View File

@@ -39,14 +39,14 @@ function Syncer(options) {
// Browser event handlers
if($tw.browser) {
// Set up our beforeunload handler
window.onbeforeunload = function(event) {
$tw.addUnloadTask(function(event) {
var confirmationMessage;
if(self.isDirty()) {
confirmationMessage = $tw.language.getString("UnsavedChangesWarning");
event.returnValue = confirmationMessage; // Gecko
}
return confirmationMessage;
};
});
// Listen out for login/logout/refresh events in the browser
$tw.rootWidget.addEventListener("tm-login",function() {
self.handleLoginEvent();

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

@@ -29,6 +29,7 @@ Options include:
Modal.prototype.display = function(title,options) {
options = options || {};
var self = this,
refreshHandler,
duration = $tw.utils.getAnimationDuration(),
tiddler = this.wiki.getTiddler(title);
// Don't do anything if the tiddler doesn't exist
@@ -83,9 +84,6 @@ Modal.prototype.display = function(title,options) {
variables: variables
});
headerWidgetNode.render(headerTitle,null);
this.wiki.addEventListener("change",function(changes) {
headerWidgetNode.refresh(changes,modalHeader,null);
});
// Render the body of the message
var bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{
parentWidget: $tw.rootWidget,
@@ -93,9 +91,6 @@ Modal.prototype.display = function(title,options) {
variables: variables
});
bodyWidgetNode.render(modalBody,null);
this.wiki.addEventListener("change",function(changes) {
bodyWidgetNode.refresh(changes,modalBody,null);
});
// Setup the link if present
if(options.downloadLink) {
modalLink.href = options.downloadLink;
@@ -135,11 +130,17 @@ Modal.prototype.display = function(title,options) {
variables: variables
});
footerWidgetNode.render(modalFooterButtons,null);
this.wiki.addEventListener("change",function(changes) {
// Set up the refresh handler
refreshHandler = function(changes) {
headerWidgetNode.refresh(changes,modalHeader,null);
bodyWidgetNode.refresh(changes,modalBody,null);
footerWidgetNode.refresh(changes,modalFooterButtons,null);
});
};
this.wiki.addEventListener("change",refreshHandler);
// Add the close event handler
var closeHandler = function(event) {
// Remove our refresh handler
self.wiki.removeEventListener("change",refreshHandler);
// Decrease the modal count and adjust the body class
self.modalCount--;
self.adjustPageClass();

View File

@@ -27,21 +27,26 @@ Options include:
Notifier.prototype.display = function(title,options) {
options = options || {};
// Create the wrapper divs
var notification = document.createElement("div"),
var self = this,
notification = document.createElement("div"),
tiddler = this.wiki.getTiddler(title),
duration = $tw.utils.getAnimationDuration();
duration = $tw.utils.getAnimationDuration(),
refreshHandler;
// Don't do anything if the tiddler doesn't exist
if(!tiddler) {
return;
}
// Add classes
$tw.utils.addClass(notification,"tc-notification");
// Create the variables
var variables = $tw.utils.extend({currentTiddler: title},options.variables);
// Render the body of the notification
var widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});
var widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document, variables: variables});
widgetNode.render(notification,null);
this.wiki.addEventListener("change",function(changes) {
refreshHandler = function(changes) {
widgetNode.refresh(changes,notification,null);
});
};
this.wiki.addEventListener("change",refreshHandler);
// Set the initial styles for the notification
$tw.utils.setStyle(notification,[
{opacity: "0"},
@@ -60,6 +65,8 @@ Notifier.prototype.display = function(title,options) {
]);
// Set a timer to remove the notification
window.setTimeout(function() {
// Remove our change event handler
self.wiki.removeEventListener("change",refreshHandler);
// Force layout and animate the notification away
$tw.utils.forceLayout(notification);
$tw.utils.setStyle(notification,[

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

@@ -37,6 +37,8 @@ Compute the internal state of the widget
SendMessageWidget.prototype.execute = function() {
this.actionMessage = this.getAttribute("$message");
this.actionParam = this.getAttribute("$param");
this.actionName = this.getAttribute("$name");
this.actionValue = this.getAttribute("$value","");
};
/*
@@ -44,7 +46,7 @@ Refresh the widget by ensuring our attributes are up to date
*/
SendMessageWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes["$message"] || changedAttributes["$param"]) {
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
@@ -66,8 +68,18 @@ SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
count++;
}
});
// Add name/value pair if present
if(this.actionName) {
paramObject[this.actionName] = this.actionValue;
}
// Dispatch the message
this.dispatchEvent({type: this.actionMessage, param: param, paramObject: paramObject, tiddlerTitle: this.getVariable("currentTiddler")});
this.dispatchEvent({
type: this.actionMessage,
param: param,
paramObject: paramObject,
tiddlerTitle: this.getVariable("currentTiddler"),
navigateFromTitle: this.getVariable("storyTiddler")
});
return true; // Action was invoked
};

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

@@ -34,7 +34,11 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
this.computeAttributes();
this.execute();
// Create element
var domNode = this.document.createElement("button");
var tag = "button";
if(this.buttonTag && $tw.config.htmlUnsafeElements.indexOf(this.buttonTag) === -1) {
tag = this.buttonTag;
}
var domNode = this.document.createElement(tag);
// Assign classes
var classes = this["class"].split(" ") || [],
isPoppedUp = this.popup && this.isPoppedUp();
@@ -103,11 +107,10 @@ ButtonWidget.prototype.allowActionPropagation = function() {
ButtonWidget.prototype.getBoundingClientRect = function() {
return this.domNodes[0].getBoundingClientRect();
}
};
ButtonWidget.prototype.isSelected = function() {
var tiddler = this.wiki.getTiddler(this.set);
return tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;
return this.wiki.getTextReference(this.set,this.defaultSetValue,this.getVariable("currentTiddler")) === this.setTo;
};
ButtonWidget.prototype.isPoppedUp = function() {
@@ -162,7 +165,8 @@ ButtonWidget.prototype.execute = function() {
this.tooltip = this.getAttribute("tooltip");
this.style = this.getAttribute("style");
this.selectedClass = this.getAttribute("selectedClass");
this.defaultSetValue = this.getAttribute("default");
this.defaultSetValue = this.getAttribute("default","");
this.buttonTag = this.getAttribute("tag");
// Make child widgets
this.makeChildWidgets();
};

View File

@@ -58,7 +58,11 @@ CheckboxWidget.prototype.getValue = function() {
var tiddler = this.wiki.getTiddler(this.checkboxTitle);
if(tiddler) {
if(this.checkboxTag) {
return tiddler.hasTag(this.checkboxTag);
if(this.checkboxInvertTag) {
return !tiddler.hasTag(this.checkboxTag);
} else {
return tiddler.hasTag(this.checkboxTag);
}
}
if(this.checkboxField) {
var value = tiddler.fields[this.checkboxField] || this.checkboxDefault || "";
@@ -90,15 +94,24 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
tiddler = this.wiki.getTiddler(this.checkboxTitle),
fallbackFields = {text: ""},
newFields = {title: this.checkboxTitle},
hasChanged = false;
hasChanged = false,
tagCheck = false,
hasTag = tiddler && tiddler.hasTag(this.checkboxTag);
if(this.checkboxTag && this.checkboxInvertTag === "yes") {
tagCheck = hasTag === checked;
} else {
tagCheck = hasTag !== checked;
}
// Set the tag if specified
if(this.checkboxTag && (!tiddler || tiddler.hasTag(this.checkboxTag) !== checked)) {
if(this.checkboxTag && (!tiddler || tagCheck)) {
newFields.tags = tiddler ? (tiddler.fields.tags || []).slice(0) : [];
var pos = newFields.tags.indexOf(this.checkboxTag);
if(pos !== -1) {
newFields.tags.splice(pos,1);
}
if(checked) {
if(this.checkboxInvertTag === "yes" && !checked) {
newFields.tags.push(this.checkboxTag);
} else if(this.checkboxInvertTag !== "yes" && checked) {
newFields.tags.push(this.checkboxTag);
}
hasChanged = true;
@@ -112,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()));
}
};
@@ -128,6 +141,7 @@ CheckboxWidget.prototype.execute = function() {
this.checkboxUnchecked = this.getAttribute("unchecked");
this.checkboxDefault = this.getAttribute("default");
this.checkboxClass = this.getAttribute("class","");
this.checkboxInvertTag = this.getAttribute("invertTag","");
// Make the child widgets
this.makeChildWidgets();
};
@@ -137,7 +151,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.field || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes["class"]) {
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes["class"]) {
this.refreshSelf();
return true;
} else {
@@ -152,4 +166,4 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) {
exports.checkbox = CheckboxWidget;
})();
})();

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"}
]);
};
@@ -85,11 +90,6 @@ NavigatorWidget.prototype.saveStoryList = function(storyList) {
));
};
NavigatorWidget.prototype.findTitleInStory = function(storyList,title,defaultIndex) {
var p = storyList.indexOf(title);
return p === -1 ? defaultIndex : p;
};
NavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {
var p = storyList.indexOf(title);
while(p !== -1) {
@@ -115,19 +115,50 @@ NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle
NavigatorWidget.prototype.addToStory = function(title,fromTitle) {
var storyList = this.getStoryList();
if(storyList) {
// See if the tiddler is already there
var slot = this.findTitleInStory(storyList,title,-1);
// If not we need to add it
if(slot === -1) {
// First we try to find the position of the story element we navigated from
slot = this.findTitleInStory(storyList,fromTitle,-1) + 1;
// Add the tiddler
storyList.splice(slot,0,title);
// Save the story
this.saveStoryList(storyList);
// Quit if we cannot get hold of the story list
if(!storyList) {
return;
}
// See if the tiddler is already there
var slot = storyList.indexOf(title);
// 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(fromTitle);
if(fromIndex >= 0) {
// The tiddler is added from inside the river
// Determine where to insert the tiddler; Fallback is "below"
switch(this.getAttribute("openLinkFromInsideRiver","below")) {
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(this.getAttribute("openLinkFromOutsideRiver","top") === "bottom") {
// Insert at bottom
slot = storyList.length;
} else {
// Insert at top
slot = 0;
}
}
// Add the tiddler
storyList.splice(slot,0,title);
// Save the story
this.saveStoryList(storyList);
};
/*
@@ -194,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
@@ -307,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"});
@@ -355,15 +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);
// Trigger an autosave
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
}
}
return false;
@@ -515,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") {
@@ -528,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]);
};
@@ -127,10 +168,11 @@ SelectWidget.prototype.refresh = function(changedTiddlers) {
return true;
// If the target tiddler value has changed, just update setting and refresh the children
} else {
if(changedTiddlers[this.selectTitle]) {
var childrenRefreshed = this.refreshChildren(changedTiddlers);
if(changedTiddlers[this.selectTitle] || childrenRefreshed) {
this.setSelectValue();
}
return this.refreshChildren(changedTiddlers);
return childrenRefreshed;
}
};

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

@@ -0,0 +1,75 @@
/*\
title: $:/core/modules/widgets/vars.js
type: application/javascript
module-type: widget
This widget allows multiple variables to be set in one go:
```
\define helloworld() Hello world!
<$vars greeting="Hi" me={{!!title}} sentence=<<helloworld>>>
<<greeting>>! I am <<me>> and I say: <<sentence>>
</$vars>
```
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var VarsWidget = function(parseTreeNode,options) {
// Call the constructor
Widget.call(this);
// Initialise
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
VarsWidget.prototype = Object.create(Widget.prototype);
/*
Render this widget into the DOM
*/
VarsWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
};
/*
Compute the internal state of the widget
*/
VarsWidget.prototype.execute = function() {
// Parse variables
var self = this;
$tw.utils.each(this.attributes,function(val,key) {
if(key.charAt(0) !== "$") {
self.setVariable(key,val);
}
});
// Construct the child widgets
this.makeChildWidgets();
};
/*
Refresh the widget by ensuring our attributes are up to date
*/
VarsWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports["vars"] = VarsWidget;
})();

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(""));
};
/*
@@ -434,7 +441,9 @@ if(index === -1) {
var grandParent = parent.parentWidget;
if(grandParent && parent.parentDomNode === this.parentDomNode) {
index = grandParent.children.indexOf(parent);
return parent.findNextSiblingDomNode(index);
if(index !== -1) {
return parent.findNextSiblingDomNode(index);
}
}
return null;
};

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));
}
};
@@ -137,7 +144,7 @@ exports.enqueueTiddlerEvent = function(title,isDeleted) {
this.changeCount[title] = 1;
}
// Trigger events
this.eventListeners = this.eventListeners || [];
this.eventListeners = this.eventListeners || {};
if(!this.eventsTriggered) {
var self = this;
$tw.utils.nextTick(function() {
@@ -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

@@ -10,6 +10,9 @@ alert-highlight: #881122
alert-muted-foreground: #b99e2f
background: #ffffff
blockquote-bar: <<colour muted-foreground>>
button-background:
button-foreground:
button-border:
code-background: #f7f7f9
code-border: #e1e1e8
code-foreground: #dd1144

View File

@@ -10,6 +10,9 @@ alert-highlight: #881122
alert-muted-foreground: #b99e2f
background: #fff
blockquote-bar: <<colour muted-foreground>>
button-background:
button-foreground:
button-border:
code-background: #f7f7f9
code-border: #e1e1e8
code-foreground: #dd1144

View File

@@ -10,6 +10,9 @@ alert-highlight: #881122
alert-muted-foreground: #b99e2f
background: #ffffff
blockquote-bar: <<colour muted-foreground>>
button-background:
button-foreground:
button-border:
code-background: #f7f7f9
code-border: #e1e1e8
code-foreground: #dd1144

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