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/11/18 00:15:07 UTC
git commit: updated refs/heads/master to bfe53d1
Repository: cloudstack
Updated Branches:
refs/heads/master e712ac78d -> bfe53d1b2
VM wizard: Add 'showStep' event
For UI plugin development, allow moving though VM wizard steps via
custom event hook, cloudStack.instanceWizard.showStep (attached to
wizard DOM object), passing the specified target step index
Example:
$wizard.trigger('cloudStack.instanceWizard.showStep', {
index: 2 // Show step 2 of wizard
refresh: true // (Optional) Force refresh of step if data loaded
});
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bfe53d1b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bfe53d1b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bfe53d1b
Branch: refs/heads/master
Commit: bfe53d1b2b32525f2adaa08b0d70d92a709e6545
Parents: e712ac7
Author: Brian Federle <br...@citrix.com>
Authored: Mon Nov 17 15:12:19 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Nov 17 15:14:51 2014 -0800
----------------------------------------------------------------------
ui/scripts/ui-custom/instanceWizard.js | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfe53d1b/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index 527dc10..e8f0c45 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -1004,6 +1004,10 @@
}
};
+ $wizard.bind('cloudStack.instanceWizard.showStep', function(e, args) {
+ showStep(args.index, { refresh: true });
+ });
+
// Go to specified step in wizard,
// updating nav items and diagram
var showStep = function(index, options) {
@@ -1020,6 +1024,10 @@
var stepID = $targetStep.attr('wizard-step-id');
var formData = cloudStack.serializeForm($form);
+ if (options.refresh) {
+ $targetStep.removeClass('loaded');
+ }
+
if (!$targetStep.hasClass('loaded')) {
// Remove previous content
if (!$targetStep.hasClass('review')) { // Review row content is not autogenerated