From 1c26c530034839e7e61ceb48d8b8a778f2a672d0 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan <hsanjuan@opennebula.org> Date: Fri, 1 Apr 2011 00:27:25 +0200 Subject: [PATCH] Fixes bug #554: Notify shows [object object] If the argument for an action is an object, do not add it to the notify notice. --- src/sunstone/public/js/sunstone-util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index 7a04bc0525..4908bdf907 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -164,7 +164,11 @@ function notifySubmit(action, args, extra_param){ var action_text = action.replace(/OpenNebula\./,'').replace(/\./,' '); var msg = "<h1>Submitted</h1>"; - msg += action_text + ": " + args; + if (typeof args == 'object'){ + msg += action_text; + } else { + msg += action_text + ": " + args; + } if (extra_param != null) msg += " >> " + extra_param;