diff --git a/static/mysc_objects.js b/static/mysc_objects.js index e322a8a..00587c1 100644 --- a/static/mysc_objects.js +++ b/static/mysc_objects.js @@ -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,