@felixhayashi sorry I should have realised earlier that it’s worth
doing it this way so that we can have different settings for different
story rivers.
Resolves some inconsistencies over the behaviour of the new tiddler
message under various circumstances.
“new journal here” when a journal for today already exists now brings
up the existing journal for editing, and adds the required tag.
I’d be very grateful for any testing of the behaviour here: try using
new tiddler, clone tiddler, new here, new journal here, and new journal
in various combinations (eg with the draft not existing, already
existing, open or closed etc), and let me know of any peculiarities.
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.
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.
Previously we were using a message `tw-auto-save-wiki` to trigger an
autosave. The message was generated by certain UI actions such as
saving a tiddler. The trouble was that the message was being processed
before the wiki change event for the accompanying change had had a
chance to percolate. The end result was that the dirty indicator was
staying lit when using autosave.
The new approach abandons the autosave message and instead triggers the
autosave in the wiki change event when a relevant change occurs.
One happy side effect of these changes is that the dirty indicator now
works as expected with the client server edition - ie, when typing in a
draft tiddler the dirty indicator will flash briefly, and then clear
when the sync mechanism has completed saving the draft.
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
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.