mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-10-06 10:02:21 +02:00
Fix broken default values in widget browser
This commit is contained in:
parent
a0c0ddbfbe
commit
e38ab3715e
@ -163,25 +163,28 @@ widget_browser.prototype.create_attribute = function(name, settings)
|
|||||||
|
|
||||||
// Setter function - maybe editable?
|
// Setter function - maybe editable?
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var input = null;
|
||||||
switch(settings.type)
|
switch(settings.type)
|
||||||
{
|
{
|
||||||
case 'string':
|
case 'string':
|
||||||
value.append('<input/>')
|
input = $j('<input/>')
|
||||||
.change(function(e) {
|
.change(function(e) {
|
||||||
self.widget[set_function_name].apply(self.widget, [$j(e.target).val()]);
|
self.widget[set_function_name].apply(self.widget, [$j(e.target).val()]);
|
||||||
});
|
});
|
||||||
|
input.val(this.widget.options[name]);
|
||||||
break;
|
break;
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
value.append('<input type="checkbox"/>')
|
input = $j('<input type="checkbox"/>')
|
||||||
|
.attr("checked", this.widget.options[name])
|
||||||
.change(function(e) {
|
.change(function(e) {
|
||||||
self.widget[set_function_name].apply(self.widget, [$j(e.target).val()]);
|
self.widget[set_function_name].apply(self.widget, [e.target.checked]);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
value.text(this.widget.options[name]);
|
value.text(this.widget.options[name]);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
value.val(this.widget.options[name]);
|
input.appendTo(value)
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user