Fix stats methods to handle removed cats/things
This commit is contained in:
parent
2f247b0d56
commit
801af67433
2 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# Date : 2017/09/17 - Version : 2
|
# Date : 2018/06/18 - Version : 1
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
|
|
@ -245,8 +245,14 @@ function SCase(uuid,name,data) {
|
||||||
var things=0;
|
var things=0;
|
||||||
var things_done=0;
|
var things_done=0;
|
||||||
this.cats.each(function(cidx,cat) {
|
this.cats.each(function(cidx,cat) {
|
||||||
|
if (cat.removed) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
cats++;
|
cats++;
|
||||||
for (idx in cat.things) {
|
for (idx in cat.things) {
|
||||||
|
if (cat.things[idx].removed) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
things++;
|
things++;
|
||||||
if (cat.things[idx].checked) {
|
if (cat.things[idx].checked) {
|
||||||
things_done++;
|
things_done++;
|
||||||
|
@ -472,6 +478,9 @@ function Cat(uuid,name,color,data) {
|
||||||
var count=0;
|
var count=0;
|
||||||
var done=0;
|
var done=0;
|
||||||
for (idx in this.things) {
|
for (idx in this.things) {
|
||||||
|
if (this.things[idx].removed) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (this.things[idx].checked) {
|
if (this.things[idx].checked) {
|
||||||
done+=1;
|
done+=1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue