1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 18:23:28 +00:00
Commit Graph

526 Commits

Author SHA1 Message Date
Jermolene
cd29eed067 Fix problem with importing using wrong import tiddler name 2015-08-01 13:48:46 +01:00
Jermolene
32f6d7f1b0 Revert getTiddlerData() and add getTiddlerDataCached()
For backwards compatibility, we now explicitly request the cacheable
version of this method.

Fixes #1873
2015-07-10 16:43:50 +01:00
Jermolene
848a7f4e74 Optimise getStateQualifier()
Another fix for #1864, this time we’re caching state qualifiers as they
are expensive to compute.
2015-07-06 11:23:12 +01:00
Jermolene
3a7e29674b Fix problem with checkbox widget and missing tiddlers
The newly added invertTag code was crashing if the tiddler doesn’t
exist.
2015-07-02 17:33:51 +01:00
Jermolene
63f802efda Rename checkbox "invert" attribute to "invertTag"
And update docs
2015-06-26 10:18:15 +01:00
James Welford Anderson
379181ded5 add invert parameter to checkbox plugin
for when you want a tag to denote the lack of a check rather than the
presence of one.
2015-06-26 05:10:13 +09:00
Jermolene
b31803608b Refactor navigator widget configuration
@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.
2015-06-19 16:44:20 +01:00
Jermolene
4a3a5bf1f0 Don't autosave when cancelling an edit
Fixes #1762
2015-06-13 18:08:09 +01:00
Jermolene
9b4b9d4d88 Update sendmessage widget to allow name/value parameters
Using `$name` and `$value` attributes allows more flexibility in how
parameter names are specified, allowing parameter names that are not
valid attribute names.
2015-05-18 22:15:23 +01:00
Jermolene
ecdcfe41ac Fix problem with #1723
Restoring operation of the “default” attribute
2015-05-14 00:07:53 +01:00
Jeremy Ruston
f0206283cf Merge pull request #1723 from cehmke/fix-buttonwidget-textreference-selected
Use of getTextRefence in ButtonWidget.isSelected
2015-05-12 11:20:47 +01:00
cehmke
4d3103ff25 Update selected value if children have been refreshed
If the children have been refreshed, it is necessary to check, whether
the value of the select box has been changed.
2015-05-10 19:32:38 +02:00
cehmke
b8addaa520 use of getTextRefence in isSelected
Instead of a particular implementation make use of the overall function
getTextReference to determine the current value.
Add a missing semicolon.
2015-05-10 13:26:00 +02:00
Jermolene
42a3e31b1b Tweaks to #1678 2015-05-07 19:44:08 +01:00
Jeremy Ruston
e93d32cdd7 Merge pull request #1678 from felixhayashi/feature/vars_widget
Introducing the vars widget
2015-05-07 19:36:25 +01:00
Jermolene
61b75be94c Add "navigateFromTitle" to action-sendmessage
Fixes #1665
2015-05-06 08:14:26 +01:00
Jermolene
a79e7a1c57 Tweaks for #1662
Coding style and ui copy
2015-05-04 20:29:00 +01:00
Jeremy Ruston
4656a7e8f6 Merge pull request #1662 from felixhayashi/feature/navigator_widget
upgrading the navigator widget
2015-05-04 20:21:38 +01:00
Jermolene
403a460002 Check for dom node not found 2015-05-03 16:56:37 +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
Felix Hayashi
740627795f This widget allows the user to set multiple variables in one go.
It thereby reduces code complexity that would arise when setting
many variables using "<$set>".

```
\define helloworld() Hello world!
<$vars greeting="Hi" me={{!!title}} sentence=<<helloworld>>>
  <<greeting>>! I am <<me>> and I say: <<sentence>>
</$vars>
```

How this Widget differs from the set widget:

 * Variables may be created by using the "key=value" notation
   that you already know from widgets like action-setfield.
 * You cannot specify a fallback ("emptyValue")
 * You cannot use a filter to produce a conditional variable assignement

