mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
load the summary by default
it was much slower in benchmarks, but that was due to a problem in libanki
This commit is contained in:
parent
0a4efd018f
commit
19af7ef67e
1 changed files with 4 additions and 6 deletions
|
@ -24,9 +24,7 @@ _body = """
|
||||||
%s
|
%s
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<div id="today">
|
%s
|
||||||
</div>
|
|
||||||
<a href="#" onClick="py.run('full');">show today's stats</a>
|
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -62,7 +60,7 @@ class DeckBrowser(object):
|
||||||
buf = ""
|
buf = ""
|
||||||
for c, deck in enumerate(self._decks):
|
for c, deck in enumerate(self._decks):
|
||||||
buf += self._deckRow(c, deck)
|
buf += self._deckRow(c, deck)
|
||||||
self.web.stdHtml(_body%(_("Decks"), buf), _css)
|
self.web.stdHtml(_body%(_("Decks"), buf, self._summary()), _css)
|
||||||
else:
|
else:
|
||||||
buf = ("""\
|
buf = ("""\
|
||||||
<br>
|
<br>
|
||||||
|
@ -177,7 +175,7 @@ later by using File>Close.
|
||||||
# self.moreMenus.append(moreMenu)
|
# self.moreMenus.append(moreMenu)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def onFull(self):
|
def _summary(self):
|
||||||
# summarize
|
# summarize
|
||||||
reps = 0
|
reps = 0
|
||||||
mins = 0
|
mins = 0
|
||||||
|
@ -203,7 +201,7 @@ later by using File>Close.
|
||||||
new = ngettext("<b>%d</b> new card", "<b>%d</b> new cards", newC) % newC
|
new = ngettext("<b>%d</b> new card", "<b>%d</b> new cards", newC) % newC
|
||||||
line2 = _("Due: %(rev)s, %(new)s") % {
|
line2 = _("Due: %(rev)s, %(new)s") % {
|
||||||
'rev': rev, 'new': new}
|
'rev': rev, 'new': new}
|
||||||
return self.web.eval("$('#today').html('%s');" % (line1+"<br>"+line2))
|
return line1+'<br>'+line2
|
||||||
|
|
||||||
def _checkDecks(self, forget=False):
|
def _checkDecks(self, forget=False):
|
||||||
self._decks = []
|
self._decks = []
|
||||||
|
|
Loading…
Reference in a new issue