[hamster-applet] adding back grand total
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] adding back grand total
- Date: Sun, 7 Nov 2010 22:53:28 +0000 (UTC)
commit 691d658446d5b62aae207cf8c6f4cda66e0c9697
Author: Toms Bauģis <toms baugis gmail com>
Date: Sun Nov 7 22:52:58 2010 +0000
adding back grand total
data/report_template.html | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/data/report_template.html b/data/report_template.html
index 5e09779..a3896a1 100644
--- a/data/report_template.html
+++ b/data/report_template.html
@@ -98,7 +98,7 @@
border-top-right-radius: 2px;
}
- .duration {
+ #grand_total {
color: #999;
}
@@ -114,6 +114,10 @@
#date_facts tr:td {
padding-left: 24px;
}
+
+ p.template-instructions {
+ margin-top: 2em;
+ }
</style>
<style type="text/css" media="print">
@@ -193,6 +197,7 @@
list[key] += value;
}
+ var grandTotal = 0;
for (var i=0; i < facts.length; i++) {
var fact = facts[i];
@@ -203,8 +208,15 @@
for (var j=0; j < fact.tags.length; j++) {
add(tagTotals, fact.tags[j], fact.delta)
}
+
+ grandTotal += fact.delta;
}
+ grandTotal = Math.round(grandTotal / 60 / 60 * 10) / 10;
+ $("#grand_total").text("(" + grandTotal + ")");
+
+
+
showChart($("#category_chart"), categoryTotals)
showChart($("#activity_chart"), activityTotals)
showChart($("#tag_chart"), tagTotals)
@@ -335,7 +347,7 @@
<body>
<div id="content">
- <h1>$title <span class="duration">($grand_total)</span></h1>
+ <h1>$title <span id="grand_total"></span></h1>
<div id="date_chart"></div>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]