1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-22 10:54:46 +00:00

Compare commits

...

473 Commits

Author SHA1 Message Date
Jermolene
aaec1b2854 Version number update for 5.0.12-beta 2014-05-17 01:17:04 +01:00
Jermolene
9edebc78e7 Tweak ribbon colour for 5.0.12 2014-05-17 01:14:20 +01:00
Jermolene
e228ac42db Fix problem with shadow tiddler iteration
See https://groups.google.com/d/topic/tiddlywiki/pNxZsSCVp7c/discussion
for more details of the bug.
2014-05-17 01:12:08 +01:00
Jermolene
be0bc04929 Fix typo 2014-05-17 01:11:41 +01:00
Jermolene
b415b0e90e Version number update for 5.0.11-beta 2014-05-16 14:55:32 +01:00
Jermolene
974aecba1f Fix build scripts 2014-05-16 14:53:16 +01:00
Jermolene
47fa18c2e0 Docs updates 2014-05-16 14:49:28 +01:00
Jermolene
d5094463f4 Temporarily revoke sorting tests
localeCompare seems to behave differently in the browser and under
Node.js, making it hard to get the tests consistent
2014-05-16 14:46:55 +01:00
Jermolene
5951dc5901 Fix problem with static renderings
The issue was that rendertiddlers always clears the output folder,
which meant that it was overwriting anything previously output by the
rendertiddler command.
2014-05-16 14:39:24 +01:00
Jermolene
1d15e4b7d3 Docs update 2014-05-16 14:37:05 +01:00
Jeremy Ruston
67e66b4698 Merge pull request #610 from BramChen/master
Update chinese translations
2014-05-16 11:24:47 +01:00
Jeremy Ruston
c00940f2d1 Merge pull request #614 from pmario/de-DE
add transcluded lingo :)
2014-05-16 09:22:13 +01:00
Jermolene
81ea326e16 Update release note 2014-05-16 09:22:00 +01:00
Jeremy Ruston
c2f52f8a4b Merge pull request #615 from nameanyone/master
Rename some system tiddlers to be consistent with Naming of System Tiddlers
2014-05-16 09:20:32 +01:00
Jeremy Ruston
ca03984663 Merge pull request #616 from xcazin/fr-FR
fr-FR edits: integration of standard search into 'Advanced Search'.
2014-05-16 09:19:42 +01:00
Jermolene
b2ff248d07 Correct typo 2014-05-16 09:18:43 +01:00
Jermolene
658bd2b8a3 Release note update 2014-05-16 09:18:37 +01:00
Xavier Cazin
a8b16c9c07 fr-FR edits: integration of standard search into 'Advanced Search'. 2014-05-16 09:37:54 +02:00
nameanyone
157ca0c8aa Rename $:/temp/NewFieldName to $:/temp/newfieldname
As per "Naming of System Tiddlers"
2014-05-15 22:54:46 -07:00
nameanyone
01b3962b2c Rename $:/ShowEditPreview to $:/state/showeditpreview
According to "Naming of System Tiddlers"
2014-05-15 22:47:21 -07:00
Bram Chen
19646c7f95 Add chinese translations of standard search 2014-05-16 08:38:13 +08:00
Mario Pietsch
dfb8a07204 add transcluded lingo :) 2014-05-16 00:26:12 +02:00
Jermolene
93566cdc33 Add standard search to advanced search 2014-05-15 23:09:31 +01:00
Jeremy Ruston
ad8a20bfed Merge pull request #613 from pmario/de-DE
update german texts
2014-05-15 22:49:17 +01:00
Jeremy Ruston
00cddd3713 Merge pull request #612 from xcazin/fr-FR
Edits to fr-FR strings to reflect fix in Advanced Search matches count
2014-05-15 22:48:50 +01:00
Mario Pietsch
23c8902e70 update german texts 2014-05-15 22:58:29 +02:00
Xavier Cazin
818fd598dc Edits to fr-FR strings to reflect fix in Advanced Search matches count 2014-05-15 22:37:33 +02:00
Jermolene
31e1088aa7 Clean up startup logging
Now we do boot logging to an array. We harvest it in the —verbose
command. We still need to provide a way to access the log in the
browser too.
2014-05-15 18:50:14 +01:00
Jermolene
f9f8ad725b Fix problem with advanced search counts
Apologies to TiddlyWiki’s translators for disrupting existing work!
2014-05-14 20:12:38 +01:00
Jermolene
81e1af1d35 Tabs appearance tweaks 2014-05-14 19:37:37 +01:00
Jermolene
c9c1b0fbb4 Get rid of the tweakParseTreeNode() hack
It’s an embarrassing hangover from a refactoring of the parsing
mechanism last year.
2014-05-14 08:51:08 +01:00
Bram Chen
f7ce0c0b8d Add chinese translations of Advanced Settings in the ControlPanel 2014-05-14 09:38:45 +08:00
Jermolene
92aa1f24be Fix tab button padding
Lack of padding caused a visual glitch in Firefox
2014-05-13 21:02:21 +01:00
Jermolene
e0a6c4e879 Update release note 2014-05-13 19:38:39 +01:00
Jermolene
f72c177ba5 Fix line height 2014-05-13 18:32:12 +01:00
Jermolene
9a26c4259a Fix problem with widget.getStateQualifier()
Fixed to take into account the recent change to read variables from the
parent widget: e60fc9f81f
2014-05-13 18:16:45 +01:00
Jeremy Ruston
6de6a43623 Merge pull request #609 from xcazin/fr-FR
fr-FR translations for new strings in the Control Panel, plus edits to an older one
2014-05-13 17:33:46 +01:00
Xavier Cazin
2fa3c8a4ed edits to the fr-FR translation for the Edit Template 2014-05-13 17:28:45 +02:00
Xavier Cazin
295094c9a3 fr-FR translation of Advanced Settings in the ControlPanel 2014-05-13 17:27:22 +02:00
Jermolene
da41879fc1 Fix dropdown behaviour in advanced settings 2014-05-13 16:21:01 +01:00
Jermolene
f8708874bc Update reveal widget docs 2014-05-13 14:50:45 +01:00
Jermolene
ad43958571 Make permalink behaviour configurable
In the process introducing a new advanced settings tab

Fixes #600
2014-05-13 14:16:58 +01:00
Jermolene
4e07b3335b Extend .tid files to allow single line text fields
To make it easier to create tiddlers that don’t include a terminating
newline in their text
2014-05-13 10:27:03 +01:00
Jermolene
b77d5f9725 Clean up whitespace 2014-05-13 10:26:02 +01:00
Jermolene
75fee26b58 Fix problem with variables containing an empty string
See
https://github.com/Jermolene/TiddlyWiki5/commit/e60fc9f81f2c8f0d115543d8
d330a1d68f9b890a#commitcomment-6301921
2014-05-13 10:15:55 +01:00
Jermolene
e8c9d78079 Update release note 2014-05-12 15:21:59 +01:00
Jermolene
d972988a53 Remove obsolete filter operators docs
It was overwritten by a later version in editions/tw5.com/filters.
2014-05-12 15:17:16 +01:00
Jermolene
e83759e86d Add "before" and "after" filter operators
Fixes #357 by adding new “before” and “after” filter operators.
2014-05-12 15:16:44 +01:00
Jermolene
2633247492 Use flexbox for vertical tabs
Thus stepping into a new world:

http://caniuse.com/flexbox

The vertical tabs are now completely reusable, with sensible wrapping
behaviour.
2014-05-12 08:41:47 +01:00
Jermolene
b3032d452f Refactor vertical tabs for reusability
In practice, if you look at TabsMacro you’ll see that the width of the
tab content is wrong, and will usually overflow the container. Next
step is to fix that by using flexbox…
2014-05-11 18:47:14 +01:00
Jermolene
e60fc9f81f Fixed problem with widgets variable access
Previously, widgets were reading variables from themselves or their
cascaded ancestors. That means that if a widget sets a variable and
then reads the same variable, it will get the same variable back. That
sounds reasonable, until you consider a widget that wants to modify a
variable - eg the tiddler macro. For example:

```
<$tiddler tiddler={{!!report}}>
<$transclude mode="block" />
</$tiddler>
```

Here we first evaluate the `{{!!report}}` reference, which involves
reading the currentTiddler variable, looking up the tiddler, and
retrieving it’s `report` field. The next the tiddler widget is
refreshed, it will use the newly set currentTiddler as the basis for
resolving the `{{!!reference}}` reference.

The fix is to get variables from ancestors, but continue to set them on
ourselves.
2014-05-08 11:51:02 +01:00
Jermolene
6ab68e0fca Remove erroneous global wiki references
$tw.wiki is used as a global reference in the outer initialisation
modules. It shouldn’t be used in widgets etc.
2014-05-07 14:49:14 +01:00
Jermolene
e548dd35af Restored drag and drop functionality within TEXTAREAs and INPUTs
As mentioned by @Skeeve in #592
2014-05-07 14:32:14 +01:00
Jermolene
8b20143b1b Pass content-type to codemirror mode option for syntax highlight
Fixes #605
2014-05-07 14:09:46 +01:00
Jeremy Ruston
711b76307c Merge pull request #604 from natecain/module_exports
Module exports
2014-05-07 14:05:45 +01:00
Jermolene
b858e9dc69 Fix incorrect filter in shadow $:/DefaultTiddlers
Fixes #606
2014-05-07 13:43:12 +01:00
Jermolene
a9411262f7 Improve TiddlyWiki as a library
1. Make it possible to disable specific boot tasks
2. Extend the startup mechanism to allow startup tasks to be disabled

Again, see Jermolene/TiddlyWiki5NodeWebkit to see how these features
fit together.
2014-05-07 12:51:16 +01:00
Jermolene
e676156b24 Fixes for running TiddlyWiki on node-webkit
See Jermolene/TiddlyWiki5NodeWebkit
2014-05-07 09:59:21 +01:00
natecain
c592e658e7 Fix up codemirror instructions to match new paths in config example 2014-05-06 23:57:10 +02:00
natecain
6b03789e06 Prioritize "module.exports" over "exports" in require sandbox
(Node-ism, inherited (temporarily?) to support codemirror upgrade)
2014-05-06 23:31:57 +02:00
natecain
51f54b06f9 Upgrade codemirror to current master 2014-05-06 23:30:40 +02:00
Jeremy Ruston
285ab41ccf Merge pull request #602 from BramChen/master
Add chinese translation of banner for binary tiddlers in edit mode
2014-05-06 20:15:43 +01:00
Jermolene
854b739a35 Implement explicit external links 2014-05-06 20:05:51 +01:00
Jermolene
abe0ce28b9 Fix typos in docs for image parser 2014-05-06 19:00:34 +01:00
Jermolene
76e8640c31 Fix problem with parsing lists contain non-breaking spaces
Some of the time we need to treat non-breaking spaces as though they
are not spaces (regexps treat them as spaces by default).
2014-05-06 18:10:27 +01:00
Jermolene
cc3d44aec1 Fix problem with list fields containing [[]]
Fixes #603 - thanks @xcazin!

It no longer crashes but unfortunately if you round trip a tiddler out
of edit mode and back you’ll lose any empty double square brackets.
2014-05-06 17:32:12 +01:00
Bram Chen
7b6cff0cca Fix incorrect charset for the previous commit 2014-05-06 17:36:59 +08:00
Jermolene
d1c85f53c0 Update release note 2014-05-06 10:33:08 +01:00
Bram Chen
e2b0da0b58 Add chinese translation of banner for binary tiddlers in edit mode 2014-05-06 17:23:27 +08:00
Jermolene
7c8c5cf745 Fix problem with parsing main UI boot tiddlers
We were parsing the boot tiddlers, making them into a widget and then
refreshing the widget tree. The problem is that subsequent chances to
the boot tiddlers themselves wouldn’t be picked up as part of the
refresh.

Now we indirectly parse those UI boot tiddlers through a transclusion,
which does get refreshed in the desired way.
2014-05-06 10:14:22 +01:00
Jermolene
38c60bd7d4 Fix tag colour 2014-05-05 23:19:49 +01:00
Jermolene
afb92c40fe Tweak ribbon colour for 5.0.11 2014-05-05 23:19:41 +01:00
Jermolene
6b45296ca9 Roadmap and release note updates 2014-05-05 23:19:30 +01:00
Jermolene
b84c663215 Add proper rendering of document title 2014-05-05 23:00:09 +01:00
Jermolene
4e101e240c Suppress history when changing the permalink URL 2014-05-05 21:51:54 +01:00
Jermolene
56251dc1f8 Fixes #598
Ensure we don’t generate permalinks with a target that is not in the
current story
2014-05-05 21:23:29 +01:00
Jermolene
f368175cb0 Remove debugging code 2014-05-05 20:58:47 +01:00
Jeremy Ruston
3e49dd65a0 Merge pull request #594 from xcazin/fr-FR
fr-FR translations for warnings about shadow tiddlers and binary content
2014-05-05 20:57:28 +01:00
Jermolene
f5ada72dac Ensure tag colours are specified in hex 2014-05-05 19:25:49 +01:00
Jermolene
986a20b22b Fixes for permalinks not working on Firefox
Sigh. It’s frustrating that the few browser differences I’m running
into in 2014 are mostly horribly familiar from 2005
2014-05-05 19:21:57 +01:00
Jermolene
ffb6c8ab81 Add hex colours to tag manager
Fixes #597
2014-05-05 18:42:25 +01:00
Jermolene
e58e68fa7c Add Matabele's gTD site 2014-05-05 17:31:52 +01:00
Jermolene
95def8b857 Add startup sequence diagram 2014-05-05 17:06:34 +01:00
Jermolene
b24ec8009d Missing dependency 2014-05-05 17:06:24 +01:00
Jermolene
9965c64b6f More refactoring of startup.js 2014-05-05 15:25:51 +01:00
Jermolene
2a50277219 Fix problem with syncer not being initialised on server 2014-05-05 14:44:32 +01:00
Jermolene
3cce12e13f More refactoring of startup.js 2014-05-05 14:41:46 +01:00
Jermolene
887e9d978b Fix problem with saving if URL contains # 2014-05-05 13:30:31 +01:00
Jermolene
a0022a1cd6 Refactoring more of startup.js into modules 2014-05-05 10:17:50 +01:00
Jermolene
519e1b4a44 Pull more of startup.js out into separate modules 2014-05-03 21:23:51 +01:00
Jermolene
b9dec37fb7 Split main rendering into it's own startup module 2014-05-03 19:50:05 +01:00
Jermolene
09156af475 Add support for "before" field on startup modules 2014-05-03 19:49:50 +01:00
Jermolene
5b5621a600 Fix googleanalytics plugin to be platform-specific 2014-05-03 18:07:20 +01:00
Jermolene
78ba57d55d Remove support for browser-startup modules
Instead support startup modules that stipulate which platform they
require.

Also include docs updates and fixes to fullscreen plugin
2014-05-03 17:49:20 +01:00
Jermolene
749582ede0 Split module loading into a separate startup task
Still a work in progress.
2014-05-03 17:10:55 +01:00
Jermolene
1c82348edb Docs typo 2014-05-03 16:56:29 +01:00
Jermolene
b96aade28a WIP: Add support for dependencies between startup modules
See StartupMechanism for details.
2014-05-03 16:32:18 +01:00
Jermolene
2f32621024 Docs updates 2014-05-03 16:27:22 +01:00
Jermolene
6ccf02ed96 Add support for onhashchange
Now we respond dynamically to changes in the location hash in the URL
bar. It means that you can do links in HTML as `<a
href=“#HelloThere”>go</a>` and in Markdown as `[example
link](#HelloThere).`

We still need to make startup.js more modular
2014-05-03 12:20:28 +01:00
Jermolene
b2c1331c11 Fix oversight in isDraftModified
If the original tiddler doesn’t exist then we should count the draft as
always having been modified
2014-05-03 12:12:07 +01:00
Xavier Cazin
f81df69395 Change references to editions/clientserver into editions/server 2014-05-03 13:10:36 +02:00
Jermolene
a5e9ef9b5f Adopt new URL scheme for permalinks
Instead of using `%00` as a separator we do the more conventional
`#!<target-title>:<story filter>`.
2014-05-03 11:32:55 +01:00
Xavier Cazin
7783378603 fr-FR translations for shadow tiddlers and binary content warnings 2014-05-02 23:00:13 +02:00
Jermolene
327b53a641 Start adding support for permalinks
At this point we respect any permalink at startup, but we don’t yet
dynamically update the permalink, nor do we respond to ongoing
permalink changes.

The permalink separator being `%00` seems like it might be a bit
controversial. It buys us not having to wrap tiddler titles in double
square brackets if they contain spaces.

Another thing is that this scheme doesn’t support tiddler filters; the
plan is to support them like this:

http://tiddlywiki.com/#!Target%00%00[tag[task]sort[created]]
2014-05-02 19:21:32 +01:00
Jermolene
cb914ae853 Remove dead code typo 2014-05-02 18:07:47 +01:00
Jermolene
a4294b55f0 Add banner for binary tiddlers in edit mode
Makes it easier to add tags to a binary tiddler (eg a PDF).
2014-05-02 09:43:39 +01:00
Jermolene
bced7124e4 Accept single quotes for attributes in TW files 2014-05-01 17:58:49 +01:00
Jermolene
f5848c395a Fix problem with editing tiddler titles
The check whether a draft has been modified was ignoring changes to the
title.

