From b3e070be084668b9ee17f9102ad8dbd3a63ee71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 20 Dec 2013 16:38:52 +0100 Subject: [PATCH] Feature #2570: Add a reset button to group wizard --- src/sunstone/public/js/plugins/groups-tab.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 510652124a..ad338c8279 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -161,6 +161,7 @@ var create_group_tmpl =
\
\ \ + \ \
\ \ @@ -346,7 +347,13 @@ var group_actions = { "Group.create" : { type: "create", call : OpenNebula.Group.create, - callback : addGroupElement, + callback : function (request,group_json){ + // Reset the create wizard + $create_group_dialog.empty(); + setupCreateGroupDialog(); + + addGroupElement(); + }, error : onError, notify: true }, @@ -961,6 +968,14 @@ function setupCreateGroupDialog(){ setupTips($create_group_dialog); + $('#create_group_reset_button').click(function(){ + $create_group_dialog.trigger('reveal:close'); + $create_group_dialog.remove(); + setupCreateGroupDialog(); + + popUpCreateGroupDialog(); + }); + setupCustomAuthDialog(dialog); $('input#name', dialog).change(function(){