mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
In extended templates in Sunstone, alt+enter creates a new line, enter submits changes
This commit is contained in:
parent
1afeae3868
commit
c780256979
@ -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
|
||||
},
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user