1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-08 04:54:23 +00:00
Commit Graph

1906 Commits

Author SHA1 Message Date
Matt Lauber
5a14b37686 Update to check if empty sting OR (is array AND is empty) 2016-02-16 08:08:09 -05:00
Eric Drechsel
dd43759ecc putSaver: return null on save success, TODOs 2016-02-15 15:20:30 -08:00
Jeremy Ruston
2203c2b38a Merge pull request #2277 from edrex/put_saver
add a simple put saver, for saving to a webdav or REST server
2016-02-15 22:00:46 +00:00
Matt Lauber
22145e2e51 Fix for #2274
List fields (such as tags) when evaluated to produce tiddlers result in empty arrays.  Using the exact not equals, an empty array is not the same as an empty string.  By using equivelent not equals, we state that the field is either != "" or anything that can be coerced to "".  Which, based on https://dorey.github.io/JavaScript-Equality-Table/ is `false` `0` `[]` or `[[]]`` neither `false` nor `0` can be set as a tiddler field as both will end up being quoted (`"false"`, `"0"`) so this should work.
2016-02-15 08:31:23 -05:00
Jermolene
df3e39d97a Update wikiparser file comment 2016-02-15 11:33:47 +00:00
Jeremy Ruston
581634d282 Merge pull request #2164 from pmario/issue-2158
Issue 2158 - check for new draft fields and warn if cancel is clicked
2016-02-11 09:31:58 +00:00
Eric Drechsel
f8565443d7 add a simple put saver, for saving to a webdav or REST server 2016-02-08 13:40:10 -08:00
Jermolene
b873df0ba2 Revert "Merge pull request #2166 from matabele/patch-5"
This reverts commit 83c54f4bb5, reversing
changes made to 0cbe97615a.
2016-01-06 09:38:39 +00:00
Jeremy Ruston
83c54f4bb5 Merge pull request #2166 from matabele/patch-5
Fix inadvertent clearing of text field (default) when `field` attribu…
2016-01-05 19:10:26 +00:00
Jermolene
0cbe97615a Add size attribute to select widget for multiple selection mode 2016-01-05 18:48:21 +00:00
Jermolene
93f7d8c028 Fix bug with tiddler widget and a blank tiddler title 2016-01-05 18:48:04 +00:00
Jeremy Ruston
31b4f104e4 Merge pull request #2161 from matabele/patch-3
Tidied up the code in the x-listops filters
2016-01-05 15:30:39 +00:00
Jeremy Ruston
2cd812c15f Merge pull request #2160 from matabele/patch-2
Changed the name of the 'list' attribute to 'field' for the $action-listops widget
2016-01-05 13:06:48 +00:00
Jeremy Ruston
791f97983e Merge pull request #2153 from tobibeer/rows-for-edittext
add rows attribute to edittext, plus docs
2016-01-05 12:31:37 +00:00
Jermolene
5cc1f2b313 Fix problem with search popup disappearing
This one took quite a lot of tracking down…

