mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
remove notes field from cloze
This commit is contained in:
parent
1800f30776
commit
f9ed0d657c
2 changed files with 3 additions and 7 deletions
|
|
@ -33,19 +33,17 @@ def addClozeModel(col):
|
||||||
m = mm.new(_("Cloze"))
|
m = mm.new(_("Cloze"))
|
||||||
fm = mm.newField(("Text"))
|
fm = mm.newField(("Text"))
|
||||||
mm.addField(m, fm)
|
mm.addField(m, fm)
|
||||||
fm = mm.newField(_("Notes"))
|
|
||||||
mm.addField(m, fm)
|
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
n = i+1
|
n = i+1
|
||||||
t = mm.newTemplate(_("Cloze") + " %d" % n)
|
t = mm.newTemplate(_("Cloze") + " %d" % n)
|
||||||
fmt = "{{cloze:%d:Text}}%%s" % n
|
fmt = "{{cloze:%d:Text}}" % n
|
||||||
t['css'] += """
|
t['css'] += """
|
||||||
.cloze {
|
.cloze {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: blue;
|
color: blue;
|
||||||
}"""
|
}"""
|
||||||
t['qfmt'] = fmt % ""
|
t['qfmt'] = fmt
|
||||||
t['afmt'] = fmt % "\n{{Notes}}"
|
t['afmt'] = fmt
|
||||||
mm.addTemplate(m, t)
|
mm.addTemplate(m, t)
|
||||||
mm.add(m)
|
mm.add(m)
|
||||||
return m
|
return m
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,4 @@ def test_modelChange():
|
||||||
deck.models.change(basic, [f.id], cloze, map, map)
|
deck.models.change(basic, [f.id], cloze, map, map)
|
||||||
f.load()
|
f.load()
|
||||||
assert f['Text'] == "f2"
|
assert f['Text'] == "f2"
|
||||||
assert f['Notes'] == "b2"
|
|
||||||
assert len(f.cards()) == 2
|
assert len(f.cards()) == 2
|
||||||
assert "b2" in f.cards()[0].a()
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue