cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.2 to 5ca5cb1
Date Tue, 22 Oct 2013 18:20:43 GMT
Updated Branches:
  refs/heads/4.2 3b28f73be -> 5ca5cb190


CLOUDSTACK-4925: UI > dialog widget > extend isChecked property to take function type
(it takes only boolean type before this check-in).


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

Branch: refs/heads/4.2
Commit: 5ca5cb1903b5904f8fed18108bfab8b9c7bee863
Parents: 3b28f73
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Oct 22 11:19:23 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Oct 22 11:20:32 2013 -0700

----------------------------------------------------------------------
 ui/scripts/ui/dialog.js | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5ca5cb19/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 4bbaf9c..ff60865 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -368,11 +368,17 @@
                         });
 
                     } else {
-                        $input = $('<input>').attr({
-                            name: key,
-                            type: 'checkbox'
-                        }).appendTo($value);
-                        if (field.isChecked) {
+                    	$input = $('<input>').attr({
+                    	    name: key,
+                    	    type: 'checkbox'
+                    	}).appendTo($value);
+                    	var isChecked;
+                    	if (typeof (field.isChecked) == 'function') {
+                    	    isChecked = field.isChecked();
+                    	} else {
+                    	    isChecked = field.isChecked;
+                    	}
+                        if (isChecked) {
                             $input.attr('checked', 'checked');
                         } else {
                             // This is mainly for IE compatibility


Mime
View raw message