Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
4d5d4c93
Commit
4d5d4c93
authored
Jul 01, 2021
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Fix dynamic appstore website
See merge request
nexedi/erp5!1452
parents
f3c88876
326a4c9a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
...rp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
+3
-3
bt5/erp5_officejs_appstore_website/PathTemplateItem/web_page_module/store_officejs_js_erp5_loader_js.js
...eItem/web_page_module/store_officejs_js_erp5_loader_js.js
+12
-1
bt5/erp5_officejs_appstore_website/PathTemplateItem/web_page_module/store_officejs_js_erp5_loader_js.xml
...Item/web_page_module/store_officejs_js_erp5_loader_js.xml
+6
-4
No files found.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
View file @
4d5d4c93
...
@@ -3,7 +3,7 @@ from DateTime import DateTime
...
@@ -3,7 +3,7 @@ from DateTime import DateTime
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
preference_tool
=
portal
.
portal_preferences
preference_tool
=
portal
.
portal_preferences
software_product_list
=
portal
.
portal_catalog
(
portal_type
=
'Software Product'
,
validation_state
=
'validated'
)
software_product_list
=
portal
.
portal_catalog
(
portal_type
=
'Software Product'
,
validation_state
=
'validated'
,
sort_on
=
'creation_date'
)
appstore_data
=
[]
appstore_data
=
[]
logo_url_list
=
[]
logo_url_list
=
[]
i
=
0
i
=
0
...
@@ -31,8 +31,8 @@ for software_product in software_product_list:
...
@@ -31,8 +31,8 @@ for software_product in software_product_list:
"application_image_type"
:
'image'
,
"application_image_type"
:
'image'
,
"application_image_url"
:
logo
.
getReference
(),
"application_image_url"
:
logo
.
getReference
(),
"application_toc_accept"
:
'true'
,
"application_toc_accept"
:
'true'
,
"application_published"
:
'some_date'
,
"application_published"
:
web_section
.
getModificationDate
().
strftime
(
"%m/%d/%Y"
)
,
"application_submitted"
:
'other_date'
,
"application_submitted"
:
web_section
.
getModificationDate
().
strftime
(
"%m/%d/%Y"
)
,
"application_description"
:
data
[
"description"
]
if
"description"
in
data
else
data
[
"name"
],
"application_description"
:
data
[
"description"
]
if
"description"
in
data
else
data
[
"name"
],
"application_url"
:
"%s://%s.%s/"
%
(
preference_tool
.
getPreferredSystemAppstoreWildcardProtocol
(),
"application_url"
:
"%s://%s.%s/"
%
(
preference_tool
.
getPreferredSystemAppstoreWildcardProtocol
(),
app_domain
,
app_domain
,
...
...
bt5/erp5_officejs_appstore_website/PathTemplateItem/web_page_module/store_officejs_js_erp5_loader_js.js
View file @
4d5d4c93
...
@@ -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
};
};
})
})
...
...
bt5/erp5_officejs_appstore_website/PathTemplateItem/web_page_module/store_officejs_js_erp5_loader_js.xml
View file @
4d5d4c93
...
@@ -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>
9
70.31366.57108.55859
</string>
</value>
<value>
<string>
9
92.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>
1
537795617.18
</float>
<float>
1
624541145.81
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment