Skip to content

Commit 5ca5cb1

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 3b28f73 commit 5ca5cb1

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎ui/scripts/ui/dialog.js‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,17 @@
368368
});
369369

370370
} else {
371-
$input = $('<input>').attr({
372-
name: key,
373-
type: 'checkbox'
374-
}).appendTo($value);
375-
if (field.isChecked) {
371+
$input = $('<input>').attr({
372+
name: key,
373+
type: 'checkbox'
374+
}).appendTo($value);
375+
var isChecked;
376+
if (typeof (field.isChecked) == 'function') {
377+
isChecked = field.isChecked();
378+
} else {
379+
isChecked = field.isChecked;
380+
}
381+
if (isChecked) {
376382
$input.attr('checked', 'checked');
377383
} else {
378384
// This is mainly for IE compatibility

0 commit comments

Comments
 (0)