Commit Graph

81 Commits

Author SHA1 Message Date
Henrik Giesel
b2b17f4c3d Recreate border-spacing with margins for #fields 2021-01-27 00:50:26 +01:00
Henrik Giesel
9b5d915983 Change nodeIsInline logic to be more typesafe 2021-01-26 23:49:48 +01:00
Henrik Giesel
feddf96f2a Change logic to detect inline elements, as the display style property may not be set after setting innerHTML 2021-01-26 23:42:04 +01:00
Henrik Giesel
520c4a3b4d Make #fields display correctly 2021-01-26 23:17:50 +01:00
Henrik Giesel
e481452114 Make fields div instead of table + implement fieldIsInInlineMode logic 2021-01-26 23:00:55 +01:00
Henrik Giesel
335267d42e Strip trailing newline if inline elements logic 2021-01-26 21:26:04 +01:00
Henrik Giesel
1df6c5f596 Avoid highlighting of toprightbuttons to shift the topbar 2021-01-22 12:53:45 +01:00
Henrik Giesel
9226d50185 Space items by using margins instead of spaces
* also changed name of topbutton container back to topbutsOuter as it is clearer
* starting with Chromium 83, `row-gap` would be better suited for this
2021-01-22 12:17:10 +01:00
Henrik Giesel
97f8f1b89e Switch from floating windows and clearfix to flex and justify-content: space-between 2021-01-22 11:37:11 +01:00
Henrik Giesel
1f4de7fe4b Adjust the positioning of the editor toolarea via CSS 2021-01-21 21:36:33 +01:00
Henrik Giesel
2946843b81 Remove image click event handler, as it never takes place
* className of fields will be "field clearfix", never just "field"
2021-01-21 20:50:17 +01:00
Henrik Giesel
e91a4b4362 Remove javascript resizing code from editor.ts 2021-01-21 19:59:16 +01:00
Henrik Giesel
6262997599 Explicitly execute code deactivating button focus from editor.py 2021-01-20 17:06:08 +01:00
Henrik Giesel
cfc8e34cf0 Remove jQuery from most top functions, and avoid waiting for jquery load 2021-01-19 03:52:46 +01:00
Henrik Giesel
5b24e5c522 Remove some unnecessary jQuery, replace some toggles with classList.toggle 2021-01-19 03:06:44 +01:00
Henrik Giesel
27a1e81088 Remove code which supposedly fixing focus, but which is not functional 2021-01-19 02:54:15 +01:00
Henrik Giesel
47d26126e7 Switch to iterables for elem.style and elem.attributes 2021-01-19 02:48:41 +01:00
Henrik Giesel
a4921a36dd Satisfy formatter 2021-01-19 01:08:15 +01:00
Henrik Giesel
4deeb798ca Prefer template string and addEventListener over string concatenation and .on<event> 2021-01-18 17:42:29 +01:00
Henrik Giesel
150de7a683 Use more strict TypeScript in editor.ts 2021-01-18 17:18:35 +01:00
Henrik Giesel
a898224d3d Switch to KeyboardEvent.code rather than KeyboardEvent.which, which is deprecated 2021-01-18 15:19:57 +01:00
Henrik Giesel
0db8a14497 Deal with div insertion on deleting list item 2021-01-15 18:46:37 +01:00
Henrik Giesel
4e1139021b Consider list edge case for line breaks
* Enter makes a new bullet point
* Shift+Enter makes a line break in current bullet point
2021-01-15 18:46:37 +01:00
Henrik Giesel
5c6694950d Prefer <br> over <div></div> 2021-01-15 18:46:37 +01:00
Henrik Giesel
fe118197a3 Improve styling of new preview button on light and nightMode 2021-01-09 23:55:39 +01:00
Henrik Giesel
ece753991e Make button show its toggle state 2021-01-09 23:16:01 +01:00
Damien Elmes
5ec5a47708 merge separate vendor rules into single rule
Rather than creating a separate rule for each package, we can just
create a generic one and reuse it. Also switch to keyword arguments
in the resulting macros, as it's easier to read.
2021-01-02 11:14:00 +10:00
Henrik Giesel
450ff60815 Fix input type for _drawFlag 2021-01-01 14:14:50 +01:00
Henrik Giesel
f31b2312df Remove browsersel 2020-12-31 16:48:04 +01:00
Henrik Giesel
ebb8171021 Add css-browser-selector to BAZEL build file in data/web/js/vendor 2020-12-31 16:41:31 +01:00
Henrik Giesel
4da27afba8 Remove hardcoded protobufjs 2020-12-31 16:17:46 +01:00
Henrik Giesel
2ba944640d Add build recipe to aqt/data/web/js 2020-12-31 16:15:25 +01:00
Damien Elmes
3d7b167947
Merge pull request #878 from hgiesel/updateQueue
Replace `_updatingQA` with promise-based `_updatingQueue`
2020-12-31 12:42:58 +10:00
Henrik Giesel
a7f17732b0 Replace () => void | Promise<void> with Callback typedef 2020-12-30 16:04:59 +01:00
Henrik Giesel
c6c52e06b4 Add types to reviewer.ts 2020-12-30 15:06:22 +01:00
Henrik Giesel
aaa30a5d49 Replace _updatingQa synchronization with promise-based _updatingQueue 2020-12-30 14:45:27 +01:00
Henrik Giesel
30b537c6e9 Put loads first in BUILD.bazel 2020-12-30 12:16:59 +01:00
Henrik Giesel
5f149a75a9 Remove jquery-ui from vendor folder 2020-12-30 12:12:49 +01:00
Henrik Giesel
a22d303e2f Add jquery-ui to vendor/BUILD.bazel 2020-12-30 12:06:06 +01:00
Damien Elmes
9e1eaacc06 Revert "Merge pull request #873 from hgiesel/otherjsdeps"
This reverts commit 62600051ae, reversing
changes made to 88553acb0d.

- Standard graphs render incorrectly on latest version - the wrong number
of days are shown, and the grid lines look wrong. Any version after 0.8.3
seems to suffer from this problem.
- Pie graphs and stack graphs don't render - they are provided in separate
files, and plot.js in previous Anki versions has them included in the one
file. To maintain compatibility with add-ons, we'd need to create a single
file as before, instead of importing multiple files.

If the above issues are fixed I'd be happy to merge this in again, but
as the old graphs are on the way out, it's probably not worth the effort.
2020-12-30 14:13:52 +10:00
Damien Elmes
1ee08c049e
Merge pull request #874 from hgiesel/jqueryreview
Update _updateQa
2020-12-30 13:51:54 +10:00
Henrik Giesel
ff4780e005 Satisfy prettier 2020-12-29 14:45:20 +01:00
Henrik Giesel
7ef41ce573 Hook functions may also return void 2020-12-29 14:01:09 +01:00
Henrik Giesel
8f39c746d9 Replace ts-ignore with declare var 2020-12-29 13:43:47 +01:00
Henrik Giesel
53f77346d8 Fix typing of reviewer hooks 2020-12-29 13:42:30 +01:00
Henrik Giesel
ecdb06cbd6 Use async/await syntax in _updateQa 2020-12-29 13:34:39 +01:00
Henrik Giesel
f90b6b3430 Remove plot.js 2020-12-29 12:16:50 +01:00
Henrik Giesel
ef9b52f861 Copy flot file to vendor directory 2020-12-29 12:11:28 +01:00
Henrik Giesel
98407c3fea Avoid building jquery to its own directory 2020-12-28 14:18:07 +01:00
Henrik Giesel
0c95cb3514 Remove jquery from Anki repo and replace with Bazel BUILD 2020-12-28 13:16:12 +01:00