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

161 Commits

Author SHA1 Message Date
Jeremy Ruston
6089c4de29 Extend refresh throttling to tiddlers having a "throttle.refresh" field
See discussion here: https://groups.google.com/d/msgid/tiddlywiki/7738644f-b53f-4fb0-b0df-16243fe51795%40googlegroups.com
2019-10-14 10:42:14 +01:00
Jeremy Ruston
93e01435d1 Dynamic plugins: Change "contains JavaScript" to "requires reload"
We might in the future offer support for certain types of JS module to be hot loaded.
2019-09-27 16:47:55 +01:00
Jeremy Ruston
1c23059204
Dynamic loading/unloading of plugins (#4259)
* First pass at dynamic loading/unloading

* Show warning for changes to plugins containing JS modules

* Use $:/config/RegisterPluginType/* for configuring whether a plugin type is automatically registered

Where "registered" means "the constituent shadows are loaded".

* Fix the info plugin

The previous mechanism re-read all plugin info during startup

* Don't prettify JSON in the plugin library

* Indicate in plugin library whether a plugin requires reloading

* Display the highlighted plugin name in the plugin chooser

And if there's no name field fall back to the part of the title after the final slash.
2019-09-16 12:15:39 +01:00
Simon Huber
31e7dbf020 Add "preventScroll" option to tm-focus-selector message (#4157)
* add "delayed" option to tm-focus-selector message

this delays the focussing for the time of the animation duration if delayed="yes" or delayed="true"

this is useful when navigating the story river up and down with keyboard shortcuts and the shortcuts focus the title input if a navigated tiddler is in edit mode -> navigation doesn't jump but stays smooth

* Update rootwidget.js

* Update WidgetMessage_ tm-focus-selector.tid

* add preventScroll="true" tip
2019-08-06 13:12:21 +01:00
Jeremy Ruston
2a4c60b23d Allow tm-open-window to specify a page title 2019-07-04 15:59:34 +01:00
Jeremy Ruston
ed67f4a88b Add new tm-focus-selector message 2019-06-28 17:27:36 +01:00
Simon Huber
e313b0b7ca CSS.escape as startup module (#3574)
* don't know what I'm doing - apply polyfill methods

* don't know what I'm doing add CSS.escape polyfill

* execute polyfills in load-modules

* Delete cssescape.js

* add css-escape polyfill as startup module

* Update load-modules.js

* this was for testing :)

* Update css-escape-polyfill.js

* Update css-escape-polyfill.js
2019-06-26 12:31:22 +01:00
Jeremy Ruston
a8f70b08a8
Add indexes to the wiki store to improve performance (#3951)
* First pass at modular wiki indexes

An exploratory experiment

* Fix tests

* Faster checking for existence of index methods

We don't really need to check the type

* Use the index for the has operator

* Fix typo

* Move iterator index methods into indexer modules

Now boot.js doesn't know the core indexers

* Fix up the other iterator index functions

* Fix crash with missing index branch

* Limit the field indexer to values less than 128 characters

* Fallback to the old manual scan if the index method returns null
* Sadly, we can no longe re-use the field indexer to accelerate the `has` operator, because the index now omits tiddlers that have field values longer than the limit

Still need to make the index configuration exposed somehow

* Rearrange tests so that we can test with and without indexers

We also need to expose the list of enabled indexers as a config option

* Test the field indexer with different length fields

So that we test the indexed and non-indexed codepaths
2019-05-24 21:07:37 +01:00
Jeremy Ruston
091864ddaf Browser messaging: suppress logging
Commented out because it can be useful for debugging.
2019-05-02 20:21:58 +01:00
Simon Huber
441011885c Fix: tm-full-screen when event.event undefined (#3835) 2019-03-09 17:09:34 +00:00
Jermolene
e61c71961b Fix default language
It is supposed to be the built-in core language, en-GB
2019-03-07 18:46:24 +00:00
Jermolene
2c2d03f7a7 Refactor startup action execution so that they can switch language/theme 2019-03-07 18:43:23 +00:00
Jermolene
348a0bc8bc Core: Allow startup navigation to be suppressed
Plugins can suppress it so that they can provide their own startup scroll handling
2019-03-04 16:59:15 +00:00
Jermolene
6ff7a7d261 BrowserStorage: Make sure tiddlers loaded from local storage mark wiki as dirty
Thanks @xcazin
2019-02-08 15:38:23 +00:00
Jermolene
e14e69bedc DynaView plugin: add optional scroll position preservation 2019-01-11 17:50:52 +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
BurningTreeC
8542ebaecb Fix $tw.platform.isLinux on latest firefox (#3495) 2018-11-25 10:51:42 +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
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
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
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
5a2e87eb09 Extend permalink/permaview to optionally copy URL to the clipboard
Fixes #3255
2018-08-16 19:39:18 +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
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
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
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
1c6942402e Add support for startup actions 2018-03-23 09:35:39 +00:00
Jermolene
de4eb5ca89 Add new th-page-refreshed hook 2018-01-04 16:01:19 +00:00
Jermolene
d2ff164c07 Add support for tm-copy-to-clipboard message 2017-12-15 15:08:18 +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
Jermolene
0b76c327c2 Add page print button
cc @silvyn
2016-10-20 09:44:52 +01:00
Jermolene
8e02bde938 Refinements to 87fa7f972c 2016-10-18 16:39:18 +01:00
Jermolene
c4e13bc94a Add icon and message handler for print button
I’m inclined to think it’s not worth adding a corresponding page
control button because it’ll require a lot of tiddlers for the
translation etc.
2016-10-08 10:10:54 +01:00
Jermolene
7bc7f643b6 Remove extraneous console.log 2016-08-16 15:48:25 +01:00
Jermolene
e20bce5450 Add experimental support for RTL languages
This commit permits language plugins to carry the field
“text-direction” with the value “rtl” to trigger right-to-left layout
of the entire page. We also adjust the sidebar layout to work in RTL
mode.

There are still a number of problems to be addressed:

* Brackets and other punctuation incorrectly placed within en-GB UI text
* System tiddler titles are rendered semi-back-to-front (eg
`languages/ca-ES/:$`)

Starting to address #1845 and the discussion in #2523.
2016-08-15 19:47:26 +01:00
Jermolene
ff57b4084a Extend notification handler to accept variables
Now we can provide variables to be passed to the rendering of the
notification text
2016-07-03 14:55:41 +01:00
Myeongjin
6388f859d1 Add localisable strings for error (#2447)
* Add localisable strings for error

* Update tiddler Transclusion Basic Usage in fr-FR
2016-05-17 21:58:47 +01:00
Jermolene
1515fd42ed Fix text editor for Internet Explorer
By switching from text events to execCommand.
2016-04-30 14:36:53 +01:00
Jeremy Ruston
2adf09129d Introduce text editor toolbar (#2315)
Tada!
2016-04-22 08:36:29 +01:00
Jermolene
33563d01ba Add user interface for enabling performance instrumentation 2015-10-14 10:59:55 +01:00
Jermolene
424b2fea32 Add th-saving-tiddler hook for autotagging etc.
@danielo515 this enhancement is intended to make it easier to implement
things like the auto tag plugin. Does it meet your needs?
2015-09-08 16:16:50 +01:00
Jermolene
51d771a074 Extend tm-open-window to pass variables 2015-08-31 14:13:32 +01:00
Jermolene
68e15c1064 Move rename tiddler handling into navigator widget
For consistency with the other tiddler manipulation primitives.
2015-08-30 19:11:14 +01:00
Jermolene
72ed4b2673 Add renaming to text-slicer tiddler toolbar
The plan is to expose the functionality in other places, too - for
example, the edit template and the tag manager
2015-08-04 17:44:07 +01:00
Jermolene
f708b4df65 Turn off performance instrumentation
The plan is to make it be a user configurable option
2015-08-01 13:13:47 +01:00
Jermolene
c6e48ebc2d Performance optimisations
In some situations, I’m seeing x2.5 speedups with these optimisations

Starts fixing #1864
2015-07-05 19:47:44 +01:00
Jermolene
b5ad255d0c Allow drafts typing timeout to be configured 2015-05-11 20:15:42 +01:00
Jermolene
cad5917eeb Request scrollbars in external windows 2015-05-05 21:47:37 +01:00
Jermolene
0932c15e5c Clarify rendering parameters
srcDocument.body.firstChild will in fact be null, but it’s clearer to
write it out
2015-05-03 16:56:27 +01:00
Jermolene
3f26492ac8 Close subwindows when closing main window 2015-05-03 16:24:02 +01:00
Jermolene
d23f174d01 Add a margin for single tiddler windows 2015-05-03 15:05:26 +01:00
Jermolene
fdeb8a925f Introduce template for single tiddler windows
Lets us include global macros etc.
2015-05-03 14:58:33 +01:00
Jermolene
ec567f67d3 Set title of external window 2015-05-03 08:49:37 +01:00
Jermolene
8708f817fa Improve garbage collection of external windows
Now we remove event listeners when a window is closed
2015-05-02 17:22:53 +01:00
Jermolene
9cf5d88cc9 Add "open new window" tiddler toolbar button 2015-05-02 12:12:51 +01:00
Andreas Abeck
2c367c5476 added localisation for encryption dialog & de-DE translation 2015-03-18 18:52:33 +01:00
Jermolene
24435a46be Lots of improvements to the plugin library
* Moved “add new plugin” into a modal wizard
* Adopt big friendly buttons
* Add plugin icons and readmes to “add new plugin” modal
* Use tabs for splitting plugins/themes/languages
* Consistent styling between the “add new plugin” modal and the
“installed plugins” control panel tab
* Behind the scenes, moved from addressing the library as
`recipes/defaults/tiddlers/<etc>` to `recipes/library/tiddlers<etc>`
2015-03-18 11:46:28 +00:00
Jermolene
3df341621d Alternative fix for unnecessary startup scrolling
@aelocson here’s an alternative fix for #981, as discussed in
https://github.com/Jermolene/TiddlyWiki5/commit/691e5719a4ff74a04d389bd1
26ba2a69e7651a2a#commitcomment-9848682

It does seem a lot nicer. It avoids the problem you raised, and also
avoids scrolling when a permalink is used.

I suspect that we’d need to make the hard-coded 50 pixels be
configurable.
2015-02-20 20:04:18 +00:00
Jermolene
691e5719a4 Avoid unnecessary scrolling at startup
The main fix is removing the fallback navigation to the first tiddler
in story.js. Also required is the fix to the startup behaviour of
zoomin.js.

Fixes #981
2015-02-10 22:40:38 +00:00
Jermolene
8643278a45 Add support for an integrated plugin library
Fixes #1450

Provides support for an integrated plugin library that can be used to
install plugins from tiddlywiki.com directly to wikis hosted online or
offline. See the Plugins tab of Control Panel.

Todo:

* Error checking(eg libraryserver.js HTTP GET)
* Translatability
* Documentation
** $:/tags/ServerConnection
** savelibrarytiddlers command
2015-02-09 19:04:11 +00:00
Jermolene
31824f043e Remove obsolete parameters 2015-01-09 20:45:16 +00:00
Jermolene
d2c4920ba4 Refine node vs. browser behaviour
Now we’re using TiddlyWiki as the core of TiddlyDesktop we need more
granular control of the platform specific code.
2014-12-18 19:52:15 +00:00
James Welford Anderson
90caf5bf42 Add hooks mechanism and th-opening-default-tiddlers-list hook
see: https://github.com/Jermolene/TiddlyWiki5/issues/1064
2014-11-23 01:11:56 +09:00
Jermolene
d6c5e51501 Fix popup handling in Cecily and Zoomin view
Cecily and Zoomin story views use a document.body that is smaller than
the document.documentElement. We were just clearing the popups on
clicks on the document.body Clicks on the document element (ie, on the
background of the page) were not being trapped, meaning that you
couldn’t dismiss a popup.
2014-11-22 10:19:03 +00:00
Jermolene
91a7c39791 Update modal handling to allow variables to be passed
@felixhayashi I’m afraid I haven’t used your pull request as there were
a few details that I wanted to do differently. The main change is that
these changes allow both a param string and hashmap to be specified.
2014-11-07 14:54:46 +00:00
Jermolene
b052e8f50b Report command errors through $tw.utils.error
So that we get the new colourisation
2014-10-21 19:31:50 +01:00
Jermolene
ef1d531091 Add confirmation for clearing password
Fixes #925
2014-10-07 14:35:42 +01:00
Jermolene
09b6540998 Update history for tm-home message 2014-10-07 14:07:41 +01:00
Jermolene
b7bbcfa056 Prompt twice when setting password
Fixes #364
2014-10-06 10:22:09 +01:00
Jermolene
3a67fdb768 Obeisance to JSHint for core modules
There are still some warnings about making functions in a loop, but
I’ll fix those as a separate pull request because the fixes are more
than typographic errors.
2014-08-30 20:44:26 +01:00
Jermolene
2f69ea362c Rename "tw-*" messages to "tm-*" 2014-08-28 21:43:44 +01:00
Jermolene
787481a804 Change more "tw-*" classes to "tc-*"
Part of #764
2014-08-28 18:21:08 +01:00
Jermolene
e47852cb14 Stop clearing the location hash for tw-browser-refresh 2014-08-26 14:19:12 +01:00
Jermolene
a105b52399 Refactor saver handler
Fixing problems caused by c4b76ceb0b:

* We still need to initialise the saver-handler even when syncing to a
server, otherwise offline snapshots can’t be saved
* We need to override the default save template a bit further up the
stack, to avoid the server side serving the offline version of the wiki
at `/`
2014-08-20 10:02:44 +01:00
Jermolene
0dfe23e0db Rename tw-refresh message to tw-browser-refresh 2014-08-19 13:11:18 +01:00
Jermolene
920e11e792 Introduce refresh button and revert home button
Now the home button behaves as it did in 5.0.13, and the new refresh
button does a full page refresh.
2014-08-19 12:12:36 +01:00
Jermolene
f75af2c983 Separate the saver handling out of the syncer 2014-08-14 11:43:07 +01:00
Jermolene
27f1f82a70 Rejigging syncer structuring
The goal is to separate out the saver handling from the syncadaptor
handling; it will take a few steps to get there
2014-08-14 11:12:25 +01:00
Jermolene
35fcdd270e Move syncer event handlers into syncer module 2014-08-13 20:25:23 +01:00
Jermolene
449edf99b5 Fix rootwidget handling 2014-08-13 20:20:58 +01:00
Jermolene
7c1cb97f7f Move syncer-browser startup handling into syncer.js 2014-08-13 20:07:08 +01:00
Jermolene
d16bff7787 Move construction of rootwidget into main startup 2014-08-13 20:06:44 +01:00
Jermolene
c9ce606b7c Move the unsaved changes warning into the syncer 2014-08-13 19:29:00 +01:00
Jermolene
57ab9f6167 Translatability for the unsaved changes message
Another bit of #491
2014-08-13 19:14:23 +01:00
Jermolene
3529625a6c Fix full screen button not supported 2014-08-03 12:35:53 +01:00
Jermolene
799a5b059a Move fullscreen button into core from plugin 2014-08-01 16:52:12 +01:00
Jermolene
18f1634802 Make the tw-home message refresh the page 2014-07-30 22:31:15 +01:00
Jermolene
1f16ef6fa8 Add support for permalink and permaview 2014-07-24 15:49:09 +01:00
Jermolene
b4d47858e5 Introduce info mechanism
We expose browser information as shadow tiddlers so that wiki
applications can adapt to available features.
2014-07-20 18:07:30 +01:00
Jermolene
9ddff6d8c0 Move startup.js into the startup folder
Neater.
2014-07-20 18:06:33 +01:00
Jermolene
9ab0c84140 Support global macros via the importvariables widget
The new importvariables widget imports macro/variable definitions from
the specified tiddlers and makes them available to its children.

Allows us to split PageMacros up into separate tiddlers.

We still support loading macros from $:/core/ui/PageMacros to help
people upgrading.

Fixes #644 and #559
2014-06-12 18:01:33 +01:00
Jermolene
3f25db0abe More permalink tweaks
And more documentation this time!
2014-05-29 23:17:21 +01:00
Jermolene
f7b8813a27 Change permalink behaviour
Now a link to a single tiddler like http://tiddlywiki.com/#HelloThere
will just open that single tiddler (the old behaviour was to also open
the default tiddlers)
2014-05-28 17:07:41 +01:00
Jermolene
9aaa000d3f Fixed default tiddler not appearing in zoomin view
See https://groups.google.com/d/topic/tiddlywiki/c-z7f-h1CAo/discussion
2014-05-26 22:56:28 +01:00
Jermolene
ad43958571 Make permalink behaviour configurable
In the process introducing a new advanced settings tab

Fixes #600
2014-05-13 14:16:58 +01:00
Jermolene
e676156b24 Fixes for running TiddlyWiki on node-webkit
See Jermolene/TiddlyWiki5NodeWebkit
2014-05-07 09:59:21 +01:00
Jermolene
7c8c5cf745 Fix problem with parsing main UI boot tiddlers
We were parsing the boot tiddlers, making them into a widget and then
refreshing the widget tree. The problem is that subsequent chances to
the boot tiddlers themselves wouldn’t be picked up as part of the
refresh.

Now we indirectly parse those UI boot tiddlers through a transclusion,
which does get refreshed in the desired way.
2014-05-06 10:14:22 +01:00
Jermolene
b84c663215 Add proper rendering of document title 2014-05-05 23:00:09 +01:00
Jermolene
4e101e240c Suppress history when changing the permalink URL 2014-05-05 21:51:54 +01:00