Original discussion that led to the creation of this widget:
https://github.com/Jermolene/TiddlyWiki5/issues/1610
2015-04-27 17:07:13 +02:00
Jermolene
139496209f Add support for custom elements to the button widget 2015-04-21 19:29:54 +01:00
Jermolene
758ba5edc2 Allow widgets to choose not to propagate actions
Allow widgets to choose not to propagate actions. This is important for
widgets that themselves trigger actions.

Note that this change will cause problems with any existing
5.1.8-prerelease plugins that call `invokeActions()`.
2015-03-25 22:13:22 +00:00
Jermolene
4eb2e3d3b4 Fix undefined tabindex problem with link widget
The tabindex attribute was being set to the string “undefined” if the
attribute was not specified. The fix is to only set the tabindex
attribute if the attribute was specified.
2015-03-25 11:11:07 +00:00
Jermolene
bd6472c1d1 Add style attribute to reveal widget 2015-03-23 15:28:26 +00:00
Jermolene
657c266522 Coding style tweaks 2015-03-10 20:04:34 +00:00
Jermolene
e80a08f43b Fix problem with custom tag in reveal widget 2015-03-10 16:59:25 +00:00
Jermolene
1808b1597e Support custom HTML element tags for reveal widget 2015-03-10 12:44:47 +00:00
Jermolene
64e1a76987 Prevent edit-text widget from generating unsafe elements 2015-03-10 12:34:50 +00:00
Jermolene
05c3de3245 Extend list widget to invoke storyview for refreshes 2015-02-23 11:24:03 +01:00
Jermolene
950a86c7b7 Extend link widget with additional attributes
Add “tabindex”, “draggable” and “tag” attributes
2015-02-23 11:23:44 +01:00
Jermolene
0da1f3f554 Extend list widget to pass refreshes to the story view 2015-02-23 11:17:00 +01:00
Jermolene
60e6b584bf Extend link widget with new attributes
Add “draggable”, “tag” and “tabindex” attributes to link widget.
2015-02-23 11:16:44 +01:00
James Welford Anderson
ee6b6a0f0c add macros for custom statically exported paths/links/images
tv-get-export-path tells render tiddlers where to export files
tv-get-export-image-link tells images.js where to look for images
tv-get-export-link tells tells link.js where to look for links to other
exported tiddlers
2015-02-21 06:45:40 +09:00
Jermolene
ead6eb00d4 Revert "Merge pull request #1509 from welford/static_export_macro"
This reverts commit b2b8006b58, reversing
changes made to e7e16137b2.

@welford my apologies it turns out there are a couple of problems, I’ll
comment more on the pull request
2015-02-20 18:39:13 +00:00
Jeremy Ruston
b2b8006b58 Merge pull request #1509 from welford/static_export_macro
Static export macro for custom paths
2015-02-20 18:15:43 +00:00
Jermolene
9e9b9a3bf1 Avoid navigating to an empty title
Fixes #1515
2015-02-20 16:19:53 +00:00
James W. Anderson
d1809f352c explicitly pass through source params
from the image/link widget to the respective static export macros
2015-02-17 07:11:00 +09:00
Jermolene
68165af081 Revert #1330 ("implements list iterator variables")
As discussed on the ticket, there is a problem:

https://github.com/Jermolene/TiddlyWiki5/pull/1330#issuecomment-74339195
2015-02-13 22:42:36 +00:00
Jermolene
c9ab873ba3 Fixes problem with drag and drop in Safari
Fixes #1415

The problem was that encodeURI() doesn’t encode slashes, which are not
legal in a data URI, although only Safari was failing. We switch to
encodeURIComponent(), which does encode slashes
2015-02-11 10:07:10 +00:00
Jermolene
1924eda8a9 Improvements for #1483
* Rename the global to $tw.dragInProgress for clarity.
* Abort the dragenter so that we don’t get extraneous feedback during
the drag
2015-02-10 23:17:38 +00:00
Jeremy Ruston
1b87d9134b Merge pull request #1483 from tobibeer/592-no-drag-n-drop-to-same-location
prevents drag and drop import in same window
2015-02-10 23:04:45 +00:00
Tobias Beer
dc23963525 using $tw.dragging to prevent dnd in same window
Anything missing?
2015-02-10 23:34:37 +01:00
Tobias Beer
30f2c06c9e Revert "prevents drag and drop import in same window"
This reverts commit 09afa8297a.
2015-02-10 23:33:19 +01:00
Tobias Beer
09afa8297a prevents drag and drop import in same window
fixes #592

