
On 12/12/2014 07:48 AM, Wen Wang wrote:
Fix the issue that reverting a snapshot doesn't change the initial state of the dialog "Edit Guest" by refeshing the dialogue when finished.
Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com> --- ui/js/src/kimchi.guest_edit_main.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 4f497e5..aa953dc 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -30,9 +30,10 @@ kimchi.guest_edit_main = function() { if(display_list.indexOf($(deactivated).attr('id')) >= 0) { $(buttonContainer).removeClass('hidden'); } - } + }, + active: kimchi.snapshotIndex === "undefined" ? 0 : kimchi.snapshotIndex }); - + kimchi.snapshotIndex = "undefined"; var guestEditForm = $('#form-guest-edit-general'); var saveButton = $('#guest-edit-button-save'); var authType; @@ -564,6 +565,14 @@ kimchi.guest_edit_main = function() { $(".icon", item).addClass("hide"); $("button", "#form-guest-edit-snapshot").button("enable"); setCurrentSnapshot(item.prop("id")); + kimchi.snapshotIndex = $('#guest-edit-tabs').tabs("option", "active");
+ kimchi.window.close(); + kimchi.window.open({
It will blink the screen.
+ url: 'guest-edit.html', + close: function() { + kimchi.clearGuestEdit(); + } + });
}, function(data){ kimchi.message.error(data.responseJSON.reason); $(".icon", item).addClass("hide");