summaryrefslogtreecommitdiff
path: root/js/tool.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-12-20 22:29:09 -0500
committerJulie Lala <jules@okfoc.us>2014-12-20 22:29:09 -0500
commitf6cd4aac9a8ea96df0c41618c3a83a0c8097acc4 (patch)
tree1937c4d01732247c985c7856104d637ac30ab4a9 /js/tool.js
parent6946255bb23b50e841a6684dc8950797d2a5dce6 (diff)
making more things textareas
Diffstat (limited to 'js/tool.js')
-rw-r--r--js/tool.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/tool.js b/js/tool.js
index 190f29f..d3d40c1 100644
--- a/js/tool.js
+++ b/js/tool.js
@@ -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
+ }
})