Jermolene
8cc236b4dc
Fix problem with sorting missing tiddlers
...
Fixes #858
2014-09-17 12:17:43 +01:00
Jermolene
3a67fdb768
Obeisance to JSHint for core modules
...
There are still some warnings about making functions in a loop, but
I’ll fix those as a separate pull request because the fixes are more
than typographic errors.
2014-08-30 20:44:26 +01:00
Jermolene
2952afe7af
Fix for autosave
...
Re-introduces the “tw-auto-save-wiki” message. The previous approach of
automatically triggering autosave whenever a tiddler changed meant that
changing configuration changes in control panel was triggering an
autosave. Using the explicit message gives us better control of the
situations in which we’ll autosave.
Now we solve the earlier problem of there being outstanding tiddler
change events at the time that we process the “tw-auto-save-wiki” by
deferring the autosave until the outstanding change event comes in.
2014-08-29 09:58:30 +01:00
Jermolene
a637af022d
Fix problem with parseTextReference not recognising missing indices
2014-08-18 10:13:30 +01:00
Jermolene
a61169e7e8
Fix problem with parsing missing tiddlers
2014-07-31 18:07:52 +01:00
Jermolene
f793816dfa
Add subtiddler support to the transclude widget
...
Useful to be able to reach into plugins. It will enable us to do things
like extract readmes from themes that are not active.
2014-07-17 18:41:20 +01:00
Jermolene
1f6e16318a
First pass at upgrade mechanism
2014-07-12 09:09:36 +01:00
Jermolene
c9d4714e98
Extend makeTranscludeWidget
...
Add support for specifying the filename, and the fallback content
within the transclude widget that is used if the transclusion target
isn’t found
2014-07-04 21:03:11 +01:00
Jermolene
6f3e31abe5
Fixed problems with detecting changes to draft tiddlers
2014-06-23 23:28:22 +01:00
Jermolene
6d1eaeb0fc
Fix detection of draft changes
...
We were getting a lot of problems where changes to a tiddler were not
being recognised
2014-06-23 08:10:32 +01:00
Jermolene
4238af2a40
Extend listed filter operator to use any field
2014-06-13 10:58:19 +01:00
Jermolene
9547a1f01c
First pass at external image support
...
A bunch of little changes that together enable external image support.
Try:
```
tiddlywiki editions/tw5.com --verbose --build externalimages
```
Then open `externalimages.html`, look for the images in the more/types
tab of the sidebar, open them and verify that they are set with an
external SRC attribute, not a data URI.
2014-06-12 08:36:30 +01:00
Jermolene
f999b2e931
Add wiki.setText() method
2014-05-31 18:37:27 +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
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
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
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
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
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
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
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
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
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
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
b7f674c51a
First pass at refactoring filter execution
...
This is the beginning of addressing #523 .
2014-04-03 20:49:16 +01:00
Jermolene
925b3d2a5b
Fix typo
2014-03-18 21:18:46 +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
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
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
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
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
bc8b72e6eb
Use hasOwnProperty to text for tiddler existence
2014-03-09 19:20:58 +00:00
Jermolene
3636744d4f
Add support for retrieving formatted text content from the fake dom
...
The idea is to convert HTML block elements into newlines, so that the
output is readable on a terminal.
2014-02-25 14:49:07 +00:00
Jermolene
260080164f
Update setTiddlerData() to preserve tiddler dictionaries
...
Previously, data tiddlers were always being saved in JSON format,
regardless of the original format.
2014-02-23 12:33:00 +00:00
Jermolene
ec0769d7ca
Fix typo
...
Fixes #417 , thanks @pmario
2014-02-21 09:11:27 +00:00
Jermolene
2744671211
Fix generateTitle to avoid clashing with shadow tiddlers
2014-02-20 09:58:01 +00:00
Jermolene
70a120d4a6
Expand the logging mechanism to support alerts overlaid on the main screen
...
Now we get decent visual indication of sync errors, for instance. Still
work to do to coalesce alerts so that the screen doesn’t fill up with
them after an interval. And probably we should add a button to clear
all alerts.
2014-02-14 07:53:41 +00:00
Jermolene
9db887748b
Extend setTiddlerData() to set arbitrary fields
2014-02-13 17:59:33 +00:00
Jermolene
ca0c352278
Extend the transclude widget to fallback to displaying it's child nodes if the target isn't defined
2014-02-12 21:38:37 +00:00
Jermolene
a01bbd4b9c
Add automatic saving and warning on exit with unsaved changes
...
We re-use some of the existing syncer mechanism. It was already keeping
track of changes to tiddlers in the store when working with a tiddler
syncadaptor. Now it also tracks changes when there is no syncadaptor,
allowing us to provide a warning if there are unsaved changes.
2014-02-06 21:36:30 +00:00
Jermolene
1d685df928
Add support for autosave
...
Causes the wiki to be autosaved whenever clicking “done” after editing
a tiddler. Only works with savers that support autosave. We should
probably make autosave configurable
2014-02-04 21:21:01 +00:00
Jermolene
02ba92c6b5
Add [is[image]]
filter operator
2014-01-29 09:04:41 +00:00
Jermolene
0b3efe179e
Extend list filter operator to take a text reference
...
Instead of just a title. Means that we can apply the list operator to
fields other than the list field.
2014-01-25 18:14:30 +00:00
Jermolene
f4b27b33de
Fixed problem with multiple tiddlers created from dragging a single file
2014-01-24 14:09:06 +00:00
Jermolene
ed5cf8b044
Refactor importing of encrypted TiddlyWiki files so that it works on Node.js
2014-01-19 20:13:55 +00:00
Jermolene
299e9d15fb
Add support for importing encrypted TiddlyWiki documents
2014-01-19 18:43:02 +00:00
Jermolene
2c790d982f
Switch to using $tw.fakeDocument
for the fakedom document object
...
So that we can free us `$tw.document` to be the actual DOM document
2014-01-15 14:57:35 +00:00
Jermolene
b04141fefd
Don't load tiddlers that don't have a title
...
We were getting problems (eg, adding a `readme.md` to a plugin without
an accompanying `readme.md.meta` would end up creating a tiddler called
“undefined”)
2014-01-12 21:48:18 +00:00
Jermolene
1a74e2538c
Cleaning up further coding style inconsistencies that have crept in
2014-01-03 10:50:00 +00:00
Stephan Hradek
ce8c79ecfa
changed sort and sortcs to support nsort and nsortcs
2013-12-29 00:15:11 +01:00
Jermolene
12b4cc5d3e
Update wiki.readFiles() to call the callback just once
...
Now we accumulate the results and just pass them to the callback once.
2013-12-23 08:55:11 +00:00
Jermolene
bd80bf4acc
Regex optimisation suggested by @Skeeve
2013-12-20 18:14:11 +00:00
Jermolene
e66fb948c1
Typo from #296
2013-12-20 17:07:30 +00:00
Stephan Hradek
04077549ca
Fixed the typos Mario noticed
2013-12-19 20:38:59 +01:00
Stephan Hradek
42ba6852d1
changed 2 loops resolving name conflicts for new tiddlers as suggested in issue 294
2013-12-18 23:48:04 +01:00
Jermolene
6298c7aa43
Refactor wiki.forEachTiddler() and wiki.getTiddlers() to take an options parameter
2013-12-11 22:01:02 +00:00
Jermolene
6a71b399b0
Fix problem with transcluding non-string fields
...
Transcluding date or list fields (like `modified` or `tags`) was
crashing.
2013-12-11 15:51:32 +00:00
Jermolene
1b99dbb677
Add wiki.importTiddler()
...
Exactly like addTiddler except that it rejects plugins that are older
than the currently installed version.
2013-12-02 09:59:17 +00:00
Jermolene
0956ae10a0
Add support for downloading files
...
We were re-using the `tw-save-wiki` message both for saving the current
wiki and downloading a new wiki. Now we’ll use the separate
`tw-download-file` message for downloading.
Fixes #236
2013-11-27 20:51:08 +00:00
Jermolene
42fce1929c
Improve save notifications for TiddlySpot
2013-11-26 12:50:40 +00:00
Jermolene
b805633dc9
Reorganise the main file saving templates
...
We’re introducing a mechanism that allows us to decide which tiddlers
get saved. Using `$:/core/save/all` gives all tiddlers, as before.
Using `$:/core/save/empty` gives an empty wiki. Saving an empty wiki
from tw5.com isn’t the same as the empty wiki cooked from
editions/empty because the two editions have different plugins and
other system tiddlers.
2013-11-25 21:16:27 +00:00
Jermolene
939ad11eae
Rename the 'setvariable' widget to 'set'
...
Sleeker.
2013-11-15 18:31:39 +00:00
Jermolene
45c51481de
Improve performance of tag handling with some caching
2013-11-13 23:33:32 +00:00
Jermolene
d2dbc73448
Correct typo
2013-11-12 19:52:25 +00:00
Jermolene
51fe1e20e8
Make sure that searching for the empty string returns all available tiddlers
...
Makes sense because every tiddler contains the empty string. This
restores the functionality of the tag editor dropdown.
2013-11-11 15:26:41 +00:00
Jeremy Ruston
ec481415f9
Fixes for TiddlyWeb
2013-11-08 20:18:26 +00:00
Jeremy Ruston
cc0011abd3
Get rid of the "new_" prefix we had on some methods
...
There's still the "old_" prefix to get rid of too.
2013-11-08 08:51:14 +00:00
Jeremy Ruston
b7cb1d3391
Change new_widget
to widget
...
I was avoiding doing this until after the merge.
2013-11-08 08:47:00 +00:00
Jeremy Ruston
35adf4269a
Merge backlog of changes from master branch
...
This is too easy. I'm worried.
2013-11-08 08:33:27 +00:00
Jeremy Ruston
4eebe7388d
Add a wiki.makeWidget() method
...
Encapsulates some logic that has been duplicated elsewhere.
2013-10-29 14:48:24 +00:00
Jeremy Ruston
20f03de712
The big purge of the old widget mechanism
...
Getting rid of the old widget mechanism files finally gives us a payoff
for all the refactoring. Still a bit of tidying up to do, and we need
to re-introduce the animation mechanisms.
2013-10-27 22:55:36 +00:00
Jeremy Ruston
b1208a8d37
Fix problem with getTiddlerLinks()
...
It was crashing if it encountered a link widget that didn't have a `to`
attribute.
2013-10-27 13:54:39 +00:00
Jeremy Ruston
8c2fb7b8d0
Extend wiki object to have methods required for importing
2013-10-25 21:15:20 +01:00
Jeremy Ruston
26ac940637
Fix typo
2013-10-21 18:32:29 +01:00
Jeremy Ruston
e33f588b73
Let the new rendering methods accept a parent widget
2013-10-21 18:32:19 +01:00
Jeremy Ruston
25612958d7
Fixed bugs in previous commit to extend search to titles and tags of binary tiddlers
2013-10-18 16:09:10 +01:00
Jeremy Ruston
e11c620c27
Fix search filter so that titles and tags of binary tiddlers are searched
2013-10-17 16:34:50 +01:00
Jeremy Ruston
cc4940f41f
Use the setvariable widget instead of macrodef
...
setvariable is more general
2013-10-13 23:40:11 +01:00
Jeremy Ruston
9278c43a91
Add support for macro definitions
2013-10-13 22:39:05 +01:00
Jeremy Ruston
ed35d91be6
Initial Commit
...
Carried over from the abortive pull request #169
2013-10-12 17:05:13 +01:00
Jeremy Ruston
d3d72eff1b
Search over tags as well as the title and text fields
2013-10-11 08:46:09 +01:00
Jeremy Ruston
b563d8e98a
Ensure getTiddlerList() returns a copy of the tiddler list
...
Fixes #155
2013-09-18 12:12:29 +01:00
Jeremy Ruston
df0a1a7c42
Fix problem with wiki.search() incorrectly searching missing tiddlers
2013-08-24 16:51:54 +01:00
Jeremy Ruston
b88079442c
Add "listed" filter operator for retrieving the tiddlers that list a specified tiddler
2013-08-16 09:31:05 +01:00
Jeremy Ruston
6fc4e5db7c
Get rid of the old "fieldgrid" and "fieldlist" widgets
...
Instead, we'll use the "list" widget with the new support for macros.
2013-08-15 18:17:11 +01:00
Jeremy Ruston
0bda00ae71
Extend the fieldlist widget to retrieve all fields used across all tiddlers
2013-08-09 16:46:17 +01:00
Jeremy Ruston
a9a2ae2223
Add sorting by tiddler lists
...
The tag and tagging filters now sort their results by the list field of
the tag, if present
2013-08-08 17:39:34 +01:00
Jeremy Ruston
83ea953a1d
Switch the story list over to using the new list field
2013-08-07 17:54:27 +01:00
Jeremy Ruston
85007cb1e1
Correct comments
2013-08-06 15:27:02 +01:00
Jeremy Ruston
86e73ee323
Set modified field and other metadata for newly created and modified tiddlers
...
Right now we're setting the created/modified time, and only setting the
creator/modifier if the tiddler `$:/status/UserName` is defined.
2013-08-04 14:02:07 +01:00
Jeremy Ruston
1a160485a8
Documentation correction
2013-07-08 21:44:12 +01:00
Jeremy Ruston
1304bfd0d4
Special treatment so that text reference to title field works for missing tiddlers
...
The title field is the one field that we know for missing tiddlers.
This is needed in a subsequent commit of viewswitcher.
2013-07-08 15:16:55 +01:00
Jeremy Ruston
647bd51299
Fix problem with erroneous initialisation of changedTiddlers member
2013-07-03 16:00:48 +01:00
Jeremy Ruston
bf4216f3ac
Don't count references to shadow tiddlers as missing tiddlers
2013-05-31 17:53:11 +01:00
Jeremy Ruston
31a4b96f57
Fixed problem with getTextReference() not always returning a string
2013-05-27 17:55:23 +01:00
Jeremy Ruston
551ebdc005
Major refactoring of rendering mechanism
...
We now use a fake DOM implementation on the server to let us share more
rendering code between the text output vs. DOM output paths.
2013-05-17 10:12:25 +01:00
Jeremy Ruston
8564602256
Refactor rendertree to simplify context handling
...
Get rid of the separate renderContext stack and instead have a parent
pointer on renderer nodes. This lets us walk back up the render tree to
resolve context references
2013-05-15 17:32:17 +01:00
Jeremy Ruston
e501c0ec2a
Enhance TiddlyFox saver to display a notification on success
2013-05-07 18:09:15 +01:00
Jeremy Ruston
e12fbf0f9f
Comment clarification
2013-04-30 22:35:52 +01:00