From 7bde22559206974a6e24897a04b3e3b437cb0261 Mon Sep 17 00:00:00 2001 From: Mike Hatfield Date: Mon, 25 Jun 2007 11:41:51 +0000 Subject: [PATCH] Office Web Scripts - URL could be formed incorrectly on AJAX response git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6087 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/web/scripts/office/my_tasks.js | 6 ++++-- source/web/scripts/office/navigation.js | 3 ++- source/web/scripts/office/office_addin.js | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/web/scripts/office/my_tasks.js b/source/web/scripts/office/my_tasks.js index d63d896d86..623a27dffd 100644 --- a/source/web/scripts/office/my_tasks.js +++ b/source/web/scripts/office/my_tasks.js @@ -169,7 +169,8 @@ var OfficeMyTasks = if (successMessage != "") { var json = "{\"statusString\":\"" + successMessage + "\",\"statusCode\":true}"; - href += "&st=" + encodeURI(json); + href += (href.indexOf("?") == -1) ? "?" : "&"; + href += "st=" + encodeURI(json); } window.location.href = href; }, @@ -216,7 +217,8 @@ var OfficeMyTasks = // Optionally add a status string if (textResponse != "") { - href += "&st=" + encodeURI(textResponse); + href += (href.indexOf("?") == -1) ? "?" : "&"; + href += "st=" + encodeURI(textResponse); } window.location.href = href; } diff --git a/source/web/scripts/office/navigation.js b/source/web/scripts/office/navigation.js index 6b6b655757..c436725bda 100644 --- a/source/web/scripts/office/navigation.js +++ b/source/web/scripts/office/navigation.js @@ -183,7 +183,8 @@ var OfficeNavigation = // Optionally add a status string if (textResponse != "") { - href += "&st=" + encodeURI(textResponse); + href += (href.indexOf("?") == -1) ? "?" : "&"; + href += "st=" + encodeURI(textResponse); } window.location.href = href; } diff --git a/source/web/scripts/office/office_addin.js b/source/web/scripts/office/office_addin.js index ad43994ebc..9cf067b920 100644 --- a/source/web/scripts/office/office_addin.js +++ b/source/web/scripts/office/office_addin.js @@ -112,7 +112,8 @@ var OfficeAddin = // Optionally add a status string if (textResponse != "") { - href += "&st=" + encodeURI(textResponse); + href += (href.indexOf("?") == -1) ? "?" : "&"; + href += "st=" + encodeURI(textResponse); } window.location.href = href; }