fix type answer preview in answer area

This commit is contained in:
Damien Elmes 2012-05-14 05:29:55 +09:00
parent 9345397859
commit c79f273931

View file

@ -209,7 +209,7 @@ Please create a new card type first."""))
ti(mungeQA(c.q(reload=True))), self.mw.reviewer._styles(), ti(mungeQA(c.q(reload=True))), self.mw.reviewer._styles(),
bodyClass="card card%d" % (c.ord+1), head=base) bodyClass="card card%d" % (c.ord+1), head=base)
self.tab['pform'].backWeb.stdHtml( self.tab['pform'].backWeb.stdHtml(
ti(mungeQA(c.a())), self.mw.reviewer._styles(), ti(mungeQA(c.a()), type='a'), self.mw.reviewer._styles(),
bodyClass="card card%d" % (c.ord+1), head=base) bodyClass="card card%d" % (c.ord+1), head=base)
clearAudioQueue() clearAudioQueue()
if c.id not in self.playedAudio: if c.id not in self.playedAudio:
@ -219,10 +219,11 @@ Please create a new card type first."""))
def maybeTextInput(self, txt, type='q'): def maybeTextInput(self, txt, type='q'):
if type == 'q': if type == 'q':
repl = "<center><input type=text value='%s'></center>" % _( repl = "<center><input type=text size=30 value='%s'></center>" % _(
"(text is typed in here)") "(text is typed in here)")
else: else:
repl = _("(typing comparison appears here)") repl = _("(typing comparison appears here)")
repl = "<font size=2>%s</font>" % repl
return re.sub("\[\[type:.+?\]\]", repl, txt) return re.sub("\[\[type:.+?\]\]", repl, txt)
# Card operations # Card operations