From 1cca082ab0d6d210beaef52e63d811ec7291d054 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 15 Feb 2012 11:23:52 -0800 Subject: [PATCH] bug 13697: title in window.open() can't have space nor longer than 8 characters. Otherwise, IE browser will have error. [Reviewed-by: Brian] --- ui/scripts/instances.js | 4 ++-- ui/scripts/system.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index afe32b9d44e..816bd1d6f68 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1470,8 +1470,8 @@ url: function(args) { return clientConsoleUrl + '?cmd=access&vm=' + args.context.instances[0].id; }, - title: function(args) { - return "console" + args.context.instances[0].id; //can't have space in window name in window.open() + title: function(args) { + return args.context.instances[0].id.substr(0,8); //title in window.open() can't have space nor longer than 8 characters. Otherwise, IE browser will have error. }, width: 820, height: 640 diff --git a/ui/scripts/system.js b/ui/scripts/system.js index d2767e5b0e2..80d87520e85 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -2256,9 +2256,9 @@ url: function(args) { return clientConsoleUrl + '?cmd=access&vm=' + args.context.routers[0].id; }, - title: function(args) { - return "console"; //can't have space in window name in window.open() - }, + title: function(args) { + return args.context.routers[0].id.substr(0,8); //title in window.open() can't have space nor longer than 8 characters. Otherwise, IE browser will have error. + }, width: 820, height: 640 } @@ -3737,9 +3737,9 @@ url: function(args) { return clientConsoleUrl + '?cmd=access&vm=' + args.context.systemVMs[0].id; }, - title: function(args) { - return "console"; //can't have space in window name in window.open() - }, + title: function(args) { + return args.context.systemVMs[0].id.substr(0,8); //title in window.open() can't have space nor longer than 8 characters. Otherwise, IE browser will have error. + }, width: 820, height: 640 }