mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4925: UI > dialog widget > extend isChecked property to take function type (it takes only boolean type before this check-in).
This commit is contained in:
parent
3b28f73bea
commit
5ca5cb1903
|
|
@ -368,11 +368,17 @@
|
|||
});
|
||||
|
||||
} else {
|
||||
$input = $('<input>').attr({
|
||||
name: key,
|
||||
type: 'checkbox'
|
||||
}).appendTo($value);
|
||||
if (field.isChecked) {
|
||||
$input = $('<input>').attr({
|
||||
name: key,
|
||||
type: 'checkbox'
|
||||
}).appendTo($value);
|
||||
var isChecked;
|
||||
if (typeof (field.isChecked) == 'function') {
|
||||
isChecked = field.isChecked();
|
||||
} else {
|
||||
isChecked = field.isChecked;
|
||||
}
|
||||
if (isChecked) {
|
||||
$input.attr('checked', 'checked');
|
||||
} else {
|
||||
// This is mainly for IE compatibility
|
||||
|
|
|
|||
Loading…
Reference in New Issue