Fixes #593
2014-05-01 17:39:37 +01:00
Jermolene
f6bd3b8c37 Optimise the all filter operator
Seems like quite a decent optimisation.
2014-04-30 22:50:47 +01:00
Jermolene
21b2d6fdc7 Allow filter operators to return an iterator
Previously filter operators were only permitted to return an array of
tiddler titles
2014-04-30 22:50:17 +01:00
Jermolene
bd3e955821 Add compound iterators to boot wiki object 2014-04-30 22:49:28 +01:00
Jermolene
fcb26419a6 Clear the tiddler event queue on startup
To avoid an unnecessary refresh cycle
2014-04-30 22:49:02 +01:00
Jermolene
a6f7da6c1c Suppress refresh cycle if no tiddlers have changed 2014-04-30 22:48:36 +01:00
Jeremy Ruston
f82f8ae7c6 Merge pull request #589 from BramChen/master
Add chinese messages for editing/overridden a shadow tiddler
2014-04-29 09:04:44 +01:00
Jermolene
edb8c65d54 Update release note 2014-04-29 09:03:47 +01:00
Jermolene
031c0f4146 Update HelloThere 2014-04-29 09:03:39 +01:00
Bram Chen
e8316cf0ac Add chinese messages for editing/overridden a shadow tiddler 2014-04-29 15:32:19 +08:00
Jermolene
0ac4c2b554 Allow digits in field names 2014-04-28 15:54:32 +01:00
Jermolene
84cd296c58 Minor tweaks to shadow warning infrastructure
1. Moved some methods out of boot.js because they are not needed until
after bootup
2. Added alternate message for editing an overridden shadow tiddler
3. Minor style tweaks
2014-04-28 15:16:31 +01:00
Jeremy Ruston
a90339d1e5 Merge pull request #586 from sukima/feature/issue-570-cancle-unchanged-drafts
Fix issue #570 Make it harder to accidentally modify a shadow tiddler
2014-04-28 13:22:44 +01:00
Jermolene
d49495ab73 Add docs for "field" filter operator
Fixes #588
2014-04-28 12:54:34 +01:00
Jeremy Ruston
5fa6d001f8 Merge pull request #587 from BramChen/master
Update chinese editions
2014-04-28 09:36:32 +01:00
Jermolene
f17dafefcb Docs updates 2014-04-28 09:33:47 +01:00
Bram Chen
88314d968a Add build targets to chinese editions 2014-04-28 16:11:57 +08:00
Bram Chen
28bab707b9 Update chinese translations for Help tiddlers 2014-04-28 16:02:58 +08:00
Devin Weaver
075cf544e4 Use new get filter from commit 570cad1c 2014-04-27 17:15:42 -04:00
Devin Weaver
a505b6ffc0 Move isModified from Tiddler to Wiki
Replace this with a $tw.wiki.isModifiedTiddler(title) as part of the
wiki object. This allows it to be used outside of the current Wiki which
can change.
2014-04-27 17:15:42 -04:00
Devin Weaver
23a71b433e Rename isEqual to isArrayEqual 2014-04-27 17:15:42 -04:00
Devin Weaver
3bbe53a58e Move shadowWarning to it's own template segment 2014-04-27 17:15:42 -04:00
Devin Weaver
8556e0ea49 Fix coding style 2014-04-27 17:15:42 -04:00
Devin Weaver
3be21853e1 Add warning box while editing a shadow tiddler
This addresses the third line item of issue #570

TODO: The filter is not working.
TODO: The message is too genaric and needs help.
2014-04-27 17:15:42 -04:00
Devin Weaver
d0636f2124 Add a confirmation to edit a shadow tiddler
Should only display the confirmation if the shadow tiddler has not been
overridden in the first place. It checks this by looking for the
existence of a modified field for which the default system based shadow
do not have until a user changes them.

This addresses the second line item on issue #570

We will need new translations for the added string
`ConfirmEditShadowTiddler`
2014-04-27 17:15:42 -04:00
Devin Weaver
5226c7a2fa Prevent saving un-modified tiddlers
When saving a tiddler we check to see if the tiddler has changed
(isModified) if it hasn't then bounce the event to tw-cancel-tiddler
instead.

Addresses first line item in issue #570
2014-04-27 17:15:42 -04:00
Devin Weaver
3a78465d2d Add isModified to Tiddler object
Adds a check to see if this tiddler differers from the tiddler
referenced in the draft.of field. It iterates of the fields property
skiping those feilds that offer a false positives. Uses the isEqual util
for the tags array.
2014-04-27 17:15:42 -04:00
Devin Weaver
23640d7af4 Add isDraft to Tiddler object
Check to see if this tiddler is a draft (has a draft.of field)
2014-04-27 17:15:42 -04:00
Devin Weaver
540681b2bc Add $tw.util.isEqual
This checks to see if an array is equal. Should handle case where an
array is considered null or undefined. It short circuits when the
lengths are different and will only loop when needed.
2014-04-27 17:15:42 -04:00
Devin Weaver
8611867930 Remove dead code 💀 2014-04-27 17:15:41 -04:00
Jermolene
77152ac577 Update release note 2014-04-27 21:58:59 +01:00
Jermolene
f5bd99fa73 Fix tests for 385c7e207c 2014-04-27 21:58:41 +01:00
Jermolene
385c7e207c Refactor wiki.filterTiddlers()
Now we pass a widget instead of the current tiddler title. We can use
widget.getVariable(“currentTiddler”) to get the current tiddler.
2014-04-27 20:03:33 +01:00
Jermolene
61c204366f Replace hamburger icon with double chevron
Fixes #580

Seems much better, especially since the chevron gives us two clear
visual states (left vs. right). The hamburger doesn’t really have a
commonly accepted way of indicating whether the menu is currently open
or not.
2014-04-27 19:28:30 +01:00
Jermolene
570cad1c7f Add 'get' filter operator
Prompted by @sukima’s work on #586
2014-04-27 18:45:01 +01:00
Jeremy Ruston
1d0dc60a2d Merge pull request #574 from pekopeko1/japanese
Updated Japanese Translation
2014-04-27 08:47:59 +01:00
Jeremy Ruston
fac0affa7b Merge pull request #584 from xcazin/fr-FR
fr-FR translations for new Help tiddlers + changes to previous ones.
2014-04-27 08:46:59 +01:00
Jeremy Ruston
f57241abbd Merge pull request #585 from BramChen/master
Update chinese translations for Help tiddlers
2014-04-27 08:46:41 +01:00
Jermolene
e9557b578e Improve output directory handling
This change is likely to break most existing scripts that call
TiddlyWiki.

TL;DR - output paths are now relative to the editions/output folder,
rather than to the current folder

See [[Notes for upgrading to 5.0.11-beta]] for details.
2014-04-27 08:28:21 +01:00
Jermolene
649f68288a Add build targets to the core editions 2014-04-26 17:11:56 +01:00
pekopeko1
37c50bae61 merged with latest master 2014-04-27 00:14:41 +09:00
pekopeko1
9ab31e37ea fix plugin.info author 2014-04-26 23:11:31 +09:00
pekopeko1
30707e2f19 revert unnecessary .gitignore change 2014-04-26 23:09:42 +09:00
Bram Chen
1fb76ae56d Fix typo 2014-04-26 20:10:02 +08:00
Bram Chen
4008191459 Update chinese translations for Help tiddlers 2014-04-26 19:52:45 +08:00
Xavier Cazin
463bd0517c fr-FR translation for new Help tiddlers 2014-04-26 11:56:40 +02:00
Xavier Cazin
fb3a31ae43 Typo: Set => Clear 2014-04-26 11:12:59 +02:00
Jermolene
f7e50e0950 Add --build command
First pass at the build system described in #356.

To test it, move to a new, empty directory and try `tiddlywiki
editions/tw5.com --verbose --build`
2014-04-25 22:41:59 +01:00
Jermolene
552657fc58 Fix text parser to use codeblocks
This means that JavaScript and JSON tiddlers will be properly
highlighted if the highlight plugin is loaded.
2014-04-24 19:41:07 +01:00
Jermolene
d727046948 Revise number of tiddlers in recent changes list
Going back to 100; 250 was a typo.
2014-04-24 12:22:31 +01:00
Jermolene
f6ca7d92e5 Fix docs typo
Fixes #575
2014-04-24 11:59:51 +01:00
Jermolene
148e77b0e4 Clean up obsolete macro definition
Fixes #576
2014-04-24 11:58:42 +01:00
Jermolene
cc60ad1428 Fixed topbar hover for Firefox
Pesky Firefox browser crankiness.

Fixes #579
2014-04-24 11:33:14 +01:00
Jermolene
fecf3a556f Update JS macro docs 2014-04-24 11:08:23 +01:00
Jeremy Ruston
39ef0ad88f Merge pull request #581 from mwfogleman/tid-mode
Refer Emacs docs to tid-mode, not tid-time.
2014-04-24 09:01:27 +01:00
Michael Fogleman
f75826224b Refer Emacs docs to tid-mode, not tid-time. 2014-04-24 11:39:37 +05:30
Jeremy Ruston
52f28a1cc3 Merge pull request #578 from sukima/feature/sign-cla-sukima
Add @sukima to cla-individual.md
2014-04-22 15:49:35 +01:00
Jermolene
61c3f8a5ba Remove wikitext tiddlers from "types" sidebar tab 2014-04-22 11:44:27 +01:00
Devin Weaver
13da54b9bd Add @sukima to cla-individual.md 2014-04-21 18:26:04 -04:00
pekopeko1
680414d1c5 edited 'shadow' translation 2014-04-20 23:33:27 +09:00
pekopeko1
2c7d5c5964 merged @ogoshima's translation 2014-04-20 23:24:35 +09:00
Jermolene
3d69c929d9 Add more warnings about backups 2014-04-19 14:42:22 +01:00
Jeremy Ruston
8cbcfee346 Merge pull request #573 from pmario/fix-concepts-tiddlerfields-lingo
Fix "description" column in TiddlerFields
2014-04-19 14:23:06 +01:00
Jermolene
43173c801f Adjust version number for 5.0.11 2014-04-19 14:22:25 +01:00
Mario Pietsch
523faf71fb change modified date 2014-04-19 15:16:12 +02:00
Mario Pietsch
ad2bbb2c93 tiddler: TiddlerFields - fix the description column. 2014-04-19 15:11:20 +02:00
Jermolene
8756d25d78 Version number update for 5.0.10-beta 2014-04-19 14:07:48 +01:00
Jermolene
8a27c2759b Update 5.0.10 release date 2014-04-19 14:06:29 +01:00
Jermolene
beddcd7138 New ribbon colour for 5.0.10 2014-04-19 13:15:24 +01:00
Jermolene
2db90378a2 Release note updates for 5.0.10 2014-04-19 11:34:23 +01:00
Jermolene
7684891285 Move topbar out of the way of scrollbars
In the process getting rid of some extraneous `<p>` tags.

Fixes #566
2014-04-19 11:32:56 +01:00
Jermolene
821f1f1428 Fix hamburger and seamless behaviour
No longer remove the tiddler borders when hiding the sidebar; users can
select Seamless theme to get the same effect.

Fixes #566
2014-04-19 11:24:41 +01:00
Jermolene
4538f081ee Release note updates for 5.0.10 2014-04-19 11:22:59 +01:00
Jermolene
b4122be50c Update release note for 5.0.10 2014-04-19 11:18:08 +01:00
Jermolene
cd76514105 Update roadmap 2014-04-19 09:36:14 +01:00
Jermolene
ba576d9f1b Add support for safe mode 2014-04-19 09:36:08 +01:00
Jermolene
15d0c27e2a Add [is[tag]] filter operator 2014-04-18 17:57:55 +01:00
Jermolene
869cec1ccc Add docs for date format strings 2014-04-18 17:37:13 +01:00
Jermolene
d6054f1039 Fix problem with offline copy of server edition
We were accidentally including all the shadow tiddlers as well as
ordinary ones.
2014-04-18 15:23:00 +01:00
Jermolene
9fbe72a877 Rearrange system tag configuration
By rearranging the `[all[]]` operator we are able to ensure that shadow
tiddlers get processed before ordinary tiddlers. This makes it easier
to create custom stylesheets that override the core.
2014-04-18 09:28:14 +01:00
Jermolene
89165fc51d Fix problem with sorting date fields
Introduced a couple of commits ago when the localeCompare() stuff was
added.
2014-04-17 22:52:57 +01:00
Jermolene
4758874d13 Add path conversions from TiddlyWiki Classic
TiddlyWiki Classic converts local file URIs to various local native
formats. The same conversions are now performed by the TiddlyFox
adaptor for TW5.
2014-04-17 22:30:14 +01:00
Jermolene
0153fd2a30 Correct typos in 5.0.9 release note 2014-04-17 20:26:35 +01:00
Jermolene
bb42c0ab36 Use localCompare for sorting strings
So that accented characters get sorted correctly. Or at least as
correctly as browsers allow.
2014-04-17 20:15:52 +01:00
Jermolene
95d291daac Update print stylesheet to hide topbar 2014-04-17 19:50:12 +01:00
Jermolene
45b0966013 Support the image widget in markdown 2014-04-17 16:50:54 +01:00
Jermolene
de07da3797 Revise warning about backing up before upgrading 2014-04-17 16:26:57 +01:00
Jeremy Ruston
aebc1ea943 Merge pull request #562 from pmario/upgrade-backup-info
add a backup info for the Upgrade tiddler.
2014-04-17 16:24:57 +01:00
Jermolene
73cfd10218 Fix regression with untagged filter operator
Restored previous behaviour of considering a missing tiddler to be
untagged.
2014-04-17 16:10:50 +01:00
Jermolene
d336ffea02 Fix incorrect background colour for sidebar tag pills
Fixes #568.
2014-04-17 15:11:59 +01:00
Jermolene
6da28e7365 Docs update 2014-04-17 14:44:14 +01:00
Jermolene
d08a2d109f Fix html parser tests 2014-04-17 14:43:24 +01:00
Jermolene
f57e047877 Fix issues with tiddlers with null fields
Fixing #567
2014-04-17 14:43:12 +01:00
Jermolene
df5fe10a40 Start release note for 5.0.10 2014-04-17 12:52:52 +01:00
Jermolene
433ac8e96e Typo fix 2014-04-17 12:52:38 +01:00
Jermolene
ad4b03506a Added wikitext image support
We’ve added a parser to recognise the `[img[URL or tiddler title]]`
format, and an associated image widget.
2014-04-17 12:52:32 +01:00
Jermolene
ace57dd205 Refactor utilities out of HTML parser
Some of the functions are useful general purpose parser helpers.
2014-04-17 12:00:32 +01:00
Jermolene
bd4a031df8 Fix problem with version checking logic
Previously, importing a plugin with a semantically identical version
number was not rejected. This meant that attempts to import
5.0.9-prerelease wikis into 5.0.9-beta led to a corrupted wiki, with a
beta core and prerelease plugins.
2014-04-17 11:59:42 +01:00
Jermolene
6db94052c7 Prepare for 5.0.10 release 2014-04-17 11:58:16 +01:00
Mario Pietsch
dd8797223a add a backup info for the Upgrade tiddler. 2014-04-16 01:09:26 +02:00
Jermolene
e54b0d7129 Docs fixes 2014-04-15 21:50:36 +01:00
Jermolene
07ab8c75b8 Docs fixes 2014-04-15 21:48:19 +01:00
Jermolene
0a6077286f Version number update for 5.0.9-beta 2014-04-15 21:43:51 +01:00
Jermolene
634e76eb7f Update release date for 5.0.9 2014-04-15 21:39:46 +01:00
Jermolene
cd1463cbb0 Get rid of the home button
I’m not keen on it because it ends up being very visually prominent for
something that’s not particularly useful.
2014-04-15 20:33:58 +01:00
OGOSHI Masayuki
5bcc666f34 Update some translations. 2014-04-16 02:40:49 +09:00
OGOSHI Masayuki
6bef1d6b30 Update command line helps Japanese Translation. 2014-04-15 23:44:05 +09:00
Jermolene
4b8be85b88 Docs updates 2014-04-15 13:24:43 +01:00
Jermolene
d01f1020d2 Release note updates 2014-04-15 09:07:25 +01:00
Jermolene
f77de37a2f Include Japanese translation in tiddlywiki.com
All of which is making index.html far too big, which we’ll address with
a plugin library.
2014-04-15 09:07:19 +01:00
Jeremy Ruston
f3c5ce7ca4 Merge pull request #558 from pekopeko1/japanese
Translation to Japanese.
2014-04-15 08:34:12 +01:00
Jermolene
6ed38389b0 Update test for previous commit
Test should have been updated with
dad60cda05
2014-04-15 08:28:47 +01:00
pekopeko1
5393fbee99 signed in CLA 2014-04-15 12:14:34 +09:00
pekopeko1
3b31c6fe3a some translation added 2014-04-15 12:00:04 +09:00
pekopeko1
9ba55c7e79 GettingStarted.tid plugin.info 2014-04-15 09:59:30 +09:00
pekopeko1
9323574efb add ja-JP directory 2014-04-15 09:58:21 +09:00
Jermolene
f5cf8cba5c Docs update 2014-04-14 21:33:16 +01:00
Jermolene
88be791e58 Fix full screen background 2014-04-14 21:30:42 +01:00
Jermolene
dad60cda05 Improve wiki.sortByList()
Previously list-before and list-after didn’t work if they referenced
entries that hadn’t yet been placed
2014-04-14 21:30:30 +01:00
Jermolene
fe0ed5e4ce Tweaks to themes
And shaking out some paragraph tags in the sidebar
2014-04-14 18:37:09 +01:00
Jermolene
aa243e4478 Add new seamless theme
Gets rid of the borders around tiddlers, and tightens up the use of
white space. Works particularly well with the sidebar hidden.
2014-04-14 13:12:44 +01:00
Jermolene
4c648e7cdc Exclude more illegal characters from external links 2014-04-14 11:17:28 +01:00
Jermolene
0aa559cd23 Improve responsiveness during editting
Simple optimisation whereby we defer the main refresh cycle when only
draft tiddlers have been modified.

We defer for 400ms, and keep extending the delay at each fresh draft
modification. The effect is that if the user is using the preview then
they’ll need to pause typing for 400ms before the preview is updated.

Fixes #470, #454, and maybe #206.
2014-04-14 10:20:32 +01:00
Jermolene
28db76ddb3 Refactor page rendering into a separate function
Refactoring page rendering so that we can fix the performance issues
with editing drafts. The plan is to defer the refresh cycle if all the
changes are to draft tiddlers.

We need to do a bit more of this to get startup.js into better shape
(and more extensible).
2014-04-14 09:53:13 +01:00
OGOSHI Masayuki
09cf788063 Merge branch 'master' into ja-JP 2014-04-14 17:03:16 +09:00
Jermolene
e366aa3746 Use Date.now() instead of new Date()
Just for when what we actually want is a millisecond counter.

