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
f5b23f1a
Commit
f5b23f1a
authored
Apr 15, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: allow display of empty record
parent
f335389e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
js/erp5_loader.js
js/erp5_loader.js
+5
-5
No files found.
js/erp5_loader.js
View file @
f5b23f1a
...
@@ -6129,10 +6129,6 @@
...
@@ -6129,10 +6129,6 @@
// dynamic content
// dynamic content
// TODO: 10 if-else...
// TODO: 10 if-else...
if
(
!
pass
.
skip
)
{
if
(
!
pass
.
skip
)
{
// set empty "record" to allow generation of empty form
if
(
pass
.
url_dict
.
mode
===
"
new
"
)
{
pointer_results
=
{
"
data
"
:
{
"
total_rows
"
:
1
,
"
rows
"
:
[{
"
doc
"
:
{}}]}};
}
// inherit item id, so it's available in form as indentifier
// inherit item id, so it's available in form as indentifier
if
(
pointer_results
.
data
.
total_rows
===
1
)
{
if
(
pointer_results
.
data
.
total_rows
===
1
)
{
...
@@ -6140,7 +6136,11 @@
...
@@ -6140,7 +6136,11 @@
}
}
// no items, need no show! (default to empty {} if none provided
// no items, need no show! (default to empty {} if none provided
if
(
pointer_results
.
data
.
total_rows
===
0
)
{
if
(
pointer_results
.
data
.
total_rows
===
0
)
{
quirk_dict
.
no_show
=
quirk_dict
.
no_items
||
{};
if
(
quirk_dict
.
property_dict
.
allow_new
)
{
pointer_results
=
{
"
data
"
:
{
"
total_rows
"
:
1
,
"
rows
"
:
[{
"
doc
"
:
{}}]}};
}
else
{
quirk_dict
.
no_show
=
quirk_dict
.
no_items
||
{};
}
}
}
// set up fragment and child_selector
// set up fragment and child_selector
if
(
quirk_dict
.
update
!==
true
)
{
if
(
quirk_dict
.
update
!==
true
)
{
...
...
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