Commit Graph

1395 Commits

Author SHA1 Message Date
Damien Elmes
072489f436 fix unicode error when generating latex 2017-08-06 13:03:32 +10:00
Damien Elmes
68d55239b4 rework fade in code
there were a number of issues with preloading:
- it could result in duplicate IDs in the document
- embedded styles failed to apply, because a preloaded item was
overriding them
- the type answer code needed rewriting to support it

so we're back to something closer to the old approach - a single node
that we fade out, update, and then fade in again. this means there's a
longer delay when revealing mathjax, but should minimize the breakage of
existing notes
2017-08-06 12:01:30 +10:00
Damien Elmes
797a7ea229 refactor editor focus handling
this fixes a bug where navigating to the next/previous card using
shortcut keys resulted in the first field being clobbered

- get rid of the stealFocus option in favour of explicitly passing
focusTo to setNote()
- setFields() is no longer responsible for setting focus
- add focusTo var to the browser so that the row changed hook can
restore focus when navigating to next/previous card
- fix the row changed hook being called twice
- the blur event now includes the field number instead of relying on the
 editor to have the correct currentField
- the current field is set to null on blur
- use deferred js and a callback rather than keeping track of when we
were loaded
- add shift+tab shortcut to go to previous field
2017-08-05 15:16:20 +10:00
Damien Elmes
96938e583a update browser toolbar to use delayed js 2017-08-05 13:47:48 +10:00
Damien Elmes
72868507c7 bundle mhchem 2017-08-05 12:47:07 +10:00
Damien Elmes
a56bddeb8d fix gifs failing to load
specifying max-height on img elements wasn't working when the parent
was an absolutely positioned element
2017-08-04 18:39:16 +10:00
Damien Elmes
d9b5d11312 fix conflicting add tags/jump to tags shortcuts 2017-08-04 17:39:40 +10:00
Damien Elmes
d656bff059 add contributor 2017-08-04 17:38:39 +10:00
Damien Elmes
37d3996be0 move height resizing to webview; remove onLoaded from toolbar/reviewer 2017-08-02 16:22:54 +10:00
Damien Elmes
538678a7a9 remove old comment 2017-08-02 16:18:09 +10:00
Damien Elmes
7d14a96889 automatically defer eval() calls until DOM loaded 2017-08-02 16:17:08 +10:00
Damien Elmes
321c4d7ff8 no longer need to hack around webengine stealing focus 2017-08-02 15:38:35 +10:00
Damien Elmes
9958dd57a4 remove superfluous lambda arg 2017-08-02 11:34:49 +10:00
Damien Elmes
61654ff70a skip useless focus preservation when navigating via preview screen 2017-08-01 17:46:08 +10:00
Damien Elmes
9ec9274011 fix fields being overwritten when dropping
remove the unneeded setFocus() call which was causing the blur event
to fire with the wrong data
2017-08-01 17:40:51 +10:00
Damien Elmes
66500f5262 move webview js into separate file 2017-08-01 17:04:55 +10:00
Damien Elmes
cd76281695 avoid errors caused by calling setHtml() before previous page loaded 2017-08-01 14:30:04 +10:00
Damien Elmes
0543a4533b add devMode flag to utils
also remove the extra toolbar call in loadProfile(), as we require a
restart to update the translations anyway
2017-08-01 14:28:13 +10:00
Damien Elmes
83c96770c8 fix latex tests 2017-08-01 14:25:49 +10:00
Damien Elmes
a5997e400b fix focus setting in resume screen 2017-08-01 13:57:15 +10:00
Damien Elmes
d2507899c2 bump version 2017-07-31 16:35:18 +10:00
Damien Elmes
d6c8c6e272 focus type answer area after it's appeared 2017-07-31 16:34:30 +10:00
Damien Elmes
412d37fc13 another workaround for the KDE accelerator issue 2017-07-31 15:48:34 +10:00
Damien Elmes
96c737f24f fix translations on Mac 2017-07-31 13:59:10 +10:00
Damien Elmes
8503ab29ab fix literal '\n' being inserted into card 2017-07-31 13:22:35 +10:00
Damien Elmes
b81a64272e allow browser override font to be unset 2017-07-29 16:09:00 +10:00
Damien Elmes
7405c1e7f1 don't force browser column font unless overriden 2017-07-29 16:00:02 +10:00
Damien Elmes
49e2d82aae fade next card in
- to minimize pop-in of images and mathjax, fade the previous card
out and fade the next card in
- render the answer at the same time as the question so it can be
shown immediately
- move reviewer css to separate file
- remove image preloading code that should no longer be necessary
2017-07-29 14:24:45 +10:00
Damien Elmes
d6a7cc0a51 bump version 2017-07-28 18:38:42 +10:00
Damien Elmes
8cd20f3352 turn latex svg into a note type option
needed until the other clients support svgs
2017-07-28 18:38:31 +10:00
Damien Elmes
608a5662a9 fix ampersands appearing in deck names
https://bugs.kde.org/show_bug.cgi?id=345023
2017-07-28 17:40:26 +10:00
Damien Elmes
44d0766cc5 fix some js lint 2017-07-28 16:48:49 +10:00
Damien Elmes
b8e306062b improve cloze and latex tag display in RTL environment
https://anki.tenderapp.com/discussions/ankidesktop/24292-mixed-arabic-and-english-words
2017-07-28 16:39:32 +10:00
Damien Elmes
7ad6966943 split js code out into separate files, mathjax improvements
- js code that was previously bundled in .py files is now in the
web folder
- add helpers to create links to bundled files, and update
stdHtml() to accept a list of javascript files to include
instead of text
- render MathJax in card layout and preview screens - these should be
updated in the future to update the document dynamically like the
reviewer does
- start media server earlier so it can be used to serve content for
the toolbar, etc
- work around a bug in WebEngine on Windows that could cause the
media server to hang
2017-07-28 16:35:45 +10:00
Damien Elmes
5ef1692c78 fix duplicate constructor call in editcurrent 2017-07-27 16:25:15 +10:00
Damien Elmes
fa3461e20b mathjax support 2017-07-27 14:18:10 +10:00
Damien Elmes
3d9d792dd4 bundle web folder 2017-07-27 12:28:44 +10:00
Damien Elmes
e7abd9f4ed fix crash when syncing media on windows
update() was being called when processing events, leading to
recursion until the stack was exhausted

