Commit Graph

135 Commits (d6de021ae6eb3e2385630763f2f5daab2566a499)

Author SHA1 Message Date
Andrew Dolgov 660a1bbe01 * switch to xhr.post() almost everywhere
* call App.handlerpcjson() automatically on json request (if possible)
 * show net/log indicators in prefs
4 years ago
Andrew Dolgov 3d11c61f32 * OPML import: don't reload everything, just feed tree
* dialogs: use auto-destroying dialog for almost all dialogs instead of destroying them manually
* some general dialog-related cleanup
4 years ago
Andrew Dolgov 88027d7a39 fix various minor issues reported by eslint 5 years ago
Andrew Dolgov 9d28b3ac50 unify prefs/main App objects, remove fake classes, use single static App object instead 5 years ago
Andrew Dolgov 30ed5d7c3c same, but for preferences 5 years ago
Andrew Dolgov f24ece85a6 add validationtextarea control, use it for filter match editor 5 years ago
Andrew Dolgov 07f4878d59 workaround for a race condition between dojo.parse() and tt-rss loading proper day/night css on startup because of firefox async CSS loader 5 years ago
Andrew Dolgov 0d6add5d7f show alert() if fatal exception happens while initializing base app objects and app.error is not available 5 years ago
Andrew Dolgov 0237dee980 implement automatic night mode detection using MQL
add separate light.css to force light theme
remove manual night mode toggle and related code
5 years ago
Michael Kuhn e38fcd6dea Fix button focus issues
This change introduces derived classes for ComboButton, DropDownButton
and Select that make sure that buttons do not remain focused after their
menus are closed. This allows using hotkeys after closing them.
6 years ago
Michael Kuhn 4a2a90c980 Fix focus issues with hotkeys
Since making use of keypress in addition to keydown, hotkeys did not
work in certain scenarios, including clicking on the feed tree expanders
or empty spaces of the toolbar.

This issue is caused by dijit.Tree and dijit.Toolbar implementing the
_KeyNavMixin, which explicitly stops propagation of keypress events.

This change contains two main fixes plus a smaller hotfix:
1. It overrides _onContainerKeydown and _onContainerKeypress for
   fox.FeedTree (which inherits from dijit.Tree).
2. It adds fox.Toolbar, which overrides _onContainerKeydown,
   _onContainerKeypress and focus. This fixes hotkeys being swallowed
   and the first focusable child receiving focus when clicking on an
   empty space of the toolbar.
3. It adds the same handling of keydown and keypress to the prefs hotkey
   handler as is done in the main hotkey handler.
6 years ago
Michael Kuhn e74f7bde22 Refactor hotkeys to use keypress instead of keydown
keydown returns the "raw" key in event.which. Depending on the keyboard
layout, this may not be what is wanted. For example, on a German
keyboard, Shift+7 has to be pressed to get a slash. However, event.which
will be 55, which corresponds to "7". In the keypress event, however,
event.which will be 47, which corresponds to "/".

Sadly, several important keys (such as escape and the arrow keys) do not
trigger a keypress event. Therefore, they have to be handled using a
keydown event.

This change refactors the hotkey support to make use of keypress events
whenever possible. This will make hotkeys work regardless of the user's
keyboard layout. Escape and arrow keys are still handled via keydown
events.

There should be only one change in behavior: I could not make Ctrl+/
work and therefore rebound the help dialog to "?".
6 years ago
Andrew Dolgov 4db13b8a17 simplify preference layout, remove some unnecessary css classes 6 years ago
Andrew Dolgov 1c8593c1fa add hotkey (a N) to toggle night.css 6 years ago
Andrew Dolgov 85adef06f4 onkeydown handlers: fix default keyboard events not being blocked if necessary 6 years ago
Andrew Dolgov 71fc6d45bd refactor error reporting to AppBase; keep exception_error() for now as a shim 6 years ago
Andrew Dolgov 4d4034091a prefs: Prefs global -> Helpers 6 years ago
Andrew Dolgov b3bc638a9f refactor OPML export/import code to be less horrible 6 years ago
Andrew Dolgov 78cc470193 remove some plugin JS code out of global context 6 years ago
Andrew Dolgov 84affc7b1d rework dojo singleton modules to better work with phpstorm completion (ugh) - declare() is not needed there anyway
remove event.observe from login form (not needed)
load pluginhost via amd
6 years ago
Andrew Dolgov 5ead558e43 move Utils to AppBase where it belongs 6 years ago
Andrew Dolgov ac8361e6f6 add AppBase as a shared ancestor for main and prefs app objects
remove event.observe stuff from startup, unneeded
6 years ago
Andrew Dolgov 526389b2d3 update notify_* calls to use Notify 6 years ago
Andrew Dolgov f89924f7a1 set use strict on JS modules; remove some mostly useless stuff like get_minified_js() 6 years ago
Andrew Dolgov 807ff07454 split main objects to dojo modules 6 years ago
Andrew Dolgov fda3ad39c8 split several utility objects into separate dojo modules 6 years ago
Andrew Dolgov 35ded4bc84 edit phrasing of some alert()s 6 years ago
Andrew Dolgov 3a6dae9203 prefs: more of the same, really 6 years ago
Andrew Dolgov b9869dbc01 prefs: remove some more stuff from global context (user management, etc) 6 years ago
Andrew Dolgov 58e54282d3 prefs: move more global functions into matching classes 6 years ago
Andrew Dolgov f26d404890 prefs: move other tree-related functions to respective trees 6 years ago
Andrew Dolgov 60cd467694 embed some pref-feed helper functions into the tree 6 years ago
Andrew Dolgov 2e985d1733 move some label helper functions to prefLabelTree 6 years ago
Andrew Dolgov e23b6e397d prefs: store active tab for reload, remove most old table row functions 6 years ago
Andrew Dolgov aa2f119eb6 remove getSelectedTableRowIds (Tables.getSelected) 6 years ago
Andrew Dolgov 874560db54 remove obsolete row selection functions
move getUrlParam() to Utils
6 years ago
Andrew Dolgov da9f83c4ac filter dialog fixes 6 years ago
Andrew Dolgov 1e2d4410d3 move some more shared stuff to CommonDialogs, Filters, and Utils 6 years ago
Andrew Dolgov bc96eac2ac addLabel -> CommonDialogs 6 years ago
Andrew Dolgov de9509cd31 hotkeys: simplify prefix timeout handling 6 years ago
Andrew Dolgov cc26be0793 migrate tt-rss.js contents to App 6 years ago
Andrew Dolgov 642c37ea61 further effocts to wrap JS stuff into objects 6 years ago
Andrew Dolgov 4bed9be57d js-ification: start on some common dialogs 6 years ago
Andrew Dolgov 44d3aedd38 prefs: hotkey handler to App 6 years ago
Andrew Dolgov ff708a9357 prefs: initial objectification 6 years ago
Andrew Dolgov b9984c0ed6 revert wrong changes in prefs.js 6 years ago
Andrew Dolgov 049a37aa0e WIP reshuffling of JS global context into separate logical objects 6 years ago
Andrew Dolgov 195180b64d minor refactoring: normalize some function names; cleanup; etc 6 years ago
Andrew Dolgov 02ec3984bd replace 4 space indents with tabs 6 years ago
Andrew Dolgov da1a3c2cc5 remove ok = confirm() thing 6 years ago