1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-01 07:36:18 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
Jermolene
9a067b8dac Ensure JS macros return text 2014-10-22 10:33:56 +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
b239b3d623 Remove curly braces from qualified identifiers
Fixes #860
2014-09-19 11:33:49 +01:00
Jermolene
05dfa1e1e3 Coding style tweak 2014-08-30 23:05:04 +01:00
Jeremy Ruston
032520fbe1 Merge pull request #769 from buggyj/xlink2
added support for xlink: attribute prefix
2014-08-30 23:04:14 +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
buggyj
710759daed added support for xlink: attribute prefix 2014-08-30 17:25:04 +02:00
Jermolene
40b4259e86 Clarify widget constructor docs 2014-07-25 15:26:53 +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
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
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
Stephan Hradek
853cca906c allowing variable number of arguments for non-argument macros 2013-12-11 22:59:52 +01:00
Jermolene
c0a6e94b21 Hash the state qualifier to make it shorter
We were having problems with TW5 generating filepaths that were longer
than Windows likes.

Fixes #240
2013-11-28 10:53:37 +00:00
Jermolene
f380d4b27d Change macro attributes to not wikify their content
One consequence of wikifying macro attributes before use was that we
couldn’t have tiddler titles with wikitext syntax in, which was
definitely a problem.
2013-11-22 20:02:44 +00:00
Jermolene
fc6dd83f2f Use prototypal inheritance to speed up the inheritance of widget variables
Now we reuse the prototype mechanism to let javascript do the work of
searching up the parent chain.
2013-11-13 21:25:45 +00:00
Jermolene
b885743efe Fix typo 2013-11-12 20:29:22 +00:00
Jermolene
4a5a8dd773 Fix the execution context for widget attributes specified as macros
We need to ensure that variables in the tree up to this point are
accessible when we render the macro text.
2013-11-12 19:52:17 +00:00
Jermolene
6f1c9d88cc Improve the Widget.prototype.removeChildDomNodes() method so that most subclasses won't need to override it 2013-11-09 16:55:14 +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
3e3a5917b7 Move the widgets back to the right folder 2013-11-08 08:38:44 +00:00