Interesting video about this:

https://www.youtube.com/watch?v=Vo72W1HWeFI
2014-04-14 09:02:52 +01:00
Jermolene
22a529b28d New ribbon colour for 5.0.9 2014-04-14 08:57:50 +01:00
Jermolene
c2d6086bd9 Show fewer tiddlers in recent changes 2014-04-13 21:17:44 +01:00
Jermolene
f1578d3409 Turn off instrumentation
All those console.log()s make editing very slow
2014-04-13 21:17:44 +01:00
Jermolene
93b9d16d6c Don't include pipe characters in URLs 2014-04-13 21:17:44 +01:00
Jeremy Ruston
13bb20cad4 Merge pull request #553 from xcazin/fr-FR
fr-FR translation of the confirmation string before cancelling tiddler changes
2014-04-13 21:03:42 +01:00
Xavier Cazin
bba7e97f60 fr-FR translation of the confirmation string before cancelling tiddler changes 2014-04-13 16:55:13 +02:00
Xavier Cazin
cb32d187c5 Merge remote-tracking branch 'upstream/master' 2014-04-13 16:45:30 +02:00
Jeremy Ruston
8582e5ebe2 Merge pull request #552 from BramChen/master
Add chinese translations of confirmation for cancelling edits
2014-04-13 09:24:45 +01:00
Jermolene
46969fbd3e Adjust Cecily tiddler width 2014-04-13 09:24:06 +01:00
Jermolene
260d3ad8c0 Docs typo 2014-04-13 09:23:57 +01:00
OGOSHI Masayuki
4d0b08d464 some translations corrected. 2014-04-13 15:52:41 +09:00
OGOSHI Masayuki
5447420832 1st time ja-JP translation commit. 2014-04-13 15:35:36 +09:00
Bram Chen
d9b87055bf Add chinese translations of confirmation for cancelling edits 2014-04-13 14:34:17 +08:00
Jermolene
4f4b743d9c Fix Cecily tiddler width for when sidebar hidden 2014-04-12 18:24:39 +01:00
Jermolene
ee2cd2056c Make tiddler width fluid when sidebar hidden 2014-04-12 17:14:27 +01:00
Jermolene
be5f6f6700 Allow spaces in property names in text references 2014-04-12 17:14:09 +01:00
Jermolene
be7822281a Release note updates 2014-04-12 16:32:58 +01:00
Jermolene
3afa26b9a3 Require confirmation before abandoning edits
Fixes #544
2014-04-12 14:15:49 +01:00
Xavier Cazin
2a2cc20601 Merge remote-tracking branch 'upstream/master' 2014-04-12 10:22:07 +02:00
Jeremy Ruston
400ab3b3c5 Merge pull request #550 from xcazin/fr-FR
3 new plugin-related strings in fr-FR Control Panel
2014-04-12 08:44:42 +01:00
Xavier Cazin
ebe7587aa0 Merge remote-tracking branch 'upstream/master' into fr-FR 2014-04-12 08:48:00 +02:00
Xavier Cazin
c954ac01fe Merge remote-tracking branch 'upstream/master' 2014-04-12 08:46:18 +02:00
Jermolene
a3cf925e56 Add classes for the current theme and language
Add the classes to the tw-page-container DIV
2014-04-11 21:37:58 +01:00
Xavier Cazin
be7c33dc48 Revert "Another missed update"
This reverts commit 7aaab03e03.
2014-04-11 16:23:23 +02:00
Xavier Cazin
634f914610 Another missed update 2014-04-11 16:15:56 +02:00
Xavier Cazin
7aaab03e03 Another missed update 2014-04-11 16:13:32 +02:00
Xavier Cazin
fd1399f6d9 3 new plugin-related strings in fr-FR Control Panel 2014-04-11 09:48:32 +02:00
Jermolene
442bc35bcb Remove dropdown from edit mode tags
Firefox didn’t like the nested buttons.

The better fix would be to switch the tag pills to being links instead
of buttons.

Fixes #515
2014-04-10 22:49:46 +01:00
Jermolene
1bc9bf541a Remove headings from Tiddler Info advanced tab
Fixes #518
2014-04-10 21:44:56 +01:00
Jermolene
ccf2cb36a1 Extend sameday operator to select field
Now the target field can be specified in the suffix:
`[sameday:created[20140808]]`
2014-04-10 20:19:12 +01:00
Jeremy Ruston
18d14031b7 Merge pull request #548 from xcazin/fr-FR
Four file updates on fr-FR translations
2014-04-10 20:08:26 +01:00
Jermolene
5fff6fc87f Docs update 2014-04-10 19:57:21 +01:00
Jermolene
5a65898dbe Update tiddler filter docs 2014-04-10 19:56:51 +01:00
Jermolene
cbf45a9982 Update release note 2014-04-10 19:56:43 +01:00
Jermolene
7a4a00f6ca Sort operator should default to title
Previously we were crashing if a sort field wasn’t specified
2014-04-10 19:56:21 +01:00
Xavier Cazin
dfb367c104 Last fr-FR updates to translatable content 2014-04-10 15:46:00 +02:00
Xavier Cazin
7853b7f7b3 Four file updates on fr-FR translations 2014-04-10 12:38:55 +02:00
Jermolene
ccefc1b17b Tolerate more whitespace in block elements
Previously the double newlines marking a block mode element couldn’t be
interspersed with whitespace.
2014-04-10 11:05:27 +01:00
Jeremy Ruston
6786a1fd14 Merge pull request #547 from BramChen/master
Fix typo in PaletteColours.multids for zh-Hant
2014-04-10 08:29:32 +01:00
Bram Chen
e73d2854f9 Fix typo in PaletteColours.multids for zh-Hant 2014-04-10 09:34:48 +08:00
Jeremy Ruston
127cd70769 Merge pull request #545 from xcazin/fr-FR
fr-FR translation of PaletteColours.multids + typo in core en-GB of the same
2014-04-09 22:20:40 +01:00
Jermolene
fc407d079c Pixel accuracy for restoring pre-refactor layout
Two problems:

* Extraneous whitespace shows up as whitespace in the HTML, making it
hard to style
* Fix some padding
2014-04-09 22:19:27 +01:00
Jermolene
df6fe8f852 Merge branch 'sidebar-remove-p' of https://github.com/pmario/TiddlyWiki5 into pmario-sidebar-remove-p 2014-04-09 21:56:20 +01:00
Jermolene
613f413942 Add docs on filter changes in 5.0.9 2014-04-09 21:53:34 +01:00
Mario Pietsch
70a2db34d1 these changes remove most of the <p> tags from the right sidebar, without changing the layout too much. The tab buttons are a little bit higher but this will be adjusted with the next CSS tweaks. 2014-04-09 21:12:10 +02:00
Mario Pietsch
5821165ec5 Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 2014-04-09 19:59:39 +02:00
Xavier Cazin
4888417a35 fr-FR translation of PaletteColours.multids + typo in core en-GB version. 2014-04-09 19:11:41 +02:00
Jeremy Ruston
2aa1acb565 Merge pull request #526 from BramChen/master
Keep up-to-date changes for chinese translations.
2014-04-09 16:11:39 +01:00
Jermolene
e5fe3f76ac Fix linkcatcher message sending
We need to send messages to the parent so that we don’t set up an
infinite loop by sending `tw-navigate` messages. Also we need to pass
along the target of the navigation.
2014-04-09 16:09:12 +01:00
Jermolene
ef03e5ce63 Docs update 2014-04-09 14:33:55 +01:00
Jermolene
690c8fe9a0 Update macros docs
Include single line macros
2014-04-09 14:33:47 +01:00
Jermolene
6f1e8ee3a1 Missed adjustments of wikitext tests
The commit 4d91a7762e broke the test
2014-04-09 11:54:03 +01:00
Jeremy Ruston
9b52ca7cc0 Merge pull request #543 from welford/load-and-deserialize
Make deserializing a bit more robust
2014-04-09 11:51:16 +01:00
Jermolene
f9a274df85 Require confirmation for all tiddler deletions
Previously we only asked for confirmation when deleting a draft tiddler
2014-04-09 11:32:08 +01:00
Jermolene
776bf29afc Update LinkCatcherWidget docs 2014-04-09 11:31:36 +01:00
Jermolene
f08c4aa525 Arrange fields alphabetically in the edit template 2014-04-09 11:31:27 +01:00
James Welford Anderson
0f07977930 deserializertype -> deserializerType 2014-04-09 06:26:01 +09:00
James Welford Anderson
362df18a19 make deserializing a bit more robust
load.js references the encoding set in boot.js when loading a file.
boot.js can now register file type with different deserialization from
their actual type
2014-04-09 06:20:51 +09:00
Jermolene
426281539a Merge branch 'saner-filters' 2014-04-08 14:14:11 +01:00
Jermolene
dc5831a8a8 First pass at a release note for 5.0.9 2014-04-08 14:12:35 +01:00
Jermolene
6d43b4e8dc Update link widget docs 2014-04-08 14:12:27 +01:00
Jermolene
3282bd948f Fix problem with search filter operator 2014-04-08 09:36:30 +01:00
Jermolene
7ec356ac80 Add @welford's signature to CLA 2014-04-08 09:16:22 +01:00
Jeremy Ruston
688879e6fa Merge pull request #540 from mwfogleman/michael-cla
Add Michael Fogleman to cla-individual.md.
2014-04-08 08:55:39 +01:00
Michael Fogleman
9bdd7a4e19 Add Michael Fogleman to cla-individual.md. 2014-04-08 11:24:38 +05:30
Jermolene
78f81a6894 Move notifications a little to the left
So that they don’t overlap the menu hamburger
2014-04-07 19:01:08 +01:00
Jermolene
5ec0775d3e Link wikitext help text to tiddlywiki.com
Fixes #537
2014-04-07 18:08:11 +01:00
Jermolene
c4d0ee11d3 Update Emacs tip 2014-04-07 09:02:31 +01:00
Jermolene
597b8ca4b1 Ensure fieldnames are not wikified
`__proto__` was being wikified into underlined text
2014-04-06 22:49:59 +01:00
Jermolene
ea46f85a8a Fix problem with fields called "__proto__" 2014-04-06 22:49:20 +01:00
Jermolene
1e960ffcac Fix problems with tiddlers called __proto__
Background:

http://www.2ality.com/2012/01/objects-as-maps.html
2014-04-06 22:43:10 +01:00
Jermolene
8a7d0f53d3 Add a sourceURL to the end of eval'd code
This, miraculously, lets Chrome dev tools list tiddler modules in the
script tag by their proper titles. Which lets you set breakpoints
within them!!!!!

https://chromedevtools.googlecode.com/svn-history/r421/trunk/tutorials/b
reapoints/index.html#regular
2014-04-06 22:36:51 +01:00
Jermolene
b51d851f93 Fix extraneous comma
Thanks to Danielo Rodríguez
2014-04-06 22:09:42 +01:00
Jermolene
e21d558ff0 Add Michael Fogleman's Emacs macro 2014-04-06 22:08:29 +01:00
Jermolene
c7b4febae3 Optimise ordering of filter expressions
We get a significant speed improvement of >10% by rearranging filter
operators to bring to the front the operators likely to reduce the size
working list.
2014-04-06 11:50:16 +01:00
Jermolene
4d91a7762e Optimise link widget
Handle the classes better, and stop using a default tooltip (parsing
the tooltip was a performance hog)
2014-04-05 17:37:58 +01:00
Jermolene
272a4bbe61 Filtering optimisations 2014-04-05 17:31:36 +01:00
Jermolene
b7f674c51a First pass at refactoring filter execution
This is the beginning of addressing #523.
2014-04-03 20:49:16 +01:00
Jermolene
14f90b9519 Include direct tiddler link in template for community links 2014-04-03 20:30:31 +01:00
Jermolene
2f458e8573 Add link to Martin Kantor's MathJax plugin 2014-04-03 20:25:40 +01:00
Jermolene
3619eb1378 Fix missing newline
Fixes #529
2014-04-03 18:10:54 +01:00
Mario Pietsch
9bd626315e Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 2014-04-03 19:03:51 +02:00
Jeremy Ruston
d3c0296a87 Merge pull request #520 from pmario/decouple-sitetitle
right menue SiteTitle and SiteSubtitle decoupled
2014-04-03 17:02:22 +01:00
Jermolene
e397e4d159 Disable the tiddlyweb adaptor unless loaded over http(s) 2014-04-03 16:33:42 +01:00
Jermolene
93c29bd388 Fix missing require in filesystem adator 2014-04-03 15:40:30 +01:00
Bram Chen
7985a808bf Keep up-to-date changes for chinese translations. 2014-04-02 16:27:03 +08:00
Mario Pietsch
aced860d52 Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 2014-04-01 23:20:59 +02:00
Jeremy Ruston
c1bb7b00c1 Merge pull request #522 from pmario/de-DE
german language update. Contains changes till Mar 31, 2014
2014-04-01 15:24:06 +01:00
Mario Pietsch
856b68a34d german language update. Contains changes till Mar 31, 2014 2014-04-01 15:43:08 +02:00
Mario Pietsch
1940bd4dce right menue SiteTitle and SiteSubtitle decoupled from tiddler title and tiddler subtitle. Otherwise it is not possible to modify the tiddler title styling, without affecting the site title. 2014-04-01 10:34:58 +02:00
Jermolene
d402d3c5a6 Add performance measurement features
This is an experimental module to help us measure the performance of
the refresh cycle and the filter mechanism. Not intended to replace the
performance measurement features in browser developer tools, just to
make it easier to automate performance checks cross-browser.

The immediate purpose is to help in refactoring the filter mechanism.
The recent change to encapsulate the wiki store “tiddlers” object has
hurt the performance of filters, and it’s going to be helpful to have
decent measurements while refactoring that code.

I’m still not convinced that this stuff should be in the core, and may
well end up removing it after the present refactoring cycle.
2014-04-01 08:33:36 +01:00
Jermolene
dcce487934 Add support for platform dependent high resolution performance timers
For profiling filter performance
2014-03-31 18:42:30 +01:00
Jermolene
53ca7f6a2f More defensive handling of pluginInfo 2014-03-31 18:30:45 +01:00
Jermolene
c3e24c1228 Trim spaces from new field and tag names
Fixes #517
2014-03-31 17:59:28 +01:00
Jermolene
6307293469 Fix some Node.js cross-platform compatibility issues
Thanks to http://shapeshed.com/writing-cross-platform-node/

Surprising that file path format is pretty much the only issue.
2014-03-31 17:17:36 +01:00
Jeremy Ruston
0d0679de1b Merge pull request #514 from Skeeve/patch-6
Show site title when logging in
2014-03-31 12:59:15 +01:00
Jermolene
09214d1c33 Fix problem with --load command overwriting $:/core
Now we use the `wiki.importTiddler()` method - it rejects attempts to
load older versions of loaded plugins
2014-03-31 12:46:10 +01:00
Jermolene
914a536d82 Correct relative date handling of t=1s
We were incorrectly displaying “1 seconds ago”
2014-03-31 12:41:54 +01:00
Jermolene
5a085f7927 Add basic CSV parser 2014-03-31 12:41:02 +01:00
Skeeve
0595619d39 Show site title when logging in
I have several TW5 servers running on the same host and think it would be good, would the password prompt display the $:/SiteTitle
2014-03-31 08:58:13 +02:00
Jermolene
776c9a2cad Add James Anderson's resource links 2014-03-27 09:56:33 +00:00
Jeremy Ruston
36dabd792e Merge pull request #509 from BramChen/master
Update chinese translations of types
2014-03-27 09:55:31 +00:00
Jermolene
ec90ac99cf Skinner dropdown arrow 2014-03-27 08:54:28 +00:00
Bram Chen
299007f08b Update chinese translations of types. 2014-03-27 10:06:40 +08:00
Bram Chen
49578bb144 Merge remote-tracking branch 'upstream/master' 2014-03-27 09:33:36 +08:00
Jeremy Ruston
ead5e607fa Merge pull request #502 from BramChen/master
Add chinese translations of translatable core strings in JavaScript modules
2014-03-26 22:15:01 +00:00
Jermolene
5c3c6cd7c0 Fix various typos 2014-03-26 21:57:13 +00:00
Jeremy Ruston
818b29386e Merge pull request #504 from buggyj/58texthtml
added missing text/html type
2014-03-26 21:49:45 +00:00
Bram Chen
c0f78df48d Merge remote-tracking branch 'upstream/master' 2014-03-27 00:53:15 +08:00
Jermolene
c58852a67b On narrow screens ensure there is a background behind the home and menu buttons 2014-03-26 14:11:26 +00:00
Jermolene
bca1d55280 Add validation of legal characters for fieldnames 2014-03-26 13:38:43 +00:00
Jermolene
45a362c285 Add a dropdown to tags in edit mode
As discussed in TW Hangout 40
2014-03-26 13:06:11 +00:00
Jermolene
355f467465 Update line colour for SVG curved text example 2014-03-26 10:16:15 +00:00
Jermolene
871630be88 Fix the menu hamburger 2014-03-26 10:16:00 +00:00
Jermolene
8b813ccb43 Correct typo 2014-03-25 22:17:31 +00:00
Jermolene
59ac38a3da Remove the scrollable from the story river
The problem was that the scrollable required that the mouse be over the
story river itself in order to scroll it with the wheel. If we fallback
to scrolling the story by scrolling the browser body then we are able
to scroll even if the mouse is over the sidebar.
2014-03-25 22:15:54 +00:00
Jermolene
80b65b1651 Add a top-left and top-right menu 2014-03-25 21:54:06 +00:00
Jermolene
7dede861e1 Fix styling for input boxes in sidebar 2014-03-25 21:53:18 +00:00
Jermolene
514b8e1776 Fix hover colour of the close buttons in the sidebar "open" tab 2014-03-25 14:37:55 +00:00
Jermolene
79d643775d Fix scrollable widget not to crash on the server 2014-03-25 14:37:33 +00:00
Jermolene
945ad6792f Add first pass at Cecily plugin 2014-03-25 14:29:32 +00:00
Jermolene
7c235566c4 Rejig the page layout to use the scrollable widget
This is the start of some refactoring of the main layout CSS intended
to give us more flexibility and control.
2014-03-25 14:29:16 +00:00
Jermolene
d3e178becc Add scrollable widget
A new widget to handle scrollable areas. We’ll use it both for the
story river and the sidebar.
2014-03-25 14:26:54 +00:00
Jermolene
bc432d5e52 Remove obsolete nighttime theme
Better to do change the background colour with a palette
2014-03-25 09:31:48 +00:00
Jermolene
fa10801d72 Fix tags for curved text howto 2014-03-24 22:53:11 +00:00
Jermolene
87c8478c80 Add curved text demo 2014-03-24 22:49:10 +00:00
Jermolene
535837e017 Use client bounding rect rather than offset positions for computing scroll positions 2014-03-24 22:31:03 +00:00
Jermolene
20f6383528 Add storyviews list filter and use it in view switcher 2014-03-24 22:17:45 +00:00
Jermolene
26fd460670 Move the version banner to the sidebar
By making it a page control we move it into the sidebar, making it easy
to control with the sidebar.
2014-03-24 21:37:42 +00:00
Jermolene
20d7264e4b Add protocol to YouTube URLs
Otherwise they don’t work when viewed from a file URI
2014-03-24 21:36:19 +00:00
Jermolene
3ce2159a95 Missing semicolon 2014-03-24 21:35:48 +00:00
buggyj
968d44e4be added missing text/html type 2014-03-24 11:31:28 +05:30
Bram Chen
f46d445ba2 Add chinese translations of PaletteColours 2014-03-24 10:34:36 +08:00
Bram Chen
1b0a39cd1a Add chinese translations of translatable core strings in JavaScript modules 2014-03-24 10:25:54 +08:00
Jeremy Ruston
cb2653aee0 Merge pull request #499 from mpollio/master
Italian translation available
2014-03-23 13:49:31 +00:00
Jermolene
34445dcc68 Break the links up into separate tiddlers 2014-03-22 17:32:28 +00:00
Maurizio
54abcdceeb Update cla-individual.md 2014-03-21 17:22:12 +01:00
Maurizio
cf7554a938 Delete favicon.ico 2014-03-21 11:03:24 +01:00
Maurizio
fb72b3b859 Delete index.html 2014-03-21 11:03:16 +01:00
Jeremy Ruston
03cfa61ae8 Merge pull request #494 from nameanyone/master
Stop using obsoleted "-moz-border-radius" and "-webkit-border-radius" pr...
2014-03-20 22:19:45 +00:00
Jeremy Ruston
4badabce4b Merge pull request #496 from buggyj/syncer
syncer freeze fix
2014-03-20 20:58:50 +00:00
Jeremy Ruston
3cb2b365c5 Merge pull request #498 from buggyj/plugindocumentation
Plugin development with github
2014-03-20 20:56:30 +00:00
Jermolene
178cfb1084 Make more core strings be translateable
Now we’re translating strings that occur in JavaScript modules.

