Fix reseting scase
This commit is contained in:
parent
942d39d755
commit
9694fafbcd
1 changed files with 6 additions and 4 deletions
|
@ -262,12 +262,9 @@ function SCase(uuid, name, data) {
|
||||||
this.reset = function () {
|
this.reset = function () {
|
||||||
this.cats.each(function (idx, cat) {
|
this.cats.each(function (idx, cat) {
|
||||||
for (idx in cat.things) {
|
for (idx in cat.things) {
|
||||||
if (cat.things[idx].checked) {
|
cat.things[idx].reset();
|
||||||
cat.things[idx].checked = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.lastChange = new Date().getTime();
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -586,6 +583,11 @@ function Thing(uuid, label, nb, checked) {
|
||||||
this.removed = data.removed || false;
|
this.removed = data.removed || false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.reset = function () {
|
||||||
|
this.checked = false;
|
||||||
|
this.lastChange = new Date().getTime();
|
||||||
|
};
|
||||||
|
|
||||||
this.export = function () {
|
this.export = function () {
|
||||||
return {
|
return {
|
||||||
uuid: this.uuid,
|
uuid: this.uuid,
|
||||||
|
|
Loading…
Reference in a new issue