mirror of
https://github.com/ankitects/anki.git
synced 2025-11-14 08:37:11 -05:00
move remaining to middle; hide timer for now
This commit is contained in:
parent
da25e87ac4
commit
7909181f32
3 changed files with 13 additions and 8 deletions
|
|
@ -25,6 +25,7 @@ class Overview(object):
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
self._renderPage()
|
self._renderPage()
|
||||||
self._renderBottom()
|
self._renderBottom()
|
||||||
|
self.mw.web.setFocus()
|
||||||
|
|
||||||
# Handlers
|
# Handlers
|
||||||
############################################################
|
############################################################
|
||||||
|
|
@ -112,6 +113,7 @@ class Overview(object):
|
||||||
h3 { margin-bottom: 0; }
|
h3 { margin-bottom: 0; }
|
||||||
.fin { font-size: 12px; font-weight: normal; }
|
.fin { font-size: 12px; font-weight: normal; }
|
||||||
td { font-size: 14px; }
|
td { font-size: 14px; }
|
||||||
|
button { font-weight: bold; }
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Bottom area
|
# Bottom area
|
||||||
|
|
|
||||||
|
|
@ -361,11 +361,11 @@ padding-left: 5px; padding-right: 5px;
|
||||||
td { font-weight: bold; font-size: 12px; }
|
td { font-weight: bold; font-size: 12px; }
|
||||||
.hitem { margin-top: 2px; }
|
.hitem { margin-top: 2px; }
|
||||||
.stat { padding-top: 5px; }
|
.stat { padding-top: 5px; }
|
||||||
|
.stat2 { padding-top: 3px; font-weight: normal; }
|
||||||
.stattxt { padding-left: 5px; padding-right: 5px; white-space: nowrap; }
|
.stattxt { padding-left: 5px; padding-right: 5px; white-space: nowrap; }
|
||||||
.nobold { font-weight: normal; display: inline-block; padding-top: 3px; }
|
.nobold { font-weight: normal; display: inline-block; padding-top: 4px; }
|
||||||
.spacer { height: 18px; }
|
.spacer { height: 18px; }
|
||||||
.spacer2 { height: 16px; }
|
.spacer2 { height: 16px; }
|
||||||
button { font-weight: normal; }
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _bottomHTML(self, middle):
|
def _bottomHTML(self, middle):
|
||||||
|
|
@ -373,12 +373,12 @@ button { font-weight: normal; }
|
||||||
<table width=100%% cellspacing=0 cellpadding=0>
|
<table width=100%% cellspacing=0 cellpadding=0>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=left width=50 valign=top class=stat>
|
<td align=left width=50 valign=top class=stat>
|
||||||
<span class=stattxt>%(rem)s</span><br>
|
<br>
|
||||||
<button onclick="py.link('edit');">%(edit)s</button></td>
|
<button onclick="py.link('edit');">%(edit)s</button></td>
|
||||||
<td align=center valign=top>
|
<td align=center valign=top>
|
||||||
%(middle)s
|
%(middle)s
|
||||||
</td>
|
</td>
|
||||||
<td width=75 align=right valign=top class=stat><span id=time class=stattxt>
|
<td width=50 align=right valign=top class=stat><span id=time class=stattxt>
|
||||||
</span><br>
|
</span><br>
|
||||||
<button onclick="py.link('more');">%(more)s ▾</button>
|
<button onclick="py.link('more');">%(more)s ▾</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -393,6 +393,7 @@ setInterval(function () { time += 1; updateTime() }, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
var updateTime = function () {
|
var updateTime = function () {
|
||||||
|
return;
|
||||||
var m = Math.floor(time / 60);
|
var m = Math.floor(time / 60);
|
||||||
var s = time %% 60;
|
var s = time %% 60;
|
||||||
if (s < 10) {
|
if (s < 10) {
|
||||||
|
|
@ -408,10 +409,12 @@ var updateTime = function () {
|
||||||
def _showAnswerButton(self):
|
def _showAnswerButton(self):
|
||||||
self.bottom.web.setFocus()
|
self.bottom.web.setFocus()
|
||||||
middle = '''
|
middle = '''
|
||||||
<div class=spacer2></div>
|
<span class=stattxt>%s</span><br>
|
||||||
<button id=ansbut onclick='py.link(\"ans\");'>%s</button>''' % _("Show Answer")
|
<button id=ansbut onclick='py.link(\"ans\");'>%s</button>''' % (
|
||||||
|
self._remaining(), _("Show Answer"))
|
||||||
# wrap it in a table so it has the same top margin as the ease buttons
|
# wrap it in a table so it has the same top margin as the ease buttons
|
||||||
middle = "<table cellpadding=0><tr><td>%s</td></tr></table>" % middle
|
middle = "<table cellpadding=0><tr><td class=stat2 align=center>%s</td></tr></table>" % middle
|
||||||
|
|
||||||
self.bottom.web.stdHtml(
|
self.bottom.web.stdHtml(
|
||||||
self._bottomHTML(middle),
|
self._bottomHTML(middle),
|
||||||
self.bottom._css + self._bottomCSS)
|
self.bottom._css + self._bottomCSS)
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
font-weight: normal;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue