Commit 326a4c9a authored by Roque's avatar Roque

erp5_officejs_appstore_website: render app urls

parent 18347abe
...@@ -4621,8 +4621,19 @@ ...@@ -4621,8 +4621,19 @@
"url": "data/" + parcel.type + "_sample.json" "url": "data/" + parcel.type + "_sample.json"
}) })
.then(function (e) { .then(function (e) {
var i, string_response,
app_list = JSON.parse(e.target.response),
site_tld = window.location.origin.split('.').pop();
// change all application urls TDL to current appstore site TDL
// e.g. if site is 'officejs.com' then all app urls will be '.com'
for (i = 0; i < app_list.length; i += 1) {
app_list[i].application_url = app_list[i].application_url.replace(
app_list[i].application_url.split('.').pop(), site_tld
);
}
string_response = JSON.stringify(app_list);
return { return {
"response": e.target.response, "response": string_response,
"baggage": parcel.baggage "baggage": parcel.baggage
}; };
}) })
......
...@@ -76,7 +76,9 @@ ...@@ -76,7 +76,9 @@
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/js</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
...@@ -221,7 +223,7 @@ ...@@ -221,7 +223,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>P1</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -235,7 +237,7 @@ ...@@ -235,7 +237,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>970.31366.57108.55859</string> </value> <value> <string>992.61706.2773.41130</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -253,7 +255,7 @@ ...@@ -253,7 +255,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1537795617.18</float> <float>1624541145.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment