1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 00:33:15 +00:00
Commit Graph

146 Commits

Author SHA1 Message Date
Jermolene
4a3a5bf1f0 Don't autosave when cancelling an edit
Fixes #1762
2015-06-13 18:08:09 +01:00
Jermolene
a79e7a1c57 Tweaks for #1662
Coding style and ui copy
2015-05-04 20:29:00 +01:00
Felix Hayashi
9693f97b16 upgrading the navigator widget
Motivation / Agenda

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

Summary

* Changed the NavigatorWidget (primarily `addToStory()`)
* Applied lingo to settings
* Applied lingo to selectbox options
2015-05-03 13:24:16 +02:00
Jermolene
9e9b9a3bf1 Avoid navigating to an empty title
Fixes #1515
2015-02-20 16:19:53 +00:00
Jermolene
8dcd080cdd Style fix 2015-02-09 21:46:54 +00:00
Tobias Beer
ca6ab6388a no error when tiddler doesn't exist
Currently **tm-delete-tiddler** throws a red error box:

```
<$button>
<$action-sendmessage $message="tm-delete-tiddler" $param="DoesntExist"/>
delete non-existing
</$button>
```

**Uncaught TypeError: Cannot read property 'fields' of undefined**
2015-02-09 12:28:42 +01:00
Jermolene
1adfe20508 Fix problem with repeatedly cancelling a draft
Fixes #1266
2014-12-22 08:40:11 +00:00
Jermolene
931d47e50c Fix problem with cloning tiddlers
We were ignoring the tags on the template tiddler.

Fixes #1097
2014-11-18 14:13:34 +00:00
Jermolene
e69e2c1c91 Require confirmation before deleting non-empty new tiddlers 2014-11-11 11:54:46 +00:00
Jermolene
3035badf14 Fix problem with done button not saving unchanged tiddlers 2014-11-10 12:56:33 +00:00
Jermolene
145713e766 Don't confirm deleting drafts with no original 2014-11-10 08:49:20 +00:00
Jermolene
1dfa6f369b Smarter cancel edit behaviour
If we cancel editing a tiddler that doesn’t exist, then we no longer
show the resulting missing tiddler.
2014-11-09 21:47:48 +00:00
Jermolene
ec4beb7f0f Fix bug in navigator 2014-11-07 21:15:52 +00:00
Jermolene
c7971d3da3 Update new tiddler message handling to accept title and fields
Now you can create a new tiddler with both a template and additional
specified fields.
2014-11-07 14:53:37 +00:00
Jermolene
644ced6d4e Preserve modified title when reusing drafts
Should fix the problem raised by @xcazin
2014-10-10 20:58:34 +01:00
Jermolene
f37a7101a7 Fix problem with new tiddler button 2014-10-10 10:17:42 +01:00
Jermolene
a8d83096d3 Fix behaviour of new tiddler message
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.
2014-10-10 09:52:19 +01:00
Jermolene
1e02a9f0db Correct return value for makeDraftTiddler 2014-10-10 09:03:35 +01:00
Jermolene
3827f98a43 Improve new tiddler behaviour with existing tiddlers
Now repeatedly clicking “new journal” will reuse the existing journal
if one exists
2014-10-09 17:30:53 +01:00
Jermolene
0dcf54c3b5 Add support for action widgets
This is part of the groundwork for fixing #336
2014-10-08 17:45:26 +01:00
Jermolene
7b1a9d84a1 Missed corrections of tm-auto-save-wiki message 2014-09-02 11:16:06 +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
89fd5379dd Change "tw-*" variables to "tv-*" 2014-08-28 22:28:02 +01:00
Jermolene
2f69ea362c Rename "tw-*" messages to "tm-*" 2014-08-28 21:43:44 +01:00
Jermolene
13c4e028b1 Refactored autosave mechanism
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.
2014-08-27 10:04:54 +01:00
Jermolene
758762eee3 Autosave after an import 2014-07-29 10:03:43 +01:00
Jermolene
89989c737e Fix bug with import tiddler handling 2014-07-17 15:02:42 +01:00
Jermolene
c92a21ff14 Remove extraneous debugger statement 2014-07-14 21:51:56 +01:00
Jermolene
c0edca78c8 Beginning of one-shot UI for upgrade.html 2014-07-14 14:53:21 +01:00
Jermolene
1f6e16318a First pass at upgrade mechanism 2014-07-12 09:09:36 +01:00
Jermolene
6f3e31abe5 Fixed problems with detecting changes to draft tiddlers 2014-06-23 23:28:22 +01:00
Jermolene
9987e6de22 Fix problem with overwriting existing tiddlers 2014-06-22 11:45:00 +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
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
cb914ae853 Remove dead code typo 2014-05-02 18:07:47 +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
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
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
8611867930 Remove dead code 💀 2014-04-27 17:15:41 -04:00
Jermolene
3afa26b9a3 Require confirmation before abandoning edits
Fixes #544
2014-04-12 14:15:49 +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
b51d851f93 Fix extraneous comma
Thanks to Danielo Rodríguez
2014-04-06 22:09:42 +01: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
Jermolene
4194f9f20f Retract change to new tiddler handling in navigator.js
Original commit: d5c31ed07f
2014-02-28 15:31:35 +00:00
Jermolene
99ccdf4584 Add confirmation when deleting tiddlers
Fixes #381
2014-02-23 17:37:32 +00:00
Jermolene
0961b0426b Use import report tiddler only if more than one tiddler is imported
If there’s only one, just display the tiddler itself.
2014-02-21 20:17:34 +00:00
Jermolene
31975e0042 Update importing so we don't open every imported tiddler
Instead we just display a report with links to each imported tiddler.
Should make importing much faster.
2014-02-21 18:21:10 +00:00
Skeeve
d5c31ed07f Update navigator.js
As described here: https://groups.google.com/d/msg/tiddlywikidev/AWvXz7RMIC4/gFF5crN2UJoJ

