1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 11:29:58 +00:00
Commit Graph

374 Commits

Author SHA1 Message Date
Jermolene
758762eee3 Autosave after an import 2014-07-29 10:03:43 +01:00
Jermolene
40b4259e86 Clarify widget constructor docs 2014-07-25 15:26:53 +01:00
Jermolene
eecb9126cd Fix checkbox widget to work with missing tiddlers 2014-07-24 15:43:37 +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
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
5a23c883e2 More defensive checks
We’ve had a few bugs with the symptom of ‘text’ being undefined.
2014-07-14 14:52:00 +01:00
Jermolene
7998686cb3 Fix typo affecting transclusion recursion detection 2014-07-14 14:50:46 +01:00
Jermolene
1f6e16318a First pass at upgrade mechanism 2014-07-12 09:09:36 +01:00
Jermolene
f08f57c5d2 Extend checkbox widget to toggle fields 2014-07-12 09:09:13 +01:00
Jermolene
4743d0a863 Fix transclusion recursion detection
We were inadvertantly doing the recursion check before we were checking
if the transclusion target exists.
2014-07-12 09:08:52 +01:00
Jermolene
9de679b84b Fix tiddler widget to refresh properly
Previously wasn’t refreshing for changes to the tiddler that it refers
to
2014-07-12 09:08:20 +01:00
Jermolene
6f3e31abe5 Fixed problems with detecting changes to draft tiddlers 2014-06-23 23:28:22 +01:00
Jermolene
32a1da7673 Fixed problem with pasted items lacking a type 2014-06-22 11:58:00 +01:00
Jermolene
9987e6de22 Fix problem with overwriting existing tiddlers 2014-06-22 11:45:00 +01:00
Jermolene
06b0f9adb7 Added aria-label attribute to link widget
And document it for the button widget
2014-06-17 07:54:10 +01:00
Jermolene
eeedcb6d94 First pass at accessibility improvements for #650 2014-06-14 18:06:56 +01:00
Jermolene
f09d69d1b7 Remove debugging code 2014-06-13 14:44:43 +01:00
Jermolene
9ab0c84140 Support global macros via the importvariables widget
The new importvariables widget imports macro/variable definitions from
the specified tiddlers and makes them available to its children.

Allows us to split PageMacros up into separate tiddlers.

We still support loading macros from $:/core/ui/PageMacros to help
people upgrading.

