diff options
Diffstat (limited to 'js/tool.js')
| -rw-r--r-- | js/tool.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -21,4 +21,14 @@ var Tool = Model({ }) var Checkbox = Tool.extend({ + init: function (span){ + this.__init(span) + var state = this.name[0] == "x" + this.name = this.name.replace(/^[x_] /,"") + this.update(state) + }, + update: function(state){ + if (state) this.el.innerHTML = "x " + this.name + else this.el.innerHTML = "_ " + this.name + } }) |
