Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
b7ab52b7
Commit
b7ab52b7
authored
May 07, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app/data: add external HTML file the ugly way...
parent
7d4abb2b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
1 deletion
+41
-1
data/global.json
data/global.json
+7
-0
data/subscription.json
data/subscription.json
+4
-0
js/erp5_loader.js
js/erp5_loader.js
+26
-1
lang/en-EN/dict.json
lang/en-EN/dict.json
+2
-0
lang/fr-FR/dict.json
lang/fr-FR/dict.json
+2
-0
No files found.
data/global.json
View file @
b7ab52b7
...
...
@@ -297,6 +297,13 @@
]
}
]
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"ui-btn ui-btn-inline ui-shadow ui-btn-icon-right translate center ui-icon-carat-r"
,
"href"
:
"#subscription/external"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.load_more"
}
}
]
},
...
...
data/subscription.json
View file @
b7ab52b7
...
...
@@ -33,6 +33,10 @@
}],
"validate_order"
:
[{
"href"
:
"validate_order"
}],
"external"
:
[{
"href"
:
"page_snippet.html"
,
"override"
:
true
}]
}
}
...
...
js/erp5_loader.js
View file @
b7ab52b7
...
...
@@ -6039,7 +6039,7 @@
**/
// TODO: change this to widget, state and status
app
.
content
.
set
=
function
(
content_dict
,
url_dict
,
create
)
{
var
pass
;
var
pass
,
is_html
,
is_href
;
// pack
pass
=
{
...
...
@@ -6049,10 +6049,35 @@
"
create
"
:
create
};
is_href
=
pass
.
url_dict
.
href
;
// waste of performance
if
(
is_href
)
{
is_html
=
is_href
.
split
(
"
.
"
).
length
>
1
&&
is_href
.
split
(
"
.
"
)[
1
]
===
"
html
"
;
}
// flag static content and skip loading config
pass
.
skip
=
!
pass
.
url_dict
.
href
&&
!
pass
.
content_dict
.
portal_type_source
;
pass
.
no_config
=
pass
.
skip
||
!!
pass
.
content_dict
.
portal_type_source
;
// HACK for Thierry
if
(
is_html
)
{
return
util
.
ajax
(
{
"
url
"
:
"
data/
"
+
pass
.
url_dict
.
href
}
).
then
(
function
(
e
)
{
// Don't look...
var
i
,
len
,
fragment
,
response
=
$
.
parseHTML
(
e
.
target
.
response
);
fragment
=
document
.
createDocumentFragment
();
for
(
i
=
0
,
len
=
response
.
length
;
i
<
len
;
i
+=
1
)
{
fragment
.
appendChild
(
response
[
i
]);
}
return
fragment
;
});
}
// and go
return
storage
.
fetchConfigAttachment
({
"
storage
"
:
app
.
storage_dict
.
settings
,
...
...
lang/en-EN/dict.json
View file @
b7ab52b7
{
"global_dict"
:
{
"load_more"
:
"Load more"
,
"external"
:
"Additional Content"
,
"subscription"
:
"Subscription"
,
"personal_data"
:
"Personal Data"
,
"home"
:
"bip&go"
,
...
...
lang/fr-FR/dict.json
View file @
b7ab52b7
{
"global_dict"
:
{
"load_more"
:
"Encore plus"
,
"external"
:
"A plus"
,
"subscription"
:
"Abonnement"
,
"personal_data"
:
"Données personnelles"
,
"home"
:
"bip&go"
,
...
...
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