diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 395b061fd3..39b6a071ee 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -392,7 +392,7 @@ var user_actions = { call: OpenNebula.User.update, callback: function(request) { notifyMessage(tr("Template updated correctly")); - Sunstone.runAction('User.showinfo',request.request.data[0]); + Sunstone.runAction('User.showinfo',request.request.data[0][0]); }, error: onError }, diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index ceff34a373..ed1c2f3cf1 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -2705,6 +2705,19 @@ function insert_extended_template_table(template_json,resource_type,resource_id, } }); + // Capture the enter key + $('#new_value').live("keypress", function(e) { + var ev = e || window.event; + var key = ev.keyCode; + + if (key == 13 && !ev.altKey) + { + //Get the button the user wants to have clicked + $('#button_add_value', $(this).parent().parent()).click(); + ev.preventDefault(); + } + }) + // Listener for single values // Listener for key,value pair remove action