Anki/proto/anki
Arthur Milchior efaaae8ce4
Cloze button get disabled outside of cloze field (#3879)
* NF: replace `disabled` by `enabled`

This allows to remove the negations and, in my opinion, make the code
easier to understand and edit.

* Cloze button get disabled outside of cloze field

More specifically, if the user focus in a field that is not a cloze
field, the button are still there but appear as disabled. The shortcut
instead of adding the cloze context shows an alert explaining why this
can't be done.

While this message is already displayed when the user tries to add a
note with cloze in non-cloze field, I suspect it will save time to
stop the user as soon as possible from making mistake. This should
make very clear what is authorized and what is not.

It'll also be a reminder of whether the current field is a cloze or
not.

In order to do this, I added a back-end method (that I expect we may
reuse in ankidroid) to get the index of the fields used in cloze. This
set is sent to the note editor, which propagates it where needed.

In mathjax, the cloze symbol is removed when the selected field is not
a cloze field.
2025-04-24 18:37:41 +10:00
..
ankidroid.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
ankihub.proto Integrate AnkiHub Sign-in (#3232) 2024-08-17 10:58:23 +07:00
ankiweb.proto Change Anki's version scheme; bump to 23.09 (#2640) 2023-09-07 12:37:15 +10:00
backend.proto Flag server messages so AnkiDroid can handle them separately 2024-11-08 22:54:15 +10:00
card_rendering.proto Modify card rendering output to specify if rendered card is empty (#3890) 2025-03-31 17:51:28 +07:00
cards.proto Remove unused proto import 2025-01-12 12:58:17 +11:00
collection.proto Refactor: Make Load Balancer Optional Throughout Codebase (#3860) 2025-03-26 23:19:28 +10:00
config.proto Feat/option to enable FSRS short-term scheduler when (re)learning steps run out && speed up features based on simulation (#3505) 2024-10-21 15:09:07 +10:00
deck_config.proto Feat/Ignored before card count (#3910) 2025-04-15 20:21:54 +10:00
decks.proto Add descending retrievability (#3559) 2024-11-08 22:53:13 +10:00
frontend.proto Deck options without bridge (#3571) 2025-01-08 21:30:30 +11:00
generic.proto Add java_multiple_files option to proto files 2022-06-27 15:16:04 +10:00
i18n.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
image_occlusion.proto Fix IO editor always starting in "hide all, guess one" mode (#3709) 2025-01-09 23:14:02 +11:00
import_export.proto Allow im-/exporting with or without deck configs (#2804) 2023-11-13 13:54:41 +10:00
links.proto Remove remaining remnants of unused error; fix CI 2024-11-19 15:26:02 +10:00
media.proto Add a backend method to extract static media references (#2716) 2023-10-11 14:10:02 +10:00
notes.proto Add a backend method to add notes in bulk (#2659) 2023-09-16 13:51:32 +10:00
notetypes.proto Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
scheduler.proto Feat/grade now (#3840) 2025-03-15 17:30:40 +07:00
search.proto Possible to show “last” subdeck name in Browser? (#3387) 2024-09-20 20:33:28 +10:00
stats.proto Apply gradient effect to forgetting curve (#3604) 2024-12-09 17:44:05 +11:00
sync.proto Add support for custom certificates (#3203) 2024-05-24 10:57:54 +01:00
tags.proto More service generation refactoring 2023-06-22 09:46:09 +10:00