Introduces and preserves **_origin** field when using drag-and-drop —
bad idea? discard? different field name?

demo http://592.tiddlyspot.com
2015-02-09 23:49:04 +01:00
Jermolene
8dcd080cdd Style fix 2015-02-09 21:46:54 +00:00
Jeremy Ruston
9cf1f8f96b Merge pull request #1476 from tobibeer/fix-tm-delete-tiddler-doesnt-exist
Fix issue deleting non-existent tiddler
2015-02-09 21:46:08 +00:00
James Welford Anderson
0b68428bc5 add image export path macro 2015-02-10 05:59:56 +09: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
Roma Hicks
687d6350d4 Added class mechanism to checkbox widget. #1463 2015-02-06 01:02:01 -06:00
James Welford Anderson
4049affb31 initial pass at static export macros 2015-02-03 07:30:24 +09:00
Jeremy Ruston
4cd8466adb Merge pull request #1396 from ng110/master
Allow widget actions to propagate to children
2015-01-28 16:28:11 +00:00
ng110
a7a205a754 Update select.js 2015-01-28 16:00:34 +00:00
ng110
16fe9fd5ce Update select.js 2015-01-20 13:02:06 +00:00
ng110
f9c4f6898e Add capability for widgets to trigger all descendant action widgets, rather than just immediate children.
Preserves compatibility with existing invokeActions call in button widget by creating a separate 'invokeActionCall' function to carry out the recursion.  Triggering all descendants permits use of action widgets inside list widgets or macros.  Also makes it possible to add triggering capability to select widget.
2015-01-20 12:34:24 +00:00
Jermolene
0fdfbc482c Add nwsaveas and param attributes to browse widget
These are for TiddlyDesktop, and only work under node-webkit
2015-01-11 14:20:34 +00:00
Jermolene
280909bb68 Fix crash for macros that return undefined
Fixes #1348
2015-01-10 13:36:43 +00:00
Jermolene
b68276e219 Fix for serverside rendering 2015-01-06 18:19:55 +00:00
Jeremy Ruston
ea07b558a3 Merge pull request #1327 from aelocson/railroad-links
Links and transclusions in railroad diagrams
2015-01-06 13:58:27 +00:00
Jermolene
ec829180f4 Coding style clean up for #1330 2015-01-06 13:49:05 +00:00
Tobias Beer
0dd3ad5e38 updated false states — looks more conclusive 2015-01-06 14:40:48 +01:00
Tobias Beer
a1ca53fa9b implements list iterator variables, see #1328
provides <<iterator>>, <<iterator-even>> and <<iterator-last>>
2015-01-06 14:31:20 +01:00
Astrid Elocson
2f42c9fb8d Links and transclusions in railroad diagrams 2015-01-06 01:39:24 +00:00
ng110
7d6769f6fd Update select.js
test change
2015-01-04 12:22:00 +00:00
Jermolene
1adfe20508 Fix problem with repeatedly cancelling a draft
Fixes #1266
2014-12-22 08:40:11 +00:00
Jermolene
0e62d8f648 Fix problem with tm-add-field for existing fields
Fixes #1197
2014-12-05 10:20:25 +00:00
Jermolene
2689e2861b Revert to using fieldmangler for adding fields
In 5.1.5 we switched to using `<$action-setfield>` instead of
`<$fieldmangler>`. The problem was that in the process we lost the
validation of field names, making it possible to create fields with
illegal names