Providing a name for the new tiddler message only works if a skeleton tiddler already exists. If not, "New Tiddler" is taken. This change fixes that in that the provided name is taken even if there is no skeleton.
2014-02-21 10:37:20 +01:00
Jermolene
9bb600299f Extend the navigator widget to maintain the "current-tiddler" field on the history list 2014-02-13 17:59:51 +00:00
Jermolene
470beabf17 Enhance links so that control/command clicking suppresses navigation
Control- or Command-clicking on a link will now open the target tiddler
but suppress navigating to it. Kind of like opening in a background tab.
2014-02-12 22:00:12 +00:00
Jermolene
828fc9dcd0 Autosave when deleting a tiddler 2014-02-07 10:14:10 +00:00
Jermolene
f0d512edf0 Remove extraneous autosave attribute from navigator widget
Inadvertently committed.
2014-02-07 10:12:45 +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
7eafd51a7d Use placeholder text for editing missing tiddlers
Fixes #387
2014-01-30 17:39:32 +00:00
Jermolene
64304f9b7f Ensure that new tiddlers created from a skeleton don't inherit created/creator fields 2014-01-21 21:00:08 +00:00
Jermolene
79046c52b4 Make the tiddler text prompt be a placeholder 2013-12-20 17:07:15 +00:00
Jermolene
8538d69dc1 Update navigator widget to use wiki.generateNewTitle() 2013-12-20 16:53:49 +00: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
713d6945c6 Misplaced space 2013-12-14 17:22:26 +00:00
Jermolene
ae6d1b1685 Major refactoring of the navigator widget
Cleans things up, and hopefully fixes #267
2013-12-12 15:17:12 +00:00
Jermolene
b8897f86fb Ensure that tiddler manipulations affect the history
Previously edit tiddler etc wouldn’t actually navigate to the new
tiddler
2013-12-11 16:30:25 +00:00
Jermolene
48f8046cf5 Fixed problem with cancelling editing the tiddler $:/StoryList 2013-12-06 08:45:24 +00:00
Jermolene
49ade66540 Extend navigator widget to allow target tiddler to be specified for certain events
Now the edit tiddler, delete tiddler, save tiddler and cancel tiddler
events can all be passed the tiddler title as the message param.
2013-12-04 13:09:26 +00:00
Jermolene
b149ab47f4 Refactor importing to to use new wiki.importTiddler method 2013-12-02 09:59:38 +00:00
Jermolene
cc9c6e4f42 Ensure that we don't overwrite the modified/modifier fields of imported tiddlers
Fixes #225
2013-11-20 20:49:32 +00:00
Grayeul
3d0c6cf41e Fixed missing reference to old CloseAllOthers 2013-11-11 07:48:54 -06:00
Grayeul
da54236f5a Change names to tw=close-other-tiddlers and handleCloseOtherTiddlersEvent 2013-11-11 07:34:19 -06:00
Grayeul
c930d84d01 Add support for close-all-others 2013-11-11 07:28:29 -06:00
Jermolene
8357d90e59 Fix bug caused when creating a tiddler title starting or ending with a space 2013-11-11 08:48:06 +00:00
Jeremy Ruston
5a8ef2681b Update tw-new-tiddler message to take a template tiddler
The template tiddler title is used as the basis of the new title, which
is probably not very convenient. We'd like to be able to use system
tiddlers as templates, without defaulting the new instance to a system
tiddler title.
2013-11-08 16:57:52 +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
3e3a5917b7 Move the widgets back to the right folder 2013-11-08 08:38:44 +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
10a635927d Add confirmation when overwriting an existing tiddler
Now there's a JavaScript confirm when attempting to save a tiddler that
has been renamed to the name of an existing tiddler
2013-09-14 21:57:23 +01:00
Jeremy Ruston
1b094b1d5c Avoid attempts to save a tiddler with an empty title
Clicking "save" with a blank title will now be ignored
2013-08-28 19:46:21 +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
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
d27cb19e22 Update titles of certain widgets that were misspelled 2013-05-31 13:23: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
b305debf97 Add a close all tiddlers button
For @pmario
2013-04-27 16:35:59 +01:00
Jeremy Ruston
738952029b Icons for editing tiddlers 2013-03-20 17:20:46 +00:00
Jeremy Ruston
5b6376a386 Better titles for drafts of new tiddlers 2013-03-18 10:59:47 +00:00
Jeremy Ruston
fc33df8829 Add support for deleting tiddlers 2013-03-10 19:24:49 +00:00
Jeremy Ruston
170c1425f7 Normalise custom event names 2013-02-04 15:29:25 +00:00
Jeremy Ruston
365974d14f Improved generation of titles for draft tiddlers 2013-02-04 11:56:11 +00:00
Jeremy Ruston
94744843b6 Added new tiddler button 2013-01-17 11:38:02 +00:00
Jeremy Ruston
6d24cedbcc Refactored widget renderers to be hosted within HTML element renderers
This arrangement takes better advantage of the similarities between the
now deleted widget renderer and the element renderer. It also obviates
the need for wrapper elements around every widget.
2013-01-03 16:27:55 +00:00
Jeremy Ruston
d96e0073ac Refactored widgets not to use a base class 2013-01-01 17:51:02 +00:00
Jeremy Ruston
7593cf1075 Cleaning up the widget refresh mechanism 2012-12-14 19:31:37 +00:00
Jeremy Ruston
966684cb13 Improved event handling for widgets 2012-12-14 17:57:53 +00:00
Jeremy Ruston
5c1caa672b Moved render() and renderInDom() into widget base class 2012-12-14 17:51:14 +00:00
Jeremy Ruston
3e06bca347 Refactor widget implementation 2012-12-14 16:01:37 +00:00
Jeremy Ruston
d338a54370 Introduce refactored wiki parser and renderer
This is a half-way through a big refactoring of the parsing and
rendering infrastructure. The main change is to separate the parse and
render trees, which makes the code a lot cleaner. The new parser isn't
yet functional enough to replace the existing parser so for the moment
you have to manually invoke it with `$tw.testNewParser()` in your
browser console. I really ought to use branches for this kind of
thing...
2012-12-13 21:34:31 +00:00