1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #2589: Show Image and Template ID when a new resource is created

This commit is contained in:
Daniel Molina 2014-01-21 17:52:54 +01:00
parent d6d74909b0
commit 32169fba66
3 changed files with 9 additions and 4 deletions

View File

@ -347,9 +347,9 @@ var image_actions = {
callback: function(request, response){
addImageElement(request, response);
$create_image_dialog.trigger("reveal:close")
notifyCustom(tr("Image created "), "ID: " + response.IMAGE.ID, false)
},
error: onError,
notify:true
error: onError
},
"Image.create_dialog" : {

View File

@ -315,9 +315,9 @@ var template_actions = {
$create_template_dialog.trigger("reveal:close")
$create_template_dialog.empty();
addTemplateElement(request, response);
notifyCustom(tr("Template created "), "ID: " + response.VMTEMPLATE.ID, false)
},
error: onError,
notify:true
error: onError
},
"Template.create_dialog" : {

View File

@ -336,6 +336,11 @@ function notifyMessage(msg){
$.jGrowl(msg, {theme: "jGrowl-notify-submit", position: "bottom-right"});
}
function notifyCustom(title, msg, sticky) {
msg = "<h1>" + title + "</h1>" + msg;
$.jGrowl(msg, {theme: "jGrowl-notify-submit", position: "bottom-right", sticky: sticky });
}
// Returns an HTML string with the json keys and values
// Attempts to css format output, giving different values to
// margins etc. according to depth level etc.