From c8a43517c820b0ec56ff1d3c2d3b0bbfd9b8d250 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 29 Mar 2011 17:56:41 +0900 Subject: [PATCH] if no cards are due, show text instead of nothing --- aqt/overview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aqt/overview.py b/aqt/overview.py index 0f83c89d2..a9d5cc759 100644 --- a/aqt/overview.py +++ b/aqt/overview.py @@ -88,14 +88,14 @@ class Overview(object): $("#study").focus(); $(function () { var d = %(fcdata)s; - if (d) { + if (typeof(d) !== "string") { $.plot($("#placeholder"), [ { data: d, bars: { show: true, barWidth: 0.8 }, color: "#0c0" } ], { xaxis: { ticks: [[0.4, "Today"]] } }); } else { - $("#placeholder").hide(); + $("#placeholder").text(d); $(".sub").hide(); } }); @@ -160,7 +160,7 @@ $(function () { def _ovForecast(self): fc = self.mw.deck.sched.dueForecast(14) if not sum(fc): - return "''" + return "'%s'" % _('No cards due in next two weeks') return simplejson.dumps(tuple(enumerate(fc))) # Toolbar