this.render();
},
+ createInput: function(type, parent, name, selected) {
+ if(!$defined(parent))
+ parent = this.parentElement;
+
+ return qwebirc.util.createInput(type, parent, name, selected);
+ },
FE: function(element, parent) {
var n = new Element(element);
if(!$defined(parent))
qwebirc.config.TextInput = new Class({
Extends: qwebirc.config.Input,
render: function() {
- var i = this.FE("input");
+ var i = this.createInput("text");
this.mainElement = i;
- i.type = "text";
i.value = this.value;
this.parent();
qwebirc.config.CheckInput = new Class({
Extends: qwebirc.config.Input,
render: function() {
- var i = this.FE("input");
+ var i = this.createInput("checkbox");
this.mainElement = i;
- i.type = "checkbox";
i.checked = this.value;
this.parent();
for(var i=0;i<value.length;i++) {
var d = this.FE("div", this.parentObject);
- var e = this.FE("input", d);
+ var e = this.createInput("radio", d, "options_radio" + this.position, i == this.option.position);
this.elements.push(e);
- e.type = "radio";
- e.name = "options_radio" + this.position;
- if(i == this.option.position)
- e.checked = "1";
-
if(i == 0)
this.mainElement = e;
var r = FE("tr", tb);
var cella = FE("td", r);
var cellb = FE("td", r);
- var save = FE("input", r);
- save.type = "button";
+ var save = qwebirc.util.createInput("submit", cellb);
save.value = "Save";
save.addEvent("click", function() {
this.fireEvent("close");
}.bind(this));
- var cancel = FE("input", r);
- cancel.type = "button";
+ var cancel = qwebirc.util.createInput("submit", cellb);
cancel.value = "Cancel";
cancel.addEvent("click", function() {
this.fireEvent("close");
qwebirc.ui.DefaultOptionsClass = new Class({
Extends: qwebirc.ui.CookieOptions
});
-