Repository: cloudstack Updated Branches: refs/heads/4.5 6df396c9c -> 3760fdeeb
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/3760fdee Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3760fdee Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3760fdee Branch: refs/heads/4.5 Commit: 3760fdeeb4a278600f30102dfa3f9e64752b724a Parents: 6df396c Author: Jessica Wang <[email protected]> Authored: Fri Oct 31 15:31:24 2014 -0700 Committer: Jessica Wang <[email protected]> Committed: Fri Oct 31 15:31:24 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/3760fdee/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')();
