[Kimchi-devel] [PATCH] Bugfix#527 Refresh "Edit Guest" after reverting a snapshot
Wen Wang
wenwang at linux.vnet.ibm.com
Fri Dec 12 09:48:52 UTC 2014
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 at 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({
+ url: 'guest-edit.html',
+ close: function() {
+ kimchi.clearGuestEdit();
+ }
+ });
}, function(data){
kimchi.message.error(data.responseJSON.reason);
$(".icon", item).addClass("hide");
--
1.9.3
More information about the Kimchi-devel
mailing list