diff options
| author | Julie Lala <jules@okfoc.us> | 2014-12-20 22:29:09 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-12-20 22:29:09 -0500 |
| commit | f6cd4aac9a8ea96df0c41618c3a83a0c8097acc4 (patch) | |
| tree | 1937c4d01732247c985c7856104d637ac30ab4a9 /js/tool.js | |
| parent | 6946255bb23b50e841a6684dc8950797d2a5dce6 (diff) | |
making more things textareas
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 + } }) |
