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
6295d0e4
Commit
6295d0e4
authored
Nov 18, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only query JIO if a page requires a portal_type to be queried
parent
354997b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
js/erp5_loader.js
js/erp5_loader.js
+10
-6
No files found.
js/erp5_loader.js
View file @
6295d0e4
...
...
@@ -338,7 +338,6 @@
}
// TODO: Make generic handler for this
if
(
item
[
property
]
===
""
)
{
console
.
log
(
"
ribbon
"
)
obj
.
ribbon
=
true
;
}
if
((
split
.
length
>
1
&&
window
.
location
.
host
!==
host
)
||
...
...
@@ -1759,7 +1758,6 @@
}
);
if
(
props
.
ribbon
)
{
console
.
log
(
"
ribbon
"
);
ribbon_wrap
=
factory
.
generateElement
(
"
span
"
,
{
"
className
"
:
"
ribbon-wrapper
"
}
...
...
@@ -3837,6 +3835,9 @@
// add validation to all forms
for
(
j
=
0
;
j
<
form_list
.
length
;
j
+=
1
)
{
form_element
=
form_list
[
j
];
// console.log("foo, we have a form")
//
// console.log(form_element);
if
(
form_element
.
getAttribute
(
"
data-bound
"
)
===
null
)
{
form_element
.
setAttribute
(
"
data-bound
"
,
true
);
...
...
@@ -3995,7 +3996,8 @@
if
(
reply
.
response
)
{
baggage
.
fields
=
util
.
parseIfNeeded
(
reply
.
response
);
}
if
(
baggage
.
create
!==
false
)
{
if
(
baggage
.
create
!==
false
&&
baggage
.
config
.
initial_query
)
{
return
init
.
testForSampleData
({
"
storage
"
:
"
items
"
,
"
type
"
:
baggage
.
type
,
...
...
@@ -4070,11 +4072,13 @@
}
else
{
baggage
.
state
=
{};
baggage
.
state
.
method
=
baggage
.
constructor
;
baggage
.
state
.
query
=
init
.
generateQueryObject
({},
baggage
.
type
);
if
(
baggage
.
config
.
initial_query
)
{
baggage
.
state
.
query
=
init
.
generateQueryObject
({},
baggage
.
type
);
}
}
// skip total for single item layouts!
// TODO: What if the first page should only contain an object?
if
(
baggage
.
layout_level
===
0
)
{
if
(
baggage
.
layout_level
===
0
&&
baggage
.
config
.
initial_query
)
{
return
util
.
fetchData
({
"
baggage
"
:
baggage
,
"
storage
"
:
"
items
"
,
...
...
@@ -4116,7 +4120,7 @@
);
}
// new item, no query!
if
(
baggage
.
mode
)
{
if
(
baggage
.
mode
||
baggage
.
config
.
initial_query
===
undefined
)
{
return
{
"
baggage
"
:
baggage
};
...
...
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