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
b04b6a0fbe
commit
5795664bd2
|
|
@ -376,8 +376,14 @@
|
|||
name: key,
|
||||
type: 'checkbox'
|
||||
}).appendTo($value);
|
||||
if (field.isChecked) {
|
||||
$input.attr('checked', strOrFunc(field.isChecked));
|
||||
var isChecked;
|
||||
if (typeof (field.isChecked) == 'function') {
|
||||
isChecked = field.isChecked();
|
||||
} else {
|
||||
isChecked = field.isChecked;
|
||||
}
|
||||
if (isChecked) {
|
||||
$input.attr('checked', strOrFunc(field.isChecked));
|
||||
} else {
|
||||
// This is mainly for IE compatibility
|
||||
setTimeout(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue