somewhat update to jquery, not yet finished though tls-sprint
authorsylvain.thenault@logilab.fr
Thu, 09 Apr 2009 17:32:54 +0200
branchtls-sprint
changeset 1327 ed2dac034fee
parent 1326 1d389a6b99b1
child 1328 c050f9f8672e
somewhat update to jquery, not yet finished though
web/data/cubicweb.widgets.js
--- a/web/data/cubicweb.widgets.js	Thu Apr 09 16:42:37 2009 +0200
+++ b/web/data/cubicweb.widgets.js	Thu Apr 09 17:32:54 2009 +0200
@@ -228,16 +228,11 @@
 			'cols' : wdgnode.getAttribute('cubicweb:cols') || 80
 		       };
 	// this.variableRegexp = /%\((\w+)\)s/;
-	this.parentnode = wdgnode;
-    },
-
-    show : function(parentnode) {
-	parentnode = parentnode || this.parentnode;
 	this.errorField = DIV({'class' : "textfieldErrors"});
 	this.textField = TEXTAREA(this.options);
-	connect(this.textField, 'onkeyup', this, this.highlightInvalidVariables);
-	appendChildNodes(parentnode, this.textField, this.errorField);
-	appendChildNodes(parentnode, this.textField);
+	jQuery(this.textField).bind('keyup', {'self': this}, this.highlightInvalidVariables);
+	wdgnode.appendChild(this.textField);
+	wdgnode.appendChild(this.errorField);
     },
 
     /* signal callbacks */