https://anki.tenderapp.com/discussions/beta-testing/639-anki-210-beta4-crashing-during-syncing
2017-07-26 15:21:27 +10:00
Damien Elmes
94b1768ba8 use ctrl+delete for delete shortcut in both reviewer and browser 2017-07-26 10:52:04 +10:00
Damien Elmes
b1959e5c83 latex fixes
- fix the missing replacement tmp.%s
- use a zoom factor of 2 by default
- look for both png and svg files before creating
2017-07-22 12:36:31 +10:00
Damien Elmes
9cda9334d3 Merge pull request #112 from sigkell/master
Output SVG instead of PNG for LaTeX
2017-07-22 11:00:13 +10:00
Damien Elmes
cc71a542a4 fix qt version in readme.development 2017-07-22 10:54:55 +10:00
Damien Elmes
630cddc786 fix superscript shortcut
https://anki.tenderapp.com/discussions/beta-testing/627-anki-210-beta-1#comment_43048185
2017-07-22 10:54:45 +10:00
Damien Elmes
8a85471374 bump version 2017-07-20 12:17:59 +10:00
Damien Elmes
17bb179d06 experimental prewrap support
- add option to wrap html in implicit pre-wrap environment during
editing and review - defaults to off
- update paste filter to convert divs/Ps to newlines and non-breaking
spaces to normal ones
- catch enter key and write \n instead of creating a new div

also:

- remove extra caretToEnd() call that is no longer required
- add dd/dt/dl to allowed tags
2017-07-20 12:16:47 +10:00
Damien Elmes
f7b3457ff0 fix drawLinks reference 2017-07-17 14:54:12 +10:00
Damien Elmes
9df1947e41 require decorator 2017-07-17 13:18:56 +10:00
Damien Elmes
dffab1376f Merge branch 'master' of github.com:dae/anki 2017-07-17 13:16:06 +10:00
Damien Elmes
896889ad82 Merge pull request #191 from dequis/signature-preserving-decorator
Make hooks.wrap preserve signatures, fixes hooking some pyqt5 callbacks
2017-07-17 13:15:56 +10:00
Damien Elmes
7d351346ab Merge pull request #190 from ankitest/patch-12
Let users extend their bottom buttons functions
2017-07-17 13:14:03 +10:00