226 'id' : wdgnode.getAttribute('cubicweb:inputid'), |
226 'id' : wdgnode.getAttribute('cubicweb:inputid'), |
227 'rows' : wdgnode.getAttribute('cubicweb:rows') || 40, |
227 'rows' : wdgnode.getAttribute('cubicweb:rows') || 40, |
228 'cols' : wdgnode.getAttribute('cubicweb:cols') || 80 |
228 'cols' : wdgnode.getAttribute('cubicweb:cols') || 80 |
229 }; |
229 }; |
230 // this.variableRegexp = /%\((\w+)\)s/; |
230 // this.variableRegexp = /%\((\w+)\)s/; |
231 this.parentnode = wdgnode; |
|
232 }, |
|
233 |
|
234 show : function(parentnode) { |
|
235 parentnode = parentnode || this.parentnode; |
|
236 this.errorField = DIV({'class' : "textfieldErrors"}); |
231 this.errorField = DIV({'class' : "textfieldErrors"}); |
237 this.textField = TEXTAREA(this.options); |
232 this.textField = TEXTAREA(this.options); |
238 connect(this.textField, 'onkeyup', this, this.highlightInvalidVariables); |
233 jQuery(this.textField).bind('keyup', {'self': this}, this.highlightInvalidVariables); |
239 appendChildNodes(parentnode, this.textField, this.errorField); |
234 wdgnode.appendChild(this.textField); |
240 appendChildNodes(parentnode, this.textField); |
235 wdgnode.appendChild(this.errorField); |
241 }, |
236 }, |
242 |
237 |
243 /* signal callbacks */ |
238 /* signal callbacks */ |
244 |
239 |
245 highlightInvalidVariables : function() { |
240 highlightInvalidVariables : function() { |