Updated Branches: refs/heads/4.2 8319473ba -> f9fd13203 refs/heads/master d51fa1c06 -> 59e65e840
CLOUDSTACK-2864: Fix duplicate message on affinity group Fixes issue where text on affinity group step of instance wizard is duplicated, when going back a step and making changes. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f9fd1320 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f9fd1320 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f9fd1320 Branch: refs/heads/4.2 Commit: f9fd13203121fab498907fa43c11aca26ca58b4e Parents: 8319473 Author: Brian Federle <[email protected]> Authored: Fri Jul 12 12:04:57 2013 -0700 Committer: Brian Federle <[email protected]> Committed: Fri Jul 12 12:04:57 2013 -0700 ---------------------------------------------------------------------- ui/scripts/ui-custom/instanceWizard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9fd1320/ui/scripts/ui-custom/instanceWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index ea7acf8..31b4baa 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -489,7 +489,10 @@ 'affinity': function($step, formData) { return { response: { - success: function(args) { + success: function(args) { + // Cleanup + $step.find('.main-desc, p.no-affinity-groups').remove(); + if (args.data.affinityGroups && args.data.affinityGroups.length) { $step.prepend( $('<div>').addClass('main-desc').append( @@ -513,7 +516,9 @@ ) ); } else { - $step.find('.select-container').append($('<p>').html(_l('message.no.affinity.groups'))); + $step.find('.select-container').append( + $('<p>').addClass('no-affinity-groups').html(_l('message.no.affinity.groups')) + ); } } }
