Repository: cloudstack
Updated Branches:
  refs/heads/master 138366804 -> 21f39577e


CLOUDSTACK-7826: UI - dialog widget - dependent dropdown field (dependsOn 
property specified) - fix a bug that default opton in dependent dropdown field 
didn't trigger change event handler until another option in dependent dropdown 
field was selected.


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

Branch: refs/heads/master
Commit: 21f39577e439bd9a98bf8e9ffa0f0f7d329c5ce9
Parents: 1383668
Author: Jessica Wang <[email protected]>
Authored: Fri Oct 31 15:31:24 2014 -0700
Committer: Jessica Wang <[email protected]>
Committed: Fri Oct 31 15:33:07 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21f39577/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index f7946dc..332b78f 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -237,7 +237,10 @@
 
                             if (($target.is(':checked') && !isReverse) ||
                                 ($target.is(':unchecked') && isReverse)) {
-                                $dependent.css('display', 'inline-block');
+                                
+                               $dependent.css('display', 'inline-block'); 
//show dependent dropdown field
+                                $dependent.change(); //trigger event handler 
for default option in dependent dropdown field (CLOUDSTACK-7826)
+                                
                                 $dependent.each(function() {
                                     if ($(this).data('dialog-select-fn')) {
                                         $(this).data('dialog-select-fn')();

Reply via email to