summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-07-29 12:27:13 -0400
committerGökay ŞATIR <gokaysatir@gmail.com>2022-09-29 10:28:18 +0300
commitb991e6a0174cd9f38efa411bf5030f01550a3d15 (patch)
treedc00c886f1bbc8a0b861ddf45bb9079a589429fd
parentwsd: add optional parameter buy_product (diff)
downloadonline-b991e6a0174cd9f38efa411bf5030f01550a3d15.tar.gz
online-b991e6a0174cd9f38efa411bf5030f01550a3d15.zip
wsd: add buyProductURL
Change-Id: I5ca0a84e7a927496bfe0b314967a2b11b20bd60d Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--browser/html/cool.html.m41
-rw-r--r--browser/src/control/Control.Infobar.js2
-rw-r--r--wsd/FileServer.cpp1
3 files changed, 3 insertions, 1 deletions
diff --git a/browser/html/cool.html.m4 b/browser/html/cool.html.m4
index b9ebe871d8..895feefe1d 100644
--- a/browser/html/cool.html.m4
+++ b/browser/html/cool.html.m4
@@ -16,6 +16,7 @@ m4_define(_YEAR_,m4_esyscmd(date +%Y|tr -d '\n'))
m4_dnl# Define MOBILEAPP as true if this is either for the iOS app or for the gtk+ "app" testbed
window.welcomeUrl = '%WELCOME_URL%';
window.feedbackUrl = '%FEEDBACK_URL%';
+ window.buyProductUrl = '%BUYPRODUCT_URL%';
m4_define([MOBILEAPP],[])
m4_ifelse(IOSAPP,[true],[m4_define([MOBILEAPP],[true])])
m4_ifelse(GTKAPP,[true],[m4_define([MOBILEAPP],[true])])
diff --git a/browser/src/control/Control.Infobar.js b/browser/src/control/Control.Infobar.js
index f2abad69e4..59c27f6665 100644
--- a/browser/src/control/Control.Infobar.js
+++ b/browser/src/control/Control.Infobar.js
@@ -14,7 +14,7 @@ L.Control.Infobar = L.Control.extend({
return;
var product = function () {
- var integratorUrl = encodeURIComponent('http://192.168.0.1/fakebuy.html');
+ var integratorUrl = encodeURIComponent(window.buyProductUrl);
var productUrl = window.feedbackUrl;
productUrl = productUrl.substring(0, productUrl.lastIndexOf('/')) +
'/product.html?integrator='+ integratorUrl;
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 75917363da..69da792003 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -1058,6 +1058,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
}
Poco::replaceInPlace(preprocess, std::string("%FEEDBACK_URL%"), std::string(FEEDBACK_URL));
Poco::replaceInPlace(preprocess, std::string("%WELCOME_URL%"), std::string(WELCOME_URL));
+ Poco::replaceInPlace(preprocess, std::string("%BUYPRODUCT_URL%"), buyProduct);
const std::string mimeType = "text/html";