Fixes #644 and #559
2014-06-12 18:01:33 +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
a03a15e7de Allow the text widget to refresh if needed 2014-06-10 19:32:55 +01:00
Jermolene
247eb04b11 Extraneous semi-colon 2014-05-31 19:18:01 +01:00
Jermolene
3182a2d599 Add first pass at select widget 2014-05-31 18:37:43 +01:00
Jermolene
a330cb543e Better defaults for radio widget
Now the “field” attribute defaults to “text”.
2014-05-31 18:35:41 +01:00
Jermolene
412cde6f53 Move "storyviews" filter operator to correct folder 2014-05-28 17:17:47 +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
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
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
ffb6c8ab81 Add hex colours to tag manager
Fixes #597
2014-05-05 18:42:25 +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
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
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
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
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
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
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
3afa26b9a3 Require confirmation before abandoning edits
Fixes #544
2014-04-12 14:15:49 +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
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
426281539a Merge branch 'saner-filters' 2014-04-08 14:14:11 +01:00
Jermolene
b51d851f93 Fix extraneous comma
Thanks to Danielo Rodríguez
2014-04-06 22:09:42 +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
c3e24c1228 Trim spaces from new field and tag names
Fixes #517
2014-03-31 17:59:28 +01:00
Jermolene
bca1d55280 Add validation of legal characters for fieldnames 2014-03-26 13:38:43 +00:00
Jermolene
79d643775d Fix scrollable widget not to crash on the server 2014-03-25 14:37:33 +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
20f6383528 Add storyviews list filter and use it in view switcher 2014-03-24 22:17:45 +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
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
Jermolene
06500e5f71 New error message text for recursive transclusion error 2014-03-17 11:54:41 +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
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
db35bc36aa Disable storyviews when rendering to the fake dom 2014-03-10 18:41:11 +00:00
Jermolene
01e1133219 Fix bug where count widget wasn't being updated correctly 2014-03-10 18:15:00 +00:00
Jermolene
98872bbe7c Allow pasting/dropping of HTML content
Fixes #477
2014-03-09 20:39:03 +00:00
Jermolene
289bec0fd5 Parse the wiki link tooltip as wiki text 2014-03-08 16:06:57 +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
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
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
2ab0facf3a Extend button widget to allow navigating to a tiddler
Fixes #327
2014-02-22 16:13:16 +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
Jermolene
68bcbff753 Rough and ready control over bitmap editor line width and colour
Fixes #414
2014-02-21 14:06:04 +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
88ffb2ad12 Fix problem that was causing Chrome to display black in colour picker swatches
Hurrah!
2014-02-20 09:57:44 +00:00
Jermolene
5e9dae8fb4 Fix view widget so that it works with indexes 2014-02-17 11:28:48 +00:00
Jermolene
69c0b5e031 Fix problem with pasting items into the browser 2014-02-14 20:00:23 +00: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
800bc639f9 Fix problem with the reveal widget not refreshing properly when used with text references
The check for changed tiddlers was failing because `this.stateTitle`
contains the entire text reference, not just the tiddler title.
2014-02-13 17:59:10 +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
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
ecad2bf7a8 Add better control over whether tiddlers are transcluded in block or inline mode 2014-02-12 17:59:28 +00:00
Jermolene
5c66bc6dbc Update the reveal widget to allow control over content retention
Thus bringing back the animation of the opening and closing of the info
panel.
2014-02-12 08:32:19 +00:00
Jermolene
ecba4f71ea Clean up the highlight plugin
Fixing various issues that were preventing language specifiers from
working.
2014-02-10 13:51:38 +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
e3a05625b2 Add experimental keyboard shortcut widget
It’s not cool that we have to use a separate keyboard widget for each
keyboard shortcut.

Fixes #386
2014-01-30 13:40:36 +00:00
Jermolene
69d342d46a Stop the reveal widget caching hidden content
Previously, when displayed content is hidden by the reveal widget there
was an optimisation such that the content was retained in the DOM but
hidden using CSS, so that it could be shown again quickly.

It turns out that a sideeffect of that optimisation is that clicking
through all the sidebar tabs leaves them all active, so that they all
need to be refreshed whenever a character is typed in an editor.

This commit suppresses the optimisation, so that hidden content is
removed from the DOM and the render tree.
2014-01-26 09:57:46 +00:00
Jermolene
70a7321edd Take editor configuration from configuration tiddlers
This should enable @buggyj to add an html editor by including a
configuration tiddler in the plugin.
2014-01-24 20:22:23 +00:00
Jermolene
f4b27b33de Fixed problem with multiple tiddlers created from dragging a single file 2014-01-24 14:09:06 +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
1e54b1bcc9 Remove empty tag fields in the field mangler
This means that removing the last tag from a tiddler will remove the
tags field.
2014-01-20 11:53:26 +00:00
Jermolene
95cb99adb9 Enhance text widget to optionally use "text" attribute
This lets us use the text widget to render text in macros that we don’t
want to be wikified.
2014-01-19 21:45:55 +00:00
João Bolila
426f2978cf fixes of a newbie, me 2014-01-12 17:09:24 +00:00
João Bolila
82a48cf85c codeblock as a widget and plugin for highlight code blocks 2014-01-07 22:57:46 +00:00
Jermolene
b06e09a4d3 Fix typo in default date format string for view widget
Fixes #320
2014-01-03 18:34:27 +00:00