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

3691 Commits

Author SHA1 Message Date
BurningTreeC
288d25e733 Remove unnecessary border-radius already set on the iframe (#3604) 2018-12-01 15:31:34 +00:00
Jermolene
0ecc7c6071 Update plugin library to 5.1.18 2018-12-01 15:21:31 +00:00
BurningTreeC
6e59d2597a Style the framed editor (#3596)
* style the framed editor

this makes the framed editor look a bit less ugly 😎

* Update framed.js

* Update base.tid

* Update base.tid
2018-12-01 14:21:43 +00:00
Andreas Hahn
2bf6203cf5 Improvements to the static single tiddler view as well as documentation. (#3386)
* Improvements to the static single tiddler view as well as documentation.

* Fixed tabs

* Fixed tabs

* Revert static view path

* Documentation updates
2018-12-01 13:30:00 +00:00
BurningTreeC
17232cfe91 Fix missing space between edittemplate tags (#3582) (#3585)
* add tc-tag-list-item to edittemplate  tag

... and remove a space that doesn't do anything here

* we need an `&nbsp` here
2018-11-29 09:51:58 +00:00
Arlen22
603c564872 Add the "tiddlywiki" argument to the server start hook (#3592)
* Update Hook__th-server-command-post-start.tid

* Update server.js

* Update listen.js
2018-11-29 09:51:11 +00:00
BurningTreeC
62cbbf1db4 fix textnodes between tags in viewtemplate (#3587)
this removes additional text-nodes in the dom after each `tc-tag-list-item` caused by the last empty line
we could also just remove that line but I don't know if that's a permanent solution or if some mechanism will re-add that line at some point, so I go with the `whitespace trim` pragma
2018-11-29 09:49:29 +00:00
BurningTreeC
0396af849a Undo #3490 - error in popup-cancelling logic (#3586) 2018-11-29 09:49:11 +00:00
Xavier Cazin
ea76a868bf Update to fr-FR language translations (#3583)
* Update to fr-FR language translations

* Add missing space

* Fix a line feed mistake
2018-11-29 09:48:11 +00:00
Marxsal
9268a8c3ca Info about using 0.0.0.0, plus warning about using it. (#3519)
* Info about using 0.0.0.0, plus warning about using it.

* Moved information to WebServer. Incls listen.

* More warnings about n.n.n.n
2018-11-29 09:47:37 +00:00
BurningTreeC
545c508138 fix tags-dropdown link (missing-tiddlers ) (#3589) 2018-11-27 20:51:54 +00:00
Mario Pietsch
42f7c03824 tm-open-external-window plus documentation. (#2721)
* first try - tm-open-external-window plus documentation.

* render examples and make help link a global variable
2018-11-27 18:43:25 +00:00
Jermolene
19c49ae18a Fix animations for tags in edittemplate
Fixes #3577
2018-11-25 11:13:42 +00:00
BurningTreeC
ad4107a94b Fix animations in "Open" Sidebar-Tab (#3578) 2018-11-25 11:12:06 +00:00
BurningTreeC
8542ebaecb Fix $tw.platform.isLinux on latest firefox (#3495) 2018-11-25 10:51:42 +00:00
BurningTreeC
cd0ce0cde5 Show tag-icons in tags edittemplate (#3447) 2018-11-25 10:43:13 +00:00
Rob Hoelz
09ea59240a Cancel non-ancestor popups when showing a new popup (#3490)
Addresses GH #3484

As far as I can tell, the popup level checks in this module are
meant to handle nested popups.  It seems to me that the goal is
for at most a single hierarchy of popups to exist at any given time
- bearing that in mind, this change checks any popups currently tracked
by the module, canceling any that don't share an element hierarchy with
the new popup.
2018-11-25 10:42:21 +00:00
Jermolene
a83cd3f984 Change logic of tv-hide-missing-links to tv-show-missing-links
See https://github.com/Jermolene/TiddlyWiki5/pull/3530#issuecomment-441368922
2018-11-24 15:53:39 +00:00
Jermolene
32c8ef1d62 Docs typo
Thanks @pmario
2018-11-24 14:18:59 +00:00
BurningTreeC
3f91d5b3a1 Add tv-override-missing-links to fix links to missing tiddlers (#3530)
* add tv-override-missing-links variable

this lets us set `tv-override-missing-links` true so that we can fix edge cases like the `Filter` dropdown in the `Advanced Search` when `enable missing links` is unchecked in the `Settings` tab of the Control Panel

* add tv-override-missing-links to filter dropdown

* add tv-override-missing-links to type dropdown

* add tv-override-missing-links to fieldname dropd

* add tv-override-missing-links to TagManager(icons)

* undo tv-override-missing-links TagManager

not needed here

* Update link.js

* Update dropdown.tid

* Update fields.tid

* Update type.tid

* Update dropdown.tid

* Update link.js

* simplify all together

* add tv-hide-missing-links to pagetemplate

* do we need to refresh here...

... if the variable gets set on top of the pagetemplate?
2018-11-24 13:36:48 +00:00
BurningTreeC
2541b9b090 Pagescroller - get scroll pos in src window (#3561) 2018-11-21 11:32:22 +00:00
Jeremy Ruston
09330968cc
New "else" prefix for filters (#3558)
* Experimental "else" prefix for filters

See #3557

* Docs updates for "else" filter runs
2018-11-20 13:29:44 +00:00
BurningTreeC
7729649f0e Fix bad function declaration in wiki.js (#3559)
fix for #3555 - inner function declaration should be on top of its "host" function

error originally appeared on firefox v38.0.5
2018-11-20 11:50:12 +00:00
BurningTreeC
430be4ec30 Fix list-tagged-draggable for quotes !! and ## (#3442)
* fix list-tagged-draggable for quotes !! and ##

* Update list.tid

* Update list.tid

* Update list.tid
2018-11-20 11:43:15 +00:00
Adrian Morosanu
f373d8f2bf Tree macro - fix for double quotes (and other special characters) (#3552)
* Added fixes for special characters (e.g. double quotes) (including @BurningTreeC and @Jermolene suggestions)
* Removed a lot of redundant code
* Set a default value for "tree" macro prefix parameter ($:/)
2018-11-19 10:50:09 +00:00
BurningTreeC
4f78d3d81b Fix untagged-pill popup position (#3550)
this corrects the popup-position of the untagged-pill in the tag-manager, showing on top of the Tiddler, not below the pill
2018-11-19 09:35:06 +00:00
BurningTreeC
72679d2041 Fix bad characters in the TagManager (#3549)
now the tag manager needs some fixes for breaking titles, too

- the `<<__variable__>>` syntax needs to be used
- the `tag-pills` don't use the tag-pill macro, but `{{||$:/core/ui/TagTemplate}}` directly
- some already sufficiently qualified states in the `iconEditor` macro are reduced to not use the `qualify` macro
2018-11-18 20:58:03 +00:00
BurningTreeC
33ba69e852 Modals: Display in source-window (#3539)
* Make modals display in source Window

this makes modals display within the window where they got opened, with the parameter `rootwindow` that, if `yes` or `true`, shows the modal always in the root TW window (`<$action-sendmessage $message="tm-modal" $param="mymodal" rootwindow="yes|true"/>`)

* pass the full event to $tw.modal.display

we need the event there to find `srcDocument` and `srcWindow`

* pass event in options object

* update modal.js to use options.event

* add docs for rootwindow tm-modal attribute
2018-11-18 20:57:04 +00:00
Jermolene
3aae643e14 Reveal widget with lazily loaded state tiddlers
Fixes #3476
2018-11-18 19:31:53 +00:00
BurningTreeC
849844be12 Add stateTitle stateField stateIndex attributes (#3529)
* make triggerPopup optionally set state directly

* update button widget for new state attributes

* update reveal widget for new state attributes

* fix errors in button widget
2018-11-18 19:16:46 +00:00
BurningTreeC
2b6514ddc2 Use new state* attributes for reveal and button widgets (#3531)
* toc macros: use stateTitle and setTitle

* tree macros: use stateTitle and setTitle

* TagManager: use popupTitle, stateTitle setTitle

* body viewtemplate: use stateTitle for folded-state

* import-listings: use stateTitle and setTitle
2018-11-18 10:54:12 +00:00
Jeremy Ruston
33dd367a65
Introduce new subfilter operator (#3508) 2018-11-16 11:27:19 +00:00
BurningTreeC
9752531b61 FIX for keyboard widget keyInfoArray (#3544)
apologies
2018-11-15 21:40:27 +00:00
BurningTreeC
43c8a0f485 Keyboard Widget: refresh keyInfoArray (#3541)
this makes a keyboard widget update its keyInfoArray if its key has the `((descriptor))` format and one of the platform-specific configuration tiddlers with that descriptor-suffix changes
2018-11-15 16:50:23 +00:00
BurningTreeC
4f7297645d Fix action-navigate widget for undefined event (#3542)
we need to prevent the event from being undefined which happens when using `action-navigate` within a global keyboard shortcut
2018-11-15 16:49:41 +00:00
Jermolene
1f296951d4 Minor tweaks for #3534
* Minor rewording of prompt text
* Moved the colon into the translation string, reasoning that it may need to be changed for languages that use punctuation differently
* Corrected expand/collapse arrows
* Moved prompt into expand/collapse button, making it easier to hit use
2018-11-15 15:43:16 +00:00
Bimba Laszlo
88664f0286 Show backlinks on rename (#3534)
* List backlinks when renaming tiddler

* List references inplace

* TiddlerInfo/References accepting specific tiddler

If `operandTitle` is set, it will show its references instead of current
tiddler's.

It's purpose is to prevent code duplication (the references are listed
when renaming tiddler).

* Don't use variable for References template, use <$tiddler>

Set the `current` to desired title with `<$tiddler>` widget.

* List references in a separate block

* Rename state tiddler

* Use qualified state
2018-11-15 15:18:38 +00:00
BurningTreeC
0ff96f9caf [pagescroller] add callback function option (#3473)
this allows using the pagescroller for scrolling elements into view where the rect gets calculated somewhere else

Example: CodeMirror has the `cm.cursorCoords()` function that returns the rect of the textselection (or cursor coordinates)

this scrolls the cursor or text selection into view using tiddlywikis pagescroller:

`$tw.pageScroller.scrollIntoView(undefined, function() { return self.cm.cursorCoords(true,"window"); });`
2018-11-15 14:58:32 +00:00
BurningTreeC
c82edbe6bc New window: add missing click listener for popups (#3538)
this adds a click listener to new windows which enables us to cancel popups by clicking
2018-11-13 18:08:54 +00:00
BurningTreeC
55b5b6dd56 PageScroller: scroll in new windows (#3537)
* make pageScroller work in new windows

* update getScrollPosition to work for new windows

* Update dom.js
2018-11-13 18:07:55 +00:00
BurningTreeC
22caef9e34 Fix NewImageType config (#3523)
* fix new-line in NewImageType config

sorry for this, too

* fix NewImageType config tiddler

* use "text" field for config
2018-11-07 16:51:55 +00:00
BurningTreeC
d64fc5d8cd Fix new-image button (#3521)z
sorry for the mistake
2018-11-07 16:05:56 +00:00
BurningTreeC
9f8a74c6d9 add new-tiddler new-journal new-image keyboard shortcuts (#3512)
* add new-tiddler action tiddler

* use new-tiddler action-tiddler

* use new-tiddler action-tiddler correctly

* use new-journal action-tiddler

* create new-journal action-tiddler

* use new-image action-tiddler

* add new-image action-tiddler

* create new-image type config

users may prefer png over jpeg for example

* add new-tiddler keyboard shortcut

* add keyboard shortcut configs

* add keyboard shortcuts ShortcutInfo

* add new-journal Keyboard shortcut

* add new-image keyboard shortcut

* Create Hidden Setting NewImageType.tid
2018-11-07 12:59:21 +00:00
BurningTreeC
6c9dfd7f62 Fix tag macros problem with double quotes (#3437)
* [Further TOC fixes] - FollowUp: fix tag macros

this fixes the tag macros when titles are used that contain quotes, especially triple quotes and more

* Update tag.tid
2018-11-06 21:35:36 +00:00
Jermolene
4f8e32a647 Change qualify widget parameter name to match qualify macro 2018-11-06 16:41:18 +00:00
BurningTreeC
4d1127ed5b Fix tc-adjust-top-of-scroll (#3475)
* correct scrolling with tc-adjust-top-of-scroll

not multiplying `offset` with t causes jumps at the first animation steps, where the offset value is bigger than `endY - scrollPosition.y`

* correct scroll offset
2018-11-06 16:23:46 +00:00
Jermolene
d7914e3f3e Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 2018-11-06 15:29:16 +00:00
Jermolene
698224556e Avoid wikify widget in TOC macro
Fixing the most egregious problem from #3517

@pmario can you kindly retest?
2018-11-06 15:29:13 +00:00
BurningTreeC
aeaf5ee5b6 FIX "Observe openLinkFromOutsideRiver ..." (#3516)
I assumed the attribute to be available but it's not
2018-11-06 14:33:41 +00:00
BurningTreeC
97b098b059 Observe openLinkFromOutsideRiver when creating new tiddlers (#3514) 2018-11-06 13:55:18 +00:00
BurningTreeC
457f03798c Fix error opening new windows with popup-blocker (#3515)
this prevents errors when a popup blocker blocks opening a new window from within a running TW
2018-11-06 13:54:00 +00:00
BurningTreeC
3592333cb8 Add support for global keyboard shortcuts (#3493)
* changes for global keyboardshortcuts

* add keyboard.js startup module

* remove not existing "th-opening-window" hook

* correct title

* use utils.addEventListeners

* define platform lookup-names on startup

* use the startup-lookup-names array

* use the platform-specific lookupNames only

* Update keyboard.js

* move initializations to the constructor

* move initializations to the constructor

* rename hasAnyTiddlerChanged

* don't explicitely create new RegExp

* use $tw.utils.hopArray

* match strings, no regex

* remove hopArray, move to boot.js

* add $tw.utils.hopArray to boot.js

* style update

* style updates

* move more to keyboardManager module

this could probably be moved to rootwidget.js

* move more to keyboardManager module

* add event listener for shortcuts in new windows

* prevent error when opening window is blocked

* add keydown listener on document in startup.js

* delete startup/keyboard.js

* add missing this.shortcutTiddlers

* Update keyboard.js

* Update boot.js

* add exports.hopArray to utils.js

* minor codingstyle tweak

* change how lookupnames get pushed to array

* Update windows.js

* re-add shortcuts-listener for new windows

I removed this before which I think was because I misunderstood what exactly should go to a separate PR
2018-11-06 13:34:51 +00:00
Jermolene
b584295831 Fix crash with search operator with blank field list 2018-11-01 12:56:56 +00:00
Jeremy Ruston
6dcdc2049a
Enhance search operator (#3502)
* Enhance search operator

* Add support for searching all fields

and also searching all fields except nominated fields.

* Docs tweaks

Thanks @pmario

* Error message improvements

* Improve error message formatting
2018-10-30 17:39:18 +00:00
Yurii Rashkovskii
c0c1b557eb Problem: revealed dropdown menu on mobiles (#3491)
On mobile phones, tiddler's dropdown menu stays partially off-screen.

Solution: ensure that the revealed coordinates are never negative

Closes #3486
2018-10-21 16:53:45 +01:00
Jermolene
6b03ba9876 Syncer: support configurable polling interval 2018-10-19 16:32:23 +01:00
Jermolene
d50e2df57b Syncer: fix problem with incoming tiddlers
The bug here is that incoming tiddlers (ie tiddlers that were updated on the server and synced back to the browser) will retain any fields that are currently present but deleted in the incoming tiddler
2018-10-14 15:35:26 +01:00
Jermolene
9c849eb10a WebServer - change /login-basic route to /login/basic
To avoid clashing with tiddlers called "login-basic" :)

We also need to revise the rout for /status for the same reason, but there are backward compatibility issues there
2018-10-13 17:22:21 +01:00
Cameron Fischer
d8007386cf Fix issues with ordering of tagged items (#3301)
* Added better handling for sortByList manual placements

If manual placement specifications show up in an inconvenient order,
sortByList, will go to the trouble of processing them in that order.

* Added tests to confirm solution to (#3296)

...That custom tag ordering will not choke when tiddlers get sorted after their dependencies have been placed around them

* Corrected list-after bug when referencing external titles

* Using more error-proof $tw.utils.hop in sortByList

* minor indentation correction in test-tags.js
2018-10-07 12:15:33 +01:00
BurningTreeC
5dcdff4b37 Fix scrolling with tc-adjust-top-of-scroll (#3467)
not multiplying `offset` with t causes jumps at the first animation steps, where the offset value is bigger than `endY - scrollPosition.y`
2018-10-07 10:23:41 +01:00
Jermolene
83a245ed21 Refactor utility for converting tiddlers to JSON 2018-10-01 11:27:45 +01:00
Jermolene
f162f4bc7b Typos missed from a9dd8c2 2018-09-28 18:18:07 +01:00
Jermolene
a9dd8c2f52 Use the new import pragma
Good for the core to show best practice
2018-09-28 16:25:54 +01:00
Jermolene
fe85845c3c Add new "\import" pragma 2018-09-28 16:01:32 +01:00
Jermolene
cfb2d7c9c8 Add support for splash screens during loading
Fixes #3417

Addresses some of the requirements discussed in #2254
2018-09-27 09:47:55 +01:00
Jermolene
7282bf4721 Fix search result count
It's been broken since 097c87f
2018-09-26 16:20:13 +01:00
Jermolene
7368cc74e1 Remove inadvertant usage of Object.assign
In order to retain compatibiltiy with IE11

See this discussion: https://groups.google.com/d/topic/tiddlywiki/RjA7_mee5oc/discussion
2018-09-21 10:56:01 +01:00
Jermolene
f98b4d5956 Add more logging for drop operations 2018-09-13 20:42:35 +01:00
Jermolene
e4e7a0912d Revert "Fix tag macro problems with bad characters in title/tags (#3435)"
This reverts commit b76c5011cf.

Thanks @pmario @BurningTreeC, let's redo this.
2018-09-12 08:42:56 +01:00
Jermolene
d650784dd6 Fix typo in keyboard shortcuts UI 2018-09-11 16:06:29 +01:00
BurningTreeC
b76c5011cf Fix tag macro problems with bad characters in title/tags (#3435)
this fixes the tag macros when titles are used that contain quotes, especially triple quotes and more
2018-09-11 16:05:39 +01:00
Jermolene
e5550b91e6 Further TOC fixes
Continuing the work of 587fe9d10e

Fixes the test case in @BurningTreeC's comment: 587fe9d10e (commitcomment-30450611)
2018-09-11 13:02:28 +01:00
Jermolene
587fe9d10e Fix TOC macro with titles ending with double quotes
By almost entirely eliminating text subsitution, we can avoid the situations where special characters in tags or titles gets the macro confused.

These are quite intricate changes, and so I'd appreciate any help reviewing and testing, many thanks.

Fixes #3427
2018-09-10 12:56:38 +01:00
Jermolene
874318091e Fix crash with illegal arguments to decodeuri(component)
Fixes #3428
2018-09-09 20:48:53 +01:00
Jermolene
f2a38960fc Fix external JS template to work with the TW5 webserver
It's a bit gross that we have to change the filename used to reference the JS file. This is to make it work with the webserver.

At the moment, the webserver exposes system tiddlers as plain text renderings, and ordinary tiddlers as full HTML renderings through a view template. So we have to use a system tiddler title for the JS file.

The workaround I'm thinking of is to remove the blanket exposure of system tiddlers, and instead have a list of system tiddlers that are specifically exposed through a namespace like `127.0.0.1:8080\lib\tiddlywiki.js`. That can't clash with a tiddler title because tiddler titles are URI encoded and so can't contain slashes.
2018-09-05 08:57:29 +01:00
Jeremy Ruston
3d10a35fb7
Add support for externalising TW's JavaScript (#3423)
* Explore externalising TiddlyWiki's JS core into a separate file

* Fix missing newline after copyright notice

* Add an error alert if tiddlywiki.js can't be loaded
2018-09-05 08:44:27 +01:00
Jermolene
19f7287a53 Add $:/tags/TiddlerInfoSegment for adding segments to the tiddler info panel 2018-08-30 13:42:51 +01:00
Jermolene
e237d8fa97 Transliterate servername to safe ASCII
Fixes #3410
2018-08-24 14:33:31 +01:00
Jermolene
0f7ce7b67f Refactor navigator widget to use story utility to manipulate the storylist as well as the historylist 2018-08-23 18:31:48 +01:00
Jermolene
3bfa9c6f10 Experimental "persistent draft indicators"
Fixes #3409
2018-08-23 18:02:39 +01:00
Jermolene
63ad284784 Fix variable name in PageTemplate 2018-08-23 17:43:34 +01:00
Jermolene
7dbe117bc5 Add username (if set) to the title of draft tiddlers
Makes things a bit easier to follow when working in multiuser environments.

@inmysocks, @danielo515, @arlen22, @pmario, @drakor does this make sense for your use cases?
2018-08-23 17:43:06 +01:00
Jermolene
7a6213dcbf Update code comment for $tw.utils.http 2018-08-23 13:13:49 +01:00
Jermolene
09112ed455 Add support for webp, heic, and heif image formats
https://en.wikipedia.org/wiki/WebP
https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
2018-08-21 11:46:46 +01:00
Jermolene
d96c844264 Use the sitetitle as the default filename for saving 2018-08-20 15:38:57 +01:00
Jermolene
fbaceaa8bd Don't steal "paste" events from contenteditable elements
Fixes pasting with a WYSIWYG editor
2018-08-20 15:26:41 +01:00
Andreas Hahn
fe527b7eaf Fixed type mismatch (#3403) 2018-08-19 18:22:52 +01:00
Jermolene
f218c946f1 Fix usages of is[current] that can be changed to all[current]
Fixes #3402
2018-08-18 14:47:35 +01:00
Jermolene
7d0b255a2a Improve "copy to clipboard" notification text 2018-08-17 09:29:23 +01:00
Jermolene
5a2e87eb09 Extend permalink/permaview to optionally copy URL to the clipboard
Fixes #3255
2018-08-16 19:39:18 +01:00
Jermolene
b55a3102be Fix typo from 8a38685 2018-08-16 16:08:33 +01:00
Jermolene
8a38685de9 Optionally adjust scroll targets to allow for a top menu bar
Fixes #3396
2018-08-16 12:07:50 +01:00
Jermolene
763f8afaf2 Add "contains" filter operator for searching list fields 2018-08-15 13:50:07 +01:00
Jermolene
3140ff9e49 Extent tm-full-screen message to support forcing the status
Now one can force "enter" or "exit", instead of just toggling the current status
2018-08-14 22:53:53 +01:00
Jermolene
7b9dc7557c Popup manager enhancements 2018-08-09 19:39:58 +01:00
Jermolene
c87c18be96 Fix tm-new-tiddler overwriting creation fields of existing tiddlers
Fixes #3371
2018-08-08 15:08:34 +01:00
Jermolene
097c87fa7b Modularize the sidebar
Fixes #2758
2018-08-02 13:22:21 +01:00
Jermolene
2d231a2e07 Fix typo in reveal widget
Introduced in a3a4c28143
2018-07-31 13:30:00 +01:00
Jermolene
4b9bc1b766 Fix crash with malformed hexadecimal HTML entities
Fixes #3373
2018-07-28 16:22:38 +01:00
Jermolene
a3a4c28143 Fix bug with reveal widget not refreshing when state tiddler changes 2018-07-20 17:07:48 +01:00
Jermolene
8520c9d8fd Coding style tweaks for #3346 2018-07-19 21:48:40 +01:00
Evan Balster
be58de8409 Add range operator and documentation (#3346) 2018-07-19 21:42:09 +01:00
Jermolene
34e04b7ca6 Minor tweaks for #3362 2018-07-19 21:28:31 +01:00
Arlen22
aa8b2e11bb Allow all methods and add bodyFormat property to route definition (#3362)
* Allow all methods and add bodyFormat property to route definition

* Set string as the default bodyFormat

* Only set encoding on string routes
2018-07-19 21:24:57 +01:00
Jermolene
8b787cd806 Add new palette colours from #3360 to other core palettes 2018-07-19 21:19:21 +01:00
Jermolene
1317e13974 Fix issue with #3360
See https://github.com/Jermolene/TiddlyWiki5/pull/3360#issuecomment-406400700
2018-07-19 21:18:54 +01:00
Talha Mansoor
e0be9a3d09 Add <select> color setting to the palette (#3360)
* Add <select> color setting to the palette

* Signing the CLA
2018-07-19 17:25:35 +01:00
snlhnk
c05c0d3df6 Module-ize server routes, add static file support and other enhancements(#2679)
* Module-ize server routes and add static file support (#2510)

* Refactor server routes to modules

New module type: serverroute

Caveats: Loading order is not deterministic but this would only matter
if two route modules attempted to use the same path regexp (that would
be silly).

* Add static assets plugin

This plugin allows the node server to fetch static assets in the /assets
directory. I felt that this was a feature that goes above the core
functionality. That is why I added it as a plugin. with the modular
route extensions this was a breeze.

* Add serverroute description to ModuleTypes

* Coding standards tweaks

* Fix filename typo

* Move support for attachments from a plugin into the core

* Missing "else"

* Refactor server handling

* Introduce a new named parameter scheme for commands
* Move the SimpleServer class into it's own module
* Deprecate the --server command because of the unwieldy syntax
* Add a new --listen command using the new syntax

For example:

tiddlywiki mywiki --listen host:0.0.0.0 port:8090

* Add check for unknown parameters

* Add support for multiple basic authentication credentials in a CSV file

Beware: Passwords are stored in plain text. If that's a problem, use an authenticating proxy and the trusted header authentication approach.

* Refactor module locations

* Rename "serverroute" module type to "route"

* Remove support for verifying optional named command parameters

The idea was to be able to flag unknown parameter names, but requiring a command to pre-specify all the parameter names makes it harder for (say) the listen command to be extensible so that plugins can add new optional parameters that they handle. (This is particularly in the context of work in progress to encapsulate authenticators into their own modules).

* Refactor the two authenticators into separate modules and add support for authorization

* Correct mistaken path.join vs. path.resolve

See https://stackoverflow.com/a/39836259

* Docs for the named command parameters

I'd be grateful if anyone with sufficient Windows experience could confirm that the note about double quotes in "NamedCommandParameters" is correct.

* Be consistent about lower case parameter names

* Do the right thing when we have a username but no password

With a username parameter but no password parameter we'll attribute edits to that username, but not require authentication.

* Remove obsolete code

* Add support for requiring authentication without restricting the username

* Refactor authorization checks

* Return read_only status in /status response

* Fix two code typos

* Add basic support for detecting readonly status and avoiding write errors

We now have syncadaptors returning  readonly status and avoid attempting to write to the server if it's going to fail

* Add readonly-styles

We hide editing-related buttons in read only mode

I've made this part of the tiddlyweb plugin but I think a case could be made for putting it into the core.

* Add custom request header as CSRF mitigation

By default we require the header X-Requested-With to be set to TiddlyWiki. Can be overriden by setting csrfdisable to "yes"

See https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Protecting_REST_Services:_Use_of_Custom_Request_Headers

* Add support for HTTPS

* First pass at a route for serving rendered tiddlers

cc @Drakor

* Tweaks to the single tiddler static view

Adding a simple sidebar

* Switch to "dash" separated parameter names

* Typo

* Docs: Update ServerCommand and ListenCommand

* First pass at docs for the new web server stuff

Writing the docs is turning out to be quite an undertaking, much harder than writing the code!

* Get rid of extraneous paragraphs in static renderings

* Rejig anonymous user handling

Now we can support wikis that are read-only for anonymous access, but allow a user to login for read/write access.

* More docs

Slowly getting there...

* Static tiddler rendering: Fix HTML content in page title

* Docs updates

* Fix server command parameter names

Missed off 30ce7ea

* Docs: Missing quotes

* Avoid inadvertent dependency on Node.js > v9.6.0

The listenOptions parameter of the plain HTTP version of CreateServer was only introduced in v9.6.0

cc @Drakor @pmario

* Typo
2018-07-18 16:54:43 +01:00
Jermolene
c72e4f01f1 Fix typo in excise button
It meant that the excise button didn't appear on tiddlers of type text/vnd.tiddlywiki
2018-07-03 11:12:12 +01:00
Jermolene
bef3242075 New text editor operation: save selection to a tiddler 2018-06-29 15:09:51 +01:00
Jermolene
f54a0a11bc Add support for editor toolbar buttons to have action widgets 2018-06-29 15:09:34 +01:00
Jermolene
acaa07a964 First stab at a threaded commenting plugin 2018-06-21 08:36:15 +01:00
Jermolene
1ce9973bed Add optional debug logging to the server command 2018-06-20 12:43:41 +01:00
Jermolene
c29f5a1b61 Server command: map missing path to "/"
Otherwise, the user gets a 404 if we use a path prefix and the user omits the trailing slash
2018-06-20 12:18:35 +01:00
BurningTreeC
2a3f1b4403 Make tm-full-screen work in all windows (#3334)
this makes tm-full-screen work in new windows, too
2018-06-16 10:03:38 +01:00
Jermolene
7557b8b5b7 Remove extraneous debugging code from 35cbb127a3 2018-06-15 11:34:06 +01:00
Jermolene
35cbb127a3 Restrict variable substitutions to macros defined with the define pragma
Fixes #3333
2018-06-15 08:31:02 +01:00
Jermolene
aba9c94f5a Fix coding standards for put.js
A few minor things, but the accidental use of "const" is serious: TW5 is intended to run on ES5.
2018-06-13 15:50:47 +01:00
Jermolene
bacf500d50 Avoid deprecated new Buffer() usage
See https://alexatnet.com/node-js-10-important-changes/#buffer-1

> Uses of new Buffer() and Buffer() outside of the node_modules directory will now emit a runtime deprecation warning.

More details: https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafe
2018-06-13 11:22:17 +01:00
Jermolene
2e51f08bef Add support for rebasing headings at render time
Fixes #3330
2018-06-10 15:54:23 +01:00
Jermolene
29606c6d24 Refactor new journal actions
Using contained actions, as we were, meant that the actions (and in this case the wikify widget) were being rendered at render time, but might have been out of date by the time the actions were triggered. Using the action attribute ensures the actions are rendered when they are executed.

Fixes #3326
2018-06-06 19:41:02 +01:00
Jermolene
6b14969cf6 Display a warning for binary tiddlers in view mode
The base64 data is currently parsed as wikitext, which is slow and unhelpful

We already display the same warning for binary tiddlers in edit mode.
2018-05-18 17:53:07 +01:00
Jermolene
33453039fc Fix broken import previews
All three were inadvertently showing the existing tiddler (if any), not the imported tiddler.
2018-05-16 17:40:15 +01:00
Jermolene
6e2b4ebf3e Remove print-tiddler-window button for v5.1.17
We'll reconsider it for v5.1.18
2018-05-12 11:20:43 +01:00
Jermolene
737e9ae4cb Revert multiple suboperator functionality from the "is" operator
See the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/3240#issuecomment-388035466
2018-05-10 13:15:49 +01:00
Jermolene
e11282cc08 Fix name of print tiddler button 2018-05-10 11:36:57 +01:00
Jermolene
2beae0db2e Tweaks for the new print tiddler toolbar button 2018-05-10 11:35:18 +01:00
Jermolene
523060e823 Add new "print tiddler" button for the view toolbar
It works by opening the tiddler in a new window and then triggering the browser print dialogue.
2018-05-10 11:33:23 +01:00
Jermolene
b95aa6ec6a Fix problem with repeated "new journal" with text set
Fixes problem whereby a repeated "new journal" would replace the text of the existing journal tiddler if the control panel new journal text was set.

Fixes #3028 and #3265
2018-05-10 11:28:07 +01:00
Jermolene
e6466b2c32 Fix problem with extraneous space in new journal titles 2018-05-10 08:52:02 +01:00
Matt Lauber
0ab9ec1ad3 Refactored the is operator for simplicity and efficiency. (#3240)
* Refactored the is operator for simplicity and efficiency.

* Improve `is` filter documentation.

* Update is.js

* extracted `subops.length` to `num_of_subops`
* renamed `subop` to `operator` for clarity/differentiation from `subops`
* refactored to avoid using a `Set` object.

* Update is.js
2018-05-09 18:07:08 +01:00
Devin Weaver
230c13129a Fix undefined xhr bug (#3262)
Closes #3261

Bug introduced in commit f9be41720 ("Minor tweak for RetrieveETag
(#3257)", 2018-05-05)
2018-05-09 18:04:52 +01:00
Daniel Rodríguez Rivero
4c89bbabbe Retain $:/status/UserName when logged out (#2893)
The user name tiddler should not be removed just because we are not logged in
2018-05-09 14:22:55 +01:00
Bram Chen
f9be417204 Minor tweak for RetrieveETag (#3257)
Need to check if the server responses a null value for ETag.
(In the case testing with build-in webdav server of CarotDAV on Windows 10)
2018-05-05 11:40:41 +01:00
Sebastian Silva
46e8e4343a Fix WebDAV by requesting new ETag. (#3230)
* Fix WebDAV by requesting new ETag conditionally

For me. this was saving only the first time and subsequently failing.
Having revised the requests, I noticed it didn't get a new ETag after saving.
Seems not all WebDAV implementations return a new ETag in PUT requests.

In my WebDAV service (WsgiDAV) - ETag is only served from a HEAD
request.

So if no ETag is found with PUT - we request one with HEAD.

This patch fixes error handling and should also work with servers that
provide ETag directly upon PUT.

* Add tweak from PMario
2018-05-04 11:48:38 +01:00
Jermolene
ab5e5795e8 Fix issue with lazy loading temporary tiddlers
Fixes #3235
2018-05-03 18:27:17 +01:00
Jermolene
c569df4bd4 Update hint for sticky titles option
Fixes #3249
2018-05-03 16:14:05 +01:00
Jermolene
b2173d11ea Restore default of preview pane hidden 2018-05-02 16:52:45 +01:00
Sebastian Silva
895447c40c Add write condition for DAT protocol (#3244)
In order to write to a DAT with Beaker Browser, it needs to have access to the file via `dat:` protocol.
2018-05-02 15:57:47 +01:00
BurningTreeC
5626148202 Fix for sidebar not showing #3223 (#3226)
* fix for sidebar not showing

I believe this fixes #3223

* add explaining comment

* ... and fix indentation.
2018-05-02 15:31:26 +01:00
Jermolene
aab408109f Prepare for v5.1.17 2018-05-02 15:28:17 +01:00
Mario Pietsch
19085a1277 Add data attributes to ViewTemplate (#3209)
* change 3 set-widgets to 1 var-widget call. Add data-tags and userClass.

* add new documentation and change the existing one accordingly.
2018-04-24 22:08:20 +01:00
Matt Lauber
c974858cf5 Add Range widget (#2988)
* Adds a range widget 

Adds a range widget that supports all the range attributes on a input[type=range] element.  These include min max and increment.

* Update range.js

* Fix spaces vs tabs.

* Added documentation.
2018-04-24 22:05:05 +01:00
Tobias Beer
f26bcb273b Fix new field value handling in edit template (#3048)
prevents variables in the value from being replaced when adding a new field
2018-04-24 22:03:59 +01:00
Tobias Beer
61f9adb710 allows to add link via ENTER in input (#2703)
simplified / refactored actions
2018-04-24 22:02:04 +01:00
Cameron Fischer
7e58866499 Added present-but-empty list-after functionality (#3219)
This places the list item at the end of the list when its 'list-item' field
is an empty string.
2018-04-24 16:58:09 +01:00
Matt Lauber
5ea6c9a273 Modify the is operator to allow multiple types to be specified. (#2982)
* Modify the is operator to allow multiple types to be specified.

* Fixed indentation.

* Fixed indentation.

* Rewritten to maintain input order when multiple filters provided.

* Updated documentation.

* Update is.tid
2018-04-12 13:21:49 +01:00
Arlen22
2163302190 Invoke hook when server starts (#3024)
* Invoke hook when server starts

Invokes the `th-server-command-start` hook when the server is started, with the server object as the parameter. This allows adding a WebSocket listener to the server.

* Return the HTTP server from the listen function

Returns the node HTTP server created in the listen function to allow extension

* Add node HTTP server to server-command-start hook

* Change hook to post start in case we add a pre-start hook

* Create Hook__th-server-command-post-start.tid
2018-04-10 21:55:54 +01:00
jed
3af0487f29 Add hooks for canceling editing a tiddler, new tiddler and renaming a tiddler (#3206)
These hooks are used by the multi-user plugin and are required to make the live two-way updating between the file system and the browser
2018-04-10 19:52:00 +01:00
BurningTreeC
afe14b47b5 draggable widget: actions on drag-start and drag-end (#3203)
* pass drag-start end drag-end actions to draggable

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* renaming dragstart/dragend -> start/end

* renaming dragstart/dragend -> start/end

* adding docs
2018-04-08 10:29:17 +01:00
Tobias Beer
f092d08358 sets checked class for radio widget wrapper / label (#2182)
* sets checked ckass for radio widget wrapper

* added tc-radio as standard class for radio widgets

* removed selectedClass again, as suggested

@pmario ;-)
2018-04-08 09:52:41 +01:00
Jermolene
ea763d0eab Add support for retaining tab content
Fixes #2031
2018-04-08 09:47:57 +01:00
Jermolene
df1f7e9798 Put saver: fix missing "else"
Thanks @arlen22
2018-04-08 09:37:49 +01:00
Tobias Beer
02529a51d0 Improve styling and reusability of palette, language, and theme switchers (#1954)
allows to override styles more easily via new class tc-chosen

----

updated all of storyview, theme, palette, language

» both in ControlPanel as well as PageControls
» removed "current ..." form switchers as it's redundant
» streamlined toolbar buttons in ControlPanel, especially less spacing

----

fixed dropdown hover colour override

if I wouldn't then it would go blank owed to default drop-down styles

----

polished styles

» chosen items now more emphasized while curspor not indicating a link
» removed underline when hovering, used highlighted border colours instead

----

use snippets languageswitcher for pagecontrols button, after all

----

wrap all switchers in tc-chooser

----

apply big font only to buttons, not reveals in pagecontrols

----

moved language switcher wrapper class to snippet

improved language switcher image alignment

----

make tiddler and ControlPanel view behave the same. add generic tc-check-list setting. add generic input type checklist, vertical alignment.

now using css rem to address drop-downs for pagecontrols

thanks @pmario

removed css artefacts in vanilla/base from before merging @pmario's PR

with comments being baked-in I don't think we want these in the code

css simplification for .tc-chosen and tc-chooser-item
2018-04-06 17:26:54 +01:00
Jermolene
0c3e549235 Fix TOC recursion detection
We need to explicitly guard against tiddlers tagged with themselves.
2018-04-05 16:32:35 +01:00
Jermolene
df0b8b5a1e Rescind preview pane default of "diff"
It was done temporarily to make the prerelease clearer
2018-04-03 19:02:42 +01:00
Jermolene
9e03264ebe Add pluggable previews to the import listing 2018-04-03 17:50:57 +01:00
Jermolene
53f2cc9814 Add compareTiddlers macro 2018-04-03 17:50:36 +01:00
Jermolene
0080728d36 Improve diff count for diff-text widget 2018-04-03 17:50:17 +01:00
Jermolene
47cdf55133 Add new subtiddlerfields filter operator 2018-04-03 17:48:01 +01:00
Mario Pietsch
2e8eb15536 Tag completion min length (#3190)
* tested with tw5.com index.html

* Controls the length of the input before the tag list is filtered
2018-04-02 19:43:18 +01:00
Mario Pietsch
e4660a8cc1 Fix new journal here (#3189)
* fix new journal here if template contains a quote "

* typo
2018-04-02 19:42:26 +01:00
Skeeve
6401b5c886 Now fixing bug mentioned in groups (#3188)
* fixed the "0 is not a number bug" in listops and x-listops

* Fixed one comment

* "default" is not a good name for a variable

* Following code styles.
Moving getInt to utils.

* Removing unwanted spaces introduced by me
2018-04-02 19:40:47 +01:00
Rizwan
501ad2798f Add ability to trigger actions on unchecking checkbox widget (#3182)
* Add uncheck-actions to checkbox widget

* Update checkbox.js

* Docs for "uncheckactions" param of checkbox widget
2018-04-02 19:39:59 +01:00
Jermolene
633208958c Docs: Clarify example of using environment variables for port number 2018-03-29 12:34:50 +01:00
Jermolene
f4fd5e76f8 Server command: support environment variables for specifying port number 2018-03-28 11:58:46 +01:00
Mario Pietsch
019cb6a542 Fix #3078 (#3185) 2018-03-23 11:08:53 +00:00
BurningTreeC
44a7ca7e43 Fix duplicate shortcut (#3187) 2018-03-23 11:07:50 +00:00
Jermolene
1c6942402e Add support for startup actions 2018-03-23 09:35:39 +00:00
Jermolene
28e713caac Add screen width/height to platform information exposed at startup 2018-03-23 09:13:45 +00:00
Jermolene
1b31004941 Shift dropdown left for "more" tiddler toolbar button 2018-03-22 21:39:26 +00:00
Jermolene
8e9330e484 Minor tweaks for #3157 2018-03-22 20:37:06 +00:00
Rizwan
033feda02d Adding comparative operators to reveal widget (#3157)
* Adding comparative operators to reveal widget 

>, <, >=, <=

* Adding documentation and formatting changes

* Bring Alphanumericals to the scope of comparison operation
2018-03-22 16:51:02 +00:00
Jermolene
f1b38c42f9 Fix problem with rotate-left bitmap operation
Spotted by @BurningTreeC  - c0569849d2 (commitcomment-28211117)
2018-03-22 10:46:57 +00:00
Matt Lauber
6963a54c66 Better Editor Toolbar Conditions (#3180)
* The Excise tool only works with tiddlywiki5 format, so only display it on tiddlers that use the tiddlywiki5 parser.

* The Editor Height tool and stamp tool only make sense with text editors, so only display them when the content type starts with text
2018-03-19 18:01:24 +00:00
BurningTreeC
54f2c4c34f add transcludify & linkify shortcuts (#3174)
* add transcludify & linkify shortcuts

* correct shortcuts
2018-03-19 15:55:35 +00:00
BurningTreeC
e92e109162 Transclusion -> Transcludify (#3173)
my mistake, sorry to all!
2018-03-19 15:54:57 +00:00
Matt Lauber
bbccb60c0b Code Cleanup (#3178)
Noticed an unused variable in the image parser, from before a old refactor.
2018-03-19 15:46:07 +00:00
Jeremy Ruston
aa7b18427f
Incorporate “diff” engine to show visual differences (#3112) 2018-03-16 20:38:35 +00:00
Jermolene
0d354fe57f SetWidget: Add "subtiddler" attribute 2018-03-16 20:35:41 +00:00
Xavier Cazin
f78190ef61 Allow empty string as value parameter in SetWidget (#3164)
When occuring in a tiddler named "New Tiddler", the following construct should return ++ instead of +[[New Tiddler]]+

<$set name="myVariable" filter="[all[current]field:title[New Tiddler]]" value="">
+<<myVariable>>+
</$set>
2018-03-15 14:12:33 +00:00
BurningTreeC
c9b8319801 Droppable widget - passing modifiers as variables (#3167)
* pass the modifier keys as variables

* Update DroppableWidget.tid

* Create modifier Variable.tid

* closing bracket got lost
2018-03-14 17:52:13 +00:00
Jermolene
de6e0d1c1e Dynaview: Add support for updating the address bar when scrolling
We add an attribute to tiddler frames in the DOM giving the title of the corresponding tiddler
2018-03-13 14:07:29 +00:00
Jermolene
c0569849d2 Add rotate-left button to bitmap editor toolbar 2018-03-12 12:45:56 +00:00
Jermolene
7cb54f32c6 Add draggable task management example 2018-03-07 15:52:58 +00:00
Jermolene
1a52fdd626 Minor tweaks to linkify and transcludify icons 2018-03-06 14:55:44 +00:00
Tobias Beer
6acf36e898 remove superfluous list item at the end of list-links-draggable (#3043)
fixes #2970

Also fixes the nesting. If a template is defined for the list item, it should define the link as is done for **list-tagged-draggable**, i.e. the template defines any link widget it contains.
2018-03-06 13:29:27 +00:00
Jermolene
3361d749bf Add missing tags to new editor toolbar buttons
Fixes #3156
2018-03-06 13:10:16 +00:00
BurningTreeC
540cd1a286 EditorToolbar: add "transclusion" and "wikilink" buttons (#3155)
* add transclusion "image" for editor button

* add wikilink "image" for editor button

* add wikilink editor toolbar button

* add transclusion editor toolbar button

* add transclusion/wikilink button styles

* add transclusion/wikilink button captions & hints

* add german captions/hints

* revert styles not needed anymore

* update transcludify icon

* update linkify icon

* update transcludify icon

* update german

* Update Buttons.multids

* Delete wikilink.tid

* Delete transclusion.tid
2018-03-06 12:44:42 +00:00
Jermolene
634eb222ca Add linkify and transcludify icons
fyi @BurningTreeC
2018-03-06 12:23:49 +00:00
BurningTreeC
8030ea0fd6 Make new tiddler title editable in ControlPanel (#3149)
* add option to configure new tiddler title

there may be users that don't like to see the word tiddler everywhere
this makes changing titles easier to access

* controlpanel - basics - new tiddler title prompt

* controlpanel-basics- newtiddler title prompt

* controlpanel - basics - new tiddler prompt
2018-03-05 11:24:29 +00:00
TheDiveO
29e4965d2b implements default setting for the More sidebar in the same way as the existing default setting which sidebar tab to open as default; adds control panel setting; adds en-GB and de-DE lingo (#3135) 2018-03-05 11:14:30 +00:00
Jermolene
fb3b7aa1cd Coding style tweaks for #3134 2018-03-05 11:11:49 +00:00
Rizwan
2b0204422d Sortan filter for alpha-numeric filter (#3134)
* Sortan filter for alpha-numeric filter

* Removing Case sensitive option, Removing default value for isAlphanumeric parameter, updating formatting

* Formatting changes

* Formatting changes
2018-03-05 11:09:25 +00:00
Jermolene
b252abd4d1 TOC: Don't dismiss popup when clicking disclosure triangles
This change makes it possible to put the TOC in a popup dropdown.
2018-02-21 14:44:10 +00:00
Jermolene
b1cd450889 Shadow GettingStarted: Get rid of double "important" 2018-02-20 16:00:06 +00:00
Skeeve
5963adf92e Bugfix/3117 inconsistent each (#3124)
* Following Jeremy's proposal of using a new suffix

* typo fixed
2018-02-17 18:51:18 +00:00
Jermolene
1c8170463c Simplify page scrolling behaviour
Fixes #2180
2018-01-30 11:29:07 +00:00
Xavier Cazin
028888edff Take default value in account when index attribute is used (#3099) 2018-01-23 16:50:03 +00:00
BurningTreeC
c194cec520 tc-body background transparent if background attachment (#3100)
* tc-body transparent if background attachment

if you go fullscreen with the fullscreen button, the tc-body background color hides the background attachments - so make it transparent if $:/themes/tiddlywiki/vanilla/settings/backgroundimage isn't empty

* if background attachment macro

macro to make tc-body background transparent
2018-01-23 16:49:24 +00:00
Jermolene
327fed30c8 Mitigate problem with microscropic editor in zoomin view
See #3098
2018-01-23 16:22:35 +00:00
BurningTreeC
42660b05a7 check if dataTransfer is undefined (#3093)
this prevents an error when dragging elements not by mouse where dataTransfer can be undefined
2018-01-20 17:28:10 +00:00
Jermolene
ff6aa0570f Check for dollar sign within HTML element name
Fixes #3091
2018-01-16 22:13:40 +00:00
Jermolene
460a07ca03 Introduce "Info/Advanced/Stylesheets" tab to Control Panel
Makes it a bit easier to understand what the browser will see for each stylesheet tiddler
2018-01-12 21:44:38 +00:00
Jermolene
4e1f9bf5ed Don't use the toolbar editor when rendering to the fakedom
Otherwise the iframe editor will crash when trying to set itself up
2018-01-12 10:56:08 +00:00
Jermolene
43108926de Update for 2018 🎉🎊 2018-01-11 12:32:24 +00:00
Jermolene
b4c7c59d5d Add emptyMessage parameter to list-links and list-tagged-draggable macros 2018-01-09 17:13:45 +00:00
Mario Pietsch
25f76a5996 Fix new journal button (#3079)
* fix "new-journal" button if template elements contain a double-quote

* fix typo
2018-01-08 12:23:34 +00:00
Jermolene
de4eb5ca89 Add new th-page-refreshed hook 2018-01-04 16:01:19 +00:00
Jermolene
e4b10d42f9 Optimise the tag filter
Spending a bit more time with Chrome dev tools, and further to 254e1ca, this optimisation reduces the rendering time for the sample TOC from 1.9s to about 0.9s...
2017-12-21 16:13:47 +00:00
Jermolene
ca43a28d0e Fix copy to clipboard for iOS 10/11 2017-12-17 21:37:29 +00:00
Jermolene
1b6a06a4d7 Add copy-to-clipboard macro
And use it in the tw5.com example documentation
2017-12-16 10:58:33 +00:00
Jeremy Ruston
c83231871d
Make macro parameters available as variables in wikified macros (#3063)
First commit
2017-12-16 09:10:10 +00:00
Jermolene
d2ff164c07 Add support for tm-copy-to-clipboard message 2017-12-15 15:08:18 +00:00
Jermolene
f478fa97fc Fix test regression caused by #3052 2017-12-12 18:15:33 +00:00
Jermolene
6928c411d6 Fix another typo from 38fbc4f35a 2017-12-12 17:51:08 +00:00
Tobias Beer
7ba9cbc052 Add hint for field list dropdown (#3040)
fixes #2983

@twMat: I know you can do it yourself, right here, and so you might. ;-)
2017-12-12 17:27:39 +00:00
Jermolene
451150ebd6 Fix typo from 38fbc4f35a 2017-12-12 15:56:56 +00:00
Jermolene
38fbc4f35a Minor tweaks to #3052 2017-12-12 12:30:34 +00:00
Tobias Beer
661bff4f5b extend LinkWidget to enforce classes (#3052)
* extend ListWidget to enforce classes

Previously, the undocumented *class* attribute only allowed to specify
additional classes to be set.

Especially for use within a LinkCatcher, you can now apply / enforce
only the custom classes and avoid any of the defaults being applied
depending on the link target.

This will allow to implement #1161 more gracefully.

* use setClass insted of exclamation mark syntax

update docs & fix typo in docs
2017-12-12 12:25:06 +00:00
Jermolene
2fd2ae993e Add buttonTemplate parameter to tabs macro 2017-11-13 13:56:13 +00:00
Jermolene
0224da34a9 Preparing for 5.1.15 2017-11-11 14:56:03 +00:00
Jermolene
29364cbd08 Change http://*.tiddlywiki.com/* to https:// 2017-11-11 11:56:20 +00:00
Jermolene
b4ec32ca70 Export transliteration pairs
Just in case plugins want to use them
2017-11-10 14:37:31 +00:00
Jermolene
c4e2793b06 Docs updates 2017-11-09 16:07:01 +00:00
Jermolene
967b123b51 Fix problem with new tiddler fields cascade
Fixes #2821

The problem was that an empty configured text field for new journals was overriding any value provided in the existing tiddler.
2017-11-08 08:41:00 +00:00
Jermolene
d7a6816307 Add jsonstringify operator 2017-10-29 15:53:53 +00:00
Jermolene
518f57f4bb Add new hook "th-importing-files" 2017-10-11 17:52:37 +01:00
Jermolene
7bdaabce78 Browse widget: add support for nwdirectory attribute 2017-10-03 21:52:51 +01:00
Jermolene
49fad6dae9 Docs tweaks 2017-10-03 21:00:36 +01:00
Jermolene
05a3d9a302 Syncer: allow logging to be disabled
We don't want the syncer used by the savetrail plugin to be logging
2017-09-26 17:10:57 +01:00
Jermolene
1dcc8c99e5 Ensure we don't colour browser logs under nw.js
Under nw.js $tw.browser and $tw.node are both true...
2017-09-22 15:18:11 +01:00
Jermolene
73953080e3 SaveTrailPlugin: Fix syncer UI interactions
The syncer used by the savetrail plugin shouldn't perform any UI interactions
2017-09-20 16:28:11 +01:00
Jermolene
9ada7a0bb1 Ensure fieldmangler widget always updates modifier/modified fields
Fixes #2969
2017-09-20 14:09:18 +01:00
Xavier Cazin
db8fd9ea74 Amendments to warnings upon loading content via _canonical_uri (#2796) (#2803)
* fr-FR translation of additional error strings

* include SaveTrail

* Amendments to the warnings upon loading content via _canonical_uri

* Typo: add a missing THE

* Clarification on why the browser might refuse to load external content
2017-09-16 15:34:26 +01:00
Arlen22
c069d48a2a Remove URI encoding from PUT saver (#2974)
Remove URI encoding from PUT saver and let the browser handle it as necessary. This seems to be the normal way of doing things. We have confirmed that several WebDAV servers do not expect the file names to be double-encoded.
2017-09-16 15:30:13 +01:00
Thomas Elmiger
489f9a0079 days filter – docs and examples optimisations (#2972)
* 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.

* Does deleting make the conflict go?

* Recreate deleted file with updated text

* days filter example should show highlights

- show a highlight using a longer timespan (180 days)
- added a second highlight to demo timespan with start AND end in the past
- better readability

* days Operator explanation optimisations

- typo
- readability (explain { positive | negative } first; remove duplication)

* Remove additional blank line

* Remove whitespace after save button

When the save button was not the last edit button (tested by moving to another place via control panel > Appearance > Toolbars > Edit Toolbar by drag-and-drop) then we got additional spacing due to whitespace in the resulting HTML after the button. This is a fix for that, I discovered while developing additional edit buttons.
2017-09-16 15:29:44 +01:00
Jermolene
35a7a66b01 Add "save" and "render" commands
A first pass at fixing #2973 - comments are welcome. If everybody is
happy, the next step is to deprecate the existing
rendertiddler(s)/savetiddler(s) commands and replace them in all
examples and tiddlywiki.info files with the new equivalents.
2017-09-12 16:04:07 +01:00
Jermolene
aa417fe899 Add new "lookup" filter 2017-09-07 15:48:00 +01:00
Jermolene
1b7d9d65f4 Only use colour output if we're on a terminal
And not if we’re running on AWS Lambda, for instance
2017-09-07 15:47:36 +01:00
Jermolene
51b1ead5c9 Add more colour to command line output 2017-09-04 14:55:12 +01:00
Jermolene
06ea4060cb LinkWidget: Add support for tv-filter-export-link
This change makes it possible to perform the conversion from target
tiddler title to `href` value as a filter expression (previously a
JavaScript macro was needed to use the tv-get-export-link variable)
2017-08-28 11:06:21 +01:00
Jermolene
90c1c6242e Fix typo 2017-08-28 10:29:36 +01:00
Jermolene
5cdf86b307 Add more transliterate pairs
Should help avoid me accidentally committing files with accents in
their titles
2017-08-26 23:17:53 +01:00
Jermolene
d3a2cfb2bc Move $tw.utils.transliterate() into its own file 2017-08-26 23:11:22 +01:00
Jermolene
8293a77c6e Add "mode" attribute to View widget
Useful for controlling how the content is parsed
2017-08-24 20:58:08 +01:00
Jermolene
b6f948b61e Add another canonical_uri template
This one doesn’t include a subdirectory
2017-08-19 10:31:42 +01:00
Jermolene
523280362b Use UI button tiddler titles as CSS classes
Which enables us to do a cleaner readonly theme
2017-08-08 18:25:45 +01:00
Marxsal
68e17f92de Restore ability to use sub-filter with image-picker macro (#2940) 2017-07-24 12:41:50 +01:00
Adrian Morosanu
34404dcfc9 Fix for automatic CamelCase linking (#2947) 2017-07-24 12:41:26 +01:00
Jermolene
a4d919f45c Extend browse widget with deserializer attribute
Along the same lines as 596dfa1d50
2017-07-18 15:32:50 +01:00
Jermolene
e951047461 Add import command
Unlike load, allows manual control of the deserializer to be used
2017-07-12 17:14:27 +01:00
Jermolene
c6e4b7a123 Update load command docs 2017-07-12 17:13:59 +01:00
Jermolene
5dd3d97760 Extend the set widget with tiddler, field and index attributes 2017-07-12 16:59:56 +01:00
Jermolene
c25a1eef33 Remove obsolete code and update docs 2017-07-12 16:50:50 +01:00
Jermolene
f59809e9a4 Use "whitespace trim" to improve spacing and legibility of view toolbar buttons
Previously, the standard toolbar buttons exhibited uneven spacing due
to the vestigial whitespace.
2017-07-12 16:47:52 +01:00
Jermolene
d966583854 Add new "\whitespace" pragma
This will allow us to simplify some of the more unreadable core
wikitext tiddlers…
2017-07-12 16:46:13 +01:00
Jermolene
596dfa1d50 Allow manual selection of deserializer for dropping or importing files 2017-07-12 16:42:16 +01:00
Jermolene
95ef1c4580 Fix linkcatcher recursion problem
Using action-navigate within the “actions” attribute of the linkcatcher
widget would otherwise trigger the navigation handler recursively.
2017-07-10 14:43:43 +01:00
Jermolene
dc295b2536 LinkCatcherWidget: Add variable containing target tiddler 2017-07-07 12:16:14 +01:00
Jermolene
69528093d9 Update fetch commands to respect 302 redirects
Astonishingly, node.js appears to require us to do this manually…
2017-07-05 10:58:35 +01:00
Jermolene
c179dc93cb Add "raw-file(s)" options to "fetch" command 2017-07-03 16:52:10 +01:00
Marxsal
4db950cc45 Add ability to now macro to return same UTC string used in date fields (#2884)
* Add ability to now macro to return same UTC string used in the modified and created fields.

* Revert "Add ability to now macro to return same UTC string used in the modified and created fields."

This reverts commit 7b6ad7db4a.

* Mods to formatDateString to adjust displayed date to UTC for [UTC]
format. Corresponding doc changes, and optimization for special
case.
2017-07-01 18:09:16 +01:00
Jermolene
ccac0258af Apply URL decoding in download saver
document.location gives us an URL encoded version of the original
filename, so we decode it to recover the original filename for saving.

Fixes #2828

Fixes #2819
2017-07-01 12:39:25 +01:00
Xavier Cazin
a7b57d7f97 allbefore:include should be the identity function when applied to 1st item (#2842)
* fr-FR translation of additional error strings

* allbefore:include should be the identity function when applied to the 1st item
2017-06-29 18:02:33 +01:00
Rob Hoelz
847727146e Fix issue 2850 (#2852)
* Trim tiddler titles imported via JSON

Otherwise, it's possible to create a tiddler with a trailing space (or a
leading one, I suppose) in its title.  TiddlyWiki, in general, trims
titles before operating on a tiddler, so having a tiddler with a
trailing space ends up making that tiddler, for all intents and
purposes, uneditable.

Fixes GH #2850

* Signing the CLA
2017-06-29 17:07:23 +01:00
Mario Pietsch
cee7baa183 Make editor font configurable, so user can easily change it to eg monospace font (#2867) 2017-06-29 16:55:49 +01:00
saqimtiaz
48e0186ba9 Added th-editing-tiddler hook in handleEditTiddlerEvent. A plugin can use the hook to return false and prevent editing or provide alternative editing options. (#2901) 2017-06-29 08:55:43 +01:00
Jermolene
2d0ac7245f Docs and tweaks for #2904
@saqimtiaz I added a dash to separate the words in the variable names
for consistency with other core variables.
2017-06-29 08:47:26 +01:00
saqimtiaz
5d74513a97 Navigator now sets variables for the story list and history list, that are available to child widgets. Needed in a mutiple-story tiddlywiki. (#2904) 2017-06-29 08:36:20 +01:00
Adrian Morosanu
f75e97f308 Create the new "tree" global macro (#2925)
* Create the "tree" global macro file (tree.tid)

* Added styles for the new "tree" global macro

* Update Explorer tab

* Cleaning the macro of unneeded code

I have chosen to keep the slash suffix in the branch node titles to go along with the rest (e.g. root node), so the "clean-chunk" macro isn't needed anymore.

* Minor fix
2017-06-28 17:44:15 +01:00
Jermolene
a5e565e198 Tweaks for #2918
A couple of fixes:

* Fixed problem with loading saver in a file URI within Beaker
* Fixed problem when saving to a directory-style URI with an implicit
“/index.html”
* Switched to double quotes for strings
2017-06-24 22:30:26 +01:00
Mario Pietsch
ef9efbc399 Fix for beaker 072 - new dat API (#2918)
* initial version that works again with beaker 0.7.2

* activate path again
2017-06-24 21:54:44 +01:00
Jermolene
cf9085b5ce Stop syncing the storylist
Reverting e3544ff3c2
2017-06-24 17:59:28 +01:00
Jermolene
a4989f5c4d Revoke #2814
The requirement to whitelist system tiddlers that need wikifying was
too burdensome
2017-06-24 17:48:18 +01:00
saqimtiaz
d89010752a Modified handleClickEvent to send original event data with tm-navigate event. Fixes 2889 (#2900) 2017-06-14 18:16:13 +01:00
Jermolene
b99a1b6496 Remove extraneous text/vnd.tiddlywiki from system tiddlers in light of #2883
There’s no special reason for these tiddlers to be viewed wikified
2017-06-09 15:42:32 +01:00
rubaboo
881e834f89 Wikify system tiddlers if type=text/vnd.tiddlywiki (#2883)
* Wikify system tiddlers if type=text/vnd.tiddlywiki

+ update CLA with my new handle

* Add filter missed in the previous commit
2017-06-09 15:34:42 +01:00
Jermolene
9c57ebb05d Minor tweaks to new tiddler Explorer 2017-06-09 15:31:55 +01:00
Adrian Morosanu
1e9d214f67 New System Explorer tab in sidebar (#2881)
* Create System-Explorer.tid

* Fixes problem with syslink parser
2017-06-09 15:22:09 +01:00
Jermolene
4b9fcdf958 Enable 'edit' button in body of missing tiddler template 2017-06-09 15:20:45 +01:00
Jermolene
432542bbcc Don't throw errors when hitting limits of the fakedom 2017-06-09 15:20:45 +01:00
Jermolene
e3544ff3c2 Don't sync $:/StoryList
Otherwise, multiple users logged into the same server overwrite one
anothers story list.

@danielo515 would this change have any impact on NoteSelf?
2017-05-04 17:29:41 +01:00
Jermolene
683285d449 Display "contents" tab for plugins that lack any information tabs
Fixes #2841
2017-04-30 09:59:41 +01:00
Jermolene
93771fdf27 Show raw text (instead of wikified) of system tiddlers
Fixes #2814
2017-04-28 09:41:27 +01:00
Jermolene
02331365f0 Update plugin library location 2017-04-26 14:35:24 +01:00
Jermolene
4b780899a5 Move SJCL license file into core plugin
It was added as a separate system tiddler, but that means updating a
lot of filters to add and exclude it as appropriate (as we do with
$:/library/sjcl.js itself)
2017-04-23 09:53:18 +01:00
Jermolene
04f402b974 Fix drag and drop issue on iOS 2017-04-21 16:27:44 +01:00
Jermolene
0aaebe9757 Revert #2814
As per the discussion on the ticket, we’ll revisit this after 5.1.14
2017-04-18 08:15:25 +01:00
Jermolene
2e0c119d5b Add Tiddler.getFieldStrings() method 2017-04-17 17:04:15 +01:00
Jermolene
f03feb69a9 Add elementTag parameter to list-tagged-draggable macro 2017-04-17 16:51:12 +01:00
Jermolene
c25a44756b Add new journal text to control panel
Making #2821 a bit more accessible
2017-04-04 18:16:37 +01:00
Jermolene
83497c13d9 Fix whitespace and missing closing tag issues in #2821 2017-04-04 18:15:49 +01:00
Richard Decal
ec0fa2f932 Added ability to change text template of NewJournal (#2821)
* adding custom text field to new-journal

* fixed spacing

* signing the CLA
2017-04-04 18:06:49 +01:00
Jermolene
50268d9231 Killer typo 2017-03-29 09:22:51 +01:00
Jermolene
b37178dda1 Fix download saver for Safari 10.1
Safari now finally supports the ‘download’ attribute for the anchor
tag, meaning that the download saver works properly.
2017-03-29 09:21:49 +01:00
Jermolene
1e106a8f3d Better handling of dropeffect 2017-03-28 15:09:36 +01:00
Jermolene
f3cab3753e Don't set draggable property for links 2017-03-28 13:05:00 +01:00
Jermolene
303f255fcd Avoid wikifying system tiddlers
Fixes #2814
2017-03-27 10:00:31 +01:00
Jermolene
af45d509eb Adjust capitalisation of X-UA-Compatible meta tag
The docs suggest that the capitalised form is correct
2017-03-27 10:00:05 +01:00
Jermolene
d3fe4f600a Partially fix drag and drop on IE11
These changes allow drag and drop to work with one issue: <a> links are
not draggable; draggable divs, spans, buttons etc. seem to work fine.
There’s some issue with IE11 that I don’t understand.

For testing, you can force links to become spans by changing line 64 of
$:/core/modules/widgets/link.js to:

	var domNode = this.document.createElement("span");
2017-03-27 09:59:40 +01:00
Jermolene
0276b69244 Remove double quotes from copyright message
Needed because we transclude the copyright message into a head meta
tag. IE11 was complaining; other browsers didn’t seem to mind.
2017-03-27 09:57:17 +01:00
Jermolene
4891732481 Adjust listops widget to only modify tiddler if tags have changed
We do this so that we don’t accidentally modify shadow tiddlers when we
drag them to reorder them within their tag parent. Otherwise, moving a
toolbar button like $:/core/ui/Buttons/permaview in the control panel
will override the shadow tiddler.
2017-03-24 09:57:22 +00:00
Jermolene
d9ed01b621 Fix: removing other tags during drag and drop 2017-03-24 09:55:42 +00:00
Jermolene
1f860bd04e Fix problem with dragging links 2017-03-23 17:52:15 +00:00
Jermolene
24f29ac605 Add support for wikified raw markup tiddlers 2017-03-23 17:02:37 +00:00
Jermolene
b1ed77d6b8 Switch drag image to use draggable DOM node
We’ll still support dragging pills, but dragging the DOM node image
seems to look better in most situations.
2017-03-23 17:02:26 +00:00
Jermolene
8f1114960a Refactor draggable stuff for easier reuse
And in the process, make the button widget draggable.

Unfortunately, Firefox has a bug that prevents buttons from being
dragged (see https://bugzilla.mozilla.org/show_bug.cgi?id=568313 and
https://bugzilla.mozilla.org/show_bug.cgi?id=646823). So we have to use
the “tag” attribute to make it use a different element.
2017-03-23 14:23:33 +00:00
Jermolene
3a00d2eea3 Allow drag and drop in toolbar layout in control panel 2017-03-20 22:29:03 +00:00
Jermolene
5ed7ade44f Add some handy drag-and-drop macros
And refactor the tag template to use one of them
2017-03-20 22:11:06 +00:00
Jermolene
bea33efd63 Fix problem with dragging text snippets 2017-03-20 22:03:28 +00:00
Jermolene
f4656b0f25 Add support dragging to the bottom of a list 2017-03-20 22:02:55 +00:00
Jermolene
9bad99d14e Draggable: properly stringify tiddler titles
Thanks @twMat
2017-03-20 22:01:51 +00:00
Jermolene
3197f9a639 Add select all/none checkbox to $:/Import
Prompted by this discussion:
https://groups.google.com/d/topic/tiddlywiki/MYBWCxOc_gM/discussion
2017-03-20 22:00:14 +00:00
Jermolene
eba1c3c160 Improve support for drag and drop
Documentation TBD
2017-03-19 19:33:56 +00:00
Jermolene
c2391c5250 Action-deletefield should only update tiddler modified/created if it is changed 2017-03-19 19:30:52 +00:00
Jermolene
39cdaeb34d Fix problem with tracking dragenter/leave events in Firefox
Fixes #686 (hopefully!)
2017-03-17 14:54:30 +00:00
Jermolene
b9fbe12118 More defensive deepFreeze()
IE11 chokes on Object.freeze(undefined)
2017-03-17 14:20:04 +00:00
Jermolene
779e62a30f Add support for JSON files containing a single tiddler
At the moment, we support JSON files containing an array of tiddlers.
With this change the core will import files containing a single
tiddler. Also adding templates for saving individual tiddlers in JSON
format
2017-03-17 14:19:43 +00:00
Jermolene
73e1724fdf Extend $tw.utils.httpRequest() to cope with binary data
The problem was that `this.responseText` crashes for non-text data. We
fix it by letting the client specify which property should be returned.

@ericshulman does this work for you?
2017-03-17 13:41:17 +00:00
Jermolene
66d5e2650e Fix problem with dragger image in Chrome
Fixes #2800
2017-03-12 18:07:59 +00:00
Jermolene
52a414959c wiki.extractTiddlerDataItem() should use caching 2017-02-28 10:23:02 +00:00
Jermolene
b9a835b879 Fix bug with wiki.getTiddlerDataCached()
We need to process the default data outside of the cache function to
ensure that we don’t cache the defaults
2017-02-28 10:23:02 +00:00
Jermolene
d0594e4a45 Rejiggle the license to try to make GitHub recognise it 2017-02-24 13:52:39 +00:00
Jermolene
ad1c2a6571 Fix problem with 'has' operator
Fixes problem introduced in 6085936475
2017-02-23 14:27:43 +00:00
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
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
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
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
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
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
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
ef1c47c3aa Fix accidental wikilinking 2017-02-05 19:58:58 +00:00
Jermolene
db056a84a5 Remove obsolete code 2017-02-04 18:14:20 +00:00
Jermolene
6c65aa2a6d Make the syncer more configurable, including names for sync adaptors
@danielo515 you may want to add a name to your sync adaptor 😄
2017-02-04 17:25:30 +00:00
Jermolene
ced9f315a1 Rename variable for clarity
It’s called an iterator in filter.js
2017-02-04 17:24:25 +00:00
Jermolene
b5059c612a Adds support for autosave with the download saver
Also does some reorganisation of control panel to move “saving” related
settings together, and expose a UI for savers to plug into.

Fixes #2741
2017-01-30 18:19:28 +00:00
Jermolene
56b6781715 Fixes to license visibility
Credits to @cdent - is 2012 right, or did your work there carry on into
2013?

Addresses part of #2378
2017-01-29 21:11:30 +00:00
Tobias Beer
1b339e17bc Add "tag" attribute to keyboard widget (#2593)
* allows to define the tag for keyboard widget

* added from 5.1.14 to docs
2017-01-13 11:17:19 -07:00
Tobias Beer
d4db283d61 Refresh simple editor when empty text, e.g. hitting ENTER (#2702)
fixes #2592, missing bit of deleting the field for adding a new tag in
edit-mode

also fix for:
https://groups.google.com/forum/?fromgroups=#!topic/tiddlywiki/L6Z7gSvBWjw
2017-01-09 10:31:40 +00:00
Jermolene
56131e4563 It's 2017!
🥂🍾
c.f. 665d6657bb
2017-01-03 13:31:22 +00:00
Thomas Elmiger
79ae3f8cb7 Replacement icon for timestamp on/off (#2692)
* Replacement icon stopwatch on

As discussed in issue #2690

* Replacement icon stopwatch off

As discussed in issue #2690
2017-01-02 17:38:32 +00:00
Jermolene
0c2734f181 Tweak wording of exporting story list 2016-12-30 17:43:35 +00:00
Marxsal
b1a5afbf15 Add an entry to the filter drop down for exporting the current story (minus advanced search) (#2670) 2016-12-30 17:42:23 +00:00
Jermolene
ab1b1f2cde Fix problem with beaker saver and default index pages
As discussed on the mailing list, we need to check for a URL that is
missing the default `/index.html`

https://groups.google.com/d/msg/tiddlywikidev/n6yUdu2zHWo/m32R2BuIDgAJ
2016-12-29 16:45:47 +00:00
Jermolene
0383b98555 Add support for other movie content types 2016-12-23 08:34:07 +00:00
Jermolene
f143164cbe Correct the name of the video parser 2016-12-22 22:07:28 +00:00
Jermolene
ba9d6187af Rename the dat saver to Beaker
It’s actually specific to the API provided by the Beaker browser, and
not a generic Dat saver
2016-12-22 08:15:16 +00:00
Jermolene
a20da9f530 Add preliminary Dat file saver
See https://datproject.org/ and https://beakerbrowser.com/
2016-12-21 12:09:08 +00:00
Tobias Beer
15c7d24eaa Allows adding a new tag name by typing enter (#2592)
* allows to add a new tagname hitting enter

see: https://groups.google.com/forum/#!topic/tiddlywiki/wqQ8jPYG-X4

* revert changes to vanilla/base

* added "Special Keys" to KeyboardShortcuts

* added info to Creating and editing tiddlers

did not add current version of <<.from-version "5.1.14">>  because it
would interrupt the flow. When changed from a noisy "New in 5.1.14" to
"(new in 5.1.14)" we might add the version info here

* revert setText & added inline styles to vanilla base

* remove fieldmangler

* commit initial edittemplate tags to merge master

* ok, now really revert to initial edittemplate tags

* move add tag via enter into tag-picker macro(s)
2016-12-18 20:43:26 +00:00
Mario Pietsch
e1053bf014 Toc recursion protection (#2650)
* add recursion protection first take

* fix problem with selectable expand

* ust path for toc-state variable instead of tag

* reactivate disabled macro call.
2016-12-17 15:29:03 +00:00
Arlen22
66a13cb915 TiddlyFox saver canSave() should always return true (#2626)
Whether saving is allowed should be determined by the parent side of the TiddlyFox, as this plugin can be used in many places.
2016-12-17 15:27:25 +00:00
Arlen22
1530b3e2d8 Put request handler on SimpleServer.prototype (#2627)
The request handler may be used by ExpressJS apps directly and can do most of the heavy lifting without any modification. Note that the self variable must be assignee using `[Function].bind(null,SimpleServer instance)`.
2016-12-17 15:06:10 +00:00
Tobias Beer
e5b432a86b Allows checkbox widget to worth with indexes within data tiddlers (#2103) 2016-12-17 11:59:59 +00:00
Tobias Beer
d6d3aab36a Allow radio widget to work with indexes in a data tiddler (#2104)
* allow radio widget to set an index in a data tiddler

* updated RadioWidget docs, with same demo macro as for CheckboxWidget
in #2103
* removed docs in widget code (seems the wrong place)

* added from version to docs

* revert doc maros to master

* using wikitext-example-without-html and .tip macro now

* fix quotes
2016-12-17 11:51:24 +00:00
Matt Lauber
9c3a6976f0 #2312 Prevent move filter from wrapping (#2658)
given a list `A B C D` if I run `A B C D +[move:-1 [A]]` I get `B C A D`.  However, if I were to do `A B C D +[move:1[D]]` it doesn't wrap around, and I get `A B C D`.  This fixes that such that `A B C D +[move:-1 [A]]` gives 'A B C D`
2016-12-16 17:58:45 +00:00
Jermolene
28591965b1 Yet more refactoring of the tag macro vs template
This change re-instates the existing behaviour whereby omitting the
parameter to the “tag” macro will default to the current tiddler
2016-12-16 17:25:06 +00:00
Jermolene
e8bb897e26 Add support for relinking when renaming tiddlers
When renaming an existing tiddler, the edit template now shows a
checkbox that determines whether or not to relink references to the
tiddler in the list or tags fields of other tiddlers.
2016-12-15 17:13:32 +00:00
Jermolene
1bba9dc315 Reuse $tw.loadTiddlersFromPath() in --load command
Thus allowing things like tiddlywiki.files to be used with the —load
command
2016-12-15 17:13:32 +00:00
Jermolene
74def9e080 Separate the PDF parser from the image parser
It was a bit of a hack, and made it harder to customise PDF presentation
2016-12-15 17:13:32 +00:00
Mario Pietsch
b43b89f44a fix for 2634 problems with week calculation 2016-11-29 17:31:54 +01:00
Jermolene
12ecb1fd08 Fix multids formatting 2016-11-29 10:29:32 +00:00
Jermolene
16bb65d17f Introduce tiddler manager 2016-11-29 08:36:07 +00:00
Jermolene
f07e0f981a Refactor tag template into an underlying macro
By refactoring the innards of the tag template into global macros, we
make it easier to re-use elements of the tag template
2016-11-28 19:17:25 +00:00
Jermolene
9a38642141 Add new "order" filter operator 2016-11-28 19:16:08 +00:00
Jermolene
a3dc3b4b98 Add new [all[tags]] filter operator 2016-11-28 19:04:04 +00:00
Jermolene
c02c3a06e0 Sort the edit content type dropdown groups more sensibly
Now we put the developer stuff at the bottom instead of the top…
2016-11-28 14:01:09 +00:00
Jermolene
cf28eeb2a1 Fix problem with checkbox widget and empty strings
If the value of `tiddler.fields[this.checkboxField]` was an empty
string then it would incorrectly fall back to the value of
`this.checkboxDefault`.
2016-11-28 13:45:41 +00:00
Jermolene
b759d82f4c @pmario's fix for #2635
This got reverted due to my git inabilities
2016-11-28 13:43:43 +00:00
Jermolene
c65d08240b Add strict mode to tag operator 2016-11-28 13:42:30 +00:00
Jermolene
c460cc03a4 Change "is" filter with blank operand to pass through arguments 2016-11-28 13:42:06 +00:00
Jeremy Ruston
a9b54d6fce Revert "Add provisional version of new tagger manager" 2016-11-28 10:40:55 +00:00
Jeremy Ruston
a85d034015 Merge pull request #2637: Introduce tiddler manager
Introduce tiddler manager
2016-11-28 10:28:12 +00:00
Jermolene
96708ecf65 Manager styling tweaks
* Make expand/collapse state be global across all tiddlers
* Remove “Show raw text” option, now that we’ve got the two expandable
areas for raw and wikified text
* Hide raw text by default
* Accentuate currently open tiddler
2016-11-28 10:01:30 +00:00
Jermolene
f67777161d Make manager sections be expandable 2016-11-27 23:04:54 +00:00
Jermolene
251619189e Add indentation to the manager 2016-11-27 22:35:04 +00:00
Jermolene
117bf0a0de Refactor the sidebar items into separate tiddlers
With some better styling too
2016-11-27 22:34:46 +00:00
Jermolene
e5af022bd3 Add image-picker-dropdown macro
Still need to add a way to select system images (like in the image
dropdown in tag manager)
2016-11-27 22:34:19 +00:00
Mario Pietsch
766bc7acee Fix for #2634 problem with week calculations (#2635) 2016-11-27 17:33:19 +00:00
Jermolene
b00c1c7290 Add select box for displaying tags vs. tiddlers 2016-11-27 14:52:39 +00:00
Jermolene
8e033eb0d4 Add new "all[tags]" filter operator 2016-11-27 14:52:04 +00:00
Jermolene
0b4669621a Return all tiddlers when "is" filter operand is missing 2016-11-27 14:51:51 +00:00
Jermolene
1a2ec12831 Fix problem with checkbox widget and empty strings
If the value of `tiddler.fields[this.checkboxField]` was an empty
string then it would incorrectly fall back to the value of
`this.checkboxDefault`.
2016-11-27 14:51:23 +00:00
Jermolene
9418538104 Separate the tag manager and tagger into separate tiddlers
As discussed in Hangout-101: https://www.youtube.com/watch?v=nXwCm794O6M
2016-11-27 13:53:42 +00:00
Jermolene
e98d324e66 Add provisional version of new tagger manager
For discussion
2016-11-26 12:48:47 +00:00
Jermolene
3bceb98119 Add support for actions attribute to CheckboxWidget 2016-11-26 08:21:58 +00:00
Jermolene
d1121787c0 Add new button to temporarily suspend timestamps
Useful when you want to make an edit but preserve the modification
date/time.
2016-11-23 18:20:31 +00:00
Jermolene
b3273bcbda Add "sticky" mode for tiddler info panel
A new option in control panel to cause the info panel to stay open
until it is explicitly closed
2016-11-23 18:17:54 +00:00
Jermolene
c8f7573a23 Make fakedom more resilient to non-string data 2016-11-22 20:24:59 +00:00
Jermolene
8d35178bc4 Undo 664225f6fd and 56640b90bb
See the discussion at #2628
2016-10-26 21:41:41 +01:00
Jermolene
56640b90bb Fix issue with tabs macro introduced by fix for #2628
I’m fixing this now to show how the tabs macro can be changed to
accommodate the change, but we may yet decide to reverse out the change
in order to maintain backwards compatibility.

One problem with changes like this is that there’s no easy way to find
out where it impacts the core UI. The tabs macro is now fixed, but
perhaps there’s more obscure things that are still broken in the core.

If we do opt to reverse the change to preserve backwards compatibility,
we could add a way to explicitly trigger the new behaviour. For
example, a new attribute `updateState=“yes”`.

Yet another alternative is to make completely new alternative to the
list widget with revised semantics, that authors can opt-in to. For
example `<$loop>`. (There was another issue we discussed a year or two
ago about adding support for an index variable which may be a candidate
for fixing at the same time).
2016-10-25 22:30:02 +01:00