From c459697b4ce001815fd89dbd64c0debe42000336 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 18 Dec 2012 13:42:49 +0100 Subject: [PATCH] Fix confirmation message when deleting elements in Sunstone --- src/sunstone/public/js/sunstone.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index 01e5a9f4db..faa3c1940e 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -758,8 +758,15 @@ function popUpConfirmDialog(target_elem){ var value = $(target_elem).val(); var tab_id = $(target_elem).parents('.tab').attr('id'); var button = Sunstone.getButton(tab_id,value); - var tip = button.tip; + + if (button.tip == undefined) + var tip = tr("You have to confrim this action"); + else + var tip = button.tip + $('button#confirm_proceed',dialog).val(value); + + $('div#confirm_tip',dialog).text(tip); dialog.dialog("open"); } @@ -772,7 +779,12 @@ function popUpConfirmWithSelectDialog(target_elem){ var value = $(target_elem).val(); var tab_id = $(target_elem).parents('.tab').attr('id'); var button = Sunstone.getButton(tab_id,value); - var tip = button.tip; + + if (button.tip == undefined) + var tip = tr("You have to confrim this action"); + else + var tip = button.tip + var select_var = button.select(); $('select#confirm_select',dialog).html(select_var); $('div#confirm_with_select_tip',dialog).text(tip);