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

Bug #1161: Wrong calls to Image.[non]persistent

Persistency actions are of type "multiple", therefore they expect an array of elements. As only the ID string was passed, action was iterated for all the chars in the ID.
(cherry picked from commit c62c2d02972d268ed154e4ac655ad094a6076c83)
This commit is contained in:
Hector Sanjuan 2012-03-10 18:44:36 +01:00 committed by Ruben S. Montero
parent daf132eee4
commit 77355a68ac

View File

@ -988,8 +988,8 @@ function setupImageTemplateUpdateDialog(){
var old_persistent = is_persistent_image(id);
var new_persistent = $('#image_template_update_persistent',dialog).is(':checked');
if (old_persistent != new_persistent){
if (new_persistent) Sunstone.runAction("Image.persistent",id);
else Sunstone.runAction("Image.nonpersistent",id);
if (new_persistent) Sunstone.runAction("Image.persistent",[id]);
else Sunstone.runAction("Image.nonpersistent",[id]);
};
var permissions = $('.permissions_table',dialog);
@ -1067,9 +1067,9 @@ function setupImageActionCheckboxes(){
var $this = $(this)
var id=$this.attr('elem_id');
if ($this.attr('checked'))
Sunstone.runAction("Image.persistent",id);
Sunstone.runAction("Image.persistent",[id]);
else
Sunstone.runAction("Image.nonpersistent",id);
Sunstone.runAction("Image.nonpersistent",[id]);
return true;
});