Repository: cloudstack Updated Branches: refs/heads/master fe1a53b0e -> 9c56b3d4d
Undo "Revert "CLOUDSTACK-7647" This reverts commit 38bd1b934ef770e8a2993c8f42b3fff03484f266. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9c56b3d4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9c56b3d4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9c56b3d4 Branch: refs/heads/master Commit: 9c56b3d4db045163ffc3b5efb5f2c067c13eb57d Parents: fe1a53b Author: Brian Federle <[email protected]> Authored: Tue Sep 30 15:03:10 2014 -0700 Committer: Brian Federle <[email protected]> Committed: Tue Sep 30 15:05:49 2014 -0700 ---------------------------------------------------------------------- ui/scripts/ui/dialog.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9c56b3d4/ui/scripts/ui/dialog.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 950d596..f7946dc 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -223,10 +223,12 @@ }); if ($dependsOn.is('[type=checkbox]')) { - var isReverse = false; - if (args.form.fields[dependsOn]) + + if (args.form.fields[dependsOn]) { isReverse = args.form.fields[dependsOn].isReverse; + isChecked = args.form.fields[dependsOn].isChecked; + } // Checkbox $dependsOn.bind('click', function(event) { @@ -260,6 +262,10 @@ // Show fields by default if it is reverse checkbox if (isReverse) { $dependsOn.click(); + + if (isChecked) { + $dependsOn.attr('checked', true); + } } } }