Partially fixing #491
2014-03-20 20:55:59 +00:00
mpollio
920df5d2d4 Italian translation available
Add italian translation
2014-03-20 13:40:40 +01:00
buggyj
7b57561160 plugin development doc 2014-03-20 13:28:17 +05:30
buggyj
d2a41b8486 plugin development with github and node.js 2014-03-20 13:20:52 +05:30
buggyj
aa63151815 syncer freeze fix 2014-03-19 20:20:54 +05:30
Jermolene
ba6edd42c1 Explicitly blacklist unsafe elements, starting with <script>
Are there are any other elements that might be considered unsafe?
2014-03-19 10:05:44 +00:00
nameanyone
7616c4ce7d Stop using obsoleted "-moz-border-radius" and "-webkit-border-radius" properties
Fixes #480
2014-03-18 16:38:52 -07:00
Jermolene
925b3d2a5b Fix typo 2014-03-18 21:18:46 +00:00
Jermolene
b8d0fd059b Fix bug with plugintiddlers filter operator 2014-03-18 21:18:45 +00:00
Jermolene
a19432541e New architecture diagram and docs updates 2014-03-18 21:18:45 +00:00
Jeremy Ruston
b52299872a Merge pull request #493 from BramChen/master
Add chinese translations of ClassicWarning section for TWC tiddlers
2014-03-18 08:45:56 +00:00
Bram Chen
699b863588 Add chinese translations of ClassicWarning section for TWC tiddlers 2014-03-18 09:53:29 +08:00
Jermolene
bdbbf94326 Update transclusion wikitext syntax to allow a template without a target tiddler
This allows us to transclude a tiddler without changing the current
tiddler with `{{||MyTiddler}}`.
2014-03-17 21:44:10 +00:00
Jermolene
cdf3e101a8 Fix crash with headings
`this.match[1].length` can get overwritten when we parse the content of
the heading
2014-03-17 20:55:08 +00:00
Jermolene
06500e5f71 New error message text for recursive transclusion error 2014-03-17 11:54:41 +00:00
Jermolene
9de17aa206 Make shadowTiddlers, pluginTiddlers and pluginInfo be private to the Wiki object constructor 2014-03-17 10:50:18 +00:00
Jermolene
279626a3e3 Freeze array or object tiddler fields
Previously object fields like the tags array weren’t frozen.
2014-03-17 08:58:42 +00:00
Jermolene
721e333a20 Starting to make the members of $tw.Wiki be private
We want to avoid plugins from directly accessing the tiddlers hashmap.
Later we’ll do pluginTiddlers, pluginInfo and shadowTiddlers.
2014-03-16 21:23:10 +00:00
Jermolene
499730c458 Remove whitespace between toolbar icons 2014-03-15 17:04:12 +00:00
Jermolene
baa8cf3dd0 Add a warning segment to templates for TWC tiddlers
Now there’s a warning banner on all TWC tiddlers. It includes an
`upgrade` button that currently just flips the tiddler type to TW5
2014-03-15 17:03:50 +00:00
Jermolene
f649b5b037 Extend button widget to set text references
Previously the `set` attribute could only be used to identify a
tiddler, not a full text reference.
2014-03-15 17:02:13 +00:00
Jermolene
afa677b9a0 Add a class to tiddler frames in view mode
We’re already marking tiddlers in edit mode with tw-tiddler-edit-mode,
makes sense to make view mode tiddlers too.
2014-03-15 11:20:33 +00:00
Jeremy Ruston
6fe884bb8a Merge pull request #489 from BramChen/master
Keep up-to-date changes for zh-Hant and zh-Hans
2014-03-15 09:02:29 +00:00
Bram Chen
00af144085 Add Chinese translations for tiddler info 'advanced' panel 2014-03-15 09:57:50 +08:00
Bram Chen
5d893397c4 Merge remote-tracking branch 'upstream/master' 2014-03-15 08:39:54 +08:00
Jermolene
42c67cfeb7 Add tiddler info "advanced" panel 2014-03-14 15:23:28 +00:00
Jermolene
b714c67374 Refactor plugin loading to retain plugin info for all plugins
Previously we were not reading the plugin info for plugins that hadn’t
been loaded.
2014-03-14 15:23:12 +00:00
Jermolene
00cb2f4659 Add links to static representations for people with JS turned off 2014-03-14 15:21:52 +00:00
Jermolene
24b6603c42 Fix problem with checking versions of plugins carrying a badly formatted "version" field 2014-03-14 10:43:22 +00:00
Bram Chen
a82e50c07f Keep up-to-date changes for zh-Hant and zh-Hans 2014-03-14 13:02:49 +08:00
Jermolene
ebc77fbd09 Get ready for a new view template segment carrying information about plugins 2014-03-13 17:44:27 +00:00
Jermolene
96457d8011 Rejig plugins tab of control panel
Now we divide the plugins into categories and organise the displayed
information a bit better
2014-03-13 17:43:18 +00:00
Jermolene
3d9f61f041 More whitespace in core templates 2014-03-13 17:42:29 +00:00
Jermolene
f48701544e Enhance tiddler title for system tiddlers
Now the $:/ part of the name is rendered in grey, making the main part
of the title more prominent.

@tobibeer suggested this a long time ago; good idea!
2014-03-13 17:40:53 +00:00
Jermolene
50cf9678cb Add support for tw-home message 2014-03-12 22:32:13 +00:00
Jermolene
c4119f4f93 Default colour tweaks 2014-03-12 22:22:18 +00:00
Jermolene
cafe74fc89 Tweaks to list-before and list-after field descriptions 2014-03-12 22:22:02 +00:00
Jeremy Ruston
2466389397 Merge pull request #485 from TheDiveO/master
added descriptions for list-before, list-after
2014-03-12 21:57:41 +00:00
Jermolene
dd3ee2a603 Extend tag manager to edit icons assigned to tags
Add a dropdown for choosing available images for a tag.

As part of this change we need to tag tiddlers that contain images
typed as wikitext (these are inline SVG icons) so that we can display
them in the dropdown.
2014-03-12 21:56:46 +00:00
Jermolene
8e17c1dfd5 Fix setTextReference()
It wasn’t working for non-existent tiddlers. Also added support for
setting indexed properties of a data tiddler.
2014-03-12 21:54:43 +00:00
Jermolene
9bd0174205 Left off previous commit 2014-03-12 21:53:50 +00:00
TheDiveO
522dad95be added descriptions for list-before, list-after 2014-03-12 21:26:18 +01:00
Jeremy Ruston
87c4839fed Merge pull request #484 from TheDiveO/master
signed CLA
2014-03-12 20:06:01 +00:00
Jermolene
22b6425bac Update link to tags docs 2014-03-12 20:05:45 +00:00
Jermolene
5ba92fe274 Update to latest version of normalize.css and fix tab styling
Tab styling was inconsistent on Firefox due to some line-height issues.
2014-03-12 20:05:34 +00:00
TheDiveO
91939d67ed signed CLA 2014-03-12 20:45:04 +01:00
Jermolene
d0caf21b2d Exclude attributes starting "on" on HTML elements
Because:

* It doesn't work well with TW5's refresh mechanism, which relies on
being able to regenerate any portion of the DOM as required; this
frequently causes inline handlers to be re-executed at unexpected times
(see
http://tiddlywiki.com/static/TiddlyWiki%2520for%2520Developers.html)
* It mixes TW5 version-specific JavaScript with user content
* In multiuser environments there is a security risk to importing or
viewing tiddlers you didn't author if they can have JavaScript in them
2014-03-12 16:39:18 +00:00
Jermolene
0d18f3cc5d Add support for ordering tags by the 'list-before' and 'list-after' fields
See the discussion here:

https://groups.google.com/d/topic/tiddlywikidev/AXDJEjcAphs/discussion
2014-03-12 14:19:26 +00:00
Jermolene
a3507bf611 Freeze the fields of a tiddler
Thus enforcing the immutability of tiddler objects
2014-03-12 08:33:13 +00:00
Jermolene
62bc20a181 Restore visibility of system tags in view template
On discussion at Hangout #38 we felt that hiding them was confusing,
and that there were few situations where a user would see system tags
except on system tiddlers.
2014-03-11 18:25:41 +00:00
Jermolene
9ded88105b Update test of tagging filter to reflect 0d7c4ae6c7 2014-03-11 15:53:41 +00:00
Jermolene
aec618793f Fix problem with refreshing D3 plugin
Fixes #217
2014-03-11 11:12:56 +00:00
Jeremy Ruston
fe33906ef0 Merge pull request #481 from BramChen/master
Add chinese translation of canned filters
2014-03-11 08:30:33 +00:00
Jermolene
6a17bad96e Add margin on code blocks and tables 2014-03-11 08:29:11 +00:00
Bram Chen
4f9fa5d66e Add chinese translation of canned filters 2014-03-11 12:51:32 +08:00
Jermolene
0d7c4ae6c7 Include tags on shadow tiddlers in tagging filter
Ensures that for system tiddlers the info panel "Tagging" tab correctly
shows the tagged tiddlers.

Final fix for #478
2014-03-10 19:41:38 +00:00
Jermolene
2608a323eb Hide system tags from the sidebar tags list
Part of #478
2014-03-10 19:40:07 +00:00
Jermolene
8d612aefdd Fix problem with theme overrides triggering the syncer object
Fixes #479
2014-03-10 19:05:06 +00:00
Jermolene
ad96c48034 Docs updates 2014-03-10 18:41:30 +00:00
Jermolene
12e153ecff Update wikitext tests to reflect title attribute 2014-03-10 18:41:26 +00:00
Jermolene
db35bc36aa Disable storyviews when rendering to the fake dom 2014-03-10 18:41:11 +00:00
Jermolene
af34fbbca3 Only show command line help if no arguments are provided
Previously we were checking in a way that meant that `tiddlywiki
<wiki>` would trigger the help message.
2014-03-10 18:20:07 +00:00
Jermolene
8239275edb Add dropdown of canned filter searches
Now you can pick from a dropdown of predefined filtered searches in the
advanced search filter tab.
2014-03-10 18:16:10 +00:00
Jermolene
be6509a17f Remove system tags from sidebar tags listing 2014-03-10 18:15:12 +00:00
Jermolene
01e1133219 Fix bug where count widget wasn't being updated correctly 2014-03-10 18:15:00 +00:00
Jermolene
f04527ae32 Correct filter for count of overridden shadow tiddlers 2014-03-10 15:05:07 +00:00
Jermolene
98872bbe7c Allow pasting/dropping of HTML content
Fixes #477
2014-03-09 20:39:03 +00:00
Jermolene
bc8b72e6eb Use hasOwnProperty to text for tiddler existence 2014-03-09 19:20:58 +00:00
Jermolene
127d547632 Avoid confusion with the word "breaking"
I meant “broken” in the sense of “incompatible”, not “breaking” as in
“news”.
2014-03-09 09:19:47 +00:00
Jermolene
53755d87c8 Added tooltip examples to the link widget 2014-03-09 09:16:31 +00:00
Jermolene
289bec0fd5 Parse the wiki link tooltip as wiki text 2014-03-08 16:06:57 +00:00
Jermolene
8bd1fa50dc Fixed typo in dom maker 2014-03-08 10:43:01 +00:00
Jermolene
81af6bdd48 Fix typo in navigate handler for button widget 2014-03-08 10:22:09 +00:00
Jermolene
a5a2c718b1 Add support for a tooltip on the link widget 2014-03-06 12:38:47 +00:00
Jeremy Ruston
6b67a3f3c2 Merge pull request #471 from BramChen/master
Update doc and the chinese tranlastions of descriptive text for missing tiddlers
2014-03-06 08:31:54 +00:00
Jermolene
1cea80a3ab Docs update 2014-03-06 08:31:05 +00:00
Bram Chen
b6a202f525 Update doc 2014-03-06 11:47:20 +08:00
Bram Chen
7b109506c8 Update the chinese tranlastions of descriptive text for missing tiddlers 2014-03-06 11:31:17 +08:00
Jermolene
c277370e48 Display --help message if run without arguments
Fixes #389
2014-03-05 11:13:58 +00:00
Jermolene
f83443feac Fix location of stylesheet docs 2014-03-05 09:14:08 +00:00
Jermolene
8529ad13d6 Docs on using stylesheets 2014-03-05 09:13:14 +00:00
Jeremy Ruston
8deedf93a2 Merge pull request #467 from nameanyone/master
Fix a typo
2014-03-05 08:22:23 +00:00
nameanyone
bdcfa75220 Fixed a typo 2014-03-04 20:15:53 -08:00
nameanyone
20d39588b5 Signed CLA 2014-03-04 20:14:57 -08:00
Jermolene
67f3d58f71 Fix problem with "null" message when unloading under IE11
Fixes #457
2014-03-04 22:21:18 +00:00
Jeremy Ruston
bbfb855c2e Merge pull request #465 from BramChen/master
Add chinese translation of MissingTiddler stuff in Misc.multids.
2014-03-04 21:47:18 +00:00
Jermolene
6a63a45968 Improved tiddler filter documentation 2014-03-04 21:17:01 +00:00
Jermolene
70d2d4b7a1 Remove the "create" button from the missing tiddler template 2014-03-04 18:55:43 +00:00
Bram Chen
6aa21b3db6 Add chinese translation of MissingTiddler stuff in Misc.multids. 2014-03-04 17:38:26 +08:00
Jermolene
ff32317f5b Update grammar docs 2014-03-04 09:06:14 +00:00
Jermolene
df6436a12c Allow middle mouse button to trigger navigation suppression when clicking a tiddler link
Equivalent to holding control/command while clicking.
2014-03-03 09:09:13 +00:00
Jermolene
0200bc1b4e Force the highlight language to lower case 2014-03-02 19:42:40 +00:00
Jermolene
bd750a21e2 Add docs for keyboard widget 2014-03-02 19:30:13 +00:00
Jermolene
8c3782c1e2 Docs update 2014-03-02 18:43:59 +00:00
Jermolene
2f2a257745 Improve the descriptive text for missing tiddlers
Now we explain that it’s a missing tiddler, and add a “create” button
2014-03-02 18:43:22 +00:00
Jermolene
ab7d2d64e7 Add docs for tw-close-other-tiddlers message
Fixes #461
2014-03-02 18:36:46 +00:00
Jermolene
bc18501b59 Add @buggj's plugin site to the Community tiddler 2014-03-02 18:36:06 +00:00
Jermolene
0a5ce6d740 Prepare for 5.0.9-prerelease 2014-03-02 18:35:45 +00:00
619 changed files with 20095 additions and 9104 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.DS_Store
tmp/
output/

View File

@@ -2,22 +2,13 @@
rem build TiddlyWiki 2.x
rem create a temporary directory if it doesn't already exist
setlocal enableextensions
mkdir tmp\tw2
setlocal disableextensions
rem Delete any existing content
del /q /s tmp\tw2
echo.
rem Prepare the readme file from the revelant content in the tw5.com wiki
node .\tiddlywiki.js ^
editions\tw5.com ^
--verbose ^
--rendertiddler TiddlyWiki2ReadMe editions\tw2\readme.md text/html ^
--output editions\tw2 ^
--rendertiddler TiddlyWiki2ReadMe readme.md text/html ^
|| exit 1
rem cook the TiddlyWiki 2.x.x index file
@@ -25,8 +16,9 @@ rem cook the TiddlyWiki 2.x.x index file
node .\tiddlywiki.js ^
editions\tw2 ^
--verbose ^
--output tmp\tw2 ^
--load editions\tw2\source\tiddlywiki.com\index.html.recipe ^
--rendertiddler $:/core/templates/tiddlywiki2.template.html .\tmp\tw2\index.html text/plain ^
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain ^
|| exit 1
fc tmp\tw2\index.html editions\tw2\target\prebuilt.html

10
2bld.sh
View File

@@ -2,16 +2,13 @@
# build TiddlyWiki 2.x
# create a temporary directory if it doesn't already exist
mkdir -p tmp
mkdir -p tmp/tw2
# Prepare the readme file from the revelant content in the tw5.com wiki
node ./tiddlywiki.js \
editions/tw5.com \
--verbose \
--rendertiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \
--output editions/tw2 \
--rendertiddler TiddlyWiki2ReadMe readme.md text/html \
|| exit 1
# cook the TiddlyWiki 2.x.x index file
@@ -19,8 +16,9 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
editions/tw2 \
--verbose \
--output tmp/tw2 \
--load editions/tw2/source/tiddlywiki.com/index.html.recipe \
--rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain \
|| exit 1
diff -q tmp/tw2/index.html editions/tw2/target/prebuilt.html

View File

@@ -25,28 +25,32 @@ echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME
node ./tiddlywiki.js \
./editions/de-AT-DE \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/de-AT-DE.html text/plain \
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all de-AT-DE.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/zh-Hant \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hant.html text/plain \
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all zh-Hant.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/zh-Hans \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hans.html text/plain \
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all zh-Hans.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/fr-FR \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/fr-FR.html text/plain \
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all fr-FR.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1

36
bld.cmd
View File

@@ -34,18 +34,20 @@ rem static.html: the static version of the default tiddlers
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^
--savetiddler $:/favicon.ico %TW5_BUILD_OUTPUT%\favicon.ico ^
--output . ^
--rendertiddler ReadMe .\readme.md text/html ^
--rendertiddler ContributingTemplate .\contributing.md text/html ^
--rendertiddler $:/core/copyright.txt .\licenses\copyright.md text/plain ^
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.html text/plain ^
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.hta text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all index.html text/plain ^
--savetiddler $:/favicon.ico favicon.ico ^
--rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain ^
--rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain ^
--savetiddler $:/green_favicon.ico %TW5_BUILD_OUTPUT%/static/favicon.ico ^
--rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^
--rendertiddler $:/core/templates/alltiddlers.template.html %TW5_BUILD_OUTPUT%\alltiddlers.html text/plain ^
--rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\static\static.css text/plain ^
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\static text/plain ^
--rendertiddler $:/core/templates/static.template.html static.html text/plain ^
--rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain ^
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain ^
--rendertiddler $:/core/templates/static.template.css static\static.css text/plain ^
|| exit 1
rem encrypted.html: a version of the main file encrypted with the password "password"
@@ -53,8 +55,9 @@ rem encrypted.html: a version of the main file encrypted with the password "pass
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--password password ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^
--rendertiddler $:/core/save/all encrypted.html text/plain ^
|| exit 1
rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
@@ -62,7 +65,8 @@ rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
node .\tiddlywiki.js ^
.\editions\tahoelafs ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all tahoelafs.html text/plain ^
|| exit 1
rem d3demo.html: wiki to demo d3 plugin
@@ -70,7 +74,8 @@ rem d3demo.html: wiki to demo d3 plugin
node .\tiddlywiki.js ^
.\editions\d3demo ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all d3demo.html text/plain ^
|| exit 1
rem codemirrordemo.html: wiki to demo codemirror plugin
@@ -78,7 +83,8 @@ rem codemirrordemo.html: wiki to demo codemirror plugin
node .\tiddlywiki.js ^
.\editions\codemirrordemo ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all codemirrordemo.html text/plain ^
|| exit 1
rem markdowndemo.html: wiki to demo markdown plugin
@@ -86,7 +92,8 @@ rem markdowndemo.html: wiki to demo markdown plugin
node .\tiddlywiki.js ^
.\editions\markdowndemo ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all markdowndemo.html text/plain ^
|| exit 1
@@ -95,7 +102,8 @@ rem highlightdemo.html: wiki to demo highlight plugin
node .\tiddlywiki.js ^
.\editions\highlightdemo ^
--verbose ^
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\highlightdemo.html text/plain ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all highlightdemo.html text/plain ^
|| exit 1
rem Make the CNAME file that GitHub Pages requires

38
bld.sh
View File

@@ -35,18 +35,20 @@ rm $TW5_BUILD_OUTPUT/static/*
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
--output . \
--rendertiddler ReadMe ./readme.md text/html \
--rendertiddler ContributingTemplate ./contributing.md text/html \
--rendertiddler $:/core/copyright.txt ./licenses/copyright.md text/plain \
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.html text/plain \
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.hta text/plain \
--savetiddler $:/green_favicon.ico $TW5_BUILD_OUTPUT/static/favicon.ico \
--rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
--rendertiddler $:/core/templates/alltiddlers.template.html $TW5_BUILD_OUTPUT/alltiddlers.html text/plain \
--rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all index.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
--rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain \
--rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain \
--savetiddler $:/green_favicon.ico static/favicon.ico \
--rendertiddler $:/core/templates/static.template.html static.html text/plain \
--rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain \
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain \
--rendertiddler $:/core/templates/static.template.css static/static.css text/plain \
|| exit 1
# encrypted.html: a version of the main file encrypted with the password "password"
@@ -54,8 +56,9 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--output $TW5_BUILD_OUTPUT \
--password password \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/encrypted.html text/plain \
--rendertiddler $:/core/save/all encrypted.html text/plain \
|| exit 1
# tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
@@ -63,7 +66,8 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/tahoelafs \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tahoelafs.html text/plain \
|| exit 1
# d3demo.html: wiki to demo d3 plugin
@@ -71,7 +75,8 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/d3demo \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/d3demo.html text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all d3demo.html text/plain \
|| exit 1
# codemirrordemo.html: wiki to demo codemirror plugin
@@ -79,7 +84,8 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/codemirrordemo \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all codemirrordemo.html text/plain \
|| exit 1
# markdowndemo.html: wiki to demo markdown plugin
@@ -87,7 +93,8 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/markdowndemo \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all markdowndemo.html text/plain \
|| exit 1
# highlightdemo.html: wiki to demo highlight plugin
@@ -95,7 +102,8 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/highlightdemo \
--verbose \
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/highlightdemo.html text/plain \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all highlightdemo.html text/plain \
|| exit 1
# Run the test edition to run the Node.js tests and to generate test.html for tests in the browser

View File

@@ -19,8 +19,6 @@ Error message and password prompt
left: 50%;
margin-left: -144px; /* - width/2 - paddingHorz/2 - border */
padding: 16px 16px 16px 16px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}

