1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 11:43:16 +00:00
Commit Graph

188 Commits

Author SHA1 Message Date
Jermolene
f846a004b6 Partial fix for copyStyles problem under Chrome
There’s still a problem: in Chrome, the styling of the textarea
placeholder isn’t correct.
2016-05-17 15:45:10 -06: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
Myeongjin
8afc1e9354 Add localisable strings (#2438)
* Add localisable string for recursive transclusion error

* Add localisable string for count

* Add localisable strings for syncer
2016-05-12 08:44:28 -06:00
Jermolene
e54cc7b211 Fix copyStyles() not working in Firefox
Yet more browser incompatibilities to weep over…
2016-05-09 14:11:08 -06:00
Jermolene
3a3754aebb Add rel="noopener noreferrer" to external links
Background:
https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerab
ility-ever-96e328301f4c#.hduwdbjlb
2016-05-05 11:49:40 +01:00
Jeremy Ruston
2adf09129d Introduce text editor toolbar (#2315)
Tada!
2016-04-22 08:36:29 +01:00
Myeongjin
e6e346ea29 change string 'Close' to lowercase for dialog (#2366) 2016-04-14 23:03:14 +01:00
Myeongjin
c9b0e15201 add localisable strings for dialog 2016-03-28 16:24:55 +09:00
Jermolene
5cc1f2b313 Fix problem with search popup disappearing
This one took quite a lot of tracking down…

Fixes #2172
2016-01-03 18:05:08 +00:00
Jermolene
a204784c0c Limited implementation of external text tiddlers in the browser
Triggered by the discussion in #1917
2015-08-29 16:33:04 +01:00
Jermolene
86e901f375 Fix event handler leak for modals and notifications
Also add support for passing custom variables into notifications.

Fixes #1694
2015-05-06 08:07:12 +01:00
Jermolene
b7465c5eb1 Missed off 7c9976f1d9 2015-04-02 15:22:50 +01:00
Jermolene
7c9976f1d9 Partially revert to 5.1.7 scroll behaviour
We’re keeping the new logic that prevents unnecessary scrolling at
startup

Fixes #1543
2015-04-02 15:21:49 +01:00
Jermolene
421ac16389 Use inline parsing for header and footer of modals
This may cause backwards compatibility problems for people relying on
the block mode parsing, but it’s much better for the rest of us as it
avoids an unsightly paragraph tag
2015-03-18 11:41:10 +00:00
Jermolene
65d81921f9 Further fixes to scrolling behaviour 2015-02-25 20:24:07 +00:00
Jermolene
8d46c18fc7 Refine fix for #1526
The previous fix changed the scrolling behaviour such that it only
scrolled to the top of a tiddler if the tiddler was entirely offscreen.
It wasn’t entirely satisfactory because scrolling was prevented even if
only a few pixels of a tiddler are in view. This commit ensures that
the scroll does occur if less than 50 pixels of the target is in view
2015-02-25 19:09:53 +00:00
Jermolene
489bc7a50b Only scroll to top when tiddlers are completely off-screen
Fixes #1526
2015-02-25 19:01:40 +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
Felix Küppers
3b2882cb48 Update browser.js 2015-01-08 20:18:41 +01:00
Jermolene
755693766a Removing debugging statements from popup mechanism 2014-12-10 17:09:14 +00: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
b882a0dff1 Fixes to make nested popups work
Thus making the export button a lot more useful
2014-11-21 17:07:03 +00:00
Jermolene
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
0bb8e08edc Provisionally make tag pill foreground colour be responsive
With this commit tag pills will now choose for the foreground colour
either the current palette “foreground” or “background” colours,
according to which has the higher contrast. It’s something @gernert has
expressed an interest in in the past, and I’ve tended to agree that it
is a nice piece of polish. It opens up the possibility of paler colours
for tag pills than are currently possible.

The trouble is that in order to implement it I’ve had to bring in a
third party library for parsing CSS colours. It weighs in just over
9KB, making quite a lot of weight for such a small feature. I don’t see
any other immediate uses for the colour parsing library either.

So, I’m undecided at the moment whether this should stay in the core.
2014-11-06 13:35:48 +00:00
Jermolene
e2046ce4ff Treat HTTP 201 response code as success 2014-09-24 16:19:23 +02:00
Jermolene
f87ce7e98a Fix tiddler keyboard shortcuts
Maddeningly, I broke them in 5.0.16-beta…
2014-09-02 22:09:28 +01:00
Jermolene
b25351e834 Extend keyboard handling
To cope with the Mac’s “meta” key (ie command/⌘) preparatory to
trapping command-S
2014-09-02 10:41:48 +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
f223310d34 Yet more "tw-*" -> "tc-*"
Part of #764
2014-08-28 19:41:29 +01:00
Jermolene
787481a804 Change more "tw-*" classes to "tc-*"
Part of #764
2014-08-28 18:21:08 +01:00
Jermolene
54591100b5 Rename "modal-*" classes to "tc-modal-*"
Part of #764
2014-08-28 17:34:02 +01:00
Jermolene
d8c3691bd1 Removed unneeded CSS classes
Part of #764
2014-08-28 17:17:50 +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
5f018c2092 More defensive dom utility hasClass()
It was failing on SVG elements such as `<path>`
2014-07-28 14:19:52 +01:00
Jermolene
3351ae7e29 Fix issue with localStorage error on Firefox
Firefox raises an error if window.localStorage is accessed when cookies
are disabled:

https://bugzilla.mozilla.org/show_bug.cgi?id=771890
2014-07-06 10:11:21 +01:00
Jermolene
465f4ac469 Fix problem with refreshing modal dialogues
Previously any refreshing of the content of a modal would cause a
crash. The problem is the way that we steal the root widget for the
render trees used in the modal. The root widget is tied to the
container DOM node for the main content area, which isn’t actually a
parent of the modal DOM nodes, hence the confusion for the refresh
mechanism.
2014-07-04 21:07:35 +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
3cce12e13f More refactoring of startup.js 2014-05-05 14:41:46 +01:00
Jermolene
749582ede0 Split module loading into a separate startup task
Still a work in progress.
2014-05-03 17:10:55 +01:00
Jermolene
e366aa3746 Use Date.now() instead of new Date()
Just for when what we actually want is a millisecond counter.

Interesting video about this:

https://www.youtube.com/watch?v=Vo72W1HWeFI
2014-04-14 09:02:52 +01:00
Jermolene
535837e017 Use client bounding rect rather than offset positions for computing scroll positions 2014-03-24 22:31:03 +00:00
Jermolene
70a120d4a6 Expand the logging mechanism to support alerts overlaid on the main screen
Now we get decent visual indication of sync errors, for instance. Still
work to do to coalesce alerts so that the screen doesn’t fill up with
them after an interval. And probably we should add a button to clear
all alerts.
2014-02-14 07:53:41 +00:00
Jermolene
b26a32b93a Remove obsolete stylesheet helper 2014-02-08 09:29:11 +00:00
Jermolene
4882f70557 Clearer explanation of key descriptor syntax 2014-02-04 20:05:34 +00:00
Jermolene
e3a05625b2 Add experimental keyboard shortcut widget
It’s not cool that we have to use a separate keyboard widget for each
keyboard shortcut.

Fixes #386
2014-01-30 13:40:36 +00:00
Jermolene
b64b7982af Fix notification removal to not rely on transitionEnd events 2014-01-09 22:26:21 +00:00
Jermolene
e0f428b9b2 Fixed problem with Element.ELEMENT_NODE undefined on Safari 2014-01-04 15:15:12 +00:00
Jermolene
027421f5e6 More coding style consistency 2014-01-03 10:54:00 +00:00
Jermolene
b132e1023d Add error checking to $tw.utils.setStyle() 2014-01-02 19:00:46 +00:00
David Jade
7f5a8fc937 Better drag/drop for Firefox/Chrome and improved IE support 2013-12-20 19:57:05 -08:00
Jermolene
1c529ddcd4 Refactored stylesheet implementation
This way we reuse the refresh mechanism properly so that theme tweaks
can be applied interactively.
2013-12-20 15:31:16 +00:00
Jermolene
638c8b2070 Fixes to fullscreen support
Prompted by this article:

http://generatedcontent.org/post/70347573294/is-your-fullscreen-api-code
-up-to-date-find-out-how-to
2013-12-18 21:39:59 +00:00
Jermolene
06a66cf24e Improve popup dismissal
Now we ignore clicks if they come from an element that has an ancestor
with the class `tw-popup`
2013-11-12 22:02:26 +00:00
Jermolene
145e3ece78 Fix $tw.utils.hasClass() to work even if the element doesn't have a className property 2013-11-12 22:01:31 +00:00
Jeremy Ruston
cc0011abd3 Get rid of the "new_" prefix we had on some methods
There's still the "old_" prefix to get rid of too.
2013-11-08 08:51:14 +00:00
Jeremy Ruston
b7cb1d3391 Change new_widget to widget
I was avoiding doing this until after the merge.
2013-11-08 08:47:00 +00:00
Jeremy Ruston
31ae8910c6 Fix animation behaviour of reveal widget 2013-11-02 09:21:11 +00:00
Jeremy Ruston
6a6f6c7713 Restored animations for the reveal widget 2013-11-01 17:23:08 +00:00
Jeremy Ruston
05e73ee1da Cope with localStorage not being available
IE10 doesn't allow localStorage for HTML pages loaded from the file://
protocol.
Boo.
2013-10-29 22:21:25 +00:00
Jeremy Ruston
654f48b14d Fix problem with modal titles 2013-10-29 15:01:36 +00:00
Jeremy Ruston
14d7d5ea59 Use the new wiki.makeWidget() method where we can 2013-10-29 14:51:35 +00:00
Jeremy Ruston
f2ac04943f Fixed tag autocomplete popup on focus 2013-10-23 17:41:12 +01:00
Jeremy Ruston
2a571b4f5f Switch the notifier and modal mechanisms to use the new widget mechanism
Note the use of the `$tw.rootWidget` to collect together the root event
handlers
2013-10-21 20:14:01 +01:00
Jeremy Ruston
ce1fb300f8 Use the new widget mechanism for stylesheet parsing and rendering 2013-10-21 18:38:20 +01:00
Jeremy Ruston
94c2eacdc9 Support selectedClass properly in the button widget 2013-10-14 16:56:13 +01:00
Jeremy Ruston
4a663d1661 Improve docs for $tw.utils.addEventListeners() 2013-09-14 13:47:51 +01:00
Jeremy Ruston
e034f28091 Bail out earlier when displaying a modal for a non-existent tiddler 2013-09-10 15:28:15 +01:00
Jeremy Ruston
ee33cbbc2e Fix up some problems when the animation duration is zero
We want to be able to suppress animations by making the duration zero
2013-08-29 12:43:24 +01:00
Jeremy Ruston
fbfe5a26c5 Move the animation duration into a tiddler so that we can easily let it be adjusted in the control panel 2013-08-28 15:15:56 +01:00
Jeremy Ruston
53ead15273 Refactor scroller so that the scrollIntoView() method is a bit more usable
Passing an event instead of a DOM node was silly.
2013-07-08 15:15:53 +01:00
Jeremy Ruston
594f4ba204 Update animations to use a timer instead the transitionEnd event
Thr trouble is that the transitionEnd event doesn't fire under some
circumstances (eg if the animated element is hidden). So, it's more
reliable to use a timer instead
2013-07-06 12:57:37 +01:00
Jeremy Ruston
0edfc855b4 Replace obsolete content type 2013-06-27 10:19:38 +01:00
Jeremy Ruston
d6654c4a0b Fixed problem with not being able to manually scroll after navigating to a tiddler 2013-06-10 21:07:23 +01:00
Jeremy Ruston
3cda8758ae Refactor scrolling animation to use requestAnimationFrame() instead of setInterval() 2013-06-10 14:11:58 +01:00
Jeremy Ruston
2c8352c442 Update the popup manager to allow popup state to be forced, rather than toggled
We'll be needing this shortly
2013-06-09 19:24:21 +01:00
Jeremy Ruston
854a9d6d1c Toggle a style on the page container when a modal is displayed 2013-06-04 16:19:47 +01:00
Jeremy Ruston
a8b1da33de Improvements to slide animation 2013-05-28 16:47:16 +01:00
Jeremy Ruston
227cadd326 Add a barebones animation framework
The idea is to allow us to package animations/transitions into plugins
2013-05-28 16:28:16 +01:00
Jeremy Ruston
d19affc9c3 Fix problem with non-shadow stylesheets not being recognised at startup 2013-05-25 16:40:34 +01:00
Jeremy Ruston
3806168038 Fixed problem with non-shadow style tiddlers not being recognised 2013-05-18 16:59:24 +01:00
Jeremy Ruston
d8abc0e9e3 Fix up more document references 2013-05-17 17:37:39 +01:00
Jeremy Ruston
6e1cd46bc7 Fix document references 2013-05-17 17:29:43 +01:00
Jeremy Ruston
551ebdc005 Major refactoring of rendering mechanism
We now use a fake DOM implementation on the server to let us share more
rendering code between the text output vs. DOM output paths.
2013-05-17 10:12:25 +01:00
Jeremy Ruston
8564602256 Refactor rendertree to simplify context handling
Get rid of the separate renderContext stack and instead have a parent
pointer on renderer nodes. This lets us walk back up the render tree to
resolve context references
2013-05-15 17:32:17 +01:00
Jeremy Ruston
8796f312cb A different animation for hiding notifications
Only slightly different, but it seems to add visual interest
2013-05-08 13:27:04 +01:00
Jeremy Ruston
24db38c06b Add simple notification mechanism 2013-05-07 18:08:44 +01:00
Jeremy Ruston
152fb798eb Start responding to dynamic stylesheet changes
This mechanism will only be triggered by changes to the stylesheet
tiddlers themselves, and not to any dependencies that they might have.
It'll stay that way for a while.

The next thing is making the theme manager actually switch themes,
forcing the right wiki change events to make the stylesheet manager
update itself
2013-04-29 12:07:39 +01:00
Jeremy Ruston
069bb624e5 Fix popup removal 2013-03-19 16:44:32 +00:00
Jeremy Ruston
dbde2bf23b Started refactoring TiddlyWeb syncer into generic syncer + TiddlyWeb adaptor
The refactored plugin is `tiddlyweb2` for the moment. The idea is to be
able to use the same syncer with a different adaptor for syncing
changes to the local file system.
2013-03-17 15:28:49 +00:00
Jeremy Ruston
c3b57507b0 Refactored wiki event mechanism to support multiple event types 2013-03-16 10:42:46 +00:00
Jeremy Ruston
4c06bd72de Fix #59
Much more intelligent automatic scrolling
2013-03-03 20:06:23 +00:00
Jeremy Ruston
9cbee467cb Smaller titles for modal dialogs 2013-03-01 09:13:10 +00:00
Jeremy Ruston
6c4a2a6026 Fix modal dialogue to use inline parsing for header and footer 2013-02-10 18:44:00 +00:00
Jeremy Ruston
6584939114 Less confusing method name 2013-02-08 09:22:21 +00:00
Jeremy Ruston
5fd73a2b8d Remove obsolete modules
ArgParser was used by the old tw2 parser, and the Sprite animator was
never actually used
2013-02-08 09:22:02 +00:00
Jeremy Ruston
170c1425f7 Normalise custom event names 2013-02-04 15:29:25 +00:00
Jeremy Ruston
5755cd5d3f Make modal wizards work again 2013-01-03 17:06:14 +00:00
Jeremy Ruston
f8340bc4dc Improvements to reveal widget popup handling 2013-01-01 16:14:42 +00:00