Skip to content

Commit 5795664

Browse files
author
Jessica Wang
committed
CLOUDSTACK-4925: UI > dialog widget > extend isChecked property to take function type (it takes only boolean type before this check-in).
1 parent b04b6a0 commit 5795664

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎ui/scripts/ui/dialog.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,14 @@
376376
name: key,
377377
type: 'checkbox'
378378
}).appendTo($value);
379-
if (field.isChecked) {
380-
$input.attr('checked', strOrFunc(field.isChecked));
379+
var isChecked;
380+
if (typeof (field.isChecked) == 'function') {
381+
isChecked = field.isChecked();
382+
} else {
383+
isChecked = field.isChecked;
384+
}
385+
if (isChecked) {
386+
$input.attr('checked', strOrFunc(field.isChecked));
381387
} else {
382388
// This is mainly for IE compatibility
383389
setTimeout(function() {

0 commit comments

Comments
 (0)