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.cats.each(function (idx, cat) {
|
||||
for (idx in cat.things) {
|
||||
if (cat.things[idx].checked) {
|
||||
cat.things[idx].checked = false;
|
||||
}
|
||||
cat.things[idx].reset();
|
||||
}
|
||||
});
|
||||
this.lastChange = new Date().getTime();
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -586,6 +583,11 @@ function Thing(uuid, label, nb, checked) {
|
|||
this.removed = data.removed || false;
|
||||
};
|
||||
|
||||
this.reset = function () {
|
||||
this.checked = false;
|
||||
this.lastChange = new Date().getTime();
|
||||
};
|
||||
|
||||
this.export = function () {
|
||||
return {
|
||||
uuid: this.uuid,
|
||||
|
|
Loading…
Reference in a new issue