1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-17 23:34:50 +00:00
Commit Graph

8620 Commits

Author SHA1 Message Date
Tobias Beer
88a65f038e Add a "close plugin library" button (#2072)
* provides a "close plugin library" button

* starting from #1718 by @inmysocks
* possibly fixes all of #1718, #1597,  and #2067

* corrected code comment

* add back title

No idea why I overlooked this beforehand.

Next time I will not suggest such changes that have little to do with
the PR, but rather just comment the code.

* ah, sorry, "fixed" wrong spot

now

```
<$action-sendmessage $message="tm-load-plugin-from-library"
url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
```

...should be back at the right spot.

* mhhh... still fixing the mess

load, unload, puh... let's see if I got it now

* added unloadIFrame and minor syntax fixes
2017-02-22 12:15:26 +00:00
Tobias Beer
6085936475 Introduce "field" suffix for "has" filter operator (#2066)
* has:field — tested & documented

allows to test whether a field exists

* fixed inverted condition

* added from version to docs
2017-02-22 12:13:59 +00:00
Jermolene
cd2bc88658 Add "enlist" operator
Fixes #2767
2017-02-21 15:17:47 +00:00
Jermolene
b1ecf81b0c Tentative improvements to highlight plugin problems
We now use highlight.js in raw HTML mode on the server, rather than
trying to use it with the fakedom. This causes problems with fakedoms
inability to get textContent for a node that has been created by
assigning innerHTML. So we extend the fakedom to allow the original
text content to be saved.

See #2778 for discussion.
2017-02-21 13:09:32 +00:00
Jermolene
eee18aab40 Docs: Fix typo 2017-02-21 08:47:00 +00:00
Jermolene
9fc2086b71 Optimise sameday filter
I used this test:

console.time();for(var t=0; t<200; t++)
{$tw.wiki.filterTiddlers("[all[tiddlers+shadows]sameday[20170210]]");};c
onsole.timeEnd()

Before this patch, I got speeds of approx 190ms, versus 140ms
afterwards.

Note that the ability to add a cache property like this is only
possible because tiddler objects are immutable.
2017-02-21 08:31:05 +00:00
Thomas Elmiger
8307f7c3ca Tiny optimisation for Naming of System Tiddlers.tid (#2773)
* Replacement icon stopwatch on

As discussed in issue #2690

* Replacement icon stopwatch off

As discussed in issue #2690

* Added missing tag "Resources" (Community Resource)

* Tried to make a sentence clearer

CamelCase words are NOT joined with hyphens (copy-paste error?). 
Copied "directly" from the line below to make the meaning even clearer.
2017-02-21 08:28:53 +00:00
Jermolene
b26e138503 Tweaks for #2774 2017-02-19 20:50:52 +00:00
twMat
16da00fe3e Clarify EditTextWidget behaviour and tag attribute (#2774) 2017-02-19 20:48:32 +00:00
Bram Chen
7086c41b6c Update chinese translations for help command (#2775)
* enhanced rendertiddler command
* the new fetch command
2017-02-19 20:46:25 +00:00
Xavier Cazin
6a172363da fr-FR for new fetch command and modified rendertiddler (#2777)
* fr-FR translation of additional error strings

* a slightly better fr-FR translation for the Site Subtitle

* fr-FR translation for the "print page" button

* fr-FR translation for Tiddler Info Panel-related strings

* fr-FR translation for Timestamp activation strings

* fr-FR translation for TiddlerManager related strings

* fr-FR translation for an additional string related to system tiddlers

* add group-sort fields to fr-FR Types

* fixes to the fr-FR Tiddler Manager translations

* fixes fr-FR translation for timestamp-related strings

* fr-FR translation of the tiddler renaming strings

* fr-FR translation of what is the StoryList filter

* fr-FR translations for new saver-related settings

* fr-FR translations around the new fetch command

* fr-FR translation for modified rendertiddler command
2017-02-19 18:27:22 +00:00
Jermolene
75b501f681 Optimise $tw.utils.parseStringArray()
On my machine, the following test performed on the prerelease improves
from 40ms to 8ms with this patch:

```
var a =
$tw.utils.stringifyList($tw.wiki.allTitles());console.time();$tw.utils.p
arseStringArray(a);console.timeEnd()
```
2017-02-19 18:08:15 +00:00
Jermolene
daf703b67f Add support for th-navigating event 2017-02-19 15:47:37 +00:00
Jermolene
0d0ece6377 Add new "fetch" command
Like the load command except retrieves the file over HTTP/HTTPS.

Allows experimentation with server-side twederation

This is a cleaned up version of code that I wrote last year at TWEUM
2016 @inmysocks @pmario @twMat @xcazin
2017-02-18 13:33:41 +00:00
Jermolene
74b0da065e Add logging functions to commander 2017-02-18 13:30:04 +00:00
Jermolene
6f93ce6ea7 Enhance rendertiddler command with support for additional variable
Passing an arbitrary variable allows us to e.g. reuse the export
filters as shown in the example
2017-02-18 13:17:44 +00:00
Jermolene
91b341e8e0 Better error trapping for WebDAV saver
Without these checks we get a startup crash when using TiddlyWiki in
client-server configuration.
2017-02-18 12:12:29 +00:00
Jermolene
f0ff1f993e Fix problem with textarea background colour
Fixes #2772
2017-02-17 17:39:01 +00:00
Bram Chen
d0c20435cd Add chinese translations for Error/EditConflict (#2771) 2017-02-17 17:11:30 +00:00
FND
6505e6f448 WebDAV file overwrite protection (#2614)
* putSaver: detect edit conflicts to prevent clobbering, if possible

if the server supplies an ETag, we send it back when saving, allowing
the server to detect edit conflicts and respond with 412 (cf.
https://www.w3.org/1999/04/Editing/)

caveats:
* this only kicks in after the first save, as we don't have access to
  the ETag when first loading the document
* there's no recovery mechanism (e.g. resetting `this.etag` in order to
  force clobbering), other than manually reloading the document

* putSaver: retrieve ETag upon initialization for clobbering protection

this addresses one of the caveats from the previous commit
(2d75cb83af) - while theoretically prone
to a race condition, it seems unlikely that saving will be triggered
before the server responds

* putSaver: simplify URI extraction

this simplifies the approach introduced in
f51f6bf774, with the purpose of removing
the fragment identifier

* putSaver: localize error message

* putSaver: switch to built-in HTTP helper

in the process, fixed ETag assignment in `#save` method (was
`this.etag`, now `self.etag`) as well as a syntax error due to a missing
closing brace

* putSaver: consolidate URI handling
2017-02-17 12:26:15 +00:00
twMat
a6b538b308 Clarify use of RawMarkup tag (#2768)
Anyone attempting to use this tag will need information about required reload of TW for activation.
2017-02-15 08:56:49 +00:00
Jermolene
467bf17dd8 GoogleAnalytics Plugin: Make sure we don't crash if the config tiddlers don't exist 2017-02-13 11:39:39 +00:00
Jermolene
95f565878e Savetrail: Fix conditionality of hook-based saving 2017-02-13 09:00:34 +00:00
Jermolene
d6f5b3cacd Filesystemadaptor: Fix problem with unknown file extensions 2017-02-12 15:35:04 +00:00
Jermolene
d5b04c2688 Fix problem with loading metafiles
This issue was introduced in 1b41b44684.

Fixes problem raised by @pmario in
https://github.com/Jermolene/TiddlyWiki5/commit/3708f6c8e4f4bf2ea1cb10b0
fa685888485f788a#commitcomment-20848240
2017-02-12 12:14:04 +00:00
Jermolene
7b251df989 Filesystemadaptor: Fix problem with creation of unneeded directories
@pmario this fixes the problem reported in
https://github.com/Jermolene/TiddlyWiki5/commit/3708f6c8e4f4bf2ea1cb10b0
fa685888485f788a#commitcomment-20847981
2017-02-12 11:15:23 +00:00
Jermolene
a51f62bc40 Docs: Move beaker browser file 2017-02-12 11:14:21 +00:00
Jermolene
6397ce8997 Docs: move a couple of files to the correct dir 2017-02-12 11:14:05 +00:00
Jermolene
de9bb2fa40 Feature TiddlyMap in the HelloThere thumbnails 2017-02-12 11:13:43 +00:00
Jermolene
b5482d8dba Remove extraneous console.log
I’ve leaving the one at line 91 because it might be useful for field
debugging…
2017-02-11 12:59:18 +00:00
Jermolene
3708f6c8e4 Major refactoring of filesystemadaptor
The code here had got a bit broken by some PRs that I should have
checked more carefully. I’ve done a major refactoring which will
hopefully make it easier to understand, and fixes a number of problems:

* Problem with eg .md tiddlers not being deleted correctly
* Problem with Windows path separators not being usable within
$:/config/FileSystemPaths on Windows
* Problem with filename clashes not being detected correctly when
saving to a different directory via $:/config/FileSystemPaths
* Enables slashes within tiddler titles to be mapped into folders
* Enables plain text files like .md and .css to be saved with .meta
files instead of as .tid files (see #2558)
* No longer replaces spaces with underscores

As this is such a major update, I’d be grateful if Node.js users could
give it a careful run through — in particular, you’ll need to try
creating new tiddlers of various types and ensure that the expected
files are created.
2017-02-11 12:56:42 +00:00
Jermolene
1961db6732 Register alternate mime type for Markdown files
macOS considers them to be `text/markdown`, which meant that dragging
an .md file ended up with the wrong content type
2017-02-11 12:48:41 +00:00
Jermolene
36c0af0fd4 Docs: Fix typo in example filter 2017-02-11 12:47:56 +00:00
Jermolene
9e08aed8ad Update release note 2017-02-10 12:45:26 +00:00
Jermolene
075d7d76df SaveTrail: Update readme 2017-02-10 07:33:38 +00:00
Jermolene
3d8249dc7a Savetrails: Download before and after files for destructive modifications 2017-02-09 15:45:39 +00:00
Jermolene
97e995e0c7 Add wiki.checkTiddlerText() convenience method 2017-02-09 15:43:28 +00:00
Jermolene
2397f0aa6f Add several new hooks for UI actions 2017-02-09 15:42:55 +00:00
Jermolene
6b2ab90721 Update hook mechanism so that multiple parameters can be passed 2017-02-09 15:42:21 +00:00
Jermolene
73ded6a82a Add new "count" filter operator
See discussion here:
https://groups.google.com/d/msgid/tiddlywiki/fe51b7f5-5369-493b-82e5-94c
18e863fe0%40googlegroups.com?utm_medium=email&utm_source=footer
2017-02-08 20:11:44 +00:00
Jermolene
9bc523fdef Fix bug in renameTiddler
This operation isn’t used by the core, but is used by the TextSlicer
plugin
2017-02-08 20:04:36 +00:00
Jermolene
f4a015f120 Upgrade to latest version of xmldom 2017-02-07 18:20:30 +00:00
Jermolene
d9fd722e50 Text-slicer: Improve image support
Previously we only worked with base64 data URI images; now we work with
relative URLs as well.
2017-02-07 11:05:08 +00:00
Jermolene
112a8d95c5 Docs: Switch "Mailing List" to "Forum"
Fixes #2761
2017-02-07 11:03:39 +00:00
Jermolene
ef1c47c3aa Fix accidental wikilinking 2017-02-05 19:58:58 +00:00
Jermolene
6282fe43af Docs capitalisation consistency
Thanks @twMat
2017-02-05 13:34:37 +00:00
Jermolene
db056a84a5 Remove obsolete code 2017-02-04 18:14:20 +00:00
Jermolene
a14b8a94df Fix JSON format for bc61f7eebf
Otherwise the JSON files cannot be imported back into TiddlyWiki
2017-02-04 18:08:47 +00:00
twMat
e20682dcfd Update title to "How to Add a New Tab to the Sidebar" (#2754)
Only title modified, from lowercase to uppercase letters.
2017-02-04 18:06:17 +00:00
Jermolene
bc61f7eebf Introduce savetrail plugin
See the readme:

“This plugin causes TiddlyWiki to continuously save the contents of
each tiddler that is changed as a JSON file. Configured correctly, the
browser will download the files silently in the background, and they
can be used as a backup in case of accidental data loss.”

Inspired by @telmiger’s comment (3) here:
https://github.com/Jermolene/TiddlyWiki5/issues/2741#issuecomment-276128
871
2017-02-04 17:37:31 +00:00