mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
if no cards are due, show text instead of nothing
This commit is contained in:
parent
7283aba0dd
commit
c8a43517c8
1 changed files with 3 additions and 3 deletions
|
@ -88,14 +88,14 @@ class Overview(object):
|
||||||
$("#study").focus();
|
$("#study").focus();
|
||||||
$(function () {
|
$(function () {
|
||||||
var d = %(fcdata)s;
|
var d = %(fcdata)s;
|
||||||
if (d) {
|
if (typeof(d) !== "string") {
|
||||||
$.plot($("#placeholder"), [
|
$.plot($("#placeholder"), [
|
||||||
{ data: d, bars: { show: true, barWidth: 0.8 }, color: "#0c0" }
|
{ data: d, bars: { show: true, barWidth: 0.8 }, color: "#0c0" }
|
||||||
], {
|
], {
|
||||||
xaxis: { ticks: [[0.4, "Today"]] }
|
xaxis: { ticks: [[0.4, "Today"]] }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#placeholder").hide();
|
$("#placeholder").text(d);
|
||||||
$(".sub").hide();
|
$(".sub").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -160,7 +160,7 @@ $(function () {
|
||||||
def _ovForecast(self):
|
def _ovForecast(self):
|
||||||
fc = self.mw.deck.sched.dueForecast(14)
|
fc = self.mw.deck.sched.dueForecast(14)
|
||||||
if not sum(fc):
|
if not sum(fc):
|
||||||
return "''"
|
return "'%s'" % _('No cards due in next two weeks')
|
||||||
return simplejson.dumps(tuple(enumerate(fc)))
|
return simplejson.dumps(tuple(enumerate(fc)))
|
||||||
|
|
||||||
# Toolbar
|
# Toolbar
|
||||||
|
|
Loading…
Reference in a new issue