From 77355a68ac7eec344b012cee0031ab8da123939f Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Sat, 10 Mar 2012 18:44:36 +0100 Subject: [PATCH] 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) --- src/sunstone/public/js/plugins/images-tab.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index 02e441da56..7834fed26a 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -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; });