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
4a48f6ee
Commit
4a48f6ee
authored
Apr 16, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: fixed allow_new and loading pages without title
parent
7ea73355
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
js/erp5_loader.js
js/erp5_loader.js
+8
-10
No files found.
js/erp5_loader.js
View file @
4a48f6ee
...
...
@@ -3292,9 +3292,7 @@
**/
// TODO: allow to run multiple mappers eg formItem + tableRow
map
.
element
=
function
(
element
,
wrapper
,
i
)
{
console
.
log
(
element
)
if
(
wrapper
.
child_mapper
)
{
console
.
log
(
"
Child mapper...
"
);
if
(
element
.
scheme
)
{
// NOTE: chaining allows the mapper to make additional async requests!
return
map
[
wrapper
.
child_mapper
]({
...
...
@@ -3318,7 +3316,7 @@
})
.
fail
(
app
.
util
.
error
);
}
console
.
log
(
"
OUT
"
)
return
RSVP
.
resolve
(
wrapper
.
child_constructor
({
"
item
"
:
element
,
"
wrapper
"
:
wrapper
,
...
...
@@ -3403,9 +3401,7 @@
var
quirk_dict
,
section
,
pos
,
label
,
j
,
k
,
field
,
setter
,
record
,
new_item
,
id
,
key
,
obj
,
translation_fields
,
item
;
console
.
log
(
"
HELLO
"
)
console
.
log
(
spec
)
translation_fields
=
"
titletextlabel
"
;
translation_fields
=
"
titletextlabel
"
;
quirk_dict
=
spec
.
wrapper
.
property_dict
;
item
=
spec
.
item
;
record
=
item
.
doc
;
...
...
@@ -5056,9 +5052,11 @@
if
(
util
.
testForString
(
"
ui-header
"
,
header
.
className
))
{
title
=
header
.
getElementsByTagName
(
"
h1
"
)[
0
];
title
.
setAttribute
(
"
data-i18n
"
,
(
page_i18n
||
""
));
title
.
removeChild
(
title
.
childNodes
[
0
]);
title
.
appendChild
(
document
.
createTextNode
((
value
||
"
\
u00A0
"
)));
if
(
title
)
{
title
.
setAttribute
(
"
data-i18n
"
,
(
page_i18n
||
""
));
title
.
removeChild
(
title
.
childNodes
[
0
]);
title
.
appendChild
(
document
.
createTextNode
((
value
||
"
\
u00A0
"
)));
}
}
// also set document title
document
.
title
=
value
;
...
...
@@ -6149,7 +6147,7 @@
}
// no items, need no show! (default to empty {} if none provided
if
(
pointer_results
.
data
.
total_rows
===
0
)
{
if
(
quirk_dict
.
property_dict
.
allow_new
)
{
if
(
quirk_dict
.
allow_new
)
{
pointer_results
=
{
"
data
"
:
{
"
total_rows
"
:
1
,
"
rows
"
:
[{
"
doc
"
:
{}}]}};
}
else
{
quirk_dict
.
no_show
=
quirk_dict
.
no_items
||
{};
...
...
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