Fixes #1186
2014-12-04 09:39:14 +00:00
Jermolene
5154a25ab9 Add tooltip to browse widget
Fixes #1179
2014-12-02 19:16:38 +00:00
Jermolene
56a0809768 Fix problem with edit-bitmap widget static rendering
The ‘introduction’ edition contains an edit-bitmap widget that was
failing under Node.js because the fake dom doesn’t support canvas.
2014-11-27 23:03:27 +00:00
Jermolene
962cdf500a Fix link dragging to text editors
We were just adding double square brackets if the title contains
spaces. We should be adding them if the title is not a valid wikilink.
2014-11-26 11:13:05 +00:00
Jermolene
996eecc79a Coding style cleanup 2014-11-25 13:49:22 +00:00
Jeremy Ruston
6f0d581d72 Merge pull request #1141 from tobibeer/auto-focus-title-on-edit
#371 focus title field on edit
2014-11-25 13:43:08 +00:00
Tobias Beer
c0834583a0 #371 focus title field on edit
* enhanced edit-text widget with a "focus=true" attribute
* modified title template to make it focus and select by default
2014-11-25 12:39:08 +01:00
Skeeve
79e428757b allow empty state tiddlers and missing state attributes act as missing state tiddlers
As described here: https://groups.google.com/d/msg/tiddlywikidev/ODJhIw6-UjQ/3ZKrlA4B810J

I think it would be a good small enhancement as the reveal widget can now be used in previously impossible ways.
2014-11-24 07:38:58 +01:00
Jermolene
84bebb65b7 Fix advanced filter search clear button
Thanks @BramChen
2014-11-23 16:02:08 +00:00
Jermolene
b882a0dff1 Fixes to make nested popups work
Thus making the export button a lot more useful
2014-11-21 17:07:03 +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
6c6fda498f Fix bug in action-setfield widget 2014-11-17 16:26:18 +00:00
Jermolene
a9eab1b8fc Improve import logging 2014-11-14 10:33:41 +00:00
Jermolene
bd211ea082 Extend set variable widget to work with filters 2014-11-13 21:39:38 +00:00
Jermolene
d1bbe7253c Remove flicker when resizing textareas
The `EditTextWidget.prototype.fixHeight()` function was defering its
work with `nextTick()`, which led to flickering on all browsers when
typing triggers a resize.
2014-11-13 11:19:21 +00:00
Jermolene
e69e2c1c91 Require confirmation before deleting non-empty new tiddlers 2014-11-11 11:54:46 +00:00
Jermolene
78735cde96 Refactor dropzone
I want to start figuring out #686
2014-11-11 11:44:00 +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
5ded01f2c6 Fix problem with blank values in action-setfield widget
One manifestation of this problem was that it wasn’t possible to use
the edit template to add a field without specifying a value
2014-11-09 17:15:40 +00:00
Jermolene
9bbd599f5c Refine refreshing of tiddler widget
We need to refresh if there is a change in the state that we copy to
variables.
2014-11-09 17:10:18 +00:00
Jermolene
d2ab7c5986 More action-deletetiddler fixes 2014-11-09 16:53:33 +00:00
Jermolene
8c67e11365 Fixes to action-deletetiddler widget 2014-11-09 16:45:14 +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
d93c19daaa Improve the format of widget message parameters
In 5.1.3 we introduced the idea that the `event.param` variable could
optionally be a hashmap, allowing multiple values to be passed with the
message.

This change moves the hashmap to a separate `event.paramObject`
variable, allowing us to pass both a hashmap and a param string.
2014-11-07 14:52:32 +00:00
Jermolene
f1a2d8c2b9 Fix typo in action-setfield widget 2014-11-06 19:35:50 +00:00
Jermolene
12aec57086 Merge action-setfield and action-setfields widgets
Less confusion, hopefully.
2014-11-06 19:27:14 +00:00
Jermolene
92f69d44bf Use action-deletefield widget in edit template fields editor
On the way to deprecating the field mangler widget
2014-11-06 18:32:11 +00:00
Jermolene
efeeab45f8 Simplify action-setfield widget 2014-11-06 18:23:59 +00:00
Jermolene
0a2a5184c4 Add action-deletetiddler widget 2014-11-06 18:23:48 +00:00
Jermolene
741f853986 Add action-setfield widget 2014-11-06 18:06:47 +00:00
Jermolene
a18af9b760 Rename the action-setfield widget to action-setfields
It makes more sense, and allows us to add a widget: `<$action-setfield
$tiddler=“title” $name=“fieldname” $value=“fieldvalue”/>`
2014-11-06 17:45:03 +00:00