Fixes #2172
2016-01-03 18:05:08 +00:00
William Jackson
ac8b706d42 Correct Formatting
Removed extra tab spacing and corrected syntax error
2016-01-03 16:30:00 +02:00
William Jackson
a44edee782 Changed indents from spaces to tabs
I am informed this is the correct convention for TW5.
2015-12-28 18:12:22 +02:00
William Jackson
471f28e52b Fix inadvertent clearing of text field (default) when field attribute of the ActionSetField widget isn't set.
When using the widget with only short form SetText attributes (field="value) -- the default field (text) of the default tiddler is set to the default value ("") -- thus clearing the text field of the current tiddler. I have inserted a conditional to test for the presence of the `field` attribute.

Whilst I was about this, I have inserted code to enable the setting of any number of TextReferences -- this fixes the issue of only being able to set one index per widget and also allows different tiddlers to be targeted by the same widget.
2015-12-28 18:08:05 +02:00
Mario Pietsch
3977cf009b fixes #2158 check if new fields are present and warn on cancel 2015-12-28 11:31:36 +01:00
Mario Pietsch
7c4ea64210 fixes #2158 check if new fields are present and warn on cancel 2015-12-28 11:29:43 +01:00
William Jackson
48987e186a Tidied up the code in the filters 2015-12-28 10:31:39 +02:00
William Jackson
2f51c3695d Changed the name of the 'list' attribute to 'field'
Other users found this to be confusing -- I have made this change in both this widget and the $checklist widget to maintain consistency
2015-12-28 10:22:28 +02:00
Jeremy Ruston
fe00229ad5 Merge pull request #2004 from inmysocks/patch-9
Modified fieldmangler to create a tiddler if adding a tag (see #2001 )
2015-12-24 15:22:41 +00:00
Tobias Beer
456e7abc5d add rows attribute to edittext, plus docs 2015-12-24 15:40:00 +01:00
Jeremy Ruston
e344dbe077 Merge pull request #2049 from inmysocks/patch-11
Let $keyboard trigger action-widgets
2015-12-24 14:12:32 +00:00
Jeremy Ruston
dcc53b8e96 Merge pull request #2074 from mklauber/master
Manage a list field by allowing the <$select> widget to select multiple items.
2015-12-24 13:48:43 +00:00
Jeremy Ruston
7676f93932 Merge pull request #2125 from tobibeer/set-emptyValue-always
always set emptyValue, not just for filter
2015-12-23 17:42:41 +00:00
Jermolene
57ceffd67c Merge #1909 from @nameanyone 2015-12-23 12:19:47 +00:00
Jeremy Ruston
ccf6edb940 Merge pull request #1933 from felixhayashi/fix/scrolling
Auto-height fix for text area which is contained in a scroll container
2015-12-22 14:08:56 +00:00
Jeremy Ruston
fa1814d0f4 Merge pull request #2048 from felixhayashi/fix/count
Replacing count with Object.keys
2015-12-22 12:41:24 +00:00
Jeremy Ruston
ef1cd5f55f Merge pull request #1967 from Drakor/fixActionSetField
fixed bug in $action-setfield introduced by #1963
2015-12-21 22:17:51 +00:00
Tobias Beer
ea8a8f1b53 always set emptyValue, not just for filter 2015-12-09 23:33:07 +01:00
Jeremy Ruston
da36f1c728 Merge pull request #2037 from matabele/Listops
ActionListopsWidget
2015-12-06 19:04:26 +00:00
jed
848e351685 removed the handled variable
because it serves no purpose here. That test isn't required in this context.
2015-11-16 10:48:25 +01:00
Jermolene
15f52bd7ce Add support for Nw.js special features to browse widget 2015-11-13 18:47:30 +00:00
Matt Lauber
8ccee5d015 Remove cla for separate PR, and clean up variable declaration. 2015-11-13 11:30:06 -05:00
Matt Lauber
f540be4ac4 use $tw.utils.stringifyList 2015-11-13 08:06:51 -05:00
Matt Lauber
065b274b98 Use the $tw.utls.parseStringArray function to break up a list. 2015-11-13 08:04:13 -05:00
Matt Lauber
c535dd605c Grant the select widget the ability to select multiple values.
Multiple values are placed in a given tiddler-field combination as if
that field were a list field.
2015-11-13 07:50:34 -05:00
Tobias Beer
ef3e44eb48 rename suffix each:list to each_list-item
based on #1422, improves readability of the filter expression

tests passed
2015-11-13 11:07:24 +01:00
Jermolene
ac00aa8407 Allow server module to work under Node even if $tw.browser is defined
Needed for TiddlyDesktop, where want to be able to run the HTTP server
in a hybrid browser/node environment.
2015-11-10 18:13:30 +00:00
William Jackson
befb13dde1 Update x-listops.js
Change default suffix for append[], prepend[] and remove[] operators from 1 to All
2015-11-08 09:49:07 +02:00
Jeremy Ruston
583ed07af2 Merge pull request #1422 from tobibeer/each-list
added list suffix for each filter
2015-11-05 12:45:27 +00:00
Felix Hayashi
f217451fc5 Replacing count's function body with Object.keys
see #2046
2015-11-03 23:47:47 +01:00
William Jackson
817882a404 Update x-listops.js
Added prefix and suffix options to 'append' and 'prepend' operators
2015-10-27 10:17:07 +02:00
Felix Hayashi
d3ab4144d4 Allows text areas to be auto-height while being wrapped in an
element that has scrollbars. The wrapper element with the
scroll bar does not need to be a direct parent of the text area.

**update:** fixed a bug that came up in the discussion

This is fixed now: https://github.com/Jermolene/TiddlyWiki5/pull/1933#issuecomment-141774881

The problem was the check in getScrollContainer()
2015-10-26 21:22:10 +01:00
jed
e55c5b0669 Let $keyboard trigger action-widgets
Because of the refresh problems with the other widgets triggering action-widgets I am doing this one by itself. I hadn't included it before.

This shouldn't have any more problems than the button widget does, and any problems caused by it should be fixed by any fix we use for the button widget. See #1564 for more background
2015-10-26 20:23:09 +01:00
William Jackson
3e445b8853 Update x-listops.js
Corrected the logic of the 'allafter' filter and added a new 'move' filter.
2015-10-22 16:40:36 +02:00
William Jackson
56d467fb47 Create action-listops.js
Action widget designed to apply filters to the current list and save the modified list back to the list. The widget is able to manipulate lists in any field or any data index of the target tiddler, and includes an option to manipulate the tags of the target tiddler. The widget is used in conjunction with the extended list operator filters (xlistops.js)
2015-10-18 18:41:40 +02:00
William Jackson
49894abaf4 Create x-listops.js
These filters are designed to be used with the action-listops widget.
2015-10-18 18:37:08 +02:00
Myeongjin
4347d91c57 add localisable strings for Import/Imported 2015-10-18 17:29:04 +09:00
Jeremy Ruston
b1633e0f2d Merge pull request #1952 from tobibeer/1937-set-refresh-filter
fixes #1937 — filter refresh in set widget
2015-10-14 14:18:29 +01:00
Jermolene
33563d01ba Add user interface for enabling performance instrumentation 2015-10-14 10:59:55 +01:00
Jermolene
85553609b1 Ensure edit-text widget fixes height even if refresh isn't required
Fixes #1995
2015-10-12 17:54:51 +01:00
jed
4c95dc9bbb Modified fieldmangler to create a tiddler if adding a tag to one that doesn't exist
This came up as an issue and I don't have any reason it shouldn't be here. It could be useful.
2015-10-08 20:39:19 +02:00
Tobias Beer
b34e4f628d adopted style recommendations 2015-10-08 14:21:57 +02:00
Tobias Beer
32c41479cc using variable declaration for readability 2015-10-08 14:18:55 +02:00
Tobias Beer
95eb8810b6 removed pushOnce 2015-10-08 14:07:12 +02:00
Tobias Beer
91b5547cdf adopted style recommendations 2015-10-08 14:07:08 +02:00
Tobias Beer
d0a24bd9f0 added $tw.utils.pushOnce
retained check for basic each nonetheless

tests pass
2015-10-08 14:07:06 +02:00
Tobias Beer
f684a6beb0 fixed helper function and added tests
tests: ok
2015-10-08 14:07:00 +02:00
Tobias Beer
a88ead9c0f removed conditional from iterator
I'd really like to see a profiler run against the two to see the
performance impact of one over the other
2015-10-08 14:06:57 +02:00
Tobias Beer
c3cbbc3f66 renamed value to items 2015-10-08 14:06:54 +02:00
Tobias Beer
f9464dfaf8 using variable declaration for readability 2015-10-08 14:06:51 +02:00
Tobias Beer
baca2703f1 added list suffix for each filter
implements #1369

when the suffix is `list`, interprets the field as a list of individual
tiddler titles and returns all titles referenced in the list field of
the source list, existing or not
2015-10-08 14:06:48 +02:00
Jermolene
99df9f46f7 Add support for tiddlers containing mp4 videos 2015-10-01 12:13:38 +01:00
Jermolene
814353d8ce Fix accidental inconsistency between savetiddlers and rendertiddlers
“-do-not-delete” flag for savetiddlers command was introduced in 5.1.10
without consistency with the already implemented “noclean” flag for the
rendertiddlers command
2015-09-29 17:04:01 +01:00
Jermolene
7b8928886b Add tw.utils.tagToCssSelector() helper method 2015-09-28 20:27:43 +01:00
Andreas Hahn
99c5fa46dd fixed bug in $action-setfield introduced by #1963: At least one of '$field', '$value' or '$index' must be specified in order to act upon the information from the fields. Prevents default deletion of the 'text' field when none are specified. 2015-09-27 15:35:54 +02:00
Tobias Beer
6b3fc8d538 updated #1480 "undefined value removes field or index"
when $value is unspecified, $action-setfield removes field or index...

modified

setText() — $:/core/modules/wiki.js
invokeAction() — $:/core/modules/widgets/action-setfield

demo

http://tobibeer.github.io/tw/batch/#ActionSetField-RemoveIndex
2015-09-25 15:20:37 +02:00
Jermolene
57c40a8a56 Text-slicer: Tweaks to fix recently introduced bugs!
* Fixes problem with slicing wikitext tiddlers
* Adjusts position of heading expand/collapse icons in the view
template segment
2015-09-22 12:57:53 +02:00
Tobias Beer
a1ce254e95 fixes #1937 — filter refresh in set widget
as per @EvanBalster
2015-09-21 17:24:26 +02:00
Jermolene
939596bd47 Add new "htmlencodedplainwikified" format to view widget
Triggered by the text-slicer plugin, but general purpose.

The clunky implementation shows the shortcomings of the view widget. It
was one of the first widgets to be implemented; subsequently, the
implementation of macros gives us a potentially more flexible way of
implementing these kinds of text transformations.
2015-09-11 13:34:01 +01:00
Jermolene
eb9fb6635d Fix issues with creation and modification dates
There were several places where tiddlers were being written without the
creation/modification details being updated.

See
https://groups.google.com/d/msgid/tiddlywiki/17ef8ab0-0128-4467-8a9d-f17
bdbcf3618%40googlegroups.com
2015-09-11 13:34:01 +01:00
Jermolene
424b2fea32 Add th-saving-tiddler hook for autotagging etc.
@danielo515 this enhancement is intended to make it easier to implement
things like the auto tag plugin. Does it meet your needs?
2015-09-08 16:16:50 +01:00
Jermolene
ecdae4ceff Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
Jermolene
5176f008f0 Enhance savetiddlers command with do not delete option 2015-09-03 08:54:17 +01:00
Jermolene
4ccdaf3faf Enhance rendertiddler command with template option 2015-09-03 08:53:08 +01:00
Jermolene
51d771a074 Extend tm-open-window to pass variables 2015-08-31 14:13:32 +01:00
Jermolene
3fbe07f1f8 Fix link widget propogation behaviour
Without this fix, using nested link widgets with custom elements causes
clicks on the inner element to trigger links on each of the containing
widgets
2015-08-30 19:12:12 +01:00
Jermolene
68e15c1064 Move rename tiddler handling into navigator widget
For consistency with the other tiddler manipulation primitives.
2015-08-30 19:11:14 +01:00
Jermolene
a204784c0c Limited implementation of external text tiddlers in the browser
Triggered by the discussion in #1917
2015-08-29 16:33:04 +01:00
Jermolene
2eb645e5e5 Add getAttribute to fakeDom 2015-08-10 20:32:13 +01:00
Jermolene
3cfad8b044 Refactoring of text-slicer
Now we process the rendered HTML of tiddlers, which allows us to
process HTML generated by MS Word. In fact, the HTML that MS Word
generates is so awful, I’ve instead been using Mammoth to do the
conversion: https://github.com/mwilliamson/mammoth.js

Also some necessary improvements to the fake dom implementation.
2015-08-10 11:41:23 +01:00
Jermolene
ac08dc2e35 Added fold/unfold all buttons
More translations, @BramChen, apologies…
2015-08-09 17:25:01 +01:00
Jermolene
16c69bb419 Tweaks to fold button 2015-08-09 16:11:37 +01:00
Jermolene
bad4a19f8e Add fold others button 2015-08-09 12:56:48 +01:00
Jermolene
5d43cd7408 Add fold tiddler toolbar button
Addressing this tweet:
https://twitter.com/s_stryjecki/status/629349768280604672
2015-08-09 11:10:04 +01:00
Jermolene
6a3c4d6c91 Flip logic for suppressing timestamps
Fixing a mistake from the earlier commits, so that the default remains
that the timestamps are applied.
2015-08-09 11:09:02 +01:00
Jermolene
e5cd8313a0 Update actionsetfield widget to allow timestamp to be preserved 2015-08-06 18:17:09 +01:00
Jermolene
fdce67399d Provide option to suppress navigation for edit/cancel/save 2015-08-05 15:07:19 +01:00
Jermolene
72ed4b2673 Add renaming to text-slicer tiddler toolbar
The plan is to expose the functionality in other places, too - for
example, the edit template and the tag manager
2015-08-04 17:44:07 +01:00
Jermolene
9168480d18 Clear caches when changing plugins 2015-08-02 22:22:33 +01:00
Jermolene
8444961cd2 Introduce Story object
A lightweight object to encapsulate manipulation of the story and
history lists
2015-08-01 18:09:00 +01:00
Jermolene
cd29eed067 Fix problem with importing using wrong import tiddler name 2015-08-01 13:48:46 +01:00
Jermolene
8f746f9dde Add parse tree utility for collecting text 2015-08-01 13:14:32 +01:00
Jermolene
f708b4df65 Turn off performance instrumentation
The plan is to make it be a user configurable option
2015-08-01 13:13:47 +01:00
Jermolene
58188cf805 Improvements to parser rule configuration
* Ignore parser rule configuration in safe mode
* Made text translatable
* Added new setting for camelcase links
* Added warning on parser rule configuration tab

See #1875
2015-07-31 13:33:33 +01:00
Jermolene
d5e690a06d First pass at global disabling of parser rules
This is to address #1875 more quickly than via #345.

This commit only includes a partial implementation of the UI - see the
ticket for details.
2015-07-30 12:28:29 +01:00
Jermolene
18e38bb2bc Fix bug with 2cb6400773
The problem was that we failed to escape the dash in the regexp,
meaning that it was matching all characters from “.” to “_”.
2015-07-14 08:33:12 +01:00