You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/09/29 21:59:19 UTC

git commit: updated refs/heads/master to ef4b5d4

Repository: cloudstack
Updated Branches:
  refs/heads/master 055fdd504 -> ef4b5d41b


CLOUDSTACK-7647: Fix 'isReverse' checkboxes which are checked by default


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ef4b5d41
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ef4b5d41
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ef4b5d41

Branch: refs/heads/master
Commit: ef4b5d41b7dd9ba16afd04c7716bada4a4721f79
Parents: 055fdd5
Author: Brian Federle <br...@citrix.com>
Authored: Mon Sep 29 12:58:40 2014 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Sep 29 12:58:40 2014 -0700

----------------------------------------------------------------------
 ui/scripts/ui/dialog.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef4b5d41/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 950d596..2bd0797 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -225,8 +225,11 @@
                     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 +263,10 @@
                         // Show fields by default if it is reverse checkbox
                         if (isReverse) {
                             $dependsOn.click();
+
+                            if (isChecked) {
+                                $dependsOn.attr('checked', true);
+                            }
                         }
                     }
                 }