File diff suppressed because it is too large Load Diff

View File

@@ -16,13 +16,20 @@ var _bootprefix = (function($tw) {
"use strict";
$tw = $tw || {};
$tw = $tw || Object.create(null);
$tw.boot = $tw.boot || Object.create(null);
// Detect platforms
$tw.browser = typeof(window) !== "undefined" ? {} : null;
$tw.node = typeof(process) === "object" ? {} : null;
$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null;
// Set default boot tasks
$tw.boot.tasks = {
trapErrors: !!($tw.browser && !$tw.node),
readBrowserTiddlers: !!($tw.browser && !$tw.node)
};
/*
Information about each module is kept in an object with these members:
moduleType: type of module

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,4 @@
title: $:/core/images/cancel-button
tags: $:/tags/Image
<svg class="tw-image-cancel-button tw-image-button" viewBox="366 150 58 58" width="22pt" height="22pt"><path d="M 414.76236 158.98764 C 403.77887 148.0041 385.97113 148.0041 374.98764 158.98764 C 364.0041 169.97113 364.0041 187.77887 374.98764 198.76236 C 385.97113 209.7459 403.77887 209.7459 414.76236 198.76236 C 425.7459 187.77887 425.7459 169.97113 414.76236 158.98764 M 385.3967 165.32954 L 385.3967 165.32954 L 394.77674 174.7096 L 404.3533 165.13303 C 405.53068 163.95566 407.4396 163.95566 408.61697 165.13303 C 409.79434 166.31041 409.79434 168.21932 408.61697 169.39669 L 399.0404 178.97325 L 408.42046 188.35331 C 409.59783 189.53068 409.59783 191.43959 408.42046 192.61697 L 408.42046 192.61697 C 407.24308 193.79434 405.33417 193.79434 404.1568 192.61697 L 394.77675 183.23692 L 385.5932 192.42046 C 384.41583 193.59783 382.50692 193.59783 381.32954 192.42046 L 381.32954 192.42046 C 380.15217 191.24308 380.15217 189.33417 381.32954 188.1568 C 381.32954 188.1568 381.32954 188.1568 381.32954 188.1568 L 381.32954 188.1568 L 381.32954 188.1568 L 390.51309 178.97326 L 381.13303 169.5932 C 379.95566 168.41583 379.95566 166.50692 381.13303 165.32954 L 381.13303 165.32954 C 382.3104 164.15217 384.21932 164.15217 385.3967 165.32954 C 385.3967 165.32954 385.3967 165.32954 385.3967 165.32954 Z"/></svg>

View File

@@ -0,0 +1,9 @@
title: $:/core/images/chevron-left
tags: $:/tags/Image
<svg class="tw-image-chevron-left tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128" version="1.1">
<g>
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-270.000000) translate(-91.000000, -63.999491) "></path>
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-270.000000) translate(-37.000000, -63.999491) "></path>
</g>
</svg>

View File

@@ -0,0 +1,9 @@
title: $:/core/images/chevron-right
tags: $:/tags/Image
<svg class="tw-image-chevron-right tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g>
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-90.000000) translate(-91.000000, -63.999491) "></path>
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-90.000000) translate(-37.000000, -63.999491) "></path>
</g>
</svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/close-button
tags: $:/tags/Image
<svg class="tw-image-close-button tw-image-button" viewBox="222 150 56 56" width="22pt" height="22pt"><path d="M 249.56668 185.88827 L 267.06757 203.38916 C 269.26427 205.58586 272.82582 205.58586 275.02252 203.38916 L 275.02252 203.38916 C 277.21922 201.19246 277.21922 197.63091 275.02252 195.43421 L 257.52163 177.93332 L 275.38916 160.06579 C 277.58586 157.86909 277.58586 154.30754 275.38916 152.11084 C 273.19246 149.91414 269.63091 149.91414 267.43421 152.11084 L 249.56668 169.97837 L 232.06579 152.47748 L 232.06579 152.47748 C 232.06579 152.47748 232.06579 152.47748 232.06579 152.47748 C 229.86909 150.28078 226.30754 150.28078 224.11084 152.47748 L 224.11084 152.47748 C 221.91414 154.674175 221.91414 158.23573 224.11084 160.43243 L 241.61173 177.93332 L 224.47748 195.06757 L 224.47748 195.06757 L 224.47748 195.06757 C 224.47748 195.06757 224.47748 195.06757 224.47748 195.06757 C 222.28078 197.26427 222.28078 200.82583 224.47748 203.02252 L 224.47748 203.02252 C 226.67418 205.21922 230.23573 205.21922 232.43243 203.02252 Z"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/delete-button
tags: $:/tags/Image
<svg class="tw-image-delete-button tw-image-button" viewBox="303 155 39 50" width="17pt" height="22pt"><path d="M 333 164.25 L 333 157.25 C 333 156.14543 332.10457 155.25 331 155.25 L 314.75 155.25 C 314.75 155.25 314.75 155.25 314.75 155.25 C 313.64543 155.25 312.75 156.14543 312.75 157.25 L 312.75 164.25 L 303.75 164.25 L 303.75 168.75 L 306 168.75 L 306 201.75 L 306 201.75 L 306 201.75 C 306 203.40685 307.34315 204.75 309 204.75 L 336.75 204.75 C 338.40685 204.75 339.75 203.40685 339.75 201.75 L 339.75 168.75 L 342 168.75 L 342 164.25 Z M 317.25 160.75 L 317.25 160.75 C 317.25 160.19772 317.69772 159.75 318.25 159.75 C 318.25 159.75 318.25 159.75 318.25 159.75 L 327.5 159.75 C 328.05228 159.75 328.5 160.19772 328.5 160.75 L 328.5 164.25 L 317.25 164.25 L 317.25 160.75 Z M 310.5 168.75 L 312.75 168.75 L 312.75 200.25 L 310.5 200.25 Z M 317.25 168.75 L 319.5 168.75 L 319.5 200.25 L 317.25 200.25 Z M 324 168.75 L 326.25 168.75 L 326.25 200.25 L 324 200.25 Z M 330.75 168.75 L 333 168.75 L 333 200.25 L 330.75 200.25 Z"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/done-button
tags: $:/tags/Image
<svg class="tw-image-done-button tw-image-button" viewBox="434 150 68 55" width="22pt" height="18pt"><path d="M 438.49266 178.00797 L 439.00744 177.49319 C 441.35054 175.15008 445.14946 175.15004 447.49262 177.49309 L 452.50734 182.50757 C 454.8505 184.85063 458.6494 184.85058 460.99252 182.50748 L 488.50747 154.99255 C 490.85058 152.64944 494.6495 152.6494 496.99266 154.99246 L 497.50722 155.506995 C 499.8504 157.85009 499.8505 161.64908 497.5074 163.99228 C 497.50738 163.99229 497.50736 163.99231 497.50734 163.99233 L 460.9926 200.5077 C 458.64947 202.85087 454.85048 202.8509 452.50732 200.50778 C 452.5073 200.50777 452.5073 200.50777 452.5073 200.50776 L 438.49268 186.49327 C 436.14952 184.15013 436.1495 180.35114 438.49264 178.00799 C 438.49265 178.00798 438.49265 178.00797 438.49266 178.00797 Z"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/down-arrow
tags: $:/tags/Image
<svg class="tw-image-down-arrow tw-image-button" viewBox="441 306 59 45" width="24pt" height="22pt"><path d="M 441 306 L 470.25 351 L 499.5 306 Z"/></svg>
<svg class="tw-image-down-arrow tw-image-button" viewBox="63 152 64 64" width="22pt" height="22pt"><path d="M 98.001786 212.81802 L 123.45763 187.36218 C 125.21499 185.60482 125.21499 182.75557 123.45763 180.99821 C 121.70027 179.24086 118.85103 179.24086 117.09367 180.99821 L 94.819805 203.27208 L 72.54594 180.99821 C 70.788582 179.24086 67.93934 179.24086 66.18198 180.99821 C 64.42462 182.75557 64.42462 185.60482 66.18198 187.36218 L 91.637825 212.81802 C 93.395184 214.57538 96.244426 214.57538 98.001786 212.81802 Z"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/edit-button
tags: $:/tags/Image
<svg class="tw-image-edit-button tw-image-button" viewBox="244 193 20 22" width="20pt" height="22pt"><path d="M 257.33334 196.80951 L 245.90476 207.2857 L 244 212.0476 L 248.7619 210.14284 L 260.19048 199.66665 Z M 259.2381 194.90475 L 258.28566 195.85716 L 261.14284 198.71428 L 262.09522 197.76187 Z M 261.14286 193 L 260.19042 193.95241 L 263.04762 196.80953 L 264 195.85714 Z M 244 213.72882 C 244 213.72882 247.4281 215.43353 250.8572 213.7288 C 254.28599 212.02405 261.14284 214.86531 261.14284 214.86531 L 261.14284 213.72884 C 261.14284 213.72884 254.28577 210.88755 250.8572 212.5923 C 247.42858 214.29712 244 212.59228 244 212.59228 Z"/></svg>

View File

@@ -0,0 +1,4 @@
title: $:/core/images/home-button
tags: $:/tags/Image
<svg class="tw-image-home-button tw-image-button" viewBox="81 513 64 54" width="22pt" height="22pt"><g><path d="M 97.04536 522.62083 L 81.364685 531.49067 L 87.85863 531.49067 L 87.85863 566.9699 L 107.49902 566.9699 L 107.49902 552.99265 L 117.95268 552.99265 L 117.95268 566.9699 L 137.59307 566.9699 L 137.59307 531.49067 L 144.086885 531.49067 L 112.72591 513.751 L 107.49902 516.70758 L 107.49902 513.751 L 97.04536 513.751 Z M 94.669443 534.17844 L 103.222493 534.17844 L 103.222493 545.19854 L 94.669443 545.19854 Z M 108.449266 534.17844 L 117.002435 534.17844 L 117.002435 545.19854 L 108.449266 545.19854 Z M 122.387575 534.17844 L 130.9405 534.17844 L 130.9405 545.19854 L 122.387575 545.19854 Z"/></g></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/info-button
tags: $:/tags/Image
<svg class="tw-image-info-button tw-image-button" viewBox="294 150 58 58" width="22pt" height="22pt"><path d="M 342.76236 158.98764 C 331.77887 148.0041 313.97113 148.0041 302.98764 158.98764 C 292.0041 169.97113 292.0041 187.77887 302.98764 198.76236 C 313.97113 209.7459 331.77887 209.7459 342.76236 198.76236 C 353.7459 187.77887 353.7459 169.97113 342.76236 158.98764 M 326.5425 157.5 L 326.5425 157.5 C 327.72545 157.5 328.72201 157.91022 329.5337 158.73088 C 330.34465 159.55157 330.75 160.54402 330.75 161.7075 C 330.75 162.87172 330.33979 163.86316 329.51911 164.68385 C 328.69842 165.5045 327.70674 165.91501 326.5425 165.91501 C 325.39801 165.91501 324.4153 165.5045 323.5946 164.68385 C 322.77393 163.86316 322.36372 162.87172 322.36372 161.7075 C 322.36372 160.54402 322.76906 159.55157 323.58 158.73088 C 324.39171 157.91022 325.3793 157.5 326.5425 157.5 Z M 327.80211 190.47259 C 324.91945 195.49132 321.85778 198 318.61462 198 C 317.37452 198 316.38691 197.65158 315.65186 196.9555 C 314.9176 196.25866 314.54943 195.37617 314.54943 194.30782 C 314.54943 193.60202 314.71223 192.70572 315.03629 191.61813 L 319.0151 177.93651 C 319.39685 176.61922 319.58735 175.62754 319.58735 174.95991 C 319.58735 174.53996 319.40582 174.16692 319.04356 173.84286 C 318.68052 173.51905 318.18469 173.35701 317.55527 173.35701 C 317.26861 173.35701 316.92506 173.36677 316.5246 173.38548 L 316.89661 172.2407 L 326.59967 170.66627 L 328.31744 170.66627 L 322.44986 191.01638 C 322.12503 192.18064 321.963 192.94337 321.963 193.30666 C 321.963 193.51588 322.04862 193.71121 322.2204 193.89273 C 322.39218 194.07425 322.5737 194.16554 322.7642 194.16477 C 323.08903 194.16554 323.4131 194.02221 323.73792 193.73559 C 324.59605 193.02976 325.6267 191.75142 326.82838 189.90008 Z"/></svg>

View File

@@ -0,0 +1,4 @@
title: $:/core/images/menu-button
tags: $:/tags/Image
<svg class="tw-image-menu-button tw-image-button" viewBox="216 585 63 45" width="22pt" height="22pt"><g><path d="M 274.5 585 L 229.5 585 C 227.01472 585 225 587.01472 225 589.5 L 225 589.5 C 225 591.98528 227.01472 594 229.5 594 L 274.5 594 C 276.98528 594 279 591.98528 279 589.5 L 279 589.5 C 279 587.01472 276.98528 585 274.5 585 Z"/><path d="M 274.5 603 L 229.5 603 C 227.01472 603 225 605.01472 225 607.5 L 225 607.5 C 225 609.98528 227.01472 612 229.5 612 L 274.5 612 C 276.98528 612 279 609.98528 279 607.5 L 279 607.5 C 279 605.01472 276.98528 603 274.5 603 Z"/><path d="M 274.5 621 L 229.5 621 C 227.01472 621 225 623.01472 225 625.5 L 225 625.5 C 225 627.9853 227.01472 630 229.5 630 L 274.5 630 C 276.98528 630 279 627.9853 279 625.5 L 279 625.5 C 279 623.01472 276.98528 621 274.5 621 Z"/></g></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/new-button
tags: $:/tags/Image
<svg class="tw-image-new-button tw-image-button" viewBox="83 81 50 50" width="22pt" height="22pt"><path d="M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/options-button
tags: $:/tags/Image
<svg class="tw-image-options-button tw-image-button" viewBox="434 218 68 68" width="22pt" height="22pt"><path d="M 478.39696 232.53705 L 478.39696 232.53705 C 477.11453 231.85132 475.77877 231.30146 474.4106 230.88735 L 474.4106 218.24993 L 461.58944 218.24993 L 461.58944 230.88735 C 460.22126 231.30146 458.8855 231.85132 457.60308 232.53705 L 448.66825 223.60214 L 439.6022 232.66814 L 448.53716 241.60304 C 447.8515 242.88541 447.30158 244.22116 446.88747 245.58935 L 434.25 245.58935 L 434.25 258.41052 L 446.88747 258.41052 C 447.30158 259.7787 447.8515 261.11446 448.53716 262.39689 L 439.6022 271.33173 L 448.66825 280.39779 L 457.60308 271.46281 C 458.8855 272.14862 460.22126 272.69847 461.58944 273.11251 L 461.58944 285.74986 L 474.4106 285.74986 L 474.4106 273.11251 C 475.77877 272.69847 477.11453 272.14862 478.39696 271.46281 L 487.3318 280.39779 L 496.3977 271.33173 L 487.46287 262.39689 C 488.14854 261.11446 488.6984 259.7787 489.11257 258.41052 L 501.7499 258.41052 L 501.7499 245.58935 L 489.11257 245.58935 C 488.6984 244.22116 488.14854 242.88541 487.46287 241.60304 L 496.3977 232.66814 L 487.3318 223.60214 Z M 475.3328 244.66714 C 479.38253 248.71698 479.38253 255.2829 475.3328 259.33273 C 471.28297 263.3826 464.71706 263.3826 460.66723 259.33273 C 456.61737 255.2829 456.61737 248.71698 460.66723 244.66714 C 464.71706 240.61734 471.28297 240.61734 475.3328 244.66714"/></svg>

View File

@@ -1,3 +1,4 @@
title: $:/core/images/save-button
tags: $:/tags/Image
<svg class="tw-image-save-button tw-image-button" viewBox="4 512 64 60" width="22pt" height="21pt"><path d="M 13.5 537.75 L 11.5 537.75 C 11.5 537.75 11.5 537.75 11.5 537.75 C 7.6340064 537.75 4.4999994 540.884 4.5 544.75 L 4.5 564.5 L 4.5 564.5 C 4.5 564.5 4.5 564.5 4.5 564.5 L 4.5 564.5 C 4.5000006 568.366 7.634007 571.5 11.5 571.5 L 60.5 571.5 C 64.365993 571.5 67.5 568.366 67.5 564.5 L 67.5 544.75 C 67.5 540.884 64.365993 537.75 60.5 537.75 L 58.5 537.75 L 49.5 546.75 L 50 546.75 C 52.20914 546.75 54 548.54086 54 550.75 L 54 556.25 C 54 558.45914 52.20914 560.25 50 560.25 L 36 560.25 L 22 560.25 C 19.790861 560.25 18 558.45914 18 556.25 L 18 556.25 C 18 556.25 18 556.25 18 556.25 L 18 550.75 C 18 548.54086 19.790861 546.75 22 546.75 C 22 546.75 22 546.75 22 546.75 L 22.5 546.75 Z"/><path d="M 16.37132 533.87132 L 33.87868 551.37868 C 35.050253 552.55025 36.949747 552.55025 38.12132 551.37868 L 55.62868 533.87132 C 56.800252 532.69975 56.800252 530.80025 55.62868 529.62868 C 55.06607 529.06607 54.30301 528.75 53.50736 528.75 L 48 528.75 C 46.343146 528.75 45 527.40685 45 525.75 L 45 516 C 45 514.34315 43.656854 513 42 513 L 30 513 C 28.343146 513 27 514.34315 27 516 L 27 525.75 C 27 527.40685 25.656854 528.75 24 528.75 L 18.492641 528.75 C 16.835786 528.75 15.492641 530.09315 15.492641 531.75 C 15.492641 532.54565 15.808711 533.3087 16.37132 533.87132 Z"/></svg>

View File

@@ -4,6 +4,17 @@ Advanced/Caption: Advanced
Advanced/Hint: Internal information about this TiddlyWiki
Advanced/LoadedModules/Caption: Loaded Modules
Advanced/LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process.
Advanced/Settings/Caption: Settings
Advanced/Settings/Hint: These advanced settings let you customise the behaviour of TiddlyWiki.
Advanced/Settings/NavigationAddressBar/Caption: Navigation Address Bar
Advanced/Settings/NavigationAddressBar/Hint: Behaviour of the browser address bar when navigating to a tiddler:
Advanced/Settings/NavigationAddressBar/No/Description: Do not update the address bar
Advanced/Settings/NavigationAddressBar/Permalink/Description: Include the target tiddler
Advanced/Settings/NavigationAddressBar/Permaview/Description: Include the target tiddler and the current story sequence
Advanced/Settings/NavigationHistory/Caption: Navigation History
Advanced/Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler:
Advanced/Settings/NavigationHistory/No/Description: Do not update history
Advanced/Settings/NavigationHistory/Yes/Description: Update history
Advanced/TiddlerFields/Caption: Tiddler Fields
Advanced/TiddlerFields/Hint: This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers).
Appearance/Caption: Appearance
@@ -14,9 +25,9 @@ Appearance/Palette/Editor/Clone/Prompt: It is recommended that you clone this sh
Appearance/Palette/Editor/Prompt/Modified: This shadow palette has been modified
Appearance/Palette/Editor/Prompt: Editing
Appearance/Palette/Editor/Reset/Caption: reset
Appearance/Palette/ShowEditor/Caption: show editor
Appearance/Palette/HideEditor/Caption: hide editor
Appearance/Palette/Prompt: Current palette:
Appearance/Palette/ShowEditor/Caption: show editor
Appearance/StoryView/Caption: Story View
Appearance/StoryView/Prompt: Current view:
Appearance/Theme/Caption: Theme
@@ -40,6 +51,9 @@ Plugins/Caption: Plugins
Plugins/Fields/Description: Description
Plugins/Fields/Title: Title
Plugins/Fields/Version: Version
Plugins/Language/Prompt: Languages
Plugins/Plugin/Prompt: Plugins
Plugins/Theme/Prompt: Themes
Saving/AutoSave/Disabled/Button: enable
Saving/AutoSave/Disabled/Prompt: Autosave is currently disabled
Saving/AutoSave/Enabled/Button: disable

View File

@@ -1,7 +1,6 @@
title: $:/language/Docs/ModuleTypes/
animation: Animations that may be used with the RevealWidget.
browser-startup: Startup functions that are only executed in the browser.
command: Commands that can be executed under Node.js.
config: Data to be inserted into `$tw.config`.
filteroperator: Individual filter operator methods.

View File

@@ -0,0 +1,100 @@
title: $:/language/Docs/PaletteColours/
alert-background: Alert background
alert-border: Alert border
alert-highlight: Alert highlight
alert-muted-foreground: Alert muted foreground
background: General background
blockquote-bar: Blockquote bar
code-background: Code background
code-border: Code border
code-foreground: Code foreground
download-background: Download button background
download-foreground: Download button foreground
dragger-background: Dragger background
dragger-foreground: Dragger foreground
dropdown-background: Dropdown background
dropdown-border: Dropdown border
dropdown-tab-background-selected: Dropdown tab background for selected tabs
dropdown-tab-background: Dropdown tab background
dropzone-background: Dropzone background
external-link-background-hover: External link background hover
external-link-background-visited: External link background visited
external-link-background: External link background
external-link-foreground-hover: External link foreground hover
external-link-foreground-visited: External link foreground visited
external-link-foreground: External link foreground
foreground: General foreground
message-background: Message box background
message-border: Message box border
message-foreground: Message box foreground
modal-backdrop: Modal backdrop
modal-background: Modal background
modal-border: Modal border
modal-footer-background: Modal footer background
modal-footer-border: Modal footer border
modal-header-border: Modal header border
muted-foreground: General muted foreground
notification-background: Notification background
notification-border: Notification border
page-background: Page background
pre-background: Preformatted code background
pre-border: Preformatted code border
primary: General primary
sidebar-button-foreground: Sidebar button foreground
sidebar-controls-foreground-hover: Sidebar controls foreground hover
sidebar-controls-foreground: Sidebar controls foreground
sidebar-foreground-shadow: Sidebar foreground shadow
sidebar-foreground: Sidebar foreground
sidebar-muted-foreground-hover: Sidebar muted foreground hover
sidebar-muted-foreground: Sidebar muted foreground
sidebar-tab-background-selected: Sidebar tab background for selected tabs
sidebar-tab-background: Sidebar tab background
sidebar-tab-border-selected: Sidebar tab border for selected tabs
sidebar-tab-border: Sidebar tab border
sidebar-tab-divider: Sidebar tab divider
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
static-alert-foreground: Static alert foreground
tab-background-selected: Tab background for selected tabs
tab-background: Tab background
tab-border-selected: Tab border for selected tabs
tab-border: Tab border
tab-divider: Tab divider
tab-foreground-selected: Tab foreground for selected tabs
tab-foreground: Tab foreground
table-border: Table border
table-footer-background: Table footer background
table-header-background: Table header background
tag-background: Tag background
tag-foreground: Tag foreground
tiddler-background: Tiddler background
tiddler-border: Tiddler border
tiddler-controls-foreground-hover: Tiddler controls foreground hover
tiddler-controls-foreground-selected: Tiddler controls foreground for selected controls
tiddler-controls-foreground: Tiddler controls foreground
tiddler-editor-background: Tiddler editor background
tiddler-editor-border-image: Tiddler editor border image
tiddler-editor-border: Tiddler editor border
tiddler-editor-fields-even: Tiddler editor background for even fields
tiddler-editor-fields-odd: Tiddler editor background for odd fields
tiddler-info-background: Tiddler info panel background
tiddler-info-border: Tiddler info panel border
tiddler-info-tab-background: Tiddler info panel tab background
tiddler-link-background: Tiddler link background
tiddler-link-foreground: Tiddler link foreground
tiddler-subtitle-foreground: Tiddler subtitle foreground
tiddler-title-foreground: Tiddler title foreground
toolbar-new-button: Toolbar 'new tiddler' button foreground
toolbar-options-button: Toolbar 'options' button foreground
toolbar-save-button: Toolbar 'save' button foreground
toolbar-info-button: Toolbar 'info' button foreground
toolbar-edit-button: Toolbar 'edit' button foreground
toolbar-close-button: Toolbar 'close' button foreground
toolbar-delete-button: Toolbar 'delete' button foreground
toolbar-cancel-button: Toolbar 'cancel' button foreground
toolbar-done-button: Toolbar 'done' button foreground
untagged-background: Untagged pill background
very-muted-foreground: Very muted foreground

View File

@@ -1,6 +1,6 @@
title: $:/language/EditTemplate/
Body/Hint: Use WikiText to add formatting, images, and dynamic features
Body/Hint: Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features
Body/Placeholder: Type the text for this tiddler
Body/Preview/Button/Hide: hide preview
Body/Preview/Button/Show: show preview
@@ -8,6 +8,8 @@ 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
Tags/Add/Button: add
Tags/Add/Placeholder: tag name
Type/Placeholder: content type

View File

@@ -16,6 +16,8 @@ hack-to-give-us-something-to-compare-against: A temporary storage field used in
icon: The title of the tiddler containing the icon associated with a tiddler
library: If set to "yes" indicates that a tiddler should be saved as a JavaScript library
list: An ordered list of tiddler titles associated with a tiddler
list-before: If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty
list-after: If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles
modified: The date and time at which a tiddler was last modified
modifier: The tiddler title associated with the person who last modified a tiddler
name: The human readable name associated with a plugin tiddler
@@ -29,4 +31,4 @@ tags: A list of tags associated with a tiddler
text: The body text of a tiddler
title: The unique name of a tiddler
type: The content type of a tiddler
version: Version information for a plugin
version: Version information for a plugin

View File

@@ -0,0 +1,12 @@
title: $:/language/Filters/
AllTiddlers: All tiddlers except system tiddlers
RecentTiddlers: Recently modified tiddlers
AllTags: All tags except system tags
Missing: Missing tiddlers
Drafts: Draft tiddlers
Orphans: Orphan tiddlers
SystemTiddlers: System tiddlers
ShadowTiddlers: Shadow tiddlers
OverriddenShadowTiddlers: Overridden shadow tiddlers
SystemTags: System tags

View File

@@ -0,0 +1,11 @@
title: $:/language/Help/build
description: Automatically run configured commands
Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.
```
--build <target> [<target> ...]
```
Build targets are defined in the `tiddlywiki.info` file of a wiki folder.

View File

@@ -0,0 +1,8 @@
title: $:/language/Help/clearpassword
description: Clear a password for subsequent crypto operations
Clear the password for subsequent crypto operations
```
--clearpassword
```

View File

@@ -12,3 +12,5 @@ To load tiddlers from an encrypted TiddlyWiki file you should first specify the
```
tiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html
```
Note that TiddlyWiki will not load an older version of an already loaded plugin.

View File

@@ -0,0 +1,10 @@
title: $:/language/Help/output
description: Set the base output directory for subsequent commands
Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.
```
--output <pathname>
```
If the specified pathname is relative then it is resolved relative to the current working directory.

View File

@@ -6,3 +6,7 @@ Render an individual tiddler as a specified ContentType, defaults to `text/html`
```
--rendertiddler <title> <filename> [<type>]
```
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.
Any missing directories in the path to the filename are automatically created.

View File

@@ -12,3 +12,7 @@ For example:
```
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain
```
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. The target directory is recursively created if it is missing.

View File

@@ -6,3 +6,7 @@ Saves an individual tiddler in its raw text or binary format to the specified fi
```
--savetiddler <title> <filename>
```
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.
Any missing directories in the path to the filename are automatically created.

View File

@@ -1,4 +1,32 @@
title: $:/language/
RecentChanges/DateFormat: DDth MMM YYYY
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/Upgrade/Caption: upgrade
CloseAll/Button: close all
ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text=<<title>>/>"?
ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<<title>>/>"?
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"?
ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"?
InvalidFieldName: Illegal characters in field name "<$text text=<<fieldName>>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)
MissingTiddler/Hint: Missing tiddler "<$text text=<<currentTiddler>>/>" - click {{$:/core/images/edit-button}} to create
RecentChanges/DateFormat: DDth MMM YYYY
RelativeDate/Future/Days: <<period>> days from now
RelativeDate/Future/Hours: <<period>> hours from now
RelativeDate/Future/Minutes: <<period>> minutes from now
RelativeDate/Future/Months: <<period>> months from now
RelativeDate/Future/Second: 1 second from now
RelativeDate/Future/Seconds: <<period>> seconds from now
RelativeDate/Future/Years: <<period>> years from now
RelativeDate/Past/Days: <<period>> days ago
RelativeDate/Past/Hours: <<period>> hours ago
RelativeDate/Past/Minutes: <<period>> minutes ago
RelativeDate/Past/Months: <<period>> months ago
RelativeDate/Past/Second: 1 second ago
RelativeDate/Past/Seconds: <<period>> seconds ago
RelativeDate/Past/Years: <<period>> years ago
SystemTiddler/Tooltip: This is a system tiddler
TagManager/Colour/Heading: Colour
TagManager/Count/Heading: Count
TagManager/Icon/Heading: Icon
TagManager/Tag/Heading: Tag

View File

@@ -1,10 +1,15 @@
title: $:/language/Search/
Advanced/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> matches</small>//
Filter/Caption: Filter
Filter/Hint: Search via a [[filter expression|http://tiddlywiki.com/static/TiddlerFilters.html]]
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> matches</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> matches</small>//
Shadows/Caption: Shadows
Shadows/Hint: Search for shadow tiddlers
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> matches</small>//
Standard/Caption: Standard
Standard/Hint: Search for standard tiddlers
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
System/Caption: System
System/Hint: Search for system tiddlers
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> matches</small>//

View File

@@ -1,5 +1,14 @@
title: $:/language/TiddlerInfo/
Advanced/Caption: Advanced
Advanced/PluginInfo/Empty/Hint: none
Advanced/PluginInfo/Heading: Plugin Details
Advanced/PluginInfo/Hint: This plugin contains the following shadow tiddlers:
Advanced/ShadowInfo/Heading: Shadow Status
Advanced/ShadowInfo/NotShadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is not a shadow tiddler
Advanced/ShadowInfo/Shadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is a shadow tiddler
Advanced/ShadowInfo/Shadow/Source: It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>
Advanced/ShadowInfo/OverriddenShadow/Hint: It is overridden by an ordinary tiddler
Fields/Caption: Fields
List/Caption: List
List/Empty: This tiddler does not have a list

View File

@@ -0,0 +1,3 @@
title: $:/language/Docs/Types/text/html
description: HTML markup
name: text/html

View File

@@ -20,11 +20,20 @@ Parse a sequence of commands
callback: a callback invoked as callback(err) where err is null if there was no error
*/
var Commander = function(commandTokens,callback,wiki,streams) {
var path = require("path");
this.commandTokens = commandTokens;
this.nextToken = 0;
this.callback = callback;
this.wiki = wiki;
this.streams = streams;
this.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);
};
/*
Add a string of tokens to the command queue
*/
Commander.prototype.addCommandTokens = function(commandTokens) {
Array.prototype.push.apply(this.commandTokens,commandTokens);
};
/*

View File

@@ -0,0 +1,52 @@
/*\
title: $:/core/modules/commands/build.js
type: application/javascript
module-type: command
Command to build a build target
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "build",
synchronous: true
};
var Command = function(params,commander) {
this.params = params;
this.commander = commander;
};
Command.prototype.execute = function() {
// Get the build targets defined in the wiki
var buildTargets = $tw.boot.wikiInfo.build;
if(!buildTargets) {
return "No build targets defined"
}
// Loop through each of the specified targets
var targets;
if(this.params.length > 0) {
targets = this.params;
} else {
targets = Object.keys(buildTargets);
}
for(var targetIndex=0; targetIndex<targets.length; targetIndex++) {
var target = targets[targetIndex],
commands = buildTargets[target];
if(!commands) {
return "Build target '" + target + "' not found";
}
// Add the commands to the queue
this.commander.addCommandTokens(commands);
}
return null;
};
exports.Command = Command;
})();

View File

@@ -0,0 +1,33 @@
/*\
title: $:/core/modules/commands/clearpassword.js
type: application/javascript
module-type: command
Clear password for crypto operations
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "clearpassword",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
$tw.crypto.setPassword(null);
return null;
};
exports.Command = Command;
})();

View File

@@ -34,7 +34,7 @@ Command.prototype.execute = function() {
for(var editionIndex=0; editionIndex<editions.length; editionIndex++) {
var editionName = editions[editionIndex];
// Check the edition exists
var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + "/" + editionName;
var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + path.sep + editionName;
if(!$tw.utils.isDirectory(editionPath)) {
return "Edition '" + editionName + "' not found";
}

View File

@@ -30,8 +30,9 @@ Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing filename";
}
fs.readFile(this.params[0],"utf8",function(err,data) {
if(err) {
var ext = path.extname(self.params[0]);
fs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {
if (err) {
self.callback(err);
} else {
var fields = {title: self.params[0]},
@@ -41,7 +42,7 @@ Command.prototype.execute = function() {
self.callback("No tiddlers found in file \"" + self.params[0] + "\"");
} else {
for(var t=0; t<tiddlers.length; t++) {
self.commander.wiki.addTiddler(new $tw.Tiddler(tiddlers[t]));
self.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));
}
self.callback(null);
}

View File

@@ -0,0 +1,38 @@
/*\
title: $:/core/modules/commands/output.js
type: application/javascript
module-type: command
Command to set the default output location (defaults to current working directory)
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "output",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
var fs = require("fs"),
path = require("path");
if(this.params.length < 1) {
return "Missing output path";
}
this.commander.outputPath = path.resolve(process.cwd(),this.params[0]);
return null;
};
exports.Command = Command;
})();

View File

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

View File

@@ -35,10 +35,12 @@ Command.prototype.execute = function() {
wiki = this.commander.wiki,
filter = this.params[0],
template = this.params[1],
pathname = this.params[2],
pathname = path.resolve(this.commander.outputPath,this.params[2]),
type = this.params[3] || "text/html",
extension = this.params[4] || ".html",
tiddlers = wiki.filterTiddlers(filter);
$tw.utils.deleteDirectory(pathname);
$tw.utils.createDirectory(pathname);
$tw.utils.each(tiddlers,function(title) {
var parser = wiki.parseTiddler(template),
widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});

View File

@@ -31,10 +31,11 @@ Command.prototype.execute = function() {
fs = require("fs"),
path = require("path"),
title = this.params[0],
filename = this.params[1],
filename = path.resolve(this.commander.outputPath,this.params[1]),
tiddler = this.commander.wiki.getTiddler(title),
type = tiddler.fields.type || "text/vnd.tiddlywiki",
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"};
$tw.utils.createFileDirectories(filename);
fs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {
self.callback(err);
});

View File

@@ -95,8 +95,9 @@ SimpleServer.prototype.listen = function(port,host) {
if(username && password) {
// Check they match
if(self.checkCredentials(request,username,password) !== "ALLOWED") {
var servername = state.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
response.writeHead(401,"Authentication required",{
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to TiddlyWiki5"'
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to ' + servername + '"'
});
response.end();
return;

View File

@@ -24,6 +24,8 @@ var Command = function(params,commander) {
Command.prototype.execute = function() {
this.commander.verbose = true;
// Output the boot message log
this.commander.streams.output.write("Boot log:\n " + $tw.boot.logMessages.join("\n ") + "\n");
return null; // No error
};

View File

@@ -37,4 +37,6 @@ exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,l
exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video".split(",");
exports.htmlUnsafeElements = "script".split(",");
})();

View File

@@ -51,13 +51,13 @@ var parseTiddlerDiv = function(text /* [,fields] */) {
// Extract the text
result.text = text.substring(match.index + match[0].length,endMatch.index);
// Process the attributes
var attrRegExp = /\s*([^=\s]+)\s*=\s*"([^"]*)"/gi,
var attrRegExp = /\s*([^=\s]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi,
attrMatch;
do {
attrMatch = attrRegExp.exec(match[1]);
if(attrMatch) {
var name = attrMatch[1];
var value = attrMatch[2];
var value = attrMatch[2] || attrMatch[3];
result[name] = value;
}
} while(attrMatch);

View File

@@ -3,7 +3,7 @@ title: $:/core/modules/filters.js
type: application/javascript
module-type: wikimethod
Adds tiddler filtering to the $tw.Wiki object.
Adds tiddler filtering methods to the $tw.Wiki object.
\*/
(function(){
@@ -149,17 +149,22 @@ exports.getFilterOperators = function() {
return this.filterOperators;
};
exports.filterTiddlers = function(filterString,currTiddlerTitle,tiddlerList) {
exports.filterTiddlers = function(filterString,widget,source) {
var fn = this.compileFilter(filterString);
return fn.call(this,tiddlerList || this.tiddlers,currTiddlerTitle);
return fn.call(this,source,widget);
};
/*
Compile a filter into a function with the signature fn(source,widget) where:
source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)
widget: an optional widget node for retrieving the current tiddler etc.
*/
exports.compileFilter = function(filterString) {
var filterParseTree;
try {
filterParseTree = this.parseFilter(filterString);
} catch(e) {
return function(source,currTiddlerTitle) {
return function(source,widget) {
return ["Filter error: " + e];
};
}
@@ -171,14 +176,20 @@ exports.compileFilter = function(filterString) {
var self = this;
$tw.utils.each(filterParseTree,function(operation) {
// Create a function for the chain of operators in the operation
var operationSubFunction = function(source,currTiddlerTitle) {
var operationSubFunction = function(source,widget) {
var accumulator = source,
results = [];
results = [],
currTiddlerTitle = widget && widget.getVariable("currentTiddler");
$tw.utils.each(operation.operators,function(operator) {
var operatorFunction = filterOperators[operator.operator] || filterOperators.field || function(source,operator,operations) {
return ["Filter Error: unknown operator '" + operator.operator + "'"];
},
operand = operator.operand;
var operand = operator.operand,
operatorFunction;
if(!operator.operator) {
operatorFunction = filterOperators.title;
} else if(!filterOperators[operator.operator]) {
operatorFunction = filterOperators.field;
} else {
operatorFunction = filterOperators[operator.operator];
}
if(operator.indirect) {
operand = self.getTextReference(operator.operand,"",currTiddlerTitle);
}
@@ -190,42 +201,58 @@ exports.compileFilter = function(filterString) {
regexp: operator.regexp
},{
wiki: self,
currTiddlerTitle: currTiddlerTitle
widget: widget
});
accumulator = results;
if($tw.utils.isArray(results)) {
accumulator = self.makeTiddlerIterator(results);
} else {
accumulator = results;
}
});
return results;
if($tw.utils.isArray(results)) {
return results;
} else {
var resultArray = [];
results(function(tiddler,title) {
resultArray.push(title);
});
return resultArray;
}
};
// Wrap the operator functions in a wrapper function that depends on the prefix
operationFunctions.push((function() {
switch(operation.prefix || "") {
case "": // No prefix means that the operation is unioned into the result
return function(results,source,currTiddlerTitle) {
$tw.utils.pushTop(results,operationSubFunction(source,currTiddlerTitle));
return function(results,source,widget) {
$tw.utils.pushTop(results,operationSubFunction(source,widget));
};
case "-": // The results of this operation are removed from the main result
return function(results,source,currTiddlerTitle) {
$tw.utils.removeArrayEntries(results,operationSubFunction(source,currTiddlerTitle));
return function(results,source,widget) {
$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));
};
case "+": // This operation is applied to the main results so far
return function(results,source,currTiddlerTitle) {
return function(results,source,widget) {
// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved
source = results.slice(0);
source = self.makeTiddlerIterator(results);
results.splice(0,results.length);
$tw.utils.pushTop(results,operationSubFunction(source,currTiddlerTitle));
$tw.utils.pushTop(results,operationSubFunction(source,widget));
};
}
})());
});
// Return a function that applies the operations to a source array/hashmap of tiddler titles
return function(source,currTiddlerTitle) {
source = source || self.tiddlers;
// Return a function that applies the operations to a source iterator of tiddler titles
return $tw.perf.measure("filter",function filterFunction(source,widget) {
if(!source) {
source = self.each;
} else if(typeof source === "object") { // Array or hashmap
source = self.makeTiddlerIterator(source);
}
var results = [];
$tw.utils.each(operationFunctions,function(operationFunction) {
operationFunction(results,source,currTiddlerTitle);
operationFunction(results,source,widget);
});
return results;
};
});
};
})();

View File

@@ -0,0 +1,31 @@
/*\
title: $:/core/modules/filters/after.js
type: application/javascript
module-type: filteroperator
Filter operator returning the tiddler from the current list that is after the tiddler named in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.after = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push(title);
});
var index = results.indexOf(operator.operand);
if(index === -1 || index > (results.length - 2)) {
return [];
} else {
return [results[index + 1]];
}
};
})();

View File

@@ -0,0 +1,56 @@
/*\
title: $:/core/modules/filters/all.js
type: application/javascript
module-type: filteroperator
Filter operator for selecting tiddlers
[all[shadows+tiddlers]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var allFilterOperators;
function getAllFilterOperators() {
if(!allFilterOperators) {
allFilterOperators = {};
$tw.modules.applyMethods("allfilteroperator",allFilterOperators);
}
return allFilterOperators;
}
/*
Export our filter function
*/
exports.all = function(source,operator,options) {
// Get our suboperators
var allFilterOperators = getAllFilterOperators();
// Cycle through the suboperators accumulating their results
var results = [],
subops = operator.operand.split("+");
// Check for common optimisations
if(subops.length === 1 && subops[0] === "tiddlers") {
return options.wiki.each;
} else if(subops.length === 1 && subops[0] === "shadows") {
return options.wiki.eachShadow;
} else if(subops.length === 2 && subops[0] === "tiddlers" && subops[1] === "shadows") {
return options.wiki.eachTiddlerPlusShadows;
} else if(subops.length === 2 && subops[0] === "shadows" && subops[1] === "tiddlers") {
return options.wiki.eachShadowPlusTiddlers;
}
// Do it the hard way
for(var t=0; t<subops.length; t++) {
var subop = allFilterOperators[subops[t]];
if(subop) {
$tw.utils.pushTop(results,subop(source,operator.prefix,options));
}
}
return results;
};
})();

View File

@@ -0,0 +1,27 @@
/*\
title: $:/core/modules/filters/all/current.js
type: application/javascript
module-type: allfilteroperator
Filter function for [all[current]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.current = function(source,prefix,options) {
var currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler");
if(currTiddlerTitle) {
return [currTiddlerTitle];
} else {
return [];
}
};
})();

View File

@@ -0,0 +1,22 @@
/*\
title: $:/core/modules/filters/all/missing.js
type: application/javascript
module-type: allfilteroperator
Filter function for [all[missing]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.missing = function(source,prefix,options) {
return options.wiki.getMissingTitles();
};
})();

View File

@@ -0,0 +1,22 @@
/*\
title: $:/core/modules/filters/all/orphans.js
type: application/javascript
module-type: allfilteroperator
Filter function for [all[orphans]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.orphans = function(source,prefix,options) {
return options.wiki.getOrphanTitles();
};
})();

View File

@@ -0,0 +1,22 @@
/*\
title: $:/core/modules/filters/all/shadows.js
type: application/javascript
module-type: allfilteroperator
Filter function for [all[shadows]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.shadows = function(source,prefix,options) {
return options.wiki.allShadowTitles();
};
})();

View File

@@ -0,0 +1,22 @@
/*\
title: $:/core/modules/filters/all/tiddlers.js
type: application/javascript
module-type: allfilteroperator
Filter function for [all[tiddlers]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.tiddlers = function(source,prefix,options) {
return options.wiki.allTitles();
};
})();

View File

@@ -17,20 +17,9 @@ Export our filter function
*/
exports.backlinks = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -0,0 +1,31 @@
/*\
title: $:/core/modules/filters/before.js
type: application/javascript
module-type: filteroperator
Filter operator returning the tiddler from the current list that is before the tiddler named in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.before = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push(title);
});
var index = results.indexOf(operator.operand);
if(index <= 0) {
return [];
} else {
return [results[index - 1]];
}
};
})();

View File

@@ -16,18 +16,9 @@ Filter operator that selects one tiddler for each unique value of the specified
Export our filter function
*/
exports.each = function(source,operator,options) {
// Convert the source to an array if necessary
if(!$tw.utils.isArray(source)) {
var copy = [];
$tw.utils.each(source,function(element,title) {
copy.push(title);
});
source = copy;
}
// Collect up the first tiddler with each unique value of the specified field
var results = [],values = {};
$tw.utils.each(source,function(title) {
var tiddler = options.wiki.getTiddler(title);
var results = [],
values = {};
source(function(tiddler,title) {
if(tiddler) {
var value = tiddler.getFieldString(operator.operand);
if(!$tw.utils.hop(values,value)) {

View File

@@ -16,23 +16,14 @@ Filter operator that selects one tiddler for each unique day covered by the spec
Export our filter function
*/
exports.eachday = function(source,operator,options) {
var results = [],
values = [];
// Function to convert a date/time to a date integer
var toDate = function(value) {
value = (new Date(value)).setHours(0,0,0,0);
return value+0;
};
// Convert the source to an array if necessary
if(!$tw.utils.isArray(source)) {
var copy = [];
$tw.utils.each(source,function(element,title) {
copy.push(title);
});
source = copy;
}
// Collect up the first tiddler with each unique day value of the specified field
var results = [],values = [];
$tw.utils.each(source,function(title) {
var tiddler = options.wiki.getTiddler(title);
source(function(tiddler,title) {
if(tiddler && tiddler.fields[operator.operand]) {
var value = toDate(tiddler.fields[operator.operand]);
if(values.indexOf(value) === -1) {

View File

@@ -17,36 +17,47 @@ Export our filter function
*/
exports.field = function(source,operator,options) {
var results = [],
fieldname = (operator.suffix || operator.operator).toLowerCase(),
isTitle = fieldname === "title";
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title),
text = tiddler ? tiddler.getFieldString(fieldname) : (isTitle ? title : null),
match;
if(text !== null) {
if(operator.regexp) {
match = !!operator.regexp.exec(text);
} else {
match = text === operator.operand;
}
if(operator.prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
fieldname = (operator.suffix || operator.operator || "title").toLowerCase();
if(operator.prefix === "!") {
if(operator.regexp) {
source(function(tiddler,title) {
if(tiddler) {
var text = tiddler.getFieldString(fieldname);
if(text !== null && !operator.regexp.exec(text)) {
results.push(title);
}
}
});
} else {
source(function(tiddler,title) {
if(tiddler) {
var text = tiddler.getFieldString(fieldname);
if(text !== null && text !== operator.operand) {
results.push(title);
}
}
});
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
if(operator.regexp) {
source(function(tiddler,title) {
if(tiddler) {
var text = tiddler.getFieldString(fieldname);
if(text !== null && !!operator.regexp.exec(text)) {
results.push(title);
}
}
});
} else {
source(function(tiddler,title) {
if(tiddler) {
var text = tiddler.getFieldString(fieldname);
if(text !== null && text === operator.operand) {
results.push(title);
}
}
});
}
}
return results;
};

View File

@@ -16,28 +16,14 @@ Filter operator for returning the names of the fields on the selected tiddlers
Export our filter function
*/
exports.fields = function(source,operator,options) {
var self = this,
results = [];
// Function to check an individual title
function checkTiddler(title) {
// Return the fields on the specified tiddler
var tiddler = options.wiki.getTiddler(title);
var results = [];
source(function(tiddler,title) {
if(tiddler) {
for(var fieldName in tiddler.fields) {
$tw.utils.pushTop(results,fieldName);
}
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -0,0 +1,31 @@
/*\
title: $:/core/modules/filters/get.js
type: application/javascript
module-type: filteroperator
Filter operator for replacing tiddler titles by the value of the field specified in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.get = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
if(tiddler) {
var value = tiddler.getFieldString(operator.operand);
if(value) {
results.push(value);
}
}
});
return results;
};
})();

View File

@@ -17,27 +17,17 @@ Export our filter function
*/
exports.has = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match = $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== "";
if(operator.prefix === "!") {
match = !match;
}
if(match) {
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === "")) {
results.push(title);
}
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== "") {
results.push(title);
}
});
}
return results;

View File

@@ -16,26 +16,13 @@ Filter operator for returning the indexes of a data tiddler
Export our filter function
*/
exports.indexes = function(source,operator,options) {
var self = this,
results = [];
// Function to check an individual title
function checkTiddler(title) {
// Return the fields on the specified tiddler
var data = options.wiki.getTiddlerData(title,{});
var results = [];
source(function(tiddler,title) {
var data = options.wiki.getTiddlerData(title);
if(data) {
$tw.utils.pushTop(results,Object.keys(data));
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
results.sort();
return results;
};

View File

@@ -16,32 +16,20 @@ Filter function for [is[current]]
Export our filter function
*/
exports.current = function(source,prefix,options) {
var results = [];
// Function to check a tiddler
function checkTiddler(title) {
if(title !== options.currTiddlerTitle) {
results.push(title);
}
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
if(prefix === "!") {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
if(source.indexOf(options.currTiddlerTitle) !== -1) {
results.push(options.currTiddlerTitle);
var results = [],
currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler");
if(prefix === "!") {
source(function(tiddler,title) {
if(title !== currTiddlerTitle) {
results.push(title);
}
}
});
} else {
if(prefix === "!") {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
} else {
results.push(options.currTiddlerTitle);
}
source(function(tiddler,title) {
if(title === currTiddlerTitle) {
results.push(title);
}
});
}
return results;
};

View File

@@ -17,24 +17,17 @@ Export our filter function
*/
exports.image = function(source,prefix,options) {
var results = [];
// Function to check a tiddler
function checkTiddler(title) {
var match = options.wiki.isImageTiddler(title);
if(prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(prefix === "!") {
source(function(tiddler,title) {
if(!options.wiki.isImageTiddler(title)) {
results.push(title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(options.wiki.isImageTiddler(title)) {
results.push(title);
}
});
}
return results;

View File

@@ -16,31 +16,19 @@ Filter function for [is[missing]]
Export our filter function
*/
exports.missing = function(source,prefix,options) {
var results = [],
missingTitles;
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
missingTitles = options.wiki.getMissingTitles();
$tw.utils.each(source,function(title) {
var match = missingTitles.indexOf(title) !== -1;
if(prefix === "!") {
match = !match;
}
if(match) {
var results = [];
if(prefix === "!") {
source(function(tiddler,title) {
if(options.wiki.tiddlerExists(title)) {
results.push(title);
}
});
} else {
if(prefix !== "!") {
missingTitles = options.wiki.getMissingTitles();
$tw.utils.each(missingTitles,function(title) {
source(function(tiddler,title) {
if(!options.wiki.tiddlerExists(title)) {
results.push(title);
});
} else {
$tw.utils.each(source,function(element,title) {
results.push(title);
});
}
}
});
}
return results;
};

View File

@@ -18,24 +18,15 @@ Export our filter function
exports.orphan = function(source,prefix,options) {
var results = [],
orphanTitles = options.wiki.getOrphanTitles();
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
var match = orphanTitles.indexOf(title) !== -1;
if(prefix === "!") {
match = !match;
}
if(match) {
if(prefix === "!") {
source(function(tiddler,title) {
if(orphanTitles.indexOf(title) === -1) {
results.push(title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
var match = orphanTitles.indexOf(title) !== -1;
if(prefix === "!") {
match = !match;
}
if(match) {
source(function(tiddler,title) {
if(orphanTitles.indexOf(title) !== -1) {
results.push(title);
}
});

View File

@@ -17,31 +17,18 @@ Export our filter function
*/
exports.shadow = function(source,prefix,options) {
var results = [];
// Function to check a tiddler
function checkTiddler(title) {
var match = options.wiki.isShadowTiddler(title);
if(prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(prefix === "!") {
source(function(tiddler,title) {
if(!options.wiki.isShadowTiddler(title)) {
results.push(title);
}
});
} else {
if(prefix !== "!") {
$tw.utils.each(options.wiki.shadowTiddlers,function(tiddler,title) {
source(function(tiddler,title) {
if(options.wiki.isShadowTiddler(title)) {
results.push(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
}
});
}
return results;
};

View File

@@ -17,24 +17,17 @@ Export our filter function
*/
exports.system = function(source,prefix,options) {
var results = [];
// Function to check a tiddler
function checkTiddler(title) {
var match = options.wiki.isSystemTiddler(title);
if(prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(prefix === "!") {
source(function(tiddler,title) {
if(!options.wiki.isSystemTiddler(title)) {
results.push(title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(options.wiki.isSystemTiddler(title)) {
results.push(title);
}
});
}
return results;

View File

@@ -0,0 +1,37 @@
/*\
title: $:/core/modules/filters/is/tag.js
type: application/javascript
module-type: isfilteroperator
Filter function for [is[tag]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.tag = function(source,prefix,options) {
var results = [],
tagMap = options.wiki.getTagMap();
if(prefix === "!") {
source(function(tiddler,title) {
if(!$tw.utils.hop(tagMap,title)) {
results.push(title);
}
});
} else {
source(function(tiddler,title) {
if($tw.utils.hop(tagMap,title)) {
results.push(title);
}
});
}
return results;
};
})();

View File

@@ -17,24 +17,17 @@ Export our filter function
*/
exports.tiddler = function(source,prefix,options) {
var results = [];
// Function to check a tiddler
function checkTiddler(title) {
var match = options.wiki.tiddlerExists(title);
if(prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(prefix === "!") {
source(function(tiddler,title) {
if(!options.wiki.tiddlerExists(title)) {
results.push(title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(options.wiki.tiddlerExists(title)) {
results.push(title);
}
});
}
return results;

View File

@@ -17,20 +17,16 @@ Export our filter function
*/
exports.limit = function(source,operator,options) {
var results = [];
// Convert to an array if necessary
if(!$tw.utils.isArray(source)) {
var copy = [];
$tw.utils.each(source,function(element,title) {
copy.push(title);
});
source = copy;
}
// Convert to an array
source(function(tiddler,title) {
results.push(title);
});
// Slice the array if necessary
var limit = Math.min(source.length,parseInt(operator.operand,10));
var limit = Math.min(results.length,parseInt(operator.operand,10));
if(operator.prefix === "!") {
results = source.slice(source.length - limit);
results = results.slice(-limit);
} else {
results = source.slice(0,limit);
results = results.slice(0,limit);
}
return results;
};

View File

@@ -17,20 +17,9 @@ Export our filter function
*/
exports.links = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -18,29 +18,16 @@ Export our filter function
exports.list = function(source,operator,options) {
var results = [],
tr = $tw.utils.parseTextReference(operator.operand),
list = options.wiki.getTiddlerList(tr.title || options.currTiddlerTitle,tr.field,tr.index);
function checkTiddler(title) {
var match = list.indexOf(title) !== -1;
if(operator.prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler"),
list = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(list.indexOf(title) === -1) {
results.push(title);
}
});
} else {
if(operator.prefix !== "!") {
results = list;
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
results = list;
}
return results;
};

View File

@@ -17,20 +17,9 @@ Export our filter function
*/
exports.listed = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title));
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -17,10 +17,7 @@ Reverse list
*/
exports.reverse = function(source,operator,options) {
var results = [];
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
$tw.utils.each(source,function(title) {
source(function(tiddler,title) {
results.unshift(title);
});
return results;
@@ -30,33 +27,36 @@ exports.reverse = function(source,operator,options) {
First entry/entries in list
*/
exports.first = function(source,operator,options) {
var count = parseInt(operator.operand) || 1;
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
return source.slice(0,Math.min(count,source.length));
var count = parseInt(operator.operand) || 1,
results = [];
source(function(tiddler,title) {
results.push(title);
});
return results.slice(0,count);
};
/*
Last entry/entries in list
*/
exports.last = function(source,operator,options) {
var count = parseInt(operator.operand) || 1;
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
return source.slice(-count);
var count = parseInt(operator.operand) || 1,
results = [];
source(function(tiddler,title) {
results.push(title);
});
return results.slice(-count);
};
/*
All but the first entry/entries of the list
*/
exports.rest = function(source,operator,options) {
var count = parseInt(operator.operand) || 1;
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
return source.slice(count);
var count = parseInt(operator.operand) || 1,
results = [];
source(function(tiddler,title) {
results.push(title);
});
return results.slice(count);
};
exports.butfirst = exports.rest;
exports.bf = exports.rest;
@@ -65,11 +65,12 @@ exports.bf = exports.rest;
All but the last entry/entries of the list
*/
exports.butlast = function(source,operator,options) {
var count = parseInt(operator.operand) || 1;
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
return source.slice(0,-count);
var count = parseInt(operator.operand) || 1,
results = [];
source(function(tiddler,title) {
results.push(title);
});
return results.slice(0,-count);
};
exports.bl = exports.butlast;
@@ -77,11 +78,12 @@ exports.bl = exports.butlast;
The nth member of the list
*/
exports.nth = function(source,operator,options) {
var count = parseInt(operator.operand) || 1;
if(!$tw.utils.isArray(source)) {
source = Object.keys(source).sort();
}
return source.slice(count-1,count);
var count = parseInt(operator.operand) || 1,
results = [];
source(function(tiddler,title) {
results.push(title);
});
return results.slice(count - 1,count);
};
})();

View File

@@ -16,22 +16,12 @@ Filter operator for returning the titles of the modules of a given type in this
Export our filter function
*/
exports.modules = function(source,operator,options) {
var results = [],
pushModules = function(type) {
$tw.utils.each($tw.modules.types[type],function(moduleInfo,moduleName) {
results.push(moduleName);
});
};
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
pushModules(title);
var results = [];
source(function(tiddler,title) {
$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {
results.push(moduleName);
});
} else {
$tw.utils.each(source,function(element,title) {
pushModules(title);
});
}
});
results.sort();
return results;
};

View File

@@ -18,25 +18,14 @@ Export our filter function
exports.next = function(source,operator,options) {
var results = [],
list = options.wiki.getTiddlerList(operator.operand);
function checkTiddler(title) {
source(function(tiddler,title) {
var match = list.indexOf(title);
// increment match and then test if result is in range
match++;
if(match > 0 && match < list.length) {
results.push(list[match]);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -0,0 +1,32 @@
/*\
title: $:/core/modules/filters/plugintiddlers.js
type: application/javascript
module-type: filteroperator
Filter operator for returning the titles of the shadow tiddlers within a plugin
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.plugintiddlers = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
var pluginInfo = options.wiki.getPluginInfo(title);
if(pluginInfo) {
$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {
results.push(title);
});
}
});
results.sort();
return results;
};
})();

View File

@@ -17,24 +17,17 @@ Export our filter function
*/
exports.prefix = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase();
if(operator.prefix === "!") {
match = !match;
}
if(match) {
results.push(title);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(title.substr(0,operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) {
results.push(title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {
results.push(title);
}
});
}
return results;

View File

@@ -18,25 +18,14 @@ Export our filter function
exports.previous = function(source,operator,options) {
var results = [],
list = options.wiki.getTiddlerList(operator.operand);
function checkTiddler(title) {
source(function(tiddler,title) {
var match = list.indexOf(title);
// decrement match and then test if result is in range
// increment match and then test if result is in range
match--;
if( match >= 0 ) {
if(match >= 0) {
results.push(list[match]);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -0,0 +1,28 @@
/*\
title: $:/core/modules/filters/removeprefix.js
type: application/javascript
module-type: filteroperator
Filter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.removeprefix = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {
results.push(title.substr(operator.operand.length));
}
});
return results;
};
})();

View File

@@ -17,34 +17,19 @@ Export our filter function
*/
exports.sameday = function(source,operator,options) {
var results = [],
isSameDay = function(dateField,dateString) {
var date1 = (new Date(dateField)).setHours(0,0,0,0),
date2 = (new Date($tw.utils.parseDate(dateString))).setHours(0,0,0,0);
return date1 === date2;
fieldName = operator.suffix || "modified",
targetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);
// Function to convert a date/time to a date integer
var isSameDay = function(dateField) {
return (new Date(dateField)).setHours(0,0,0,0) === targetDate;
};
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match = isSameDay(tiddler.fields.modified,operator.operand);
if(operator.prefix === "!") {
match = !match;
}
if(match) {
source(function(tiddler,title) {
if(tiddler && tiddler.fields[fieldName]) {
if(isSameDay(tiddler.fields[fieldName])) {
results.push(title);
}
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -18,7 +18,7 @@ Export our filter function
exports.search = function(source,operator,options) {
var invert = operator.prefix === "!";
return options.wiki.search(operator.operand,{
titles: source,
source: source,
invert: invert
});
};

View File

@@ -0,0 +1,30 @@
/*\
title: $:/core/modules/filters/shadowsource.js
type: application/javascript
module-type: filteroperator
Filter operator for returning the source plugins for shadow tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.shadowsource = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
var source = options.wiki.getShadowSource(title);
if(source) {
$tw.utils.pushTop(results,source);
}
});
results.sort();
return results;
};
})();

View File

@@ -17,38 +17,33 @@ Export our filter function
*/
exports.sort = function(source,operator,options) {
var results = prepare_results(source);
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",false,false);
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",false,false);
return results;
};
exports.nsort = function(source,operator,options) {
var results = prepare_results(source);
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",false,true);
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",false,true);
return results;
};
exports.sortcs = function(source,operator,options) {
var results = prepare_results(source);
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",true,false);
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",true,false);
return results;
};
exports.nsortcs = function(source,operator,options) {
var results = prepare_results(source);
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",true,true);
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",true,true);
return results;
};
var prepare_results = function (source) {
var results;
if($tw.utils.isArray(source)) {
results = source;
} else {
results = [];
$tw.utils.each(source,function(element,title) {
results.push(title);
});
}
var results = [];
source(function(tiddler,title) {
results.push(title);
});
return results;
}

View File

@@ -17,31 +17,18 @@ Export our filter function
*/
exports.tag = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match = tiddler.hasTag(operator.operand);
if(operator.prefix === "!") {
match = !match;
}
if(match) {
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(tiddler && !tiddler.hasTag(operator.operand)) {
results.push(title);
}
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(tiddler && tiddler.hasTag(operator.operand)) {
results.push(title);
}
});
}
// Sort the results if we are matching a tag
if(operator.prefix !== "!") {
results = options.wiki.sortByList(results,operator.operand);
}
return results;

View File

@@ -17,20 +17,9 @@ Export our filter function
*/
exports.tagging = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -17,23 +17,11 @@ Export our filter function
*/
exports.tags = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
source(function(tiddler,title) {
if(tiddler && tiddler.fields.tags) {
$tw.utils.pushTop(results,tiddler.fields.tags);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
});
}
});
return results;
};

View File

@@ -17,35 +17,14 @@ Export our filter function
*/
exports.title = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match = tiddler.fields[operator.operator] === operator.operand;
if(operator.prefix === "!") {
match = !match;
}
if(match) {
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(tiddler && tiddler.fields.title !== operator.operand) {
results.push(title);
}
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
});
} else {
// If we're filtering a hashmap we change the behaviour to pass through missing tiddlers
if(operator.prefix !== "!") {
results.push(operator.operand);
} else {
$tw.utils.each(source,function(element,title) {
if(title !== operator.operand) {
checkTiddler(title);
}
});
}
results.push(operator.operand);
}
return results;
};

View File

@@ -17,25 +17,17 @@ Export our filter function
*/
exports.untagged = function(source,operator,options) {
var results = [];
// Function to check an individual title
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title),
match = tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0;
if(operator.prefix !== "!") {
match = !match;
}
if(match) {
$tw.utils.pushTop(results,title);
}
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {
checkTiddler(title);
if(operator.prefix === "!") {
source(function(tiddler,title) {
if(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) {
$tw.utils.pushTop(results,title);
}
});
} else {
$tw.utils.each(source,function(element,title) {
checkTiddler(title);
source(function(tiddler,title) {
if(!tiddler || !tiddler.hasField("tags") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) {
$tw.utils.pushTop(results,title);
}
});
}
return results;

37
core/modules/language.js Normal file
View File

@@ -0,0 +1,37 @@
/*\
title: $:/core/modules/language.js
type: application/javascript
module-type: global
The $tw.Language() manages translateable strings
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Create an instance of the language manager. Options include:
wiki: wiki from which to retrieve translation tiddlers
*/
function Language(options) {
options = options || "";
this.wiki = options.wiki || $tw.wiki;
}
/*
Return a single translateable string. The title is automatically prefixed with "$:/language/"
Options include:
variables: optional hashmap of variables to supply to the language wikification
*/
Language.prototype.getString = function(title,options) {
options = options || {};
title = "$:/language/" + title;
return this.wiki.renderTiddler("text/plain",title,{variables: options.variables});
};
exports.Language = Language;
})();

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