mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
card is a class not an id now
This commit is contained in:
parent
5c80708765
commit
a8b90ca6b0
3 changed files with 5 additions and 5 deletions
|
@ -156,7 +156,7 @@ Please create a new card first."""))
|
|||
def renderPreview(self):
|
||||
c = self.card
|
||||
styles = "\n.cloze { font-weight: bold; color: blue; }"
|
||||
html = '''<html><head>%s</head><body id=card>
|
||||
html = '''<html><head>%s</head><body class=card>
|
||||
<style>%s</style>%s</body></html>'''
|
||||
ti = self.maybeTextInput
|
||||
base = getBase(self.mw.col)
|
||||
|
|
|
@ -109,7 +109,7 @@ function _typeAnsPress() {
|
|||
def _initWeb(self):
|
||||
base = getBase(self.mw.col)
|
||||
self.web.stdHtml(self._revHtml, self._styles(),
|
||||
bodyID="card", loadCB=lambda x: self._showQuestion(),
|
||||
bodyClass="card", loadCB=lambda x: self._showQuestion(),
|
||||
head=base)
|
||||
|
||||
# Showing the question
|
||||
|
|
|
@ -79,14 +79,14 @@ class AnkiWebView(QWebView):
|
|||
def setHtml(self, html, loadCB=None):
|
||||
self._loadFinishedCB = loadCB
|
||||
QWebView.setHtml(self, html)
|
||||
def stdHtml(self, body, css="", bodyID="", loadCB=None, head=""):
|
||||
def stdHtml(self, body, css="", bodyClass="", loadCB=None, head=""):
|
||||
self.setHtml("""
|
||||
<html><head><style>%s</style>
|
||||
<script>%s</script>
|
||||
%s
|
||||
</head>
|
||||
<body id="%s">%s</body></html>""" % (
|
||||
css, anki.js.all, head, bodyID, body), loadCB)
|
||||
<body class="%s">%s</body></html>""" % (
|
||||
css, anki.js.all, head, bodyClass, body), loadCB)
|
||||
def setBridge(self, bridge):
|
||||
self._bridge.setBridge(bridge)
|
||||
def eval(self, js):
|
||||
|
|
Loading…